[Tutor] built in functions int(),long()
Bob Gailer
bgailer@alum.rpi.edu
Thu Jun 19 14:50:05 2003
--=======253F19E2=======
Content-Type: text/plain; x-avg-checked=avg-ok-55CD3CE8; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 8bit
At 11:37 AM 6/19/2003 -0700, Jeff Shannon wrote:
[snip]
> What has you confused is that Python, when asked to show you an integer,
will automatically convert that integer into base 10 for
> display. However, that's a feature of the display, not of the integer
itself -- it just so happens that for humans, base 10 is easiest to
> read, so Python accommodates us (unless we specifically request
otherwise, through the use of hex() or similar functions). Of
> course, internally the computer will store all integers in binary format
(base 2), because that's the way that computers are wired.
"base 10" is ambiguous. We usually interpret that to mean the decimal
system, but an 8 fingered alien who counts in octal would say "base 10" and
it would mean octal.
Bob Gailer
bgailer@alum.rpi.edu
303 442 2625
--=======253F19E2=======
Content-Type: text/plain; charset=us-ascii; x-avg=cert; x-avg-checked=avg-ok-55CD3CE8
Content-Disposition: inline
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.488 / Virus Database: 287 - Release Date: 6/5/2003
--=======253F19E2=======--