https://bugs.kde.org/show_bug.cgi?id=359915
Francis Herne <m...@flherne.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Latest Commit| |http://commits.kde.org/kdev | |-python/69177a77cbd17af0c19 | |205ce25943cc8f693d80d Resolution|--- |FIXED Status|UNCONFIRMED |RESOLVED --- Comment #1 from Francis Herne <m...@flherne.uk> --- Git commit 69177a77cbd17af0c19205ce25943cc8f693d80d by Francis Herne. Committed on 13/11/2016 at 15:46. Pushed by flherne into branch 'master'. Improved unpacking and iteration. Make unpacking in assignments handle unsure-types (unpack all suitable types and combine the results). ``` a = 1, 2, 3 a = ["a", "b", "c"] x, y, z = a # 'unsure (int, str)' rather than 'mixed'. ``` Reimplement visitFor() and visitComprehension() to use the assignment code, which has better unpacking support and saves a lot of lines. For-loops and comprehensions now get a type when used on tuples: `for x in 1, 2, 3: pass # 'int'` ...and support nested and PEP-3132 unpacking: ``` for first, *middle, (a, b) in [(1, 2, 3, (4, 5))]: pass # middle: 'list of int', a: 'int' ``` Iterating over dicts now gets the key type rather than values. Fixes one previously-XFAIL test, adds a few more. No known regressions. Differential Revision: https://phabricator.kde.org/D3352 M +89 -187 duchain/declarationbuilder.cpp M +1 -26 duchain/declarationbuilder.h M +5 -1 duchain/helpers.cpp M +8 -4 duchain/tests/pyduchaintest.cpp http://commits.kde.org/kdev-python/69177a77cbd17af0c19205ce25943cc8f693d80d -- You are receiving this mail because: You are watching all bug changes.