Passing Keyword Arguments - Intermittent errors

Tim Parkin <[email protected]>
Newsgroups gmane.comp.python.peak
Message-ID <[email protected]>
I'm seeing errors on multiple systems but not consistently  - I can't
see a pattern though. Here is an example (that sometimes works)

(py)tim@eliot:~$ python
Python 2.5.2 (r252:60911, Apr 21 2008, 11:12:42)
[GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from peak.rules import *
>>> @abstract
... def func(x, **k): pass
...
>>> @when(func,(str,))
... def fstr(x,**k): print x,k
...
>>> func('x', s='7')
Traceback (most recent call last):
 File "<stdin>", line 1, in <module>
 File "<stdin>", line 1, in func
 File "<stdin>", line 1, in func
TypeError: callback() got an unexpected keyword argument 's'
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.