On Wed, Feb 12, 2020 at 6:51 AM <jdve...@gmail.com> wrote:
>
> Good point, Brandt. However, `global` is not used in the assertion itself as 
> walrus operator can be.
>
> My point is: is it good to add a new way of causing side effects in 
> assertions?
>

My point is: Is it good to find extremely stupid things that can be
done with a code construct, and then blaming the code construct?

I can do way, WAY worse with assertions.

assert globals().__setitem__("len", lambda x: 5) is None

Obviously lambda is evil, because it can be used in this way.

This thread doesn't belong on python-ideas, and I don't see a lot of
value moving it to python-list either. Maybe it can move to Google
Groups instead?

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/6RVXMJBRYHO5UIFIUMVONDU23EIHVDYH/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to