diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2020-11-22 11:25:02 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-22 11:25:02 (GMT) |
commit | 686c203cd4355be5b7809a9d24b4aa3566d9371f (patch) | |
tree | 457b1a741d4f70e85d2bea686cd9ffb822cd8a85 /Doc/c-api | |
parent | c4d45ee670c09d4f6da709df072ec80cb7dfad22 (diff) | |
download | cpython-686c203cd4355be5b7809a9d24b4aa3566d9371f.zip cpython-686c203cd4355be5b7809a9d24b4aa3566d9371f.tar.gz cpython-686c203cd4355be5b7809a9d24b4aa3566d9371f.tar.bz2 |
bpo-42423: Accept single base class in PyType_FromModuleAndSpec() (GH-23441)
Diffstat (limited to 'Doc/c-api')
-rw-r--r-- | Doc/c-api/type.rst | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Doc/c-api/type.rst b/Doc/c-api/type.rst index a822b67..a869859 100644 --- a/Doc/c-api/type.rst +++ b/Doc/c-api/type.rst @@ -154,9 +154,8 @@ The following functions and structs are used to create Creates and returns a heap type object from the *spec* (:const:`Py_TPFLAGS_HEAPTYPE`). - If *bases* is a tuple, the created heap type contains all types contained - in it as base types. - + The *bases* argument can be used to specify base classes; it can either + be only one class or a tuple of classes. If *bases* is ``NULL``, the *Py_tp_bases* slot is used instead. If that also is ``NULL``, the *Py_tp_base* slot is used instead. If that also is ``NULL``, the new type derives from :class:`object`. @@ -174,7 +173,8 @@ The following functions and structs are used to create .. versionchanged:: 3.10 - The function now accepts NULL ``tp_doc`` slot. + The function now accepts a single class as the *bases* argument and + ``NULL`` as the ``tp_doc`` slot. .. c:function:: PyObject* PyType_FromSpecWithBases(PyType_Spec *spec, PyObject *bases) |