summaryrefslogtreecommitdiffstats
path: root/Doc/lib
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/lib')
-rw-r--r--Doc/lib/libos.tex33
1 files changed, 30 insertions, 3 deletions
diff --git a/Doc/lib/libos.tex b/Doc/lib/libos.tex
index 17b7c67..2b4728c 100644
--- a/Doc/lib/libos.tex
+++ b/Doc/lib/libos.tex
@@ -854,9 +854,10 @@ the \ctype{stat} structure, namely:
\member{st_ctime}
(time of most recent content modification or metadata change).
-\versionchanged [The time values are floats, measuring
- seconds. Fractions of a second may be reported if the system
- supports that]{2.3}
+\versionchanged [If \function{stat_float_times} returns true, the time
+values are floats, measuring seconds. Fractions of a second may be
+reported if the system supports that. On Mac OS, the times are always
+floats. See \function{stat_float_times} for further discussion. ]{2.3}
On some Unix systems (such as Linux), the following attributes may
also be available:
@@ -899,6 +900,32 @@ Availability: Macintosh, \UNIX, Windows.
[Added access to values as attributes of the returned object]{2.2}
\end{funcdesc}
+\begin{funcdesc}{stat_float_times}{\optional{newvalue}}
+Determine whether \class{stat_result} represents time stamps as float
+objects. If newval is True, future calls to stat() return floats, if
+it is False, future calls return ints. If newval is omitted, return
+the current setting.
+
+For compatibility with older Python versions, accessing
+\class{stat_result} as a tuple always returns integers. For
+compatibility with Python 2.2, accessing the time stamps by field name
+also returns integers. Applications that want to determine the
+fractions of a second in a time stamp can use this function to have
+time stamps represented as floats. Whether they will actually observe
+non-zero fractions depends on the system.
+
+Future Python releases will change the default of this settings;
+applications that cannot deal with floating point time stamps can then
+use this function to turn the feature off.
+
+It is recommended that this setting is only changed at program startup
+time in the \var{__main__} module; libraries should never change this
+setting. If an application uses a library that works incorrectly if
+floating point time stamps are processed, this application should turn
+the feature off until the library has been corrected.
+
+\end{funcdesc}
+
\begin{funcdesc}{statvfs}{path}
Perform a \cfunction{statvfs()} system call on the given path. The
return value is an object whose attributes describe the filesystem on