PEP-3132 "Extended Iterable Unpacking" (https://www.python.org/dev/peps/pep-3132/), part of Python 3.0, allows the syntax: `a, *b, c = range(5)` Resulting in a == 0; b == [1,2,3]; c == 4 kdev-python doesn't like this and warns that 'b' is undefined.
Git commit 6b81441e0db9a7c34dccc627cf99c0785a00afed by Sven Brauch, on behalf of Francis Herne. Committed on 02/06/2016 at 20:41. Pushed by brauch into branch '5.0'. Adds support for PEP-3132 'Extended Iterable Unpacking' Support assignments of the form a, *b, c = 1, 2, 3, 4, 5, after which b is [2, 3, 4]. Related: bug 359914 Differential revision: https://phabricator.kde.org/D1751 Fix assignments of the form a = b = 7, a = b = 3, 4. Fix assignment from a single-element tuple: foo = (3,) makes foo a tuple, not int. Fix unpacking into a single-element tuple: foo, = [7] makes foo an int, not a list. Fix unpacking of nested tuples: foo, (bar, baz) = 2, ('a', 5.5). Declaration aliasing works for simple "a = b" assignment, e.g. def aaa(a: int): return "a" bbb = aaa It _doesn't_ work for anything more advanced, e.g. def aaa(a: int): return "a" bbb, ccc = aaa, 4 although the function type is preserved. This is a regression, aliasing works for non-nested tuple assignment without this patch. The use case is however questionable and the benefit of these changes is certainly more valuable. M +86 -104 duchain/declarationbuilder.cpp M +12 -15 duchain/declarationbuilder.h M +27 -2 duchain/tests/pyduchaintest.cpp http://commits.kde.org/kdev-python/6b81441e0db9a7c34dccc627cf99c0785a00afed