[IronPython] Distinguishing DLR object from CLR object

Curt Hagenlocher curt at hagenlocher.org
Wed Jan 30 15:15:11 PST 2008


Is there a straightforward and reliable way from within IronPython to tell
if a particular object is a "CLR object' or a "DLR object"?  I can make a
guess for just IronPython by saying

isPythonObject = clr.GetClrType(type(obj)).FullName.startswith('IronPython')

but this is both ugly and unreliable.

--
Curt Hagenlocher
curt at hagenlocher.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ironpython.com/pipermail/users-ironpython.com/attachments/20080130/a233cce5/attachment.htm 


More information about the Users mailing list