What is the range of a variable of type int()
eg:
i = int()
print i.max() # 0x
print i.min() # 0x
is it a signed 16 bit or 32 bit or is it unsigned 16 or 32...
I've noticed that it can be incremented into a new class of type
long...
--
KraftDiner wrote:
What is the range of a variable of type int()
eg:
i = int()
print i.max() # 0x
print i.min() # 0x
is it a signed 16 bit or 32 bit or is it unsigned 16 or 32...
I've noticed that it can be incremented into a new class of type
long...
| import sys
|
Simon Forman wrote:
KraftDiner wrote:
What is the range of a variable of type int()
eg:
i = int()
print i.max() # 0x
print i.min() # 0x
is it a signed 16 bit or 32 bit or is it unsigned 16 or 32...
I've noticed that it can be incremented into a new class of
At Wednesday 23/8/2006 18:53, KraftDiner wrote:
| import sys
| sys.maxint
2147483647
So what type / class should one use to represent a 16 bit integers
(signed or unsigned)?
Plain int.
If you need the overflow at 32K/64K, try: x 0x
Gabriel Genellina
Softlab SRL
KraftDiner [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
So what type / class should one use to represent a 16 bit integers
(signed or unsigned)?
For most purposes, Python just has integers, with 'small' ones (depending
on the machine) handled more efficiently. For special
Terry Reedy wrote:
KraftDiner [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
So what type / class should one use to represent a 16 bit integers
(signed or unsigned)?
For most purposes, Python just has integers, with 'small' ones (depending
on the machine) handled more
23 Aug 2006 17:28:48 -0700, KraftDiner [EMAIL PROTECTED]:
This is obvious... but how do I crop off the high order bits if
necessary?
a[0]0x ?
min(a[0], 0x) ?
--
Felipe.
--
http://mail.python.org/mailman/listinfo/python-list