On 03/02/2017 12:36 PM, Sven R. Kunze wrote:
On 01.03.2017 06:34, Ethan Furman wrote:
On the bright side, if enough use-cases of this type come up (pesky try/except
for a simple situation), we may be able
to get Guido to reconsider PEP 463. I certainly think PEP 463 makes a lot more
sense that adding list.get().
It then would make sense to remove .get() on dicts. ;-)
and to remove parameter "default" of max().
and to remove parameter "default" of getattr().
Backwards compatibility, and performance, says no. ;)
try/except expressions are not a silver bullet any more than try/except blocks.
But they can still be very useful.
--
~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/