A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2002-March/021746.html below:

[Python-Dev] self._backupfilename in fileinput

[Python-Dev] self._backupfilename in fileinput [Python-Dev] self._backupfilename in fileinputSkip Montanaro skip@pobox.com
Mon, 25 Mar 2002 16:13:02 -0600
Working my way through the unqualified except: clauses, I found one in
fileinput.py that looks very straightforward:

    try: os.unlink(backupfilename)
    except: pass

To make sure that OSError was all that could be raised I started looking at
what values backupfilename could assume.  Then I started looking at
self._backupfilename.  This weird beast takes on values of three distinct
types: None, 0, and various strings.  

While it's not technically broken, is this something worth fixing?  My
inclination is to just add OSError to the except clause and let someone else
worry about fixing something that's ugly but not really broken.

Skip



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4