[BUG] IMO, but no opinions? Uncle Tim? was: int(float(sys.maxint)) buglet ?

Nick Coghlan ncoghlan at iinet.net.au
Wed Dec 8 07:11:51 EST 2004


> In the absence of identifying an actual problem this would solve, I
> would oppose adding *gratuitous* complication.  Abusing your sense of
> aesthetics isn't "an actual problem" in this sense to me, although it
> may be to you.  Of course you're welcome to make any code changes you
> like in your own copy of Python <wnk>.

.>>> _int = int
.>>> def int(*args): return _int(_int(*args))
....
.>>> from sys import maxint
.>>> int(maxint)
.2147483647
.>>> int(-maxint-1)
.-2147483648

Pretty! };>

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at email.com   |   Brisbane, Australia
---------------------------------------------------------------
             http://boredomandlaziness.skystorm.net



More information about the Python-list mailing list