My first Python program

Hallvard B Furuseth h.b.furuseth at
Tue Oct 12 22:19:51 CEST 2010

I wrote:
>     except IOError:
>         if e.errno != errno.ENOENT: raise    # if you are picky

Argh, I meant "except IOError, e:".  That's for Python 2 but not
Python 3.  "except IOError as e:" works on Python 2.6 and above.


More information about the Python-list mailing list