[New-bugs-announce] [issue43692] Raise SyntaxError on implicit string concatentation in list
report at bugs.python.org
Thu Apr 1 06:28:05 EDT 2021
New submission from Carsten Docktor <carsten.docktor at gmail.com>:
I recently found several bugs, which came from the "feature" shown below.
Is python supposed to use string concatenation in a list environment like this? Why would this be appreciated?
## Expected Behavior
The example below should raise a SyntaxErorr for a missing comma.
String concatenation in a list should require brackets.
## Current Behavior
Missing commas in a string list lead to unnoticed concatenated strings.
## Steps to Reproduce
my_list = [
interpreted_list = [
assert my_list == interpreted_list # unwanted behavior
components: Interpreter Core
title: Raise SyntaxError on implicit string concatentation in list
versions: Python 3.9
Python tracker <report at bugs.python.org>
More information about the New-bugs-announce