[issue8206] 2to3 doesn't convert 'types.InstanceType' to 'object'

2010-03-23 Thread Benjamin Peterson
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

[issue8206] 2to3 doesn't convert 'types.InstanceType' to 'object'

2010-03-22 Thread Eric Promislow
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

[issue8206] 2to3 doesn't convert 'types.InstanceType' to 'object'

2010-03-22 Thread Martin v . Löwis
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

[issue8206] 2to3 doesn't convert 'types.InstanceType' to 'object'

2010-03-22 Thread Eric Promislow
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

[issue8206] 2to3 doesn't convert 'types.InstanceType' to 'object'

2010-03-22 Thread Martin v . Löwis
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