Can "self" crush itself?

Terry Reedy tjreedy at udel.edu
Thu Nov 26 02:09:25 CET 2009


n00m wrote:
>> Or just raise an exception in __init__(),..
> 
> Then we are forced to handle this exception outside of class code.
> It's Ok. Never mind.
> --------------------
> 
> Next thing.
> I can't understand why we can get __name__, but not __dict__,
> on the module level?
> 
> 
> print __name__
> print __dict__

If the global namespace contained itself, as a dict, there would be an 
infinite loop.




More information about the Python-list mailing list