Message102683
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. |
|
Date |
User |
Action |
Args |
2010-04-09 06:21:22 | l0nwlf | set | recipients:
+ l0nwlf, georg.brandl, twhitema |
2010-04-09 06:21:20 | l0nwlf | set | messageid: <1270794080.85.0.84353756568.issue8350@psf.upfronthosting.co.za> |
2010-04-09 06:21:18 | l0nwlf | link | issue8350 messages |
2010-04-09 06:21:17 | l0nwlf | create | |
|