Martin v. Löwis <mar...@v.loewis.de> added the comment:

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).

----------
nosy: +loewis

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue8206>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to