Benjamin Peterson benja...@python.org added the comment:
Closing 2to3 request.
--
nosy: +benjamin.peterson
resolution: - works for me
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8206
New submission from Eric Promislow er...@activestate.com:
Title should be self-explanatory.
--
components: 2to3 (2.x to 3.0 conversion tool)
messages: 101543
nosy: ericp
severity: normal
status: open
title: 2to3 doesn't convert 'types.InstanceType' to 'object'
versions: Python 3.1
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
Eric Promislow er...@activestate.com added the comment:
I'm working on a debugger, trying to identify instances of
old-style classes in Python 2, and any class in Python 3.
The getattr formulation will work, but because I already
need to maintain an is_v3 flag, I might as well use it
here.
As a
Martin v. Löwis mar...@v.loewis.de added the comment:
In a sense, *all* objects are instances of new-style classes in 2.x, including
instances of old-style classes (which are instances of the InstanceType type,
which is a type, and hence a new-style class).
You may want to look at the