New submission from Antoine d'Otreppe <[EMAIL PROTECTED]>:

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...>
                  ^
---

----------
components: Interpreter Core
messages: 74648
nosy: Antoine d'Otreppe
severity: normal
status: open
title: Namespace inconsistency
type: feature request
versions: Python 2.5

_______________________________________
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue4104>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to