//arry/ On 07/28/2017 03:11 PM, Rob Cliffe wrote:
On 28/07/2017 20:57, MRAB wrote:To me, anything beginning with "else" or "elif" suggests an alternative branch, not an additional one (YMMV):On 2017年07月28日 10:17, Michel Desmoulin wrote:elif break and elif None: I'd like that very much. It's weird a breakthe semantic of break and None, but it's in such a dark corner of Pythonanyway I don't bother.Surely it would not be "elif break", but "elif not break"?if condition: do_something else: do_something_completely_differentTherefore I would find "if not break" or even "and if not break" more intuitive.Best wishes Rob CliffeLe 27/07/2017 à 21:19, MRAB a écrit :On 2017年07月27日 03:34, Mike Miller wrote:On 2017年07月26日 16:36, MRAB wrote:"nobreak" would introduce a new keyword, but "not break" wouldn't.Whenever I've used the for-else, I've put a # no-break right next to it, to remind myself as much as anyone else.for...: not break: is the best alternative I've yet seen, congrats. Perhaps inPython 5 it can be enabled, with for-else: used instead for empty iterables, as that's what I expected the first few dozen times.For empty iterables, how about "elif None:"? :-)_______________________________________________ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-devUnsubscribe: https://mail.python.org/mailman/options/python-dev/rob.cliffe%40btinternet.com--- This email has been checked for viruses by AVG. http://www.avg.com_______________________________________________ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-devUnsubscribe: https://mail.python.org/mailman/options/python-dev/larry%40hastings.org
_______________________________________________ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com