Zdravim.
jeste se jednou vratim k dekoratorum. Zkousel jsem property pres
dekorator a nejak se mi nedari. Nevite nekdo v cem je chyba ?

class a:
    @property
    def rad():
        def fget(self):
            print 'get'
            return 1
        def fset(self,val):
            print 'set',val

x=a()
print x.rad

a pak neco jako...
Traceback (most recent call last):
  File "<input>", line 1, in <module>
TypeError: rad() takes no arguments (1 given)

  
Diky Mirek.

_______________________________________________
Python mailing list
[email protected]
http://www.py.cz/mailman/listinfo/python

Odpovedet emailem