A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2004-December/050273.html below:

[Python-Dev] [Python 2.4] PyInt_FromLong returning NULL

[Python-Dev] [Python 2.4] PyInt_FromLong returning NULL [Python-Dev] [Python 2.4] PyInt_FromLong returning NULLJim Fulton jim at zope.com
Tue Dec 7 19:06:54 CET 2004
Tim Peters wrote:
> [Jim Fulton]
> 
>>Ugh. Part of the problem is that all of those calls are unchecked,
>>Dang us.  If they were checked, then, who knows, we might have
>>gotten informative exceptions.
> 
> 
> They certainly "should" be checked, but as a pragmatic matter
> PyInt_FromLong(1) can't fail -- Python allocates an int object for 1
> (and for about 100 other popular little integers) when it starts up,
> and PyInt_FromLong() just returns a new reference to these
> pre-existing objects whenever possible.

I know. I'm sure that's why we don't bother.  But, obviously,
it can fail.

Jim


-- 
Jim Fulton           mailto:jim at zope.com       Python Powered!
CTO                  (540) 361-1714            http://www.python.org
Zope Corporation     http://www.zope.com       http://www.zope.org
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4