Can "self" crush itself?

Terry Reedy tjreedy at udel.edu
Wed Nov 25 20:09:25 EST 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