RFC: Proposal: Deterministic Object Destruction

Rick Johnson rantingrickjohnson at gmail.com
Wed Feb 28 21:46:05 EST 2018


On Wednesday, February 28, 2018 at 5:02:17 PM UTC-6, Chris Angelico wrote:

> Here's one example: reference cycles. When do they get detected?
> Taking a really simple situation:
>
> class Foo:
>     def __init__(self):
>         self.self = self

*shudders*

Can you provide a real world example in which you need an
object which circularly references _itself_? This looks like
a highly contrived example used to (1) merely win the
argument, and (2) Bump fib() up one position from it's
current position as "the worst introductory example of how
to write a function in the history of programming tutorials"



More information about the Python-list mailing list