A = X > Y ? X : Y
François Pinard
pinard at iro.umontreal.ca
Tue Feb 8 20:59:27 EST 2000
More information about the Python-list mailing list
Tue Feb 8 20:59:27 EST 2000
- Previous message (by thread): A = X > Y ? X : Y
- Next message (by thread): A = X > Y ? X : Y
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Brad Howes <bradh at mediaone.net> writes: > Curtis Jensen <cjensen at be-research.ucsd.edu> writes: > Its in the FAQ -- and its not as pretty: > a = ( ( x > y ) and x ) or y > Seems to work fine for numbers -- not sure about objects or strings. If really in the FAQ, it should not be. It surely does not work when x is 0, and y is less than 0. -- François Pinard http://www.iro.umontreal.ca/~pinard
- Previous message (by thread): A = X > Y ? X : Y
- Next message (by thread): A = X > Y ? X : Y
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list