Clean up shutil.disk_usage.
- Move a test from call time to define time
- Add the function name to __all__
- Improve docstring and docs
A few lines are now duplicated (named tuple definition and docstring)
but I think the end result reads better.
diff --git a/Doc/library/shutil.rst b/Doc/library/shutil.rst
index 6f70206..0d80913 100644
--- a/Doc/library/shutil.rst
+++ b/Doc/library/shutil.rst
@@ -175,8 +175,9 @@
.. function:: disk_usage(path)
- Return disk usage statistics about the given path as a namedtuple including
- total, used and free space expressed in bytes.
+ Return disk usage statistics about the given path as a :term:`named tuple`
+ with the attributes *total*, *used* and *free*, which are the amount of
+ total, used and free space, in bytes.
.. versionadded:: 3.3