[Python-ideas] Retrying EAFP without DRY

Nick Coghlan ncoghlan at gmail.com
Wed Jan 25 02:13:18 CET 2012

On Wed, Jan 25, 2012 at 10:52 AM, Mike Meyer <mwm at mired.org> wrote:
> So long as you incorrectly see this as "just another looping
> construct", your conclusions will be flawed. Not necessarily wrong,
> just flawed. It can also be used to fix LBYL and DRY code smells.

It *is* just another looping construct: "retry" = "go back to the
start of the try block". It's really just proposing a weird way to
spell while+continue.

Exception handling and repeating a section of code are *not* the same
thing - it doesn't make sense to bundle the two into a single


Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia

More information about the Python-ideas mailing list