Still the __new__ hell ...

Gabriel Genellina gagsl-py2 at yahoo.com.ar
Fri Mar 23 01:09:31 EDT 2007


En Wed, 21 Mar 2007 07:51:32 -0300, Bruno Desthuilliers  
<bruno.42.desthuilliers at wtf.websiteburo.oops.com> escribió:

> Paulo da Silva a écrit :
>> As a relatively inexperient
>> in python, how could I know that a 'string' is an instance of
>> basestring?
>
> By reading this newsgroup ?-)

Or asking Python itself:

>>> type("any string").mro()
[<type 'str'>, <type 'basestring'>, <type 'object'>]

-- 
Gabriel Genellina




More information about the Python-list mailing list