[Python-ideas] Inline assignments using "given" clauses

Rhodri James rhodri at kynesim.co.uk
Thu May 10 10:23:38 EDT 2018


On 10/05/18 14:44, Guido van Rossum wrote:
> I'm sorry, but unless there's a sudden landslide of support for 'given' in
> favor of ':=', I'm really not going to consider it.

OK, this is my ha'p'th in favour of 'given', for what little it's worth. 
  The more I see of general assignment expressions, the less I like 
them.  All I really want is a less clumsy way to write

     while true:
         thing_to_do = get_something_to_do()
         if thing_to_do == GET_OUT_OF_HERE:
             break
         # else do stuff

-- 
Rhodri James *-* Kynesim Ltd


More information about the Python-ideas mailing list