what does := means simply?

Marko Rauhamaa marko at pacujo.net
Thu May 17 10:50:22 EDT 2018


bartc <bc at freeuk.com>:
> Anyway, try this:
>> def showarg(x): print(x)
>> def dummy(*args,**kwargs): pass
>> dummy(a=showarg(1),*[showarg(2),showarg(3)])
>> This displays 2,3,1 showing that evaluation is not left to right.

Nice one!
Marko


More information about the Python-list mailing list

AltStyle によって変換されたページ (->オリジナル) /