Inheriting the @ sign from Ruby
Moshe Zadka
moshez at zadka.site.co.il
Tue Dec 12 10:17:32 EST 2000
On Tue, 12 Dec 2000, Roy Katz <katz at Glue.umd.edu> wrote:
> Why not bind @ to the first argument of method definitions? Consider:
>
>
> class X:
>
> def __init__( self, x ):
>
> @bind(x) # binds to 'self', because
> # 'self' is the first argument to __init__
>
> def bind(myself, x):
> @x = x # equivalent to myself.x
If you're requiring the "@" anyway, why not write the self. and be
maximally obvious?
Explicit is better then implicit.
--
Moshe Zadka <sig at zadka.site.co.il>
This is a signature anti-virus.
Please stop the spread of signature viruses!
More information about the Python-list
mailing list