On 12/3/07, Guido van Rossum <[EMAIL PROTECTED]> wrote:
>
> On Dec 2, 2007 12:56 PM, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote:
> > > It's only used for sys.maxint. Do we still need sys.maxint and
> > > PyInt_GetMax()? IMO PyLong_GetNativeMax() and sys.maxnativelong are
> > > better names.
> >
> > I think they should go entirely. They don't give any interesting
> > information about the Python implementation.
>
> 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.) I also suspecet that sys.maxint is used frequently for "some
> large integer" used as an approximation of infinity in some context.


It is, but it doesn't appear to common:

 http://www.google.com/codesearch?q=+sys.maxint

Only turns up ~10 unique non-Python-itself projects using within the first 5
pages of results.  Much of the time it is used as a large number.  Anyone
porting that code forward to 2.6 or later can fix that.

Please don't encourage its misuse for determining if the host has 32 or
64bit longs or pointers.  It does not do that.  Use platform.architecture()
for the long size and look at the length of a hex pointer in the repr of a
class for C pointer size.
_______________________________________________
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to