PEP 308 - suggestion for generalising the ternary operator
Damien Morton
newsgroups1 at bitfurnace.com
Wed Feb 12 22:42:07 EST 2003
More information about the Python-list mailing list
Wed Feb 12 22:42:07 EST 2003
- Previous message (by thread): PEP 308 - suggestion for generalising the ternary operator
- Next message (by thread): PEP 308 - suggestion for generalising the ternary operator
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I tend to think that using the colon in a conditional selection expression makes it hard to distinguish from a dictionary Any comments on the original proposed form? Is the question mark as an operator too scary? (cond?value, cond?value, cond?value, cond?value, default_value) (cond?true_value, false_value) vs. (cond:value, cond:value, cond:value, cond:value, default_value) (cond:true_value, false_value) some other ideas: (cond->value, cond->value, cond->value, cond->value, default_value) (cond->value, default_value) or (cond=>value, cond=>value, cond=>value, cond=>value, default_value) (cond=>value, default_value) "Erik Max Francis" <max at alcyone.com> wrote in message news:3E4AE4F1.6397A292 at alcyone.com... > Oren Tirosh wrote: > > > (cond:value, cond:value, cond:value, cond:value, default_value) > > > > Or maybe: > > > > (cond:value, cond:value, cond:value, cond:value, else:default_value) > > My first reaction is that, as a general conditoinal form, that doesn't > look so bad. > > -- > Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/ > __ San Jose, CA, USA / 37 20 N 121 53 W / &tSftDotIotE > / \ If you can't fight and you can't flee, flow. > \__/ Robert Elliot > Physics reference / http://www.alcyone.com/max/reference/physics/ > A physics reference. > -- > http://mail.python.org/mailman/listinfo/python-list >
- Previous message (by thread): PEP 308 - suggestion for generalising the ternary operator
- Next message (by thread): PEP 308 - suggestion for generalising the ternary operator
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list