paint-brush
How I Changed Python to Accept "else-less" If Expressionsby@miguendes
202 reads

How I Changed Python to Accept "else-less" If Expressions

by Miguel Brito26mAugust 27th, 2021
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

"else-less" if expressions are similar to Ruby's "inline if", also known as a conditional modifier. Python 3.11.0a0 (heads/main:938e84b4fa, Aug. 6 2021, 08:59:36) [GCC 7.5.0] on linux. The 'else' is currently named 'F' in the language's grammar. The 'if' expression is an expression that returns nil if the expression evaluates to false. In Python, one cannot do that without explicitly adding an else to the expression.

People Mentioned

Mention Thumbnail

Companies Mentioned

Mention Thumbnail
Mention Thumbnail
featured image - How I Changed Python to Accept "else-less" If Expressions
Miguel Brito HackerNoon profile picture
Miguel Brito

Miguel Brito

@miguendes

I’m an AI Software Engineer based in London/UK using AI to improve cancer detection. https://miguendes.me/

About @miguendes
LEARN MORE ABOUT @MIGUENDES'S
EXPERTISE AND PLACE ON THE INTERNET.
L O A D I N G
. . . comments & more!

About Author

Miguel Brito HackerNoon profile picture
Miguel Brito@miguendes
I’m an AI Software Engineer based in London/UK using AI to improve cancer detection. https://miguendes.me/

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite
Also published here
Cyberfishnews
Cyberfishnews