From b68a8c754007fdc1504d3caecfc67337d7627a2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20=C4=8Cert=C3=ADk?= Date: Sat, 13 Aug 2022 21:33:28 +0200 Subject: [PATCH] Declare variables on the same line This is the most natural Python syntax to declare variables on the same line. --- integration_tests/loop_01.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/integration_tests/loop_01.py b/integration_tests/loop_01.py index b08a8e2a46..1a7ba67ebd 100644 --- a/integration_tests/loop_01.py +++ b/integration_tests/loop_01.py @@ -1,14 +1,10 @@ def main0(): - s: str - s = 'aabbcc' - c: str + s: str = 'aabbcc'; c: str for c in s: print(c) def test_issue_770(): - i: i64 - res: i64 - res = 0 + i: i64; res: i64 = 0 for i in range(10): res += i assert res == 45