On 01/17/2018 10:59 PM, Steven D'Aprano wrote:
On Thu, Jan 18, 2018 at 05:22:06PM +1100, Chris Angelico wrote:
I haven't yet seen any justification for syntax here. The nearest I've
seen is that this "ensure" action is more like:
try:
cond = x >= 0
except BaseException:
raise AssertionError("x must be positive")
else:
if not cond:
raise AssertionError("x must be positive")
Which, IMO, is a bad idea, and I'm not sure anyone was actually
advocating it anyway.
My understanding is that Sylvain was advocating for that.
Agreed. Which, as has been pointed out, is an incredibly bad idea.
--
~Ethan~
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/