Thoughts on using isinstance
codecraig at gmail.com
Wed Jan 24 18:21:04 CET 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.
> 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.
More information about the Python-list