[New-bugs-announce] [issue4632] Wrong fix for range(42)[::-1]

Thomas Heller report at bugs.python.org
Thu Dec 11 13:01:57 CET 2008

New submission from Thomas Heller <theller at ctypes.org>:

The 2to3 fixer translates this code:
into this one:
which throws an error when run with Python 3:

Traceback (most recent call last):
  File "test.py", line 1, in <module>
TypeError: sequence index must be integer, not 'slice'

components: 2to3 (2.x to 3.0 conversion tool)
messages: 77604
nosy: theller
severity: normal
status: open
title: Wrong fix for range(42)[::-1]

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list