[Python-3000] PyInt_ to PyLong_ rename
Guido van Rossum
guido at python.org
Mon Dec 3 20:46:53 CET 2007
On Dec 3, 2007 11:34 AM, "Martin v. Löwis" <martin at v.loewis.de> wrote:
> > Actually it's still somewhat interesting to be able to tell whether a
> > particular Python build uses 64-bit pointer or 32-bit pointers. (I
> > realize sys.maxint doesn't quite tell us this, but on Linux at least
> > it does.)
>
> Sure. However, you could also use _testcapi.PY_SSIZE_T_MAX, or
> ctypes.sizeof(ctypes.py_object).
Much less intuitive though.
> > I also suspecet that sys.maxint is used frequently for "some
> > large integer" used as an approximation of infinity in some context.
>
> Sure. However, 1<<1000 might do as well.
Fair enough. (or 2**64 :-)
> > IMO we should devise an API specifically for that. Or we should get
> > rid of it and force everyone to just call PyInt_AsLong and test for an
> > error return.
>
> I'd be in favor of the latter. I never meant the PyInt_CheckExact hack
> to persist into the release.
OK. What's needed?
--
--Guido van Rossum (home page: http://www.python.org/~guido/)
More information about the Python-3000
mailing list