runtime type checking of wxDateTime "type"

Given Python's polymorphism, I'm trying to write some code to
detect the type of an argument and ensure it's a wxDateTime
instance before proceeding as though it were (and possibly
generating exceptions). However, the only idiom that I
can find that seems to work is:

  isinstance(o, wxPython.utils.wxDateTimePtr)

Is there a less ugly/more elegant/more "conventional" way
to do this?

Thanks in advance,
/Will Sadkin
Parlance Corporation

Will Sadkin wrote:

Given Python's polymorphism, I'm trying to write some code to
detect the type of an argument and ensure it's a wxDateTime
instance before proceeding as though it were (and possibly
generating exceptions). However, the only idiom that I can find that seems to work is:

  isinstance(o, wxPython.utils.wxDateTimePtr)

Is there a less ugly/more elegant/more "conventional" way
to do this?

That's the right way.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!