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/008498.html below:

[Python-Dev] Adding insint() function

[Python-Dev] Adding insint() function [Python-Dev] Adding insint() functionAndrew Kuchling akuchlin@mems-exchange.org
Fri, 18 Aug 2000 11:00:37 -0400
Four modules define insint() functions to insert an integer into a
dictionary in order to initialize constants in their module
dictionaries:

kronos Modules>grep -l insint *.c
pcremodule.c
shamodule.c
socketmodule.c
zlibmodule.c
kronos Modules>          

(Hm... I was involved with 3 of them...)  Other modules don't use a
helper function, but just do PyDict_SetItemString(d, "foo",
PyInt_FromLong(...)) directly.  

This duplication bugs me.  Shall I submit a patch to add an API
convenience function to do this, and change the modules to use it?
Suggested prototype and name: PyDict_InsertInteger( dict *, string,
long)

--amk






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