PEP 308: some candidate uses cases from live code
Paul Rubin
http
Tue Feb 11 19:23:12 EST 2003
More information about the Python-list mailing list
Tue Feb 11 19:23:12 EST 2003
- Previous message (by thread): PEP 308: some candidate uses cases from live code
- Next message (by thread): PEP 308: some candidate uses cases from live code
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Martin Maney <maney at pobox.com> writes: > These are the uses of a simple if/else that seemed to me to be at least > vaguely suitable for the proposed ternary operator; most of the if/else > occurences rejected were over four lines or had very little in common > between the if and the else code. I don't believe I omitted any that > weren't less good candidates than the ones below. I think occurrences of x = foo # set default value if cond: x = bar should also count as potential places for a conditional expression, even though no "else" is involved. It's a shortcut for if cond: x = bar else: x = foo and so instances of it should be included in your "database".
- Previous message (by thread): PEP 308: some candidate uses cases from live code
- Next message (by thread): PEP 308: some candidate uses cases from live code
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list