[Python-Dev] "result type only depends on operand types"...?
Guido van Rossum
guido@python.org
Sun, 31 Mar 2002 16:30:21 -0500
> > Um, what's a platform int? Unless you're talking about a NumPy
> > feature?
>
> Well, I'm assuming (perhaps falsely) that there will be some way of
> saying, "give me a fixed-width register integer".
Not in Python source code. I don't see why you'd want that.
Of course, C code has this and has always had this, e.g. the "i"
format code in PyArg_ParseTuple().
> But I'm not going to worry about it; if that's not part of the
> current plan and people whine about it, they can write an extension
> and contribute it to the core after it proves itself. (Possibly
> make it part of the os package as a sub-module if/when it gets
> integrated.)
A wise man once said: worrying is interest paid on problems not yet
due.
> If NumPy ever gets integrated into the core, that would be the
> appropriate place to put it. (I don't use NumPy; it might actually do
> that already.)
I think NumPy has a way to create arrays whose elements are
variously-sized machine ints and floats. I don't know that it has
corresponding scalar types -- I thing these all get mapped to the
standard Python types.
--Guido van Rossum (home page: http://www.python.org/~guido/)