GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Philip May
  • Machine Learning
  • Python
  • IT
  • Linux
  • Blog
  • About Me
  • Backoff
  • Beautiful Soup
  • Black
  • Colab
  • Collections
  • Conda
  • Context Manager

This view

  • Original page
  • New address

GeezerVison is showing philipmay.org — Python Programming — Philip May

Python Programming#

Ignore an Exception#

Suppresses specified exception.

import contextlib

with contextlib.suppress(FileNotFoundError):
    os.remove(os.path.join(dirname, filename))
On this page
Edit on GitHub
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.