New submission from ledave123 <ledave...@yahoo.fr>:

On python 2.4.4, reversed(range()) is correct :
>>> list(reversed(range(12,-1,-1)))
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]

However, on python 3.1.1 :
>>> list(reversed(range(12,-1,-1)))
[]
which is obviously wrong.

When step is positive, the result is okay on python 3.1.1 :
>>> list(reversed(range(13)))
[12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0]

----------
components: Interpreter Core
messages: 95104
nosy: ledave123
severity: normal
status: open
title: reversed(range(x, -1, -1)) is empty when x > 1
type: behavior
versions: Python 3.1

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue7298>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to