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 iljah
Recipients iljah
Date 2020-10-09.13:43:54
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1602251034.78.0.495592912184.issue41982@roundup.psfhosted.org>
In-reply-to
Content
File:
#! /usr/bin/env python3
with \
  open('file1', 'w') as file1,
  open('file2', 'w') as file2:

  print('ok')

gives error:
  File "./test.py", line 3
    open('file1', 'w') as file1,
                         ^
SyntaxError: invalid syntax

but adding \ after file1 fixes it:
  open('file1', 'w') as file1, \


Location flagged by syntax error (between as and file1) is not correct.
History
Date User Action Args
2020-10-09 13:43:54iljahsetrecipients: + iljah
2020-10-09 13:43:54iljahsetmessageid: <1602251034.78.0.495592912184.issue41982@roundup.psfhosted.org>
2020-10-09 13:43:54iljahlinkissue41982 messages
2020-10-09 13:43:54iljahcreate