This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author loewis
Recipients ericp, loewis
Date 2010-03-22.22:58:38
SpamBayes Score 3.4058345e-09
Marked as misclassified No
Message-id <1269298719.66.0.659421150592.issue8206@psf.upfronthosting.co.za>
In-reply-to
Content
I don't think this conversion is correct. If there is a test for InstanceType, there is (IMO) a fifty-fifty-chance that it is there to distinguish old-style and new-style classes, so converting it to object is most likely to break the code.

People who actually want this conversion to happen could replace types.InstanceType with

  getattr(types, 'InstanceType', object)

or add

try:
  from types import InstanceType
except ImportError:
  InstanceType = object

to the top of the module; this would then work for both 2.x and 3.x (assuming that replacing InstanceType with object is actually correct in the code in question).
History
Date User Action Args
2010-03-22 22:58:39loewissetrecipients: + loewis, ericp
2010-03-22 22:58:39loewissetmessageid: <1269298719.66.0.659421150592.issue8206@psf.upfronthosting.co.za>
2010-03-22 22:58:38loewislinkissue8206 messages
2010-03-22 22:58:38loewiscreate