◐ Shell
reader mode source ↗
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
File filter
Conversations
Jump to
Diff view
Apply and reload
Show whitespace
Diff view
Apply and reload
12 changes: 11 additions & 1 deletion Doc/library/pathlib.rst
Original file line number Diff line number Diff line change
@@ -271,6 +271,10 @@ property:
Methods and properties
^^^^^^^^^^^^^^^^^^^^^^

Pure paths provide the following methods and properties:

.. data:: PurePath.drive
Expand Down Expand Up @@ -657,6 +661,8 @@ call fails (for example because the path doesn't exist):
Return information about this path (similarly to :func:`os.stat`).
The result is looked up at each call to this method.

>>> p = Path('setup.py')
>>> p.stat().st_size
956
Expand Up @@ -948,7 +954,7 @@ call fails (for example because the path doesn't exist):
.. method:: Path.rglob(pattern)

This is like calling :meth:`Path.glob` with "``**``" added in front of the
given *pattern*:

>>> sorted(Path().rglob("*.py"))
[PosixPath('build/lib/pathlib.py'),
@@ -972,6 +978,8 @@ call fails (for example because the path doesn't exist):
An :exc:`OSError` can be raised if either file cannot be accessed for some
reason.

>>> p = Path('spam')
>>> q = Path('eggs')
>>> p.samefile(q)
Expand All @@ -988,6 +996,8 @@ call fails (for example because the path doesn't exist):
*target_is_directory* must be true (default ``False``) if the link's target
is a directory. Under POSIX, *target_is_directory*'s value is ignored.

>>> p = Path('mylink')
>>> p.symlink_to('setup.py')
>>> p.resolve()
5 changes: 2 additions & 3 deletions Doc/library/turtle.rst
Original file line number Diff line number Diff line change
Expand Up @@ -936,10 +936,9 @@ Color control
>>> turtle.fillcolor("violet")
>>> turtle.fillcolor()
'violet'
>>> col = turtle.pencolor()
>>> col
(50.0, 193.0, 143.0)
>>> turtle.fillcolor(col)
>>> turtle.fillcolor()
(50.0, 193.0, 143.0)
>>> turtle.fillcolor('#ffffff')
Expand Down
2 changes: 1 addition & 1 deletion Doc/library/weakref.rst
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ the constructor when it was created.
>>> obj = Object()
>>> f = weakref.finalize(obj, callback, 1, 2, z=3)
>>> f.detach() #doctest:+ELLIPSIS
(<__main__.Object object ...>, <function callback ...>, (1, 2), {'z': 3})
>>> newobj, func, args, kwargs = _
>>> assert not f.alive
>>> assert newobj is obj
Expand Down
Toggle all file notes Toggle all file annotations