New submission from Thomas Heller <[EMAIL PROTECTED]>:

The 2to3 fixer translates this code:
    range(42)[::-1]
into this one:
    list(range(42)[::-1]
which throws an error when run with Python 3:

Traceback (most recent call last):
  File "test.py", line 1, in <module>
    print(list(range(42)[::-1]))
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 <[EMAIL PROTECTED]>
<http://bugs.python.org/issue4632>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to