Thoughts on using isinstance
abcd
codecraig at gmail.com
Wed Jan 24 12:21:04 EST 2007
>Yes because usually you don't expect a list or dictionary but some object
> that *acts* like a list or dictionary. Or you even expect just some
> aspects of the type's behavior. For example that it is something you can
> iterate over.
>
> Ciao,
> Marc 'BlackJack' Rintsch
good point. is there place that documents what methods/attrs I should
check for on an object? for example, if its a list that I expect I
should verify the object that is passed in has a ??? function? etc.
thanks.
More information about the Python-list
mailing list