python2.2: type('name') -> <type 'str'> ??

Tim Peters tim.one at home.com
Wed Jul 25 00:47:14 EDT 2001


[Richard Jones]
> Not having access to 2.2 for the moment, what's the story if 
> type() returns the instance type?

C:\Code\descr\dist\src\PCbuild>python
Python 2.2a1 (#21, Jul 21 2001, 01:12:35) [MSC 32 bit (Intel)] on win32
...
>>> class C:
...   pass
...
>>> type(C())
<type 'instance'>
>>> type(C())()
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
TypeError: cannot create 'instance' instances
>>>

it's-a-unification-not-a-miracle<wink>-ly y'rs  - tim





More information about the Python-list mailing list