mirror of
https://github.com/python/cpython.git
synced 2025-07-30 14:44:10 +00:00
gh-96526: Clarify format and __format__ docstrings (gh-96648)
This commit is contained in:
parent
0ea8b925d0
commit
07b8e85d0e
6 changed files with 29 additions and 16 deletions
|
@ -5824,11 +5824,13 @@ object.__format__
|
|||
/
|
||||
|
||||
Default object formatter.
|
||||
|
||||
Return str(self) if format_spec is empty. Raise TypeError otherwise.
|
||||
[clinic start generated code]*/
|
||||
|
||||
static PyObject *
|
||||
object___format___impl(PyObject *self, PyObject *format_spec)
|
||||
/*[clinic end generated code: output=34897efb543a974b input=7c3b3bc53a6fb7fa]*/
|
||||
/*[clinic end generated code: output=34897efb543a974b input=b94d8feb006689ea]*/
|
||||
{
|
||||
/* Issue 7994: If we're converting to a string, we
|
||||
should reject format specifications */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue