New submission from Carsten Docktor <carsten.dock...@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 ```python my_list = [ "a", "b" "c", "d" ] interpreted_list = [ "a", "bc", "d", ] assert my_list == interpreted_list # unwanted behavior ``` ---------- components: Interpreter Core messages: 389970 nosy: carsten.docktor priority: normal severity: normal status: open title: Raise SyntaxError on implicit string concatentation in list type: behavior versions: Python 3.9 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue43692> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com