Changing truth

Dan Bishop danb_83 at yahoo.com
Thu Jan 16 08:21:35 CET 2003


Michael Hudson <mwh at python.net> wrote in message news:<7h38yxmp6mp.fsf at pc150.maths.bris.ac.uk>...

> Hey, noone in this thread's even tried to fiddle with the builtins
> yet...

Good idea!

>>> int = long

There!  Now I don't have to deal with those nasty OverflowErrors anymore :-)

But if your prefer obsfuscation, I'll swap str and xrange.

>>> for digit in str(42): # note the misleading counter name
...    print digit,
...
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
30 31 32 33 34 35 36 37 38 39 40 41




More information about the Python-list mailing list