This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients BTaskaya, gvanrossum, lys.nikolaou, pablogsal, serhiy.storchaka
Date 2020-12-26.18:21:50
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
About the difference in behavior. Currently:

>>> (1/0).numerator: int
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ZeroDivisionError: division by zero
>>> x[0]: int
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'x' is not defined
>>> [][print('Hi!')]: int

With PR 23952 it all will be no-op.

Also, there should be changes in the following weird example:

def f():
   (yield).x: int
Date User Action Args
2020-12-26 18:21:50serhiy.storchakasetrecipients: + serhiy.storchaka, gvanrossum, lys.nikolaou, pablogsal, BTaskaya
2020-12-26 18:21:50serhiy.storchakasetmessageid: <>
2020-12-26 18:21:50serhiy.storchakalinkissue42737 messages
2020-12-26 18:21:50serhiy.storchakacreate