Issue 17210: documentation of PyUnicode_Format() states wrong argument type requirements (original) (raw)

The current documentation says:

""" PyObject* PyUnicode_Format(PyObject *format, PyObject *args) Return value: New reference.

Return a new string object from format and args; this is analogous to format % args. The args argument must be a tuple.

"""

According to the implementation, however, "args" can be a tuple, a unicode string, or an arbitrary mapping, i.e. everything that Python's "%" operator allows for strings as well.