On Tue, Apr 21, 2020 at 9:45 AM M.-A. Lemburg <m...@egenix.com> wrote:

> In the use case discussed here, that namespace would be
> locals(), so you could just as well write render_template(**locals()),
>

Doing that gets in the way of tools. At the very least it makes it
impossible to highlight accidentally unused variables.


> or better: use a namespace object, fill this with the right
> values and pass in render_template(namespace).
>

This sounds like it's going to have the exact same amount of same-named
keywords. Please clarify how this is different.
<http://python.org/psf/codeofconduct/>

We went through this discussion already with Stephen J Turnbull. I've given
concrete examples from the CPython repo of this pattern, where you can see
all the context. Feel free to pick any of them (except the log level thing,
an enum is the right solution there) and explain exactly how you would
reduce same-naming.
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/DN52JHZ6MEAXE3XPHZ4JWVSXWKFRKNTB/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to