This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author rhettinger
Recipients AlexWaygood, docs@python, mwallerb, rhettinger
Date 2022-01-14.20:30:01
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1642192201.49.0.771893477547.issue46379@roundup.psfhosted.org>
In-reply-to
Content
Markus, thank you for the suggestion but I'm going to decline.  When this rough equivalent was first created, we looked at several recipes and chose this one as being one of the least magical.  Intentionally, we did not use the variant you've proposed.  To a person well versed in recursion and in generator chains it makes sense but not so much for anyone else.  Plus it is hard to step through by hand to see what it is doing.

In general, the rough equivalents were intended to a way to understand what output is going to be generated.  That is why they are mostly simple rather than being faithful to the actual implementations (otherwise, we would use classes rather than generators for all the equivalents).  Viewed in this light, we place almost zero weight to making the recipe memory efficient with respect to temporary variables.
History
Date User Action Args
2022-01-14 20:30:01rhettingersetrecipients: + rhettinger, docs@python, AlexWaygood, mwallerb
2022-01-14 20:30:01rhettingersetmessageid: <1642192201.49.0.771893477547.issue46379@roundup.psfhosted.org>
2022-01-14 20:30:01rhettingerlinkissue46379 messages
2022-01-14 20:30:01rhettingercreate