[Python-3000] PyInt_ to PyLong_ rename
"Martin v. Löwis"
martin at v.loewis.de
Mon Dec 3 20:34:32 CET 2007
> 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).
> 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.
> 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.
Regards,
Martin
More information about the Python-3000
mailing list