Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9194076

Browse files
committed
Deploying to gh-pages from @ e17b9f3 🚀
1 parent 3ec8dcb commit 9194076

File tree

531 files changed

+4934
-4944
lines changed

Some content is hidden

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

531 files changed

+4934
-4944
lines changed

.buildinfo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Sphinx build info version 1
22
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
3-
config: 40fc522a7573e9bac1c12a3954261123
3+
config: c25c4b6fc5d5d55aea294dde0c81d589
44
tags: 645f666f9bcd5a90fca523b33c5a78b7

_sources/c-api/complex.rst.txt

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,16 @@ pointers. This is consistent throughout the API.
2525
2626
The C structure which corresponds to the value portion of a Python complex
2727
number object. Most of the functions for dealing with complex number objects
28-
use structures of this type as input or output values, as appropriate. It is
29-
defined as::
28+
use structures of this type as input or output values, as appropriate.
29+
30+
.. c:member:: double real
31+
double imag
32+
33+
The structure is defined as::
3034

3135
typedef struct {
32-
double real;
33-
double imag;
36+
double real;
37+
double imag;
3438
} Py_complex;
3539

3640

@@ -106,17 +110,22 @@ Complex Numbers as Python Objects
106110
.. c:function:: PyObject* PyComplex_FromCComplex(Py_complex v)
107111
108112
Create a new Python complex number object from a C :c:type:`Py_complex` value.
113+
Return ``NULL`` with an exception set on error.
109114
110115
111116
.. c:function:: PyObject* PyComplex_FromDoubles(double real, double imag)
112117
113118
Return a new :c:type:`PyComplexObject` object from *real* and *imag*.
119+
Return ``NULL`` with an exception set on error.
114120
115121
116122
.. c:function:: double PyComplex_RealAsDouble(PyObject *op)
117123
118124
Return the real part of *op* as a C :c:expr:`double`.
119125
126+
Upon failure, this method returns ``-1.0`` with an exception set, so one
127+
should call :c:func:`PyErr_Occurred` to check for errors.
128+
120129
121130
.. c:function:: double PyComplex_ImagAsDouble(PyObject *op)
122131
@@ -131,8 +140,11 @@ Complex Numbers as Python Objects
131140
method, this method will first be called to convert *op* to a Python complex
132141
number object. If :meth:`!__complex__` is not defined then it falls back to
133142
:meth:`~object.__float__`. If :meth:`!__float__` is not defined then it falls back
134-
to :meth:`~object.__index__`. Upon failure, this method returns ``-1.0`` as a real
135-
value.
143+
to :meth:`~object.__index__`.
144+
145+
Upon failure, this method returns :c:type:`Py_complex`
146+
with :c:member:`~Py_complex.real` set to ``-1.0`` and with an exception set, so one
147+
should call :c:func:`PyErr_Occurred` to check for errors.
136148
137149
.. versionchanged:: 3.8
138150
Use :meth:`~object.__index__` if available.

_sources/library/datetime.rst.txt

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Aware and Naive Objects
4848
-----------------------
4949

5050
Date and time objects may be categorized as "aware" or "naive" depending on
51-
whether or not they include timezone information.
51+
whether or not they include time zone information.
5252

5353
With sufficient knowledge of applicable algorithmic and political time
5454
adjustments, such as time zone and daylight saving time information,
@@ -58,7 +58,7 @@ interpretation. [#]_
5858

5959
A **naive** object does not contain enough information to unambiguously locate
6060
itself relative to other date/time objects. Whether a naive object represents
61-
Coordinated Universal Time (UTC), local time, or time in some other timezone is
61+
Coordinated Universal Time (UTC), local time, or time in some other time zone is
6262
purely up to the program, just like it is up to the program whether a
6363
particular number represents metres, miles, or mass. Naive objects are easy to
6464
understand and to work with, at the cost of ignoring some aspects of reality.
@@ -70,9 +70,9 @@ These :class:`tzinfo` objects capture information about the offset from UTC
7070
time, the time zone name, and whether daylight saving time is in effect.
7171

7272
Only one concrete :class:`tzinfo` class, the :class:`timezone` class, is
73-
supplied by the :mod:`!datetime` module. The :class:`timezone` class can
74-
represent simple timezones with fixed offsets from UTC, such as UTC itself or
75-
North American EST and EDT timezones. Supporting timezones at deeper levels of
73+
supplied by the :mod:`!datetime` module. The :class:`!timezone` class can
74+
represent simple time zones with fixed offsets from UTC, such as UTC itself or
75+
North American EST and EDT time zones. Supporting time zones at deeper levels of
7676
detail is up to the application. The rules for time adjustment across the
7777
world are more political than rational, change frequently, and there is no
7878
standard suitable for every application aside from UTC.
@@ -95,7 +95,7 @@ The :mod:`!datetime` module exports the following constants:
9595

9696
.. attribute:: UTC
9797

98-
Alias for the UTC timezone singleton :attr:`datetime.timezone.utc`.
98+
Alias for the UTC time zone singleton :attr:`datetime.timezone.utc`.
9999

100100
.. versionadded:: 3.11
101101

@@ -850,7 +850,7 @@ Other constructors, all class methods:
850850

851851
.. classmethod:: datetime.today()
852852

853-
Return the current local datetime, with :attr:`.tzinfo` ``None``.
853+
Return the current local date and time, with :attr:`.tzinfo` ``None``.
854854

855855
Equivalent to::
856856

@@ -1051,7 +1051,7 @@ Other constructors, all class methods:
10511051
Return a :class:`.datetime` corresponding to *date_string*, parsed according to
10521052
*format*.
10531053

1054-
If *format* does not contain microseconds or timezone information, this is equivalent to::
1054+
If *format* does not contain microseconds or time zone information, this is equivalent to::
10551055

10561056
datetime(*(time.strptime(date_string, format)[0:6]))
10571057

@@ -1267,22 +1267,22 @@ Instance methods:
12671267

12681268
If provided, *tz* must be an instance of a :class:`tzinfo` subclass, and its
12691269
:meth:`utcoffset` and :meth:`dst` methods must not return ``None``. If *self*
1270-
is naive, it is presumed to represent time in the system timezone.
1270+
is naive, it is presumed to represent time in the system time zone.
12711271

12721272
If called without arguments (or with ``tz=None``) the system local
1273-
timezone is assumed for the target timezone. The ``.tzinfo`` attribute of the converted
1273+
time zone is assumed for the target time zone. The ``.tzinfo`` attribute of the converted
12741274
datetime instance will be set to an instance of :class:`timezone`
12751275
with the zone name and offset obtained from the OS.
12761276

12771277
If ``self.tzinfo`` is *tz*, ``self.astimezone(tz)`` is equal to *self*: no
12781278
adjustment of date or time data is performed. Else the result is local
1279-
time in the timezone *tz*, representing the same UTC time as *self*: after
1279+
time in the time zone *tz*, representing the same UTC time as *self*: after
12801280
``astz = dt.astimezone(tz)``, ``astz - astz.utcoffset()`` will have
12811281
the same date and time data as ``dt - dt.utcoffset()``.
12821282

1283-
If you merely want to attach a time zone object *tz* to a datetime *dt* without
1283+
If you merely want to attach a :class:`timezone` object *tz* to a datetime *dt* without
12841284
adjustment of date and time data, use ``dt.replace(tzinfo=tz)``. If you
1285-
merely want to remove the time zone object from an aware datetime *dt* without
1285+
merely want to remove the :class:`!timezone` object from an aware datetime *dt* without
12861286
conversion of date and time data, use ``dt.replace(tzinfo=None)``.
12871287

12881288
Note that the default :meth:`tzinfo.fromutc` method can be overridden in a
@@ -1292,7 +1292,7 @@ Instance methods:
12921292
def astimezone(self, tz):
12931293
if self.tzinfo is tz:
12941294
return self
1295-
# Convert self to UTC, and attach the new time zone object.
1295+
# Convert self to UTC, and attach the new timezone object.
12961296
utc = (self - self.utcoffset()).replace(tzinfo=tz)
12971297
# Convert from UTC to tz's local time.
12981298
return tz.fromutc(utc)
@@ -1406,7 +1406,7 @@ Instance methods:
14061406

14071407
There is no method to obtain the POSIX timestamp directly from a
14081408
naive :class:`.datetime` instance representing UTC time. If your
1409-
application uses this convention and your system timezone is not
1409+
application uses this convention and your system time zone is not
14101410
set to UTC, you can obtain the POSIX timestamp by supplying
14111411
``tzinfo=timezone.utc``::
14121412

@@ -1974,7 +1974,7 @@ Examples of working with a :class:`.time` object::
19741974
supply implementations of the standard :class:`tzinfo` methods needed by the
19751975
:class:`.datetime` methods you use. The :mod:`!datetime` module provides
19761976
:class:`timezone`, a simple concrete subclass of :class:`tzinfo` which can
1977-
represent timezones with fixed offset from UTC such as UTC itself or North
1977+
represent time zones with fixed offset from UTC such as UTC itself or North
19781978
American EST and EDT.
19791979

19801980
Special requirement for pickling: A :class:`tzinfo` subclass must have an
@@ -2099,7 +2099,7 @@ When a :class:`.datetime` object is passed in response to a :class:`.datetime`
20992099
method, ``dt.tzinfo`` is the same object as *self*. :class:`tzinfo` methods can
21002100
rely on this, unless user code calls :class:`tzinfo` methods directly. The
21012101
intent is that the :class:`tzinfo` methods interpret *dt* as being in local
2102-
time, and not need worry about objects in other timezones.
2102+
time, and not need worry about objects in other time zones.
21032103

21042104
There is one more :class:`tzinfo` method that a subclass may wish to override:
21052105

@@ -2216,12 +2216,12 @@ only EST (fixed offset -5 hours), or only EDT (fixed offset -4 hours)).
22162216
:mod:`zoneinfo`
22172217
The :mod:`!datetime` module has a basic :class:`timezone` class (for
22182218
handling arbitrary fixed offsets from UTC) and its :attr:`timezone.utc`
2219-
attribute (a UTC timezone instance).
2219+
attribute (a UTC :class:`!timezone` instance).
22202220

2221-
``zoneinfo`` brings the *IANA timezone database* (also known as the Olson
2221+
``zoneinfo`` brings the *IANA time zone database* (also known as the Olson
22222222
database) to Python, and its usage is recommended.
22232223

2224-
`IANA timezone database <https://www.iana.org/time-zones>`_
2224+
`IANA time zone database <https://www.iana.org/time-zones>`_
22252225
The Time Zone Database (often called tz, tzdata or zoneinfo) contains code
22262226
and data that represent the history of local time for many representative
22272227
locations around the globe. It is updated periodically to reflect changes
@@ -2235,10 +2235,10 @@ only EST (fixed offset -5 hours), or only EDT (fixed offset -4 hours)).
22352235
-------------------------
22362236

22372237
The :class:`timezone` class is a subclass of :class:`tzinfo`, each
2238-
instance of which represents a timezone defined by a fixed offset from
2238+
instance of which represents a time zone defined by a fixed offset from
22392239
UTC.
22402240

2241-
Objects of this class cannot be used to represent timezone information in the
2241+
Objects of this class cannot be used to represent time zone information in the
22422242
locations where different offsets are used in different days of the year or
22432243
where historical changes have been made to civil time.
22442244

@@ -2299,7 +2299,7 @@ Class attributes:
22992299

23002300
.. attribute:: timezone.utc
23012301

2302-
The UTC timezone, ``timezone(timedelta(0))``.
2302+
The UTC time zone, ``timezone(timedelta(0))``.
23032303

23042304

23052305
.. index::
@@ -2508,7 +2508,7 @@ Using ``datetime.strptime(date_string, format)`` is equivalent to::
25082508

25092509
datetime(*(time.strptime(date_string, format)[0:6]))
25102510

2511-
except when the format includes sub-second components or timezone offset
2511+
except when the format includes sub-second components or time zone offset
25122512
information, which are supported in ``datetime.strptime`` but are discarded by
25132513
``time.strptime``.
25142514

about.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,13 +319,13 @@ <h3>瀏覽</h3>
319319
<a href="https://www.python.org/psf/donations/">Please donate.</a>
320320
<br />
321321
<br />
322-
最後更新於 Jul 16, 2024 (02:41 UTC)。
322+
最後更新於 Jul 18, 2024 (09:54 UTC)。
323323

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

326326
<br />
327327

328-
使用 <a href="https://www.sphinx-doc.org/">Sphinx</a> 7.4.4 建立。
328+
使用 <a href="https://www.sphinx-doc.org/">Sphinx</a> 7.4.5 建立。
329329
</div>
330330

331331
</body>

bugs.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -358,13 +358,13 @@ <h3>瀏覽</h3>
358358
<a href="https://www.python.org/psf/donations/">Please donate.</a>
359359
<br />
360360
<br />
361-
最後更新於 Jul 16, 2024 (02:41 UTC)。
361+
最後更新於 Jul 18, 2024 (09:54 UTC)。
362362

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

365365
<br />
366366

367-
使用 <a href="https://www.sphinx-doc.org/">Sphinx</a> 7.4.4 建立。
367+
使用 <a href="https://www.sphinx-doc.org/">Sphinx</a> 7.4.5 建立。
368368
</div>
369369

370370
</body>

c-api/abstract.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,13 +329,13 @@ <h3>瀏覽</h3>
329329
<a href="https://www.python.org/psf/donations/">Please donate.</a>
330330
<br />
331331
<br />
332-
最後更新於 Jul 16, 2024 (02:41 UTC)。
332+
最後更新於 Jul 18, 2024 (09:54 UTC)。
333333

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

336336
<br />
337337

338-
使用 <a href="https://www.sphinx-doc.org/">Sphinx</a> 7.4.4 建立。
338+
使用 <a href="https://www.sphinx-doc.org/">Sphinx</a> 7.4.5 建立。
339339
</div>
340340

341341
</body>

c-api/allocation.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -343,13 +343,13 @@ <h3>瀏覽</h3>
343343
<a href="https://www.python.org/psf/donations/">Please donate.</a>
344344
<br />
345345
<br />
346-
最後更新於 Jul 16, 2024 (02:41 UTC)。
346+
最後更新於 Jul 18, 2024 (09:54 UTC)。
347347

348348
<a href="/bugs.html">Found a bug</a>?
349349

350350
<br />
351351

352-
使用 <a href="https://www.sphinx-doc.org/">Sphinx</a> 7.4.4 建立。
352+
使用 <a href="https://www.sphinx-doc.org/">Sphinx</a> 7.4.5 建立。
353353
</div>
354354

355355
</body>

c-api/apiabiversion.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -375,13 +375,13 @@ <h3>瀏覽</h3>
375375
<a href="https://www.python.org/psf/donations/">Please donate.</a>
376376
<br />
377377
<br />
378-
最後更新於 Jul 16, 2024 (02:41 UTC)。
378+
最後更新於 Jul 18, 2024 (09:54 UTC)。
379379

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

382382
<br />
383383

384-
使用 <a href="https://www.sphinx-doc.org/">Sphinx</a> 7.4.4 建立。
384+
使用 <a href="https://www.sphinx-doc.org/">Sphinx</a> 7.4.5 建立。
385385
</div>
386386

387387
</body>

c-api/arg.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -886,13 +886,13 @@ <h3>瀏覽</h3>
886886
<a href="https://www.python.org/psf/donations/">Please donate.</a>
887887
<br />
888888
<br />
889-
最後更新於 Jul 16, 2024 (02:41 UTC)。
889+
最後更新於 Jul 18, 2024 (09:54 UTC)。
890890

891891
<a href="/bugs.html">Found a bug</a>?
892892

893893
<br />
894894

895-
使用 <a href="https://www.sphinx-doc.org/">Sphinx</a> 7.4.4 建立。
895+
使用 <a href="https://www.sphinx-doc.org/">Sphinx</a> 7.4.5 建立。
896896
</div>
897897

898898
</body>

c-api/bool.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -340,13 +340,13 @@ <h3>瀏覽</h3>
340340
<a href="https://www.python.org/psf/donations/">Please donate.</a>
341341
<br />
342342
<br />
343-
最後更新於 Jul 16, 2024 (02:41 UTC)。
343+
最後更新於 Jul 18, 2024 (09:54 UTC)。
344344

345345
<a href="/bugs.html">Found a bug</a>?
346346

347347
<br />
348348

349-
使用 <a href="https://www.sphinx-doc.org/">Sphinx</a> 7.4.4 建立。
349+
使用 <a href="https://www.sphinx-doc.org/">Sphinx</a> 7.4.5 建立。
350350
</div>
351351

352352
</body>

c-api/buffer.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1013,13 +1013,13 @@ <h3>瀏覽</h3>
10131013
<a href="https://www.python.org/psf/donations/">Please donate.</a>
10141014
<br />
10151015
<br />
1016-
最後更新於 Jul 16, 2024 (02:41 UTC)。
1016+
最後更新於 Jul 18, 2024 (09:54 UTC)。
10171017

10181018
<a href="/bugs.html">Found a bug</a>?
10191019

10201020
<br />
10211021

1022-
使用 <a href="https://www.sphinx-doc.org/">Sphinx</a> 7.4.4 建立。
1022+
使用 <a href="https://www.sphinx-doc.org/">Sphinx</a> 7.4.5 建立。
10231023
</div>
10241024

10251025
</body>

c-api/bytearray.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -396,13 +396,13 @@ <h3>瀏覽</h3>
396396
<a href="https://www.python.org/psf/donations/">Please donate.</a>
397397
<br />
398398
<br />
399-
最後更新於 Jul 16, 2024 (02:41 UTC)。
399+
最後更新於 Jul 18, 2024 (09:54 UTC)。
400400

401401
<a href="/bugs.html">Found a bug</a>?
402402

403403
<br />
404404

405-
使用 <a href="https://www.sphinx-doc.org/">Sphinx</a> 7.4.4 建立。
405+
使用 <a href="https://www.sphinx-doc.org/">Sphinx</a> 7.4.5 建立。
406406
</div>
407407

408408
</body>

c-api/bytes.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -520,13 +520,13 @@ <h3>瀏覽</h3>
520520
<a href="https://www.python.org/psf/donations/">Please donate.</a>
521521
<br />
522522
<br />
523-
最後更新於 Jul 16, 2024 (02:41 UTC)。
523+
最後更新於 Jul 18, 2024 (09:54 UTC)。
524524

525525
<a href="/bugs.html">Found a bug</a>?
526526

527527
<br />
528528

529-
使用 <a href="https://www.sphinx-doc.org/">Sphinx</a> 7.4.4 建立。
529+
使用 <a href="https://www.sphinx-doc.org/">Sphinx</a> 7.4.5 建立。
530530
</div>
531531

532532
</body>

0 commit comments

Comments
 (0)