]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.12] GH-119054: Add alt text to pathlib inheritance diagram (GH-121158) (#121169)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sat, 29 Jun 2024 17:53:27 +0000 (19:53 +0200)
committerGitHub <noreply@github.com>
Sat, 29 Jun 2024 17:53:27 +0000 (17:53 +0000)
GH-119054: Add alt text to pathlib inheritance diagram (GH-121158)
(cherry picked from commit 6b280a84988ca221b5bdc1077a914e873790cce5)

Co-authored-by: Barney Gale <barney.gale@gmail.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Doc/library/pathlib.rst

index 84702c48318025fe5bed128f8d88be575e20ed68..674a9c27b6908f8716f3b37c7b13e5a509adf7c8 100644 (file)
@@ -21,6 +21,12 @@ inherit from pure paths but also provide I/O operations.
 .. image:: pathlib-inheritance.png
    :align: center
    :class: invert-in-dark-mode
+   :alt: Inheritance diagram showing the classes available in pathlib. The
+         most basic class is PurePath, which has three direct subclasses:
+         PurePosixPath, PureWindowsPath, and Path. Further to these four
+         classes, there are two classes that use multiple inheritance:
+         PosixPath subclasses PurePosixPath and Path, and WindowsPath
+         subclasses PureWindowsPath and Path.
 
 If you've never used this module before or just aren't sure which class is
 right for your task, :class:`Path` is most likely what you need. It instantiates