int/long unification hides bugs
peter at engcorp.com
Tue Oct 26 15:36:30 CEST 2004
Cliff Wells wrote:
> On Tue, 2004-10-26 at 05:10 +0000, Sam Holden wrote:
>>On 25 Oct 2004 21:25:07 -0700, kartik <kartick_vaddadi at yahoo.com> wrote:
>>>integers are used in different ways from strings. i may expect file
>>>paths to be around 100 characters, and if i get a 500-character path,
>>>i have no problem just because of the length. but if a person's age is
>>>500 where i expect it to be less than 100, then **definitely**
>>What if Noah is using your program?
> Then Python clearly needs a special mode so that when a person's age is
> entered large numbers are allowed, but when counting animals it throws
> an exception if the number is greater than two.
And what about Methuselah? He's not going to be receiving his
social security cheques if he can't enter his age as higher than,
say, 2**7 (as our friend kartik would arbitrarily say...). We
actually need 2**10 for his age, but now that's a little too
high so maybe we'd better just kill the old bugger off at 2**9
(hey, he's lived so long that shaving 208 years off his age
won't bother him, right?).
More information about the Python-list