object argument. If *visit* returns a non-zero value that value should be
returned immediately.
+ The traversal function must not have any side effects. Implementations
+ may not modify the reference counts of any Python objects nor create or
+ destroy any Python objects.
+
To simplify writing :c:member:`~PyTypeObject.tp_traverse` handlers, a :c:func:`Py_VISIT` macro is
provided. In order to use this macro, the :c:member:`~PyTypeObject.tp_traverse` implementation
must name its arguments exactly *visit* and *arg*:
but the instance has no strong reference to the elements inside it, as they
are allowed to be removed even if the instance is still alive).
+ .. warning::
+ The traversal function must not have any side effects. It must not
+ modify the reference counts of any Python objects nor create or destroy
+ any Python objects.
+
Note that :c:func:`Py_VISIT` requires the *visit* and *arg* parameters to
:c:func:`!local_traverse` to have these specific names; don't name them just
anything.