summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2011-11-08 22:25:47 (GMT)
committerEzio Melotti <ezio.melotti@gmail.com>2011-11-08 22:25:47 (GMT)
commit257a14c2a524ed029b499f5676c456d1c6c0f3a0 (patch)
tree9ea123a8a6decee106e19c80dd9619be3a96f9ee
parent4b6fabdff1fd9a539ca13b8174c9dc2a5c5828e8 (diff)
downloadcpython-257a14c2a524ed029b499f5676c456d1c6c0f3a0.zip
cpython-257a14c2a524ed029b499f5676c456d1c6c0f3a0.tar.gz
cpython-257a14c2a524ed029b499f5676c456d1c6c0f3a0.tar.bz2
Refactor functions signatures in the doc.
-rw-r--r--Doc/library/os.rst23
1 files changed, 15 insertions, 8 deletions
diff --git a/Doc/library/os.rst b/Doc/library/os.rst
index 92b24ac..8632c4b 100644
--- a/Doc/library/os.rst
+++ b/Doc/library/os.rst
@@ -872,22 +872,26 @@ as internal buffering of data.
.. versionadded:: 3.3
-.. function:: futimesat(dirfd, path[, (atime, mtime)])
+.. function:: futimesat(dirfd, path[, times])
Like :func:`utime` but if *path* is relative, it is taken as relative to *dirfd*.
If *path* is relative and *dirfd* is the special value :data:`AT_FDCWD`, then *path*
- is interpreted relative to the current working directory.
+ is interpreted relative to the current working directory. *times* must be a
+ 2-tuple of numbers, of the form ``(atime, mtime)``, or None.
Availability: Unix.
.. versionadded:: 3.3
-.. function:: futimens(fd[, (atime_sec, atime_nsec), (mtime_sec, mtime_nsec)])
+.. function:: futimens(fd[, atimes, mtimes])
Updates the timestamps of a file specified by the file descriptor *fd*, with
nanosecond precision.
If no second argument is given, set *atime* and *mtime* to the current time.
+ *atimes* and *mtimes* must be 2-tuples of numbers, of the form
+ ``(atime_sec, atime_nsec)`` and ``(mtime_sec, mtime_nsec)`` respectively,
+ or ``None``.
If *atime_nsec* or *mtime_nsec* is specified as :data:`UTIME_NOW`, the corresponding
timestamp is updated to the current time.
If *atime_nsec* or *mtime_nsec* is specified as :data:`UTIME_OMIT`, the corresponding
@@ -909,11 +913,12 @@ as internal buffering of data.
.. versionadded:: 3.3
-.. function:: futimes(fd[, (atime, mtime)])
+.. function:: futimes(fd[, times])
Set the access and modified time of the file specified by the file
- descriptor *fd* to the given values. If no second argument is used, set the
- access and modified times to the current time.
+ descriptor *fd* to the given values. *atimes* must be a 2-tuple of numbers,
+ of the form ``(atime, mtime)``, or None. If no second argument is used,
+ set the access and modified times to the current time.
Availability: Unix.
@@ -1699,10 +1704,12 @@ Files and Directories
Added support for Windows 6.0 (Vista) symbolic links.
-.. function:: lutimes(path[, (atime, mtime)])
+.. function:: lutimes(path[, times])
Like :func:`utime`, but if *path* is a symbolic link, it is not
- dereferenced.
+ dereferenced. *times* must be a 2-tuple of numbers, of the form
+ ``(atime, mtime)``, or None.
+
Availability: Unix.