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

Nick Coghlan ncoghlan at gmail.com
Sun Oct 13 17:11:41 CEST 2013


On 14 October 2013 01:05, Victor Stinner <victor.stinner at gmail.com> wrote:
> 2013/10/13 Ethan Furman <ethan at stoneleaf.us>:
>> True, but Raymond's example of
>>
>>     with ignore(OSError):
>>         os.remove('somefile')
>
> And what about:
>
> with ignore(OSError):
>   os.remove('file1')
>   os.remove('file2')

It's just as broken as the try/except equivalent. I consider that a
feature, not a bug.

Cheers,
Nick.

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


More information about the Python-Dev mailing list