strange behavor....

Roel Schroeven rschroev_nospam_ml at fastmail.fm
Sun Nov 14 21:44:45 CET 2010


Op 2010-11-14 21:23, Steve Holden schreef:
> What method of a does the statement
> 
>     a = something
> 
> call? I ask in genuine ignorance, and in the knowledge that you may
> indeed be able to point me to such a method.

It wouldn't call a method of a. I'm not an expert in these matters, but
I would think it would call a method in a's namespace. For example, if
'a' lives in module 'foo', I would think that

a = something # from within module foo

and

foo.a = something # outside of module foo

are equivalent.

But chances are my conceptions are wrong.


-- 
The saddest aspect of life right now is that science gathers knowledge
faster than society gathers wisdom.
  -- Isaac Asimov

Roel Schroeven



More information about the Python-list mailing list