[Python-3000] Types and classes

Facundo Batista facundobatista at gmail.com
Wed Apr 9 02:25:19 CEST 2008


2008/4/8, Guido van Rossum <guido at python.org>:

> Seems to be mass confusion all around. My proposal is:
>
>  repr(int) == <class 'int'>
>  str(int) == 'int'
>
>  For user-defined classes, a module name will always be present, e.g.
>  for class C defined in __main__:
>
>  repr(C) == <class '__main__.C'>
>  str(c) == '__main__.C'

+1

-- 
.    Facundo

Blog: http://www.taniquetil.com.ar/plog/
PyAr: http://www.python.org/ar/


More information about the Python-3000 mailing list