[New-bugs-announce] [issue13233] os.acces documentation error

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


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

http://docs.python.org/library/os.html#os.access

points out that I should use
try:
    fp = open("myfile")
except IOError as e:
    if e.errno == errno.EACCESS:
        return "some default data"
    # Not a permission error.
    raise
else:
    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>
<http://bugs.python.org/issue13233>
_______________________________________


More information about the New-bugs-announce mailing list