Skip to content

Python: Recognise walrus operator#3126

Merged
RunDevelopment merged 1 commit intoPrismJS:masterfrom
hoonweiting:python-walrus
Oct 5, 2021
Merged

Python: Recognise walrus operator#3126
RunDevelopment merged 1 commit intoPrismJS:masterfrom
hoonweiting:python-walrus

Conversation

@hoonweiting
Copy link
Copy Markdown
Contributor

Python 3.8 introduced the assignment expression operator, better known as the walrus operator. However, I'm not sure if ...|!=|:=|... is preferred over ...|[!:]=|....

Copy link
Copy Markdown
Member

@RunDevelopment RunDevelopment left a comment

Choose a reason for hiding this comment

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

LGTM; I'll merge this after GH Actions come back online.

Thank you @hoonweiting!

However, I'm not sure if ...|!=|:=|... is preferred over ...|[!:]=|....

Both are fine.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Oct 5, 2021

JS File Size Changes (gzipped)

A total of 1 files have changed, with a combined diff of +1 B (+0.1%).

Details
file master pull size diff % diff
components/prism-python.min.js 1.06 KB 1.06 KB +1 B +0.1%

Generated by 🚫 dangerJS against 5bcbc7c

@RunDevelopment RunDevelopment merged commit 18bd101 into PrismJS:master Oct 5, 2021
@hoonweiting hoonweiting deleted the python-walrus branch October 5, 2021 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants