[docs] [issue25377] Mention octal format of mode argument of os.chmod

R. David Murray report at bugs.python.org
Sun Oct 11 17:46:55 CEST 2015

R. David Murray added the comment:

The main docs do not mention octal, but instead point to the constants in the stat module.  The help text currently says "Operating-system mode bitfield", which is in fact accurate.  A decimal number is *not* a bitfield (although it can be interpreted as one, giving the unexpected results).  

However, the help doc could be enhanced to say "Operating-system mode bitfield, see stat module for symbolic constants.".

Basically, the fact that octal works is an historical accident due to it working that way on unix, but ideally should not be relied upon by python code (though of course it will be :).

nosy: +r.david.murray

Python tracker <report at bugs.python.org>

More information about the docs mailing list