File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -42,8 +42,8 @@ as much as it can.
4242 callable object that receives notification when *ob * is garbage collected; it
4343 should accept a single parameter, which will be the weak reference object
4444 itself. *callback * may also be ``None `` or ``NULL ``. If *ob * is not a
45- weakly referenceable object, or if * callback * is not callable, `` None ``, or
46- ``NULL ``, this will return `` NULL `` and raise :exc: ` TypeError ` .
45+ weakly referenceable object, this will raise :exc: ` TypeError ` and return
46+ ``NULL ``.
4747
4848 .. seealso ::
4949 :c:func: `PyType_SUPPORTS_WEAKREFS ` for checking if *ob * is weakly
@@ -58,8 +58,8 @@ as much as it can.
5858 be a callable object that receives notification when *ob * is garbage
5959 collected; it should accept a single parameter, which will be the weak
6060 reference object itself. *callback * may also be ``None `` or ``NULL ``. If *ob *
61- is not a weakly referenceable object, or if * callback * is not callable,
62- ``None ``, or `` NULL ``, this will return `` NULL `` and raise :exc: ` TypeError `.
61+ weakly referenceable object, this will raise :exc: ` TypeError ` and return
62+ ``NULL ``.
6363
6464 .. seealso ::
6565 :c:func: `PyType_SUPPORTS_WEAKREFS ` for checking if *ob * is weakly
You can’t perform that action at this time.
0 commit comments