RFC: Proposal: Deterministic Object Destruction

dieter dieter at handshake.de
Thu Mar 1 02:11:03 EST 2018


Rick Johnson <rantingrickjohnson at gmail.com> writes:
> ...
> Can you provide a real world example in which you need an
> object which circularly references _itself_?

Circular structures occur in real life.

One example are tracebacks (which are very helpful for debugging
reasons). Keeping a traceback in a variable can easily introduce
a cycle.

Another example is a tree structure where you need both efficient
access to children and ancestors of a node (see the DOM standard).




More information about the Python-list mailing list