summaryrefslogtreecommitdiffstats
path: root/Modules/posixmodule.c
diff options
context:
space:
mode:
authorLarry Hastings <larry@hastings.org>2014-02-09 06:15:29 (GMT)
committerLarry Hastings <larry@hastings.org>2014-02-09 06:15:29 (GMT)
commit2623c8c23cead505a78ec416072223552e94727e (patch)
tree9ac129d693fd98eb33d548bc836d89e006bbb937 /Modules/posixmodule.c
parent09f08fe2483aaefba367c6b0b4654c3490a32c42 (diff)
downloadcpython-2623c8c23cead505a78ec416072223552e94727e.zip
cpython-2623c8c23cead505a78ec416072223552e94727e.tar.gz
cpython-2623c8c23cead505a78ec416072223552e94727e.tar.bz2
Issue #20530: Argument Clinic's signature format has been revised again.
The new syntax is highly human readable while still preventing false positives. The syntax also extends Python syntax to denote "self" and positional-only parameters, allowing inspect.Signature objects to be totally accurate for all supported builtins in Python 3.4.
Diffstat (limited to 'Modules/posixmodule.c')
-rw-r--r--Modules/posixmodule.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index 0646043f..1428220 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -2435,7 +2435,9 @@ It's an error to use dir_fd or follow_symlinks when specifying path as
[clinic start generated code]*/
PyDoc_STRVAR(os_stat__doc__,
-"sig=($module, path, *, dir_fd=None, follow_symlinks=True)\n"
+"stat($module, /, path, *, dir_fd=None, follow_symlinks=True)\n"
+"--\n"
+"\n"
"Perform a stat system call on the given path.\n"
"\n"
" path\n"
@@ -2486,7 +2488,7 @@ exit:
static PyObject *
os_stat_impl(PyModuleDef *module, path_t *path, int dir_fd, int follow_symlinks)
-/*[clinic end generated code: output=33b6ee92cd1b98de input=5ae155bd475fd20a]*/
+/*[clinic end generated code: output=f1dcaa5e24db9882 input=5ae155bd475fd20a]*/
{
return posix_do_stat("stat", path, dir_fd, follow_symlinks);
}
@@ -2567,7 +2569,10 @@ Note that most operations will use the effective uid/gid, therefore this
[clinic start generated code]*/
PyDoc_STRVAR(os_access__doc__,
-"sig=($module, path, mode, *, dir_fd=None, effective_ids=False, follow_symlinks=True)\n"
+"access($module, /, path, mode, *, dir_fd=None, effective_ids=False,\n"
+" follow_symlinks=True)\n"
+"--\n"
+"\n"
"Use the real uid/gid to test for access to a path.\n"
"\n"
" path\n"
@@ -2627,7 +2632,7 @@ exit:
static PyObject *
os_access_impl(PyModuleDef *module, path_t *path, int mode, int dir_fd, int effective_ids, int follow_symlinks)
-/*[clinic end generated code: output=33b3fafc61e778e1 input=2e2e7594371f5b7e]*/
+/*[clinic end generated code: output=a6ed4f151be9df0f input=2e2e7594371f5b7e]*/
{
PyObject *return_value = NULL;
@@ -2723,7 +2728,9 @@ Return the name of the terminal device connected to 'fd'.
[clinic start generated code]*/
PyDoc_STRVAR(os_ttyname__doc__,
-"sig=($module, fd)\n"
+"ttyname($module, fd, /)\n"
+"--\n"
+"\n"
"Return the name of the terminal device connected to \'fd\'.\n"
"\n"
" fd\n"
@@ -2757,7 +2764,7 @@ exit:
static char *
os_ttyname_impl(PyModuleDef *module, int fd)
-/*[clinic end generated code: output=c3083e665d4d11b9 input=5f72ca83e76b3b45]*/
+/*[clinic end generated code: output=cee7bc4cffec01a2 input=5f72ca83e76b3b45]*/
{
char *ret;