summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorFichteFoll <fichtefoll2@googlemail.com>2019-07-31 15:55:42 +0200
committerFichteFoll <fichtefoll2@googlemail.com>2019-07-31 15:55:42 +0200
commitdedd237499bc90ab61e9df52ca907e3ce4547e4b (patch)
tree7887550d2d3e1b7037a90a56a538eeb9993b75d1 /testsuite
parent9726e10004e5615c432f126530ee0540b9903f6e (diff)
downloadpep8-dedd237499bc90ab61e9df52ca907e3ce4547e4b.tar.gz
Add support for assignment expressions
Introduced in Python 3.8 with PEP-572. Refer to https://www.python.org/dev/peps/pep-0572.
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/python38.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/testsuite/python38.py b/testsuite/python38.py
new file mode 100644
index 0000000..59addad
--- /dev/null
+++ b/testsuite/python38.py
@@ -0,0 +1,12 @@
+#: Okay
+if x := 1:
+ print(x)
+if m and (token := m.group(1)):
+ pass
+stuff = [[y := f(x), x / y] for x in range(5)]
+#: E225:1:5
+if x:= 1:
+ pass
+#: E225:1:18
+if False or (x :=1):
+ pass