@@ -600,7 +600,9 @@ def __repr__(self):
600600
601601
602602class PurePath (object ):
603- """PurePath represents a filesystem path and offers operations which
603+ """Base class for manipulating paths without I/O.
604+
605+ PurePath represents a filesystem path and offers operations which
604606 don't imply any actual filesystem I/O. Depending on your system,
605607 instantiating a PurePath will return either a PurePosixPath or a
606608 PureWindowsPath object. You can also instantiate either of these classes
@@ -955,11 +957,21 @@ def match(self, path_pattern):
955957
956958
957959class PurePosixPath (PurePath ):
960+ """PurePath subclass for non-Windows systems.
961+
962+ On a POSIX system, instantiating a PurePath should return this object.
963+ However, you can also instantiate it directly on any system.
964+ """
958965 _flavour = _posix_flavour
959966 __slots__ = ()
960967
961968
962969class PureWindowsPath (PurePath ):
970+ """PurePath subclass for Windows systems.
971+
972+ On a Windows system, instantiating a PurePath should return this object.
973+ However, you can also instantiate it directly on any system.
974+ """
963975 _flavour = _windows_flavour
964976 __slots__ = ()
965977
@@ -968,6 +980,14 @@ class PureWindowsPath(PurePath):
968980
969981
970982class Path (PurePath ):
983+ """PurePath subclass that can make system calls.
984+
985+ Path represents a filesystem path but unlike PurePath, also offers
986+ methods to do system calls on path objects. Depending on your system,
987+ instantiating a Path will return either a PosixPath or a WindowsPath
988+ object. You can also instantiate a PosixPath or WindowsPath directly,
989+ but cannot instantiate a WindowsPath on a POSIX system or vice versa.
990+ """
971991 __slots__ = (
972992 '_accessor' ,
973993 '_closed' ,
@@ -1422,9 +1442,17 @@ def expanduser(self):
14221442
14231443
14241444class PosixPath (Path , PurePosixPath ):
1445+ """Path subclass for non-Windows systems.
1446+
1447+ On a POSIX system, instantiating a Path should return this object.
1448+ """
14251449 __slots__ = ()
14261450
14271451class WindowsPath (Path , PureWindowsPath ):
1452+ """Path subclass for Windows systems.
1453+
1454+ On a Windows system, instantiating a Path should return this object.
1455+ """
14281456 __slots__ = ()
14291457
14301458 def owner (self ):
0 commit comments