[Tutor] Use of "or" in a lambda expression

Danny Yoo danny.yoo at gmail.com
Sat Apr 4 22:10:05 CEST 2015


>
> To my mind, would:
>
> def quit():
>     print('Hello lambda world!')
>     sys.exit()
>
> and:
>
> widget = Button(None, text='Hello event world!', command=quit)
>
> be preferable Python style?
>

Yes, I'd prefer this much more, compared to  the original.


More information about the Tutor mailing list