type(type) is an object, not an instance
Greg Ewing (using news.cis.dfn.de)
me at privacy.net
Tue Mar 18 22:34:38 EST 2003
Sip wrote:
> I don't know if this can be called a bug, but type(type) is the type
> object, not an instance of it
Actually, it's both! It's an instance of itself:
Python 2.2 (#1, Jul 11 2002, 14:19:37)
[GCC 3.0.4] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> isinstance(type, type)
1
--
Greg Ewing, Computer Science Dept,
University of Canterbury,
Christchurch, New Zealand
http://www.cosc.canterbury.ac.nz/~greg
More information about the Python-list
mailing list