[issue8350] os.mkdir doc comment is incorrect

Todd Whiteman report at bugs.python.org
Fri Apr 9 00:02:39 CEST 2010


New submission from Todd Whiteman <twhitema at yahoo.com.au>:

The doc command for os.mkdir is incorrect (at least for posix). It specifies that there is an optional mode keyword, but it's not a keyword argument, see below:

>>> import os
>>> help(os.mkdir)
mkdir(...)
    mkdir(path [, mode=0777])
    
    Create a directory.

>>> os.mkdir("/tmp/1", mode=777) 
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: mkdir() takes no keyword arguments


Suggest the following doc comment change:

mkdir(...)
    mkdir(path [, mode])
    
    Create a directory. Mode defaults to 0777 if not specified.

----------
assignee: georg.brandl
components: Documentation
messages: 102648
nosy: georg.brandl, twhitema
severity: normal
status: open
title: os.mkdir doc comment is incorrect
versions: Python 2.6, Python 3.1

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


More information about the Python-bugs-list mailing list