Message 74648 - Python tracker
Hello
See the following code and comments for explanation ;) (Try it with
interactive mode)
---
>>> class A:
... class B:
... pass
>>> A
<class __main__.A at 0x...>
>>> A.B
<class __main__.B at 0x...>
>>> B
NameError: B is not defined
---
This seems to be inconsistent, as Python represents A.B as __main__.B,
but B is not accessable from __main__
Maybe this could be better:
---
>>> A.B
<class __main__.A.B at 0x...>
^
---