[Python-ideas] Is this PEP-able? for X in ListY while conditionZ:

Stephen J. Turnbull stephen at xemacs.org
Wed Jun 26 08:06:04 CEST 2013


Steven D'Aprano writes:

 > I'm pretty sure they mean exactly what they say. Why else would
 > they say it? The coding standard in question is as clear as day:
 > 
 > [quote]
 > Using break and continue is not allowed in any of your code for
 > this class.
 > [end quote]

Note that here they wrote "*this* class", while the rest of the rules
have no such clarification.  It's quite possible that the exercises
for CSMC 201 are such that "break" or "continue" would rarely be good
style, and a more general rule will be introduced in more advanced
classes.  I suspect that the faculty and TAs would revolt if they
frequently had to plow through the kind of example you presented.



More information about the Python-ideas mailing list