[issue4113] Add custom __repr__ to functools.partial

Alexander Belopolsky report at bugs.python.org
Fri Nov 19 16:23:09 CET 2010


Alexander Belopolsky <belopolsky at users.sourceforge.net> added the comment:

There is an ongoing discussion about deprecating undocumented PyUnicode_AppendAndDel(). See Marc-Andre's comment in msg121371:

"""
+.. c:function:: void PyUnicode_Append(PyObject **pleft, PyObject *right)
+
+   Concat two strings and put the result in *pleft. Sets *pleft to
+   NULL on error.
+
+.. c:function:: void PyUnicode_AppendAndDel(PyObject **pleft, PyObject *right)
+
+   Concat two strings and put the result in *pleft and drop the right
+   object. Sets *pleft to NULL on error.
+
+

Please don't document these two obscure APIs. Instead we should
make them private functions by prepending them with an underscore.
If you look at the implementations of those two APIs, they
are little more than a macros around PyUnicode_Concat().

3rd party extensions should use PyUnicode_Concat() to achieve
the same effect.
"""

While it is OK for Python library to use private APIs, please consider if PyUnicode_Concat() may be more appropriate.  If not, please make a case at issue 10435 for keeping it public.

----------
assignee:  -> belopolsky
nosy: +lemburg

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4113>
_______________________________________


More information about the Python-bugs-list mailing list