how to refactor nested for loop into smaller for loop assume each of them independent?
Steve D'Aprano
steve+python at pearwood.info
Sat Oct 8 07:29:04 EDT 2016
More information about the Python-list mailing list
Sat Oct 8 07:29:04 EDT 2016
- Previous message (by thread): how to refactor nested for loop into smaller for loop assume each of them independent?
- Next message (by thread): how to refactor nested for loop into smaller for loop assume each of them independent?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Sat, 8 Oct 2016 09:12 pm, BartC wrote: > The OP's code however is a good demonstration of how crazy Python's > original for-range loop was: you need to construct a list of N elements > just to be able to count to N. How many years was it until xrange was > introduced? Python 1.4 (that's 1996) had xrange, but I don't know when it was added. https://docs.python.org/release/1.4/lib/node26.html#SECTION00330000000000000000 The oldest version I have access to is the *extremely* primitive 0.9. Not surprisingly, it doesn't have xrange -- but it lacks a lot of things, including globals(), map(), named exceptions, "" strings ('' is okay), exponentiation, and more. -- Steve “Cheer up,” they said, “things could be worse.” So I cheered up, and sure enough, things got worse.
- Previous message (by thread): how to refactor nested for loop into smaller for loop assume each of them independent?
- Next message (by thread): how to refactor nested for loop into smaller for loop assume each of them independent?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list