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.

Author l0nwlf
Recipients georg.brandl, l0nwlf, twhitema
Date 2010-04-09.06:21:16
SpamBayes Score 5.551115e-17
Marked as misclassified No
Message-id <1270794080.85.0.84353756568.issue8350@psf.upfronthosting.co.za>
In-reply-to
Content
Tested on trunk. 

11:46:02 l0nwlf-MBP:python-svn $ ./python.exe 
Python 2.7a4+ (trunk:79888M, Apr  9 2010, 11:41:22) 
[GCC 4.2.1 (Apple Inc. build 5646) (dot 1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import posix
>>> posix.mkdir('1')
>>> posix.mkdir('2', 000)
>>> posix.mkdir('3', mode=000)
Traceback (most recent call last):
  File "<input>", line 1, in <module>
TypeError: mkdir() takes no keyword arguments
>>> import os
>>> os.mkdir('4', 777)
>>> os.mkdir('5', mode=777)
Traceback (most recent call last):
  File "<input>", line 1, in <module>
TypeError: mkdir() takes no keyword arguments
>>> 

The two options to fix this are:
1. Patch python-svn/Modules/posixmodule.c to take the keyword arguments.
2. Modify the PyDoc in posixmodule.c as Todd suggested.

I had attached a patch which solves the issue using solution '2'. 

Also I observed that os.makedirs() have no such issue even though it uses os.mkdir() because it uses 'mkdir(name, mode)' to call mkdir.
History
Date User Action Args
2010-04-09 06:21:22l0nwlfsetrecipients: + l0nwlf, georg.brandl, twhitema
2010-04-09 06:21:20l0nwlfsetmessageid: <1270794080.85.0.84353756568.issue8350@psf.upfronthosting.co.za>
2010-04-09 06:21:18l0nwlflinkissue8350 messages
2010-04-09 06:21:17l0nwlfcreate