def rad(self):

On 11/8/06, mtip <[EMAIL PROTECTED]> wrote:
> 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
>


-- 
Rules of Optimization:
Rule 1: Don't do it.
Rule 2 (for experts only): Don't do it yet.
_______________________________________________
Python mailing list
[email protected]
http://www.py.cz/mailman/listinfo/python

Odpovedet emailem