This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author terry.reedy
Recipients barry, gvanrossum, lemburg, michael.foord, ncoghlan, rhettinger, terry.reedy
Date 2013-07-28.17:06:02
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1375031162.24.0.39585136605.issue18472@psf.upfronthosting.co.za>
In-reply-to
Content
Based on recent python-list posts, there is also 'break is bad' propaganda going around. Perhaps we should say that loop-and-a-half with break is preferred (or at least equally acceptable) to repeating code.

while True:
    value = getvalue()
    if not value:
        break
    process(value)

versus

value = getvalue()
while value
    process(value)
    value = getvalue()

The latter has the problem that the getvalue code can get out of synch, and indeed, given the alternative of writing it once, it is not obvious that it should be the same in the two places.
History
Date User Action Args
2013-07-28 17:06:02terry.reedysetrecipients: + terry.reedy, lemburg, gvanrossum, barry, rhettinger, ncoghlan, michael.foord
2013-07-28 17:06:02terry.reedysetmessageid: <1375031162.24.0.39585136605.issue18472@psf.upfronthosting.co.za>
2013-07-28 17:06:02terry.reedylinkissue18472 messages
2013-07-28 17:06:02terry.reedycreate