A RetroSearch Logo

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

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2000-August/008520.html below:

[Python-Dev] Adding insint() function

[Python-Dev] Adding insint() functionVladimir Marangozov Vladimir.Marangozov@inrialpes.fr
Fri, 18 Aug 2000 20:17:53 +0200 (CEST)
Andrew Kuchling wrote:
> 
> On Fri, Aug 18, 2000 at 01:52:20PM -0400, Tim Peters wrote:
> >+1, provided the treatment of errors is clearly documented.
> 
> The treatment of errors in module init functions seems to be simply
> charge ahead and do the inserts, and then do 'if (PyErr_Occurred())
> Py_FatalError())'.  The new function will probably return NULL if
> there's an error, but I doubt anyone will check it; it's too ungainly
> to write 
>   if ( (PyDict_SetItemStringInt(d, "foo", FOO)) == NULL ||
>        (PyDict_SetItemStringInt(d, "bar", BAR)) == NULL || 
>        ... repeat for 187 more constants ...

:-)

So name it PyModule_AddConstant(module, name, constant),
which fails with "can't add constant to module" err msg.

-- 
       Vladimir MARANGOZOV          | Vladimir.Marangozov@inrialpes.fr
http://sirac.inrialpes.fr/~marangoz | tel:(+33-4)76615277 fax:76615252



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