Can "self" crush itself?

n00m n00m at narod.ru
Wed Nov 25 19:56:07 EST 2009


> 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__


>>> ===================================== RESTART ====
>>>
__main__

Traceback (most recent call last):
  File "D:\Python25\zewrt.py", line 19, in <module>
    print __dict__
NameError: name '__dict__' is not defined




More information about the Python-list mailing list