bpo-35814: Allow same r.h.s. in annotated assignments as in normal ones#11667
bpo-35814: Allow same r.h.s. in annotated assignments as in normal ones#11667ilevkivskyi merged 6 commits intopython:masterfrom
Conversation
|
Should we also backport this to 3.7? |
|
Hm, actually there was an old test checking that |
…/cpython into fix-annotation-tuple
|
OK, after more careful reading of PEP 526, I found this: So it was a deliberate decision. The PEP is final now, so I would propose to just close this, unles @rhettinger really thinks we need to allow omitting parentheses. |
|
This was meant to guard against interpretations like var1: type = 1, var2 = 2 |
|
Sorry, too soon. I think that worry was unneeded and agree with Raymond. We can change it in 3.8 but no backport. |
I think it would make sense to add a tests that this particular code still fails. |
https://bugs.python.org/issue35814