On Sat, Mar 23, 2019 at 10:37:43AM -0700, Gregory P. Smith wrote:
> A useless statement like that isn't likely to be typed. I've never seen
> anyone do that.
Unlikely yes, but ideally type annotations should not alter program behavior:
>>> d = {}
>>> try: d["x"]
... except KeyError: print("KeyError")
...
KeyError
>>>
>>> d = {}
>>> try: d["x"] : int
... except KeyError: print("KeyError")
...
Stefan Krah
_______________________________________________
Python-ideas mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/