On Sat, Apr 18, 2020 at 11:19 PM Stephen J. Turnbull
<turnbull.stephen...@u.tsukuba.ac.jp> wrote:
>
> Chris Angelico writes:
>
>  > Look at the real-world examples that I posted and tell me what I
>  > should be doing differently, if it's an anti-pattern to be
>  > discouraged.
>
> IIRC, you didn't post real-world examples relevant to Paul's comment
> because you posted only the call sites.
>
> So, for example, if a function call you posted were refactored to a
> local function (perhaps using a nonlocal declaration, though cases
> where that's necessary should be rare), you wouldn't need to pass
> those arguments at all.
>

Except that render_template isn't one of my own functions. It's part
of the templating engine (this is a Flask web app). There is no
refactoring to do - that IS the correct way to call it.

The only way to avoid that would be to do something silly like
**locals() and we already know from the f-string discussion that
that's a bad idea.

ChrisA
_______________________________________________
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/TRPT2LQ4IVOPRYDR2KITLCV6XHVYW7TI/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to