Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: if <expr> as <name> syntax interest
Post: RE: if <expr> as <name> syntax interest

Thanks for the link! That covers my use cases, although I prefer as over :=... Apparently why they didn't use as over := is discussed here: https://www.reddit.com/r/Python/comments...ly/e1pfzgv Qui...
Lucid News and Discussions 2 2,373 Jul-06-2018, 03:45 PM
    Thread: if <expr> as <name> syntax interest
Post: if <expr> as <name> syntax interest

A useful addition to the python base is an if statement that can capture the expression's result in a variable if it's truthy: if re.match(pattern, str) as match: print(match.group(0))Which could rep...
Lucid News and Discussions 2 2,373 Jul-06-2018, 03:32 PM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020