Message159351
| Author |
thread13 |
| Recipients |
thread13 |
| Date |
2012年04月26日.02:53:35 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1335408816.14.0.0332999907924.issue14671@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
$python
Python 2.6.5 (r265:79063, Apr 16 2010, 13:09:56)
[GCC 4.4.3] on linux2
>>> class Old: pass
>>> class New(object): pass
>>> o = Old()
>>> n = New()
>>> isinstance(o, object)
True
This is it, basically. Is it a bug or a feature?
More tests :
>>> isinstance(o, Old)
True
>>> isinstance(o, New)
False
>>> isinstance(n, Old)
False
>>> isinstance(o, int)
False
Please note that some unimportant output was deleted from above.
PS. If this is a feature, how do I detect an old-style class then ? |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2012年04月26日 02:53:36 | thread13 | set | recipients:
+ thread13 |
| 2012年04月26日 02:53:36 | thread13 | set | messageid: <1335408816.14.0.0332999907924.issue14671@psf.upfronthosting.co.za> |
| 2012年04月26日 02:53:35 | thread13 | link | issue14671 messages |
| 2012年04月26日 02:53:35 | thread13 | create |
|