Skip to content

Commit 7917d6a

Browse files
committed
Correct the comment on type_validate_new_bases()
The checks are plain C and do not run Python code.
1 parent 5f92ab0 commit 7917d6a

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

‎Objects/typeobject.c‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1902,10 +1902,7 @@ type_check_new_bases(PyTypeObject *type, PyObject *new_bases)
19021902
}
19031903

19041904
// Checks on the new __bases__ value that depend on the current state of the
1905-
// type hierarchy (inheritance cycles, layout compatibility). These can run
1906-
// Python code and release TYPE_LOCK, so they are validated optimistically:
1907-
// the caller snapshots the publish generation before calling this and
1908-
// the new bases are only stored if the generation is unchanged.
1905+
// type hierarchy (inheritance cycles, layout compatibility).
19091906
static int
19101907
type_validate_new_bases(PyTypeObject *type, PyObject *new_bases, PyTypeObject **best_base)
19111908
{

0 commit comments

Comments
 (0)