[TransWarp] read tutorial...

Vladimir Bormotov bor at vb.dn.ua
Sun Mar 2 14:21:07 EST 2003


                Hi!
                
   2.2.1 Binding fundamental

ws:~$ python
Python 2.2.2 (#1, Feb 13 2003, 13:34:47) 
[GCC 2.96 20000731 (ASPLinux 7.3 2.96-113)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from peak.api import binding 
>>> class Car:
...   passengers = binding.New(dict, 'passengers')
... 
>>> aCar = Car()
>>> print aCar.passengers
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
AttributeError: Car instance has no attribute 'passengers'
>>> dir(aCar)
['__doc__', '__module__', 'passengers']


 whats wrong?
   
   
-- 
		Bor.



More information about the PEAK mailing list