Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 257a14c

Browse files
committed
Refactor functions signatures in the doc.
1 parent 4b6fabd commit 257a14c

1 file changed

Lines changed: 15 additions & 8 deletions

File tree

Doc/library/os.rst

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -872,22 +872,26 @@ as internal buffering of data.
872872
.. versionadded:: 3.3
873873

874874

875-
.. function:: futimesat(dirfd, path[, (atime, mtime)])
875+
.. function:: futimesat(dirfd, path[, times])
876876

877877
Like :func:`utime` but if *path* is relative, it is taken as relative to *dirfd*.
878878
If *path* is relative and *dirfd* is the special value :data:`AT_FDCWD`, then *path*
879-
is interpreted relative to the current working directory.
879+
is interpreted relative to the current working directory. *times* must be a
880+
2-tuple of numbers, of the form ``(atime, mtime)``, or None.
880881

881882
Availability: Unix.
882883

883884
.. versionadded:: 3.3
884885

885886

886-
.. function:: futimens(fd[, (atime_sec, atime_nsec), (mtime_sec, mtime_nsec)])
887+
.. function:: futimens(fd[, atimes, mtimes])
887888

888889
Updates the timestamps of a file specified by the file descriptor *fd*, with
889890
nanosecond precision.
890891
If no second argument is given, set *atime* and *mtime* to the current time.
892+
*atimes* and *mtimes* must be 2-tuples of numbers, of the form
893+
``(atime_sec, atime_nsec)`` and ``(mtime_sec, mtime_nsec)`` respectively,
894+
or ``None``.
891895
If *atime_nsec* or *mtime_nsec* is specified as :data:`UTIME_NOW`, the corresponding
892896
timestamp is updated to the current time.
893897
If *atime_nsec* or *mtime_nsec* is specified as :data:`UTIME_OMIT`, the corresponding
@@ -909,11 +913,12 @@ as internal buffering of data.
909913
.. versionadded:: 3.3
910914

911915

912-
.. function:: futimes(fd[, (atime, mtime)])
916+
.. function:: futimes(fd[, times])
913917

914918
Set the access and modified time of the file specified by the file
915-
descriptor *fd* to the given values. If no second argument is used, set the
916-
access and modified times to the current time.
919+
descriptor *fd* to the given values. *atimes* must be a 2-tuple of numbers,
920+
of the form ``(atime, mtime)``, or None. If no second argument is used,
921+
set the access and modified times to the current time.
917922

918923
Availability: Unix.
919924

@@ -1699,10 +1704,12 @@ Files and Directories
16991704
Added support for Windows 6.0 (Vista) symbolic links.
17001705

17011706

1702-
.. function:: lutimes(path[, (atime, mtime)])
1707+
.. function:: lutimes(path[, times])
17031708

17041709
Like :func:`utime`, but if *path* is a symbolic link, it is not
1705-
dereferenced.
1710+
dereferenced. *times* must be a 2-tuple of numbers, of the form
1711+
``(atime, mtime)``, or None.
1712+
17061713

17071714
Availability: Unix.
17081715

0 commit comments

Comments
 (0)