New submission from Arthur Milchior <art...@milchior.fr>:
According to the current documentation, I believe there is an error in list_display, set_display and dict_display. According to list display, this is a valid expression [* l1 ^ l2] parsed as list_display: "[" starred_list: starred_item: "*" or_expr: xor_expr: xor_expr: "l1" "^" and_expr: "l2" "]" I add the full derivation from and_expr to l2 at the end of the report, it's not important for this topic. The same issue is present for set. For dictionary it is also present, but instead the error is in key_datum. I have no idea what would be the proper correction. Indeed [*l1+l2] is valid (in 3.9) at least. So it's not like the element after a star is restricted to be an atom. At the very least, I believe it should be clearly indicated that, contrary to what the name indicates, "or_expr" do not mean that we accept any or, nor any expression. It just mean that *some_complex_expression is interpreted as * (some_complex_expression) and that it is valid iff some_complex_expression is valid shift_expr: a_expr: m_expr: power: primary: atom: identifier: "l2" ---------- assignee: docs@python components: Documentation messages: 405187 nosy: Arthur-Milchior, docs@python priority: normal severity: normal status: open title: The documentation wrongly uses or_expr for star expresion in displays versions: Python 3.10, Python 3.11, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue45646> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com