
On Thu, 30 Apr 2020 at 00:37, Raymond Hettinger <raymond.hettinger@gmail.com> wrote:
On Apr 29, 2020, at 4:20 PM, Antoine Pitrou <solipsis@pitrou.net> wrote:
On Wed, 29 Apr 2020 12:01:24 -0700 Raymond Hettinger <raymond.hettinger@gmail.com> wrote:
Also, if you know of a real world use case, what solution is currently being used. I'm not sure what alternative call_once() is competing against.
Of course this is meant to be something simple - so there are no "real world use cases" that are "wow, it could not have been done without it". I was one of the first to reply to this on "python-ideas", as I often need the pattern, but seldon worrying about rentrancy, or parallel calling. Most of the uses are just that: initalize a resource lazily, and just "lru_cache" could work. My first thought was for something more light-weight than lru_cache (and a friendlier name). So, one of the points I'd likely have used this is here: https://github.com/jsbueno/terminedia/blob/d97976fb11ac54b527db4183497730883...
_______________________________________________ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-leave@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/Y2MUKYDC... Code of Conduct: http://python.org/psf/codeofconduct/