bpo-40334: Correctly identify invalid target in assignment errors (GH-20076)
Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
diff --git a/Lib/test/test_genexps.py b/Lib/test/test_genexps.py
index 86e4e19..5c1a209 100644
--- a/Lib/test/test_genexps.py
+++ b/Lib/test/test_genexps.py
@@ -158,7 +158,7 @@
>>> (y for y in (1,2)) += 10
Traceback (most recent call last):
...
- SyntaxError: cannot assign to generator expression
+ SyntaxError: 'generator expression' is an illegal expression for augmented assignment
########### Tests borrowed from or inspired by test_generators.py ############