Issue1225107
Created on 2005-06-21 20:20 by jkloth, last changed 2009-01-17 22:28 by benjamin.peterson.
|
msg60765 - (view) |
Author: Jeremy Kloth (jkloth) |
Date: 2005-06-21 20:20 |
|
inspect.isclass() can return True for instances of classes
which define a __getattr__ method. For example:
>>> class Namespace(unicode):
... def __getattr__(self, attr):
... return '<%s>' % (self + attr)
...
>>> inspect.isclass(Namespace('foo'))
True
Changing inspect.isclass() to:
return isinstance(object, (types.ClassType, type))
solves this issue.
The check for __bases__ is no longer need due to
type/class unification.
|
|
msg80054 - (view) |
Author: Benjamin Peterson (benjamin.peterson) |
Date: 2009-01-17 22:28 |
|
Finally fixed in r68676.
|
|
| Date |
User |
Action |
Args |
| 2009-01-17 22:28:08 | benjamin.peterson | set | status: open -> closed resolution: fixed messages:
+ msg80054 nosy:
+ benjamin.peterson |
| 2005-06-21 20:20:01 | jkloth | create | |
|