Message159358
| Author |
georg.brandl |
| Recipients |
benjamin.peterson, georg.brandl, thread13 |
| Date |
2012年04月26日.06:00:10 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1335420010.9.0.418298693688.issue14671@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
This is a result of how old-style classes are implemented.
If you look at type(Old()), you can see that it isn't Old, but "instance".
(And "instance" is a subclass of object again.)
"issubclass" for old-style classes doesn't check type(o) but o.__class__, which are different: the former is "instance" and the latter your class. That is one reason we removed old-style classes in Python 3... |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2012年04月26日 06:00:10 | georg.brandl | set | recipients:
+ georg.brandl, benjamin.peterson, thread13 |
| 2012年04月26日 06:00:10 | georg.brandl | set | messageid: <1335420010.9.0.418298693688.issue14671@psf.upfronthosting.co.za> |
| 2012年04月26日 06:00:10 | georg.brandl | link | issue14671 messages |
| 2012年04月26日 06:00:10 | georg.brandl | create |
|