[Python-ideas] Retrying EAFP without DRY

Nick Coghlan ncoghlan at gmail.com
Tue Jan 24 08:00:28 CET 2012

On Tue, Jan 24, 2012 at 3:47 PM, Mike Meyer <mwm at mired.org> wrote:
> The argument isn't that we need a new syntax for a small set of loops, it's that the only ways to implement retrying after an exception leave a code smell.

Uh, saying "retrying is fundamentally a looping operation" is not a
code smell. How do you plan to implement retry if not as a looping
construct under the hood? No matter how many times you assert
otherwise, "go back to this earlier point in the code and resume
execution from there" is pretty much the *definition* of a loop.


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

More information about the Python-ideas mailing list