python2.2: type('name') -> <type 'str'> ??
Joal Heagney
s713221 at student.gu.edu.au
Thu Jul 26 07:39:40 EDT 2001
Guido van Rossum wrote:
>
> 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/)
Very nice.
--
Joal Heagney is: _____ _____
/\ _ __ __ _ | | _ ___ |
/__\|\ || ||__ |\ || |___|/_\|___] |
/ \ \_||__ ||___| \_|! | | \ \ !
More information about the Python-list
mailing list