On Tue, Apr 24, 2018 at 12:03 PM, Ethan Furman <et...@stoneleaf.us> wrote:
[..]
> But I do write this:
>
>   def wrapper(func, some_value):
>     value_I_want = process(some_value)
>     def wrapped(*args, **kwds):
>       if value_I_want == 42:
>          ...

But this pattern is more rare than comparing local variables. That's
the point I'm trying to use.  Besides, to make it an assignment
expression under my proposal you would need to use parens. Which makes
it even less likely that you confuse '=' and '=='.

Yury
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to