2to3: Skip isinstance fixer. #3245

Merged
merged 1 commit into from Apr 14, 2013

Projects

None yet

1 participant

@charris
Member
charris commented Apr 14, 2013

The isinstance fixer removes duplicate types in the second argument of
isinstance(). For example, isinstance(x, (int, int)) is converted to
isinstance(x, (int)). This would certainly apply if we let the long
fixer replace long by int, but as is it does nothing.

Duplicate entries are supposedly deprecated in Python 3, I'm not sure
why or how, but it does not seem to be a problem at this point. If it
ever becomes so, we can deal with it then.

Closes #3065

@charris charris 2to3: Skip isinstance fixer.
The isinstance fixer removes duplicate types in the second argument of
isinstance(). For example, isinstance(x, (int, int)) is converted to
isinstance(x, (int)). This would certainly apply if we let the long
fixer replace long by int, but as is it does nothing.

Duplicate entries are supposedly deprecated in Python 3, I'm not sure
why or how, but it does not seem to be a problem at this point. If it
ever becomes so, we can deal with it then.

Closes #3085
3a31503
@charris charris merged commit 6c47259 into numpy:master Apr 14, 2013

1 check passed

default The Travis build passed
Details
@charris charris deleted the charris:2to3-apply-isinstance-fixer branch Apr 14, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment