This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: os.acces documentation error
Type: Stage: resolved
Components: Documentation Versions: Python 3.2, Python 3.3, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: ezio.melotti Nosy List: Guilherme.Moro, docs@python, ezio.melotti, python-dev
Priority: normal Keywords:

Created on 2011-10-20 16:20 by Guilherme.Moro, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (4)
msg146024 - (view) Author: Guilherme Moro (Guilherme.Moro) Date: 2011-10-20 16:20
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:
msg146030 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2011-10-20 16:53
New changeset 1d8fad82c32d by Ezio Melotti in branch '3.2':
#13233: fix typo.
http://hg.python.org/cpython/rev/1d8fad82c32d

New changeset 99c8b93c57cd by Ezio Melotti in branch 'default':
#13233: null merge with 3.2.
http://hg.python.org/cpython/rev/99c8b93c57cd
msg146032 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2011-10-20 16:54
New changeset 8bf9724dcd49 by Ezio Melotti in branch '2.7':
#13233: fix typo.
http://hg.python.org/cpython/rev/8bf9724dcd49
msg146033 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2011-10-20 16:55
Fixed, thanks for the report!
History
Date User Action Args
2022-04-11 14:57:22adminsetgithub: 57442
2011-10-20 16:55:39ezio.melottisetstatus: open -> closed

assignee: docs@python -> ezio.melotti
versions: + Python 3.2, Python 3.3
nosy: + ezio.melotti

messages: + msg146033
resolution: fixed
stage: resolved
2011-10-20 16:54:53python-devsetmessages: + msg146032
2011-10-20 16:53:58python-devsetnosy: + python-dev
messages: + msg146030
2011-10-20 16:20:40Guilherme.Morocreate