Summary: | PEP-3132 not supported | ||
---|---|---|---|
Product: | [Developer tools] kdev-python | Reporter: | Francis Herne <mail> |
Component: | Language support | Assignee: | Sven Brauch <mail> |
Status: | RESOLVED FIXED | ||
Severity: | wishlist | ||
Priority: | NOR | ||
Version: | 4.90.91 | ||
Target Milestone: | 1.7.3 | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/kdev-python/6b81441e0db9a7c34dccc627cf99c0785a00afed | Version Fixed In: |
Description
Francis Herne
2016-04-30 21:04:37 UTC
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 |