can a method access/set another's variables?
Alex Martelli
aleax at mac.com
Mon Apr 2 01:04:12 EDT 2007
asdf1234234 <wswilson at gmail.com> wrote:
> My code is:
> -a.py-
> import b
>
> class A:
> def __init__(self):
> pass
Incidentally, these last two lines are totally, utterly useless. Do NOT
define special methods like this -- just omit the whole def statement
and you'll have identical semantics, no wasted boilerplate, even better
performance.
Alex
More information about the Python-list
mailing list