[Python-Dev] API bloat

Victor Stinner victor.stinner at haypocalc.com
Thu Feb 10 16:49:51 CET 2011


Le jeudi 10 février 2011 à 16:19 +0100, M.-A. Lemburg a écrit :
> > And the following were added to 3.2,
> > of which only 2 are documented:
> > 
> > PyArg_ValidateKeywordArguments
> > PyAST_CompileEx
> > Py_CompileString
> > Py_CompileStringExFlags
> > PyErr_NewExceptionWithDoc    (documented)
> > PyErr_SyntaxLocationEx
> > PyErr_WarnFormat
> > PyFrame_GetLineNumber
> > PyImport_ExecCodeModuleWithPathnames
> > PyImport_GetMagicTag
> > PyLong_AsLongLongAndOverflow    (documented)
> > PyModule_GetFilenameObject
> > Py_SetPath
> > PyStructSequence_GetItem
> > PyStructSequence_NewType
> > PyStructSequence_SetItem
> > PySys_AddWarnOptionUnicode
> > PySys_AddXOption
> > PySys_FormatStderr
> > PySys_FormatStdout
> > PySys_GetXOptions
> > PyThread_acquire_lock_timed
> > PyType_FromSpec
> > PyUnicode_AsUnicodeCopy
> > PyUnicode_AsWideCharString
> > PyUnicode_EncodeFSDefault
> > PyUnicode_FSDecoder
> > Py_UNICODE_strcat
> > Py_UNICODE_strncmp
> > Py_UNICODE_strrchr
> > PyUnicode_TransformDecimalToASCII

PyErr_WarnFormat, PyImport_ExecCodeModuleWithPathnames,
PyModule_GetFilenameObject, PySys_AddWarnOptionUnicode,
PySys_FormatStderr, PySys_FormatStdout, PyUnicode_AsUnicodeCopy,
PyUnicode_AsWideCharString, PyUnicode_EncodeFSDefault and
PyUnicode_FSDecoder are documented (I wrote most of these functions). I
added references in the issue #11173.

So there are a little bit less than 29/31 of new undocumented functions.

But yes, most Py_UNICODE_* functions are not documented: see issue
#10435 (which has a patch).

victor



More information about the Python-Dev mailing list