[docs] [issue13233] os.acces documentation error

Guilherme Moro report at bugs.python.org
Thu Oct 20 18:20:41 CEST 2011

New submission from Guilherme Moro <guilherme.moro at gmail.com>:


points out that I should use
    fp = open("myfile")
except IOError as e:
    if e.errno == errno.EACCESS:
        return "some default data"
    # Not a permission error.
    with fp:
        return fp.read()

but theres a typo the correct is errno.EACCES: not errno.EACCESS:

assignee: docs at python
components: Documentation
messages: 146024
nosy: Guilherme.Moro, docs at python
priority: normal
severity: normal
status: open
title: os.acces documentation error
versions: Python 2.7

Python tracker <report at bugs.python.org>

More information about the docs mailing list