
report at bugs
Nov 10, 2009, 2:27 AM
Post #1 of 19
(556 views)
Permalink
|
|
[issue7298] reversed(range(x, -1, -1)) is empty when x > 1
|
|
New submission from ledave123 <ledave123 [at] yahoo>: 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 <report [at] bugs> <http://bugs.python.org/issue7298> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
|