Skip to content

Commit 6f809ae

Browse files
Deploy preview for PR 1231 🛫
1 parent fe8cd1f commit 6f809ae

585 files changed

Lines changed: 662 additions & 607 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

pr-preview/pr-1231/_sources/library/glob.rst.txt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ not by actually invoking a subshell.
2929
The pathnames are returned in no particular order. If you need a specific
3030
order, sort the results.
3131

32-
Files beginning with a dot (``.``) can only be matched by
32+
By default, files beginning with a dot (``.``) can only be matched by
3333
patterns that also start with a dot,
3434
unlike :func:`fnmatch.fnmatch` or :func:`pathlib.Path.glob`.
3535
For tilde and shell variable expansion, use :func:`os.path.expanduser` and
@@ -70,7 +70,8 @@ The :mod:`!glob` module defines the following functions:
7070
pattern is followed by an :data:`os.sep` or :data:`os.altsep` then files will not
7171
match.
7272

73-
If *include_hidden* is true, "``**``" pattern will match hidden directories.
73+
If *include_hidden* is true, wildcards can match path segments that
74+
begin with a dot (``.``).
7475

7576
.. audit-event:: glob.glob pathname,recursive glob.glob
7677
.. audit-event:: glob.glob/2 pathname,recursive,root_dir,dir_fd glob.glob
@@ -131,7 +132,7 @@ The :mod:`!glob` module defines the following functions:
131132
Escape all special characters (``'?'``, ``'*'`` and ``'['``).
132133
This is useful if you want to match an arbitrary literal string that may
133134
have special characters in it. Special characters in drive/UNC
134-
sharepoints are not escaped, e.g. on Windows
135+
sharepoints are not escaped, for example on Windows
135136
``escape('//?/c:/Quo vadis?.txt')`` returns ``'//?/c:/Quo vadis[?].txt'``.
136137

137138
.. versionadded:: 3.4

pr-preview/pr-1231/_sources/library/os.rst.txt

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2150,6 +2150,11 @@ features:
21502150

21512151
.. audit-event:: os.chdir path os.chdir
21522152

2153+
.. seealso::
2154+
2155+
The :func:`contextlib.chdir` context manager, which changes the current
2156+
working directory on entering and restores the previous one on exit.
2157+
21532158
.. versionchanged:: 3.3
21542159
Added support for specifying *path* as a file descriptor
21552160
on some platforms.
@@ -2975,10 +2980,16 @@ features:
29752980

29762981
.. attribute:: path
29772982

2978-
The entry's full path name: equivalent to ``os.path.join(scandir_path,
2979-
entry.name)`` where *scandir_path* is the :func:`scandir` *path*
2980-
argument. The path is only absolute if the :func:`scandir` *path*
2981-
argument was absolute. If the :func:`scandir` *path*
2983+
The entry's path name: equivalent to ``os.path.join(scandir_path,
2984+
entry.name)`` where *scandir_path* is the original :func:`scandir`
2985+
*path* argument. Apart from the filename, the path preserves the
2986+
original :func:`scandir` argument. If the :func:`scandir` *path*
2987+
argument was relative, the :attr:`path` attribute is also relative.
2988+
Changing the current working directory after creating the
2989+
:func:`scandir` iterator may cause later uses of :attr:`path` to resolve
2990+
differently. On some platforms, the constructed path may not be valid
2991+
if the original :func:`scandir` argument was usable for enumeration but
2992+
not for joining with the entry name. If the :func:`scandir` *path*
29822993
argument was a :ref:`file descriptor <path_fd>`, the :attr:`path`
29832994
attribute is the same as the :attr:`name` attribute.
29842995

pr-preview/pr-1231/_sources/library/urllib.parse.rst.txt

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,18 @@ or on combining URL components into a URL string.
5656
:class:`SplitResult` or :class:`SplitResultBytes`.
5757
This corresponds to the general structure of a URL:
5858
``scheme://netloc/path?query#fragment``.
59-
Each tuple item is a string, possibly empty. The components are not broken up
60-
into smaller parts (for example, the network location is a single string), and %
61-
escapes are not expanded. The delimiters as shown above are not part of the
62-
result, except for a leading slash in the *path* component, which is retained if
63-
present. For example:
59+
Each tuple item is a string, possibly empty.
60+
61+
The delimiters as shown above are not part of the result, except for a
62+
leading slash in the *path* component, which is retained if present.
63+
64+
Additionally, the netloc property is broken down into these additional
65+
attributes added to the returned object: username, password, hostname, and
66+
port.
67+
68+
Percent-encoded sequences are not decoded.
69+
70+
For example:
6471

6572
.. doctest::
6673
:options: +NORMALIZE_WHITESPACE

pr-preview/pr-1231/about.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ <h3>導航</h3>
356356
<a href="https://www.python.org/psf/donations/">敬請捐贈。</a>
357357
<br>
358358
<br>
359-
最後更新於 7月 06, 2026 (00:40 UTC)。
359+
最後更新於 7月 07, 2026 (00:41 UTC)。
360360

361361
<a href="/bugs.html">發現 bug</a>
362362

pr-preview/pr-1231/bugs.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ <h3>導航</h3>
393393
<a href="https://www.python.org/psf/donations/">敬請捐贈。</a>
394394
<br>
395395
<br>
396-
最後更新於 7月 06, 2026 (00:40 UTC)。
396+
最後更新於 7月 07, 2026 (00:41 UTC)。
397397

398398
<a href="/bugs.html">發現 bug</a>
399399

pr-preview/pr-1231/c-api/abstract.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ <h3>導航</h3>
365365
<a href="https://www.python.org/psf/donations/">敬請捐贈。</a>
366366
<br>
367367
<br>
368-
最後更新於 7月 06, 2026 (00:40 UTC)。
368+
最後更新於 7月 07, 2026 (00:41 UTC)。
369369

370370
<a href="/bugs.html">發現 bug</a>
371371

pr-preview/pr-1231/c-api/allocation.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,7 @@ <h3>導航</h3>
577577
<a href="https://www.python.org/psf/donations/">敬請捐贈。</a>
578578
<br>
579579
<br>
580-
最後更新於 7月 06, 2026 (00:40 UTC)。
580+
最後更新於 7月 07, 2026 (00:41 UTC)。
581581

582582
<a href="/bugs.html">發現 bug</a>
583583

pr-preview/pr-1231/c-api/apiabiversion.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ <h3>導航</h3>
514514
<a href="https://www.python.org/psf/donations/">敬請捐贈。</a>
515515
<br>
516516
<br>
517-
最後更新於 7月 06, 2026 (00:40 UTC)。
517+
最後更新於 7月 07, 2026 (00:41 UTC)。
518518

519519
<a href="/bugs.html">發現 bug</a>
520520

pr-preview/pr-1231/c-api/arg.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -996,7 +996,7 @@ <h3>導航</h3>
996996
<a href="https://www.python.org/psf/donations/">敬請捐贈。</a>
997997
<br>
998998
<br>
999-
最後更新於 7月 06, 2026 (00:40 UTC)。
999+
最後更新於 7月 07, 2026 (00:41 UTC)。
10001000

10011001
<a href="/bugs.html">發現 bug</a>
10021002

pr-preview/pr-1231/c-api/bool.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ <h3>導航</h3>
376376
<a href="https://www.python.org/psf/donations/">敬請捐贈。</a>
377377
<br>
378378
<br>
379-
最後更新於 7月 06, 2026 (00:40 UTC)。
379+
最後更新於 7月 07, 2026 (00:41 UTC)。
380380

381381
<a href="/bugs.html">發現 bug</a>
382382

0 commit comments

Comments
 (0)