Message74648
| Author | Antoine d'Otreppe |
|---|---|
| Recipients | Antoine d'Otreppe |
| Date | 2008-10-10.21:35:35 |
| SpamBayes Score | 0.00050218485 |
| Marked as misclassified | No |
| Message-id | <1223674536.22.0.160836227089.issue4104@psf.upfronthosting.co.za> |
| In-reply-to |
| Content | |
|---|---|
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...>
^
--- |
|
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2008-10-10 21:35:36 | Antoine d'Otreppe | set | recipients: + Antoine d'Otreppe |
| 2008-10-10 21:35:36 | Antoine d'Otreppe | set | messageid: <1223674536.22.0.160836227089.issue4104@psf.upfronthosting.co.za> |
| 2008-10-10 21:35:35 | Antoine d'Otreppe | link | issue4104 messages |
| 2008-10-10 21:35:35 | Antoine d'Otreppe | create | |