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 <1609006910.64.0.0653829301001.issue42737@roundup.psfhosted.org>
In-reply-to
Content
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
Hi!

With PR 23952 it all will be no-op.

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

def f():
   (yield).x: int
History
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: <1609006910.64.0.0653829301001.issue42737@roundup.psfhosted.org>
2020-12-26 18:21:50serhiy.storchakalinkissue42737 messages
2020-12-26 18:21:50serhiy.storchakacreate