Still the __new__ hell ...

Paulo da Silva psdasilvaX at esotericaX.ptX
Fri Mar 23 15:41:04 CET 2007


Gabriel Genellina escreveu:
> 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
> 

Good! ;-)
Paulo



More information about the Python-list mailing list