[docs] [issue18269] Clarify which integer is required in os.chmod() exception

Brett Cannon report at bugs.python.org
Thu Jun 20 16:55:29 CEST 2013


Brett Cannon added the comment:

os.chmod is implemented in posixmodule.c and the argument parsing code can be found at http://hg.python.org/cpython/file/3acbb23c73bc/Modules/posixmodule.c#l2605 . You will notice that the argument parsing is specified as "O&i|$O&p". That means the first argument is parsed as a Python object which is passed through a converter function and the second argument is required to be an integer. That converter function can be found at http://hg.python.org/cpython/file/3acbb23c73bc/Modules/posixmodule.c#l681. Looking at that code doesn't suggest that TypeError is raised with that message.

What were the exact arguments you passed into os.chmod() that triggered the exception?

----------
assignee: docs at python -> 
components: +Library (Lib) -Documentation
nosy: +brett.cannon
status: open -> pending
versions:  -Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.5

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue18269>
_______________________________________


More information about the docs mailing list