[Python-ideas] PEP 505: None-aware operators: operators ?= and ?? and OR

Rhodri James rhodri at kynesim.co.uk
Fri Jul 20 10:35:26 EDT 2018


On 20/07/18 14:06, Michel Desmoulin wrote:
> Proposal a __very__ dumbed down "try" expression
> ====================================================
> 
>      variable = try Expression as not sentinel [else default]

I like this approach.  I think it should play nice with the ternary if, 
though I haven't actually checked the grammar.

My only doubt is how much value there is to having a sentinel other than 
"None".

-- 
Rhodri James *-* Kynesim Ltd


More information about the Python-ideas mailing list