Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unpack to function target #73

Merged
merged 9 commits into from
Mar 2, 2021

Conversation

tsundvoll
Copy link
Contributor

@tsundvoll tsundvoll commented Feb 17, 2021

New version that replaces #58.

@tsundvoll tsundvoll force-pushed the unpack-to-function-target branch 2 times, most recently from 87ac9dd to aa720d4 Compare February 17, 2021 14:32
Copy link
Contributor

@JensGM JensGM left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CallNodeSubscript should not be relevant if the value is not unpacked.

xun/functions/graph.py Outdated Show resolved Hide resolved
xun/functions/graph.py Outdated Show resolved Hide resolved
xun/functions/store/store_accessor.py Outdated Show resolved Hide resolved
xun/functions/store/store_accessor.py Outdated Show resolved Hide resolved
xun/functions/transformations.py Show resolved Hide resolved
xun/tests/test_graph.py Outdated Show resolved Hide resolved
xun/tests/test_graph.py Show resolved Hide resolved
xun/tests/test_graph.py Outdated Show resolved Hide resolved
xun/tests/test_transformations.py Outdated Show resolved Hide resolved
xun/tests/test_util.py Outdated Show resolved Hide resolved
@tsundvoll tsundvoll self-assigned this Feb 22, 2021
@JensGM JensGM linked an issue Mar 1, 2021 that may be closed by this pull request
@tsundvoll tsundvoll force-pushed the unpack-to-function-target branch 9 times, most recently from d2a3702 to b02bcde Compare March 2, 2021 14:59
A function target tuple can now contain a starred expression,
in accordance with PEP 3132 -- Extended Iterable Unpacking.

Examples
--------
>>> def f():
...     return ('a', 'b', 'c', 'd')
...
>>> a, *bc, d = f()
>>> b, c = bc
>>> a, b, c, d
('a', 'b', 'c', 'd')
@tsundvoll tsundvoll force-pushed the unpack-to-function-target branch 2 times, most recently from 6a91a2d to b2a70af Compare March 2, 2021 15:13
@tsundvoll tsundvoll merged commit bc49fd1 into equinor:master Mar 2, 2021
@tsundvoll tsundvoll deleted the unpack-to-function-target branch March 2, 2021 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Structures unpacking
2 participants