Adding a conditional expression in Py3.0
25 Sep
2005
25 Sep
'05
12:53 a.m.
Sorry for looking in every hole. Just a suggestion. A= condition and first or second problem is in case when first in (None,0,[],""). May be invent new operator 'take'. take - returns right operator when left evals to True and stops computing condidtional expression. Then we could write: A = condition take first or second. A = x==y take w or s A = z is not None and q!=12 take [] or allowable(z,q) take [(z,q)] or "Impossible" Ok, it might looks ugly. But may be not. ------------------------------------- Excuse my english.
6757
Age (days ago)
6759
Last active (days ago)
3 comments
4 participants
participants (4)
-
Gustavo J. A. M. Carneiro
-
Nick Coghlan
-
Reinhold Birkenfeld
-
Sokolov Yura