Ternary operator and tuple unpacking -- What am I missing ?
Scott David Daniels
Scott.Daniels at Acm.Org
Tue Jan 13 10:47:56 EST 2009
imageguy wrote:
> 1) >>> n = None
> 2) >>> c,d = n if n is not None else 0,0
...
This is more easily expressed as:
c, d = n or (0, 0)
More information about the Python-list
mailing list