[Python-Dev] re: syntax - "Aren't tuples redundant?"

Andrew Kuchling akuchlin@mems-exchange.org
Sat, 5 Feb 2000 17:01:56 -0500 (EST)


Tim Peters writes:
>fundamental reason for this tension.  Python already has different concrete
>implementations of a single "integer" interface, and essentially the only
>things needed to integrate int and long fully are changing the literal
>parsers to ignore "L", and changing the guts of the "if (overflow) {}" bits
>of intobject.c to return a long instead of raising an exception (a

Not quite *that* simple; you'd also have to change various bits of the
core that currently do PyInt_Check(whatever) to also accept longs.  I
just sent off a patch to make long*sequence legal, but there's still
slicing and indexing to take care of: list[0L:5L] isn't currently
legal.

The Solaris large-file patch that makes .tell() return a long is
probably going to turn up more errors like this.  Making ints and long
ints integerchangeable would be an *excellent* idea.  Possible for
1.6?  Maybe, if GvR indicates it should be a priority. 'grep -l
PyInt_Check' over the Python source code lists lots of Modules, most
of the files in Objects/, and 5 files in Python/ (ceval, marshal,
pythonrun, structmember, and traceback).  

-- 
A.M. Kuchling			http://starship.python.net/crew/amk/
    "Doctor, we did good, didn't we?"
    "Perhaps. Time will tell. Always does."
    -- Ace and the Doctor, in Ben Aaronovitch's _Remembrance of the Daleks_