[Python-ideas] with ... except

Terry Reedy tjreedy at udel.edu
Sat Mar 9 21:38:28 CET 2013

On 3/9/2013 9:34 AM, Nick Coghlan wrote:

> Ultimately, though, this may be an inevitable price we pay for the
> abstraction - you *do* lose flexibility when you design for the
> typical case, and so you do eventually have to say "sorry, to handle
> that more complex case you need to drop back down to the lower level
> syntax" (try/except/else/finally for with statements, while loops for
> for loops). An important part of minimising language complexity is
> actually recognising when that limit has been reached and saying, no,
> sorry, we want to keep the higher level API simple, so that use case
> won't be supported, since it can already be handled with the lower
> level API in those cases where it is needed.

Nicely put.

Terry Jan Reedy

More information about the Python-ideas mailing list