[PEAK] Passing Keyword Arguments - Intermittent errors
Tim Parkin
info at timparkin.co.uk
Wed Sep 17 15:34:48 EDT 2008
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 at 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'
More information about the PEAK
mailing list