[docs] [issue33878] Doc: Assignment statement to tuple or list: case missing.

Julien Palard report at bugs.python.org
Sat Jun 16 10:52:59 EDT 2018

Julien Palard <julien+python at palard.fr> added the comment:

Agree, the empty list could be merged, the only special-case is the "single item in parenthesis", as always.

I'm still exploring the path to simplicity over explicitly listing everything (but in the reference, explicitly listing could be what we need):

    Assignment of an object to a target list, optionally enclosed in parentheses or square brackets, is recursively defined as follows.

        If the target list is a single target in parentheses: The object is assigned to that target.
        Else the object must be an iterable with the same number of items as there are targets in the target list, and the items are assigned, from left to right, to the corresponding targets.

What do you think? Should we go full-explicit, with trailing comas and everything?


Python tracker <report at bugs.python.org>

More information about the docs mailing list