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

LIN-32-walrus-operator #666

Merged
merged 7 commits into from
Jun 3, 2022
Merged

LIN-32-walrus-operator #666

merged 7 commits into from
Jun 3, 2022

Conversation

aayan636
Copy link
Contributor

@aayan636 aayan636 commented Jun 2, 2022

Description

Added support for walrus operator (:=) for Python 3.8 and above

Fixes #LIN-32

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

The walrus operator updates the identifier to the left of the := operator and also returns the value so that the expression value can be reused. Added tests for both behaviors in tests/end-to-end/test_op.py

tests/end_to_end/test_op.py Outdated Show resolved Hide resolved
Copy link
Contributor

@yifanwu yifanwu left a comment

Choose a reason for hiding this comment

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

Looks pretty good! Just have some confusion about your TODO. and Shardul's test request.

lineapy/transformer/node_transformer.py Outdated Show resolved Hide resolved
Copy link
Contributor

@yifanwu yifanwu left a comment

Choose a reason for hiding this comment

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

ship it!

@aayan636 aayan636 merged commit 371da69 into main Jun 3, 2022
@aayan636 aayan636 deleted the LIN-32-walrus-operator branch June 3, 2022 22:16
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.

3 participants