[Python-Dev] Adding insint() function (original) (raw)

Donald Beaudry Donald Beaudry donb@init.com
Tue, 22 Aug 2000 15:16:39 -0400


Andrew Kuchling <akuchlin@mems-exchange.org> wrote,

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: PyDictInsertInteger( dict *, string, long)

+0 but...

...why not:

PyDict_SetValueString(PyObject* dict, char* key, char* fmt, ...)

and

PyDict_SetValue(PyObject* dict, PyObject* key, char* fmt, ...)

where the fmt is Py_BuildValue() format string and the ... is, of course, the argument list.

-- Donald Beaudry Ab Initio Software Corp. 201 Spring Street donb@init.com Lexington, MA 02421 ...Will hack for sushi...