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 Dominik V., docs@python, rhettinger
Date 2020-04-20.21:10:57
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1587417057.98.0.43761493421.issue40341@roundup.psfhosted.org>
In-reply-to
Content
I rather like the discussion in [How do I write a function with output parameters].  Some variant of each of those solutions arise in code reviews over and over again.  Rarely do the occur in simplistic examples, but they do occur.  The simple examples given are the easiest way to learn about the anti-patterns.

In the section [How do I use strings to call functions/methods?], let's eliminate the eval() variant which isn't really helpful.  The locals() technique does occur in practice and is worth showing.

In the section [How can I sort one list by values from another list], I concur that we can completely eliminate "alternative" and its explanatory text.
History
Date User Action Args
2020-04-20 21:10:58rhettingersetrecipients: + rhettinger, docs@python, Dominik V.
2020-04-20 21:10:57rhettingersetmessageid: <1587417057.98.0.43761493421.issue40341@roundup.psfhosted.org>
2020-04-20 21:10:57rhettingerlinkissue40341 messages
2020-04-20 21:10:57rhettingercreate