Assorted comments by Jim Jewett

This commit is contained in:
Antoine Pitrou 2013-11-20 00:46:39 +01:00
parent 3129ea6d88
commit 734743d99b
1 changed files with 7 additions and 3 deletions

View File

@ -155,8 +155,8 @@ contrasts with some other Path class proposals which were derived from
if you want a path to act as a sequence, you have to lookup a dedicated
attribute (the ``parts`` attribute).
By avoiding to pass as builtin types, the path classes minimize the potential
for confusion if they are combined by accident with genuine builtin types.
Not behaving like one of the basic builtin types also minimizes the potential
for confusion if a path is combined by accident with genuine builtin types.
Immutability
@ -201,6 +201,9 @@ Paths of different flavours always compare unequal, and cannot be ordered::
File "<stdin>", line 1, in <module>
TypeError: unorderable types: PurePosixPath() < PureWindowsPath()
Paths compare unequal to, and are not orderable with instances of builtin
types (such as ``str``) and any other types.
Useful notations
----------------
@ -315,7 +318,8 @@ which is a special case in the POSIX specification on `pathname resolution`_
PurePosixPath('//some/path')
Calling the constructor without any argument creates a path object pointing
to the logical "current directory"::
to the logical "current directory" (without looking up its absolute path,
which is the job of the ``cwd()`` classmethod on concrete paths)::
>>> PurePosixPath()
PurePosixPath('.')