[Python-Dev] cpython: Rename contextlib.ignored() to contextlib.ignore(). (original) (raw)

Greg Ewing greg.ewing at canterbury.ac.nz
Tue Oct 15 22:50:52 CEST 2013


Zero Piraeus wrote:

I thought the whole point was to replace code that would otherwise contain 'except: pass' with something slightly more concise.

Hmmm, that suggests another potential name.

with passing_on(OSError):
   os.remove(somefile)

-- Greg



More information about the Python-Dev mailing list