<br><br><div><span class="gmail_quote">On 12/3/07, <b class="gmail_sendername">Guido van Rossum</b> <<a href="mailto:guido@python.org">guido@python.org</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Dec 2, 2007 12:56 PM, "Martin v. Löwis" <<a href="mailto:martin@v.loewis.de">martin@v.loewis.de</a>> wrote:<br>> > It's only used for sys.maxint. Do we still need sys.maxint and<br>> > PyInt_GetMax()? IMO PyLong_GetNativeMax() and
sys.maxnativelong are<br>> > better names.<br>><br>> I think they should go entirely. They don't give any interesting<br>> information about the Python implementation.<br><br>Actually it's still somewhat interesting to be able to tell whether a
<br>particular Python build uses 64-bit pointer or 32-bit pointers. (I<br>realize sys.maxint doesn't quite tell us this, but on Linux at least<br>it does.) I also suspecet that sys.maxint is used frequently for "some
<br>large integer" used as an approximation of infinity in some context.</blockquote><div><br>It is, but it doesn't appear to common:<br> <br> <a href="http://www.google.com/codesearch?q=+sys.maxint">http://www.google.com/codesearch?q=+sys.maxint
</a><br><br>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.<br>
<br>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.
<br><br></div></div>