class instance checking -- newbie
moshez at math.huji.ac.il
Fri May 12 08:29:51 CEST 2000
On 11 May 2000, Tim Northover wrote:
> I think I need to determine whether an object belongs to a particular
> class (specifically whether it is a MatchObject) and I couldn't find
> anything very useful in the documentation. Could someone possibly suggest
> an answer or point me at the correct part of the docs?
Are you sure that checking that it isn't None wouldn't satisfy you just as
well? If I haven't read your mind correctly, look for "isinstance"
Moshe Zadka <moshez at math.huji.ac.il>
http://www.linux.org.il -- we put the penguin in .com
More information about the Python-list