python2.2: type('name') -> <type 'str'> ??
Guido van Rossum
guido at python.org
Wed Jul 25 01:40:29 EDT 2001
Francisco <frandebo at latt.if.usp.br> writes:
> I just compiled python2.2a and I'm getting this strange response to the
> 'type' command:
>
> Python 2.2a1 (#2, Jul 24 2001, 12:24:09)
> [GCC 2.95.2 20000220 (Debian GNU/Linux)] on linux2
> Type "copyright", "credits" or "license" for more information.
> >>> type('')
> <type 'str'>
>
> while I expected to get <type 'string'>.
>
> Am I missing something or I just messed up with the compilation??
No, the string type changed its name to match the str() function
(which is now the same as the str type).
--Guido van Rossum (home page: http://www.python.org/~guido/)
More information about the Python-list
mailing list