[issue28880] range(i, j) doesn't work

2016-12-05 Thread R. David Murray
R. David Murray added the comment: In case anyone else wonders, the tutorial does cover this, although its example uses ">>> print(range(10))" instead of just ">>> range(10)". -- ___ Python tracker ___

[issue28880] range(i, j) doesn't work

2016-12-05 Thread Steven D'Aprano
Steven D'Aprano added the comment: Hi John, and thanks for the bug report. If only they were all as easily resolved as this one :-) With respect, if you're just getting started with Python, you shouldn't get into the habit of hitting the bug tracker every time you find something that surprise

[issue28880] range(i, j) doesn't work

2016-12-05 Thread John Henning
John Henning added the comment: Ha! Thanks! Restarted python and now that works. Sorry for the trouble! Trying to teach myself python working through the python tutorial and hit this problem. -- ___ Python tracker

[issue28880] range(i, j) doesn't work

2016-12-05 Thread R. David Murray
R. David Murray added the comment: Presumably you use 'list' as a variable name earlier in your interactive session. Try restarting your python shell. -- nosy: +r.david.murray resolution: -> not a bug stage: -> resolved status: open -> closed ___

[issue28880] range(i, j) doesn't work

2016-12-05 Thread John Henning
John Henning added the comment: Right about the command prompt! My bad. However, the new language you provided gives me the following: >>> list(range(9)) Traceback (most recent call last): File "", line 1, in TypeError: 'list' object is not callable >>> list(range(0, 10)) Traceback (most r

[issue28880] range(i, j) doesn't work

2016-12-05 Thread Matthew Barnett
Matthew Barnett added the comment: Not a bug. Python 2 had 'range', which returned a list, and 'xrange', which returned an xrange object which was iterable: >>> range(7) [0, 1, 2, 3, 4, 5, 6] >>> xrange(7) xrange(7) >>> list(xrange(7)) [0, 1, 2, 3, 4, 5, 6] In Python 3, 'range' was dropped an

[issue28880] range(i, j) doesn't work

2016-12-05 Thread John Henning
New submission from John Henning: When attempting to use range(I, j) command in Windows 10 command prompt, the latest version of Python would simply echo what was typed. See below: >>> range(7) range(0, 7) >>> range(0, 9) range(0, 9) >>> range(1, 10, 3) range(1, 10, 3) >>> -- componen