For review: PEP 308 - If-then-else expression
Paul Rubin
phr-n2003b at NOSPAMnightsong.com
Sat Feb 8 17:15:43 EST 2003
More information about the Python-list mailing list
Sat Feb 8 17:15:43 EST 2003
- Previous message (by thread): For review: PEP 308 - If-then-else expression
- Next message (by thread): For review: PEP 308 - If-then-else expression
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Dave Brueck <dave at pythonapocrypha.com> writes: > I like the PEP proposal _more_ than the C way because the implication of > what is expected is stronger. I like the similarity between these two: > > z = x.Foo() > z = x.Foo() if x else -1 # I expect z to get x.Foo() most of the time The PEP proposal is uncomfortable in cases where you DON'T especially expect one outcome more than the other: maximum = x if (x > y) else y seems more confusing than maximum = (x > y) ? x : y
- Previous message (by thread): For review: PEP 308 - If-then-else expression
- Next message (by thread): For review: PEP 308 - If-then-else expression
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list