Re:What the heck is an xrange?
by dcrosta on Monday June 18, 2012 @11:15PM
(#4130063)
Huh -- CPython 2.x doesn't let you create an xrange with values past 263-1. CPython 3.x does.
[ Parent
| on HN ]
Even 63-bit integers aren't (all) representable in IEEE double floating point values (that Python uses) which have a 53 bits mantissa.
For example, int(float(10¹⁸ - 1)) != 10¹⁸ - 1, but xrange(1, 10¹⁸) is perfectly valid (even in Python 2).
edit: how do I type two consecutive asterisks on Hacker News? Backslash doesn't seem to work as an escape character.
If you put two spaces at the beginning of a line, you'll get a monospaced "literal" mode.
For example, int(float(10**18 - 1)) != 10**18 - 1,
but xrange(1, 10**18) is perfectly valid (even in Python 2).
Re:What the heck is an xrange?
by heretohelp on Tuesday June 19, 2012 @12:52AM
(#4130312)
\\\\
Edit: failure. That's two stymied people :(