Skip to content

Commit 0743615

Browse files
committed
Deploying to gh-pages from @ ebd40d0 🚀
1 parent b72a43d commit 0743615

File tree

556 files changed

+662
-581
lines changed

Some content is hidden

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

556 files changed

+662
-581
lines changed

_sources/library/codecs.rst.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,14 @@ any codec:
5353
:exc:`UnicodeDecodeError`). Refer to :ref:`codec-base-classes` for more
5454
information on codec error handling.
5555

56+
.. function:: charmap_build(string)
57+
58+
Return a mapping suitable for encoding with a custom single-byte encoding.
59+
Given a :class:`str` *string* of up to 256 characters representing a
60+
decoding table, returns either a compact internal mapping object
61+
``EncodingMap`` or a :class:`dictionary <dict>` mapping character ordinals
62+
to byte values. Raises a :exc:`TypeError` on invalid input.
63+
5664
The full details for each codec can also be looked up directly:
5765

5866
.. function:: lookup(encoding)

_sources/library/csv.rst.txt

Lines changed: 28 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ The :mod:`csv` module defines the following functions:
5353
.. index::
5454
single: universal newlines; csv.reader function
5555

56-
.. function:: reader(csvfile, dialect='excel', **fmtparams)
56+
.. function:: reader(csvfile, /, dialect='excel', **fmtparams)
5757

5858
Return a :ref:`reader object <reader-objects>` that will process
5959
lines from the given *csvfile*. A csvfile must be an iterable of
@@ -84,7 +84,7 @@ The :mod:`csv` module defines the following functions:
8484
Spam, Lovely Spam, Wonderful Spam
8585

8686

87-
.. function:: writer(csvfile, dialect='excel', **fmtparams)
87+
.. function:: writer(csvfile, /, dialect='excel', **fmtparams)
8888

8989
Return a writer object responsible for converting the user's data into delimited
9090
strings on the given file-like object. *csvfile* can be any object with a
@@ -323,8 +323,8 @@ The :mod:`csv` module defines the following constants:
323323
.. data:: QUOTE_MINIMAL
324324

325325
Instructs :class:`writer` objects to only quote those fields which contain
326-
special characters such as *delimiter*, *quotechar* or any of the characters in
327-
*lineterminator*.
326+
special characters such as *delimiter*, *quotechar*, ``'\r'``, ``'\n'``
327+
or any of the characters in *lineterminator*.
328328

329329

330330
.. data:: QUOTE_NONNUMERIC
@@ -342,10 +342,13 @@ The :mod:`csv` module defines the following constants:
342342

343343
.. data:: QUOTE_NONE
344344

345-
Instructs :class:`writer` objects to never quote fields. When the current
346-
*delimiter* occurs in output data it is preceded by the current *escapechar*
347-
character. If *escapechar* is not set, the writer will raise :exc:`Error` if
345+
Instructs :class:`writer` objects to never quote fields.
346+
When the current *delimiter*, *quotechar*, *escapechar*, ``'\r'``, ``'\n'``
347+
or any of the characters in *lineterminator* occurs in output data
348+
it is preceded by the current *escapechar* character.
349+
If *escapechar* is not set, the writer will raise :exc:`Error` if
348350
any characters that require escaping are encountered.
351+
Set *quotechar* to ``None`` to prevent its escaping.
349352

350353
Instructs :class:`reader` objects to perform no special processing of quote characters.
351354

@@ -414,9 +417,16 @@ Dialects support the following attributes:
414417

415418
.. attribute:: Dialect.escapechar
416419

417-
A one-character string used by the writer to escape the *delimiter* if *quoting*
418-
is set to :const:`QUOTE_NONE` and the *quotechar* if *doublequote* is
419-
:const:`False`. On reading, the *escapechar* removes any special meaning from
420+
A one-character string used by the writer to escape characters that
421+
require escaping:
422+
423+
* the *delimiter*, the *quotechar*, ``'\r'``, ``'\n'`` and any of the
424+
characters in *lineterminator* are escaped if *quoting* is set to
425+
:const:`QUOTE_NONE`;
426+
* the *quotechar* is escaped if *doublequote* is :const:`False`;
427+
* the *escapechar* itself.
428+
429+
On reading, the *escapechar* removes any special meaning from
420430
the following character. It defaults to :const:`None`, which disables escaping.
421431

422432
.. versionchanged:: 3.11
@@ -436,9 +446,12 @@ Dialects support the following attributes:
436446

437447
.. attribute:: Dialect.quotechar
438448

439-
A one-character string used to quote fields containing special characters, such
440-
as the *delimiter* or *quotechar*, or which contain new-line characters. It
441-
defaults to ``'"'``.
449+
A one-character string used to quote fields containing special characters,
450+
such as the *delimiter* or the *quotechar*, or which contain new-line
451+
characters (``'\r'``, ``'\n'`` or any of the characters in *lineterminator*).
452+
It defaults to ``'"'``.
453+
Can be set to ``None`` to prevent escaping ``'"'`` if *quoting* is set
454+
to :const:`QUOTE_NONE`.
442455

443456
.. versionchanged:: 3.11
444457
An empty *quotechar* is not allowed.
@@ -447,7 +460,8 @@ Dialects support the following attributes:
447460

448461
Controls when quotes should be generated by the writer and recognised by the
449462
reader. It can take on any of the :ref:`QUOTE_\* constants <csv-constants>`
450-
and defaults to :const:`QUOTE_MINIMAL`.
463+
and defaults to :const:`QUOTE_MINIMAL` if *quotechar* is not ``None``,
464+
and :const:`QUOTE_NONE` otherwise.
451465

452466

453467
.. attribute:: Dialect.skipinitialspace

_sources/library/math.rst.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -774,7 +774,7 @@ Constants
774774
The mathematical constant *τ* = 6.283185..., to available precision.
775775
Tau is a circle constant equal to 2\ *π*, the ratio of a circle's circumference to
776776
its radius. To learn more about Tau, check out Vi Hart's video `Pi is (still)
777-
Wrong <https://www.youtube.com/watch?v=jG7vhMMXagQ>`_, and start celebrating
777+
Wrong <https://vimeo.com/147792667>`_, and start celebrating
778778
`Tau day <https://tauday.com/>`_ by eating twice as much pie!
779779

780780
.. versionadded:: 3.6

_sources/library/time.rst.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -712,13 +712,18 @@ Functions
712712

713713
Clock:
714714

715-
* On Windows, call ``GetSystemTimeAsFileTime()``.
715+
* On Windows, call ``GetSystemTimePreciseAsFileTime()``.
716716
* Call ``clock_gettime(CLOCK_REALTIME)`` if available.
717717
* Otherwise, call ``gettimeofday()``.
718718

719719
Use :func:`time_ns` to avoid the precision loss caused by the :class:`float`
720720
type.
721721

722+
.. versionchanged:: 3.13
723+
724+
On Windows, calls ``GetSystemTimePreciseAsFileTime()`` instead of
725+
``GetSystemTimeAsFileTime()``.
726+
722727

723728
.. function:: time_ns() -> int
724729

about.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ <h3>瀏覽</h3>
320320
<a href="https://www.python.org/psf/donations/">Please donate.</a>
321321
<br>
322322
<br>
323-
最後更新於 6月 30, 2025 (06:01 UTC)。
323+
最後更新於 7月 01, 2025 (10:10 UTC)。
324324

325325
<a href="/bugs.html">Found a bug</a>?
326326

bugs.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ <h3>瀏覽</h3>
359359
<a href="https://www.python.org/psf/donations/">Please donate.</a>
360360
<br>
361361
<br>
362-
最後更新於 6月 30, 2025 (06:01 UTC)。
362+
最後更新於 7月 01, 2025 (10:10 UTC)。
363363

364364
<a href="/bugs.html">Found a bug</a>?
365365

c-api/abstract.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ <h3>瀏覽</h3>
329329
<a href="https://www.python.org/psf/donations/">Please donate.</a>
330330
<br>
331331
<br>
332-
最後更新於 6月 30, 2025 (06:01 UTC)。
332+
最後更新於 7月 01, 2025 (10:10 UTC)。
333333

334334
<a href="/bugs.html">Found a bug</a>?
335335

c-api/allocation.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ <h3>瀏覽</h3>
350350
<a href="https://www.python.org/psf/donations/">Please donate.</a>
351351
<br>
352352
<br>
353-
最後更新於 6月 30, 2025 (06:01 UTC)。
353+
最後更新於 7月 01, 2025 (10:10 UTC)。
354354

355355
<a href="/bugs.html">Found a bug</a>?
356356

c-api/apiabiversion.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/">Please donate.</a>
377377
<br>
378378
<br>
379-
最後更新於 6月 30, 2025 (06:01 UTC)。
379+
最後更新於 7月 01, 2025 (10:10 UTC)。
380380

381381
<a href="/bugs.html">Found a bug</a>?
382382

c-api/arg.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -931,7 +931,7 @@ <h3>瀏覽</h3>
931931
<a href="https://www.python.org/psf/donations/">Please donate.</a>
932932
<br>
933933
<br>
934-
最後更新於 6月 30, 2025 (06:01 UTC)。
934+
最後更新於 7月 01, 2025 (10:10 UTC)。
935935

936936
<a href="/bugs.html">Found a bug</a>?
937937

0 commit comments

Comments
 (0)