Python 3 doesn't distinguish fixnums from bignums at the type level, so
this would run forever. Instead, get (a guess at) the largest fixnum
value, and use that.
## Figure out the number of bits in a (nonnegative) primitive `int'. We'll
## use a list of these as our sieve.
+ try: _MAX = SYS.maxint
+ except AttributeError: _MAX = SYS.maxsize
_NBIT = 15
- while type(1 << (_NBIT + 1)) == int: _NBIT += 1
+ while 1 << (_NBIT + 1) < _MAX: _NBIT += 1
def __init__(me, limit):
"""