Is types.InstanceType no longer valid with Python 2.2
Emile van Sebille
emile at fenx.com
Thu Jan 3 13:51:51 EST 2002
More information about the Python-list mailing list
Thu Jan 3 13:51:51 EST 2002
- Previous message (by thread): trace.py and coverage.py
- Next message (by thread): Is types.InstanceType no longer valid with Python 2.2
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
"Georg Lohrer" <GeorgLohrer at gmx.de> wrote in message news:43293uk34r6dgn5vgel7j0uiekhg6jp0no at 4ax.com... [snipped] > Therefore I need recognizing an instantion of a class. If I could be > assured that only a class-instantiation could have a __dict__ then a > possible solution would be try..catch AttributeError to catch all > other items. But with Python 2.1 the InstanceType decision was more > elegant. > > Ciao, Georg > Aside from Skip verifying that InstanceType works in 2.2 (which I hadn't, but have since) and so it should for you, one attribute that may do it is __class__. I'm not aware that this is used otherwise. HTH, -- Emile van Sebille emile at fenx.com ---------
- Previous message (by thread): trace.py and coverage.py
- Next message (by thread): Is types.InstanceType no longer valid with Python 2.2
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list