[TransWarp] Sorry: tut.pdf bug!

Phillip J. Eby pje at telecommunity.com
Wed Sep 17 12:25:18 EDT 2003


At 03:54 PM 9/17/03 +0200, Eckhard Jost wrote:
>Sorry the bug is in the following code:
>
>from peak.api import binding
>
>class Car:
>     passengers=binding.New(dict, attrName='passengers')
>
>aCar=Car()
>print aCar.passengers
>
> > ... I got the following:
> >
> > Traceback (most recent call last):
> >   File "peak-test.py", line 3, in ?
> >     class Car:
> >   File "peak-test.py", line 4, in Car
> >     passengers=binding.New(dict, attrName='passengers')
> > TypeError: New() got an unexpected keyword argument 'attrName'

The current tutorial is for PEAK 0.5a3, or to be precise, the current CVS 
version.  In 0.5a2, I believe 'New' took the attribute name only as a 
positional argument, i.e. 'passengers=binding.New(dict, 
"passengers")'.  But I could be wrong; it's been too many months ago for me.  :)




More information about the PEAK mailing list