-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Add walrus operator to lexer and try to make lexer code cleaner. #968
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #968 +/- ##
==========================================
- Coverage 64.7% 64.67% -0.04%
==========================================
Files 97 97
Lines 17041 17032 -9
Branches 3799 3802 +3
==========================================
- Hits 11026 11015 -11
- Misses 3441 3442 +1
- Partials 2574 2575 +1
Continue to review full report at Codecov.
|
The walrus operator is 3.8 only? Are we targetting that? I tend to feel like we should target 3.7 rather chasing the latest shiny version. (I may be biased because the walrus operator feels like a mistake for the language.) The lexer refactor is great. It would be nice to split the refactor and feature into separate commits. |
Should we merge this now? @cthulahoops would you be good with that? It's been 20 days since this was opened and we should merge before there are conflicts. |
I will remove the walrus operator from this change to split the refactor and the walrus operator, so I would rather wait for this. |
@cthulahoops could you re-review? |
Excuse me, I don't understand, why Python actually needs "walrus operator". Why don't they implement assignment as binary operator? |
To avoid the confusion between
I always thought the lack of an assignment operator was a strength of python. The walrus operator seems like an odd thing to introduce. It'll save a couple of lines of code in its few legitimate uses, but it'll get lots of use where it sholudn't. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
No description provided.