checking type of my own objects

Erik Max Francis max at alcyone.com
Sun Sep 14 17:06:28 EDT 2003


Tobiah wrote:

> What is the best way to check the type?

	e.__class__ is Event

or if you want to include subclasses:

	isinstance(e, Event)

-- 
   Erik Max Francis && max at alcyone.com && http://www.alcyone.com/max/
 __ San Jose, CA, USA && 37 20 N 121 53 W && &tSftDotIotE
/  \ If the sun comes up / And you're not home / I'll be strong
\__/  India Arie




More information about the Python-list mailing list