Random 32Bit integer was: Size of integers (2**32-1)
Thomas Guettler
st-newsgroups at thomas-guettler.de
Tue Feb 5 05:34:18 EST 2002
More information about the Python-list mailing list
Tue Feb 5 05:34:18 EST 2002
- Previous message (by thread): Size of integers (2**32-1)
- Next message (by thread): Random 32Bit integer was: Size of integers (2**32-1)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Gerhard Häring wrote: > Le 05/02/02 à 10:16, Thomas Guettler écrivit: > >>I have two python version installed: >>with the cygwin version "print 2**32-1" works >>but with the zope version I get OverFlowError. >> > > Zope uses Python 2.1, while your Cygwin Python is 2.2, right? yes [cut] > Btw. it looks like random.randint/randrange really want ints and won't > accept longs. A workaround could be to use a construction like: > > print random.randrange(0, sys.maxint) * 2L This would give me a long. But I need a 32Bit Integer. Unfortunately there is no sys.minint. OK, it is not that important for me. But it would be nice to know the answer (How to get a radom 32 Bit integer) thomas
- Previous message (by thread): Size of integers (2**32-1)
- Next message (by thread): Random 32Bit integer was: Size of integers (2**32-1)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list