Any *disadvantage* to using xrange() instead of range()?
Bob Alexander
bobalex at ix.netcom.com
Thu Jul 8 12:46:43 EDT 1999
More information about the Python-list mailing list
Thu Jul 8 12:46:43 EDT 1999
- Previous message (by thread): Two Pythons talking to each other?
- Next message (by thread): Any *disadvantage* to using xrange() instead of range()?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
...even for iteration over a small sequence of integers? My intuition would be that xrange() is the preferred way to iterate over a numeric sequence, but the documentation seems to go out of its way to stress that the advantage of xrange() over range() is minimal -- almost seems to be discouraging us programmers from using it unless we have a "memory-starved" machine. Is there any reason why xrange() should not be the "idiomatic" way to iterate over a sequence of integers? -- Bob
- Previous message (by thread): Two Pythons talking to each other?
- Next message (by thread): Any *disadvantage* to using xrange() instead of range()?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list