Skip to content

Commit de7cccb

Browse files
committed
Deploying to gh-pages from @ 93e38a6 🚀
1 parent de15b1a commit de7cccb

File tree

545 files changed

+633
-555
lines changed

Some content is hidden

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

545 files changed

+633
-555
lines changed

_sources/faq/programming.rst.txt

+15-3
Original file line numberDiff line numberDiff line change
@@ -1279,13 +1279,25 @@ Or, you can use an extension that provides a matrix datatype; `NumPy
12791279
<https://numpy.org/>`_ is the best known.
12801280

12811281

1282-
How do I apply a method to a sequence of objects?
1283-
-------------------------------------------------
1282+
How do I apply a method or function to a sequence of objects?
1283+
-------------------------------------------------------------
12841284

1285-
Use a list comprehension::
1285+
To call a method or function and accumulate the return values is a list,
1286+
a :term:`list comprehension` is an elegant solution::
12861287

12871288
result = [obj.method() for obj in mylist]
12881289

1290+
result = [function(obj) for obj in mylist]
1291+
1292+
To just run the method or function without saving the return values,
1293+
a plain :keyword:`for` loop will suffice::
1294+
1295+
for obj in mylist:
1296+
obj.method()
1297+
1298+
for obj in mylist:
1299+
function(obj)
1300+
12891301
.. _faq-augmented-assignment-tuple-error:
12901302

12911303
Why does a_tuple[i] += ['item'] raise an exception when the addition works?

_sources/library/index.rst.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ as a collection of packages, so it may be necessary to use the packaging
2727
tools provided with the operating system to obtain some or all of the
2828
optional components.
2929

30-
In addition to the standard library, there is a growing collection of
31-
several thousand components (from individual programs and modules to
30+
In addition to the standard library, there is an active collection of
31+
hundreds of thousands of components (from individual programs and modules to
3232
packages and entire application development frameworks), available from
3333
the `Python Package Index <https://pypi.org>`_.
3434

_sources/library/stdtypes.rst.txt

+6
Original file line numberDiff line numberDiff line change
@@ -1617,6 +1617,9 @@ expression support in the :mod:`re` module).
16171617
range [*start*, *end*]. Optional arguments *start* and *end* are
16181618
interpreted as in slice notation.
16191619

1620+
If *sub* is empty, returns the number of empty strings between characters
1621+
which is the length of the string plus one.
1622+
16201623

16211624
.. method:: str.encode(encoding="utf-8", errors="strict")
16221625

@@ -2698,6 +2701,9 @@ arbitrary binary data.
26982701
The subsequence to search for may be any :term:`bytes-like object` or an
26992702
integer in the range 0 to 255.
27002703

2704+
If *sub* is empty, returns the number of empty slices between characters
2705+
which is the length of the bytes object plus one.
2706+
27012707
.. versionchanged:: 3.3
27022708
Also accept an integer in the range 0 to 255 as the subsequence.
27032709

_sources/library/sys.rst.txt

+9
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,15 @@ always available.
3535
can then log the event, raise an exception to abort the operation,
3636
or terminate the process entirely.
3737

38+
Note that audit hooks are primarily for collecting information about internal
39+
or otherwise unobservable actions, whether by Python or libraries written in
40+
Python. They are not suitable for implementing a "sandbox". In particular,
41+
malicious code can trivially disable or bypass hooks added using this
42+
function. At a minimum, any security-sensitive hooks must be added using the
43+
C API :c:func:`PySys_AddAuditHook` before initialising the runtime, and any
44+
modules allowing arbitrary memory modification (such as :mod:`ctypes`) should
45+
be completely removed or closely monitored.
46+
3847
.. audit-event:: sys.addaudithook "" sys.addaudithook
3948

4049
Calling :func:`sys.addaudithook` will itself raise an auditing event

about.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ <h3>瀏覽</h3>
284284
<br />
285285
<br />
286286

287-
最後更新於 11月 09, 2022。
287+
最後更新於 11月 12, 2022。
288288
<a href="/bugs.html">Found a bug</a>?
289289
<br />
290290

bugs.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ <h3>瀏覽</h3>
319319
<br />
320320
<br />
321321

322-
最後更新於 11月 09, 2022。
322+
最後更新於 11月 12, 2022。
323323
<a href="/bugs.html">Found a bug</a>?
324324
<br />
325325

c-api/abstract.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ <h3>瀏覽</h3>
294294
<br />
295295
<br />
296296

297-
最後更新於 11月 09, 2022。
297+
最後更新於 11月 12, 2022。
298298
<a href="/bugs.html">Found a bug</a>?
299299
<br />
300300

c-api/allocation.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ <h3>瀏覽</h3>
330330
<br />
331331
<br />
332332

333-
最後更新於 11月 09, 2022。
333+
最後更新於 11月 12, 2022。
334334
<a href="/bugs.html">Found a bug</a>?
335335
<br />
336336

c-api/apiabiversion.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ <h3>瀏覽</h3>
341341
<br />
342342
<br />
343343

344-
最後更新於 11月 09, 2022。
344+
最後更新於 11月 12, 2022。
345345
<a href="/bugs.html">Found a bug</a>?
346346
<br />
347347

c-api/arg.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -866,7 +866,7 @@ <h3>瀏覽</h3>
866866
<br />
867867
<br />
868868

869-
最後更新於 11月 09, 2022。
869+
最後更新於 11月 12, 2022。
870870
<a href="/bugs.html">Found a bug</a>?
871871
<br />
872872

c-api/bool.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ <h3>瀏覽</h3>
292292
<br />
293293
<br />
294294

295-
最後更新於 11月 09, 2022。
295+
最後更新於 11月 12, 2022。
296296
<a href="/bugs.html">Found a bug</a>?
297297
<br />
298298

c-api/buffer.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -967,7 +967,7 @@ <h3>瀏覽</h3>
967967
<br />
968968
<br />
969969

970-
最後更新於 11月 09, 2022。
970+
最後更新於 11月 12, 2022。
971971
<a href="/bugs.html">Found a bug</a>?
972972
<br />
973973

c-api/bytearray.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ <h3>瀏覽</h3>
368368
<br />
369369
<br />
370370

371-
最後更新於 11月 09, 2022。
371+
最後更新於 11月 12, 2022。
372372
<a href="/bugs.html">Found a bug</a>?
373373
<br />
374374

c-api/bytes.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ <h3>瀏覽</h3>
484484
<br />
485485
<br />
486486

487-
最後更新於 11月 09, 2022。
487+
最後更新於 11月 12, 2022。
488488
<a href="/bugs.html">Found a bug</a>?
489489
<br />
490490

c-api/call.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,7 @@ <h3>瀏覽</h3>
609609
<br />
610610
<br />
611611

612-
最後更新於 11月 09, 2022。
612+
最後更新於 11月 12, 2022。
613613
<a href="/bugs.html">Found a bug</a>?
614614
<br />
615615

c-api/capsule.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ <h3>瀏覽</h3>
405405
<br />
406406
<br />
407407

408-
最後更新於 11月 09, 2022。
408+
最後更新於 11月 12, 2022。
409409
<a href="/bugs.html">Found a bug</a>?
410410
<br />
411411

c-api/cell.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ <h3>瀏覽</h3>
319319
<br />
320320
<br />
321321

322-
最後更新於 11月 09, 2022。
322+
最後更新於 11月 12, 2022。
323323
<a href="/bugs.html">Found a bug</a>?
324324
<br />
325325

c-api/code.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ <h3>瀏覽</h3>
386386
<br />
387387
<br />
388388

389-
最後更新於 11月 09, 2022。
389+
最後更新於 11月 12, 2022。
390390
<a href="/bugs.html">Found a bug</a>?
391391
<br />
392392

c-api/codec.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ <h3>瀏覽</h3>
436436
<br />
437437
<br />
438438

439-
最後更新於 11月 09, 2022。
439+
最後更新於 11月 12, 2022。
440440
<a href="/bugs.html">Found a bug</a>?
441441
<br />
442442

c-api/complex.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ <h3>瀏覽</h3>
417417
<br />
418418
<br />
419419

420-
最後更新於 11月 09, 2022。
420+
最後更新於 11月 12, 2022。
421421
<a href="/bugs.html">Found a bug</a>?
422422
<br />
423423

c-api/concrete.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ <h3>瀏覽</h3>
431431
<br />
432432
<br />
433433

434-
最後更新於 11月 09, 2022。
434+
最後更新於 11月 12, 2022。
435435
<a href="/bugs.html">Found a bug</a>?
436436
<br />
437437

c-api/contextvars.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ <h3>瀏覽</h3>
415415
<br />
416416
<br />
417417

418-
最後更新於 11月 09, 2022。
418+
最後更新於 11月 12, 2022。
419419
<a href="/bugs.html">Found a bug</a>?
420420
<br />
421421

c-api/conversion.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ <h3>瀏覽</h3>
370370
<br />
371371
<br />
372372

373-
最後更新於 11月 09, 2022。
373+
最後更新於 11月 12, 2022。
374374
<a href="/bugs.html">Found a bug</a>?
375375
<br />
376376

c-api/coro.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ <h3>瀏覽</h3>
283283
<br />
284284
<br />
285285

286-
最後更新於 11月 09, 2022。
286+
最後更新於 11月 12, 2022。
287287
<a href="/bugs.html">Found a bug</a>?
288288
<br />
289289

c-api/datetime.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,7 @@ <h3>瀏覽</h3>
576576
<br />
577577
<br />
578578

579-
最後更新於 11月 09, 2022。
579+
最後更新於 11月 12, 2022。
580580
<a href="/bugs.html">Found a bug</a>?
581581
<br />
582582

c-api/descriptor.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ <h3>瀏覽</h3>
298298
<br />
299299
<br />
300300

301-
最後更新於 11月 09, 2022。
301+
最後更新於 11月 12, 2022。
302302
<a href="/bugs.html">Found a bug</a>?
303303
<br />
304304

c-api/dict.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,7 @@ <h3>瀏覽</h3>
506506
<br />
507507
<br />
508508

509-
最後更新於 11月 09, 2022。
509+
最後更新於 11月 12, 2022。
510510
<a href="/bugs.html">Found a bug</a>?
511511
<br />
512512

c-api/exceptions.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1526,7 +1526,7 @@ <h3>瀏覽</h3>
15261526
<br />
15271527
<br />
15281528

1529-
最後更新於 11月 09, 2022。
1529+
最後更新於 11月 12, 2022。
15301530
<a href="/bugs.html">Found a bug</a>?
15311531
<br />
15321532

c-api/file.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ <h3>瀏覽</h3>
344344
<br />
345345
<br />
346346

347-
最後更新於 11月 09, 2022。
347+
最後更新於 11月 12, 2022。
348348
<a href="/bugs.html">Found a bug</a>?
349349
<br />
350350

c-api/float.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ <h3>瀏覽</h3>
449449
<br />
450450
<br />
451451

452-
最後更新於 11月 09, 2022。
452+
最後更新於 11月 12, 2022。
453453
<a href="/bugs.html">Found a bug</a>?
454454
<br />
455455

c-api/frame.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ <h3>瀏覽</h3>
350350
<br />
351351
<br />
352352

353-
最後更新於 11月 09, 2022。
353+
最後更新於 11月 12, 2022。
354354
<a href="/bugs.html">Found a bug</a>?
355355
<br />
356356

c-api/function.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ <h3>瀏覽</h3>
365365
<br />
366366
<br />
367367

368-
最後更新於 11月 09, 2022。
368+
最後更新於 11月 12, 2022。
369369
<a href="/bugs.html">Found a bug</a>?
370370
<br />
371371

c-api/gcsupport.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,7 @@ <h3>瀏覽</h3>
509509
<br />
510510
<br />
511511

512-
最後更新於 11月 09, 2022。
512+
最後更新於 11月 12, 2022。
513513
<a href="/bugs.html">Found a bug</a>?
514514
<br />
515515

c-api/gen.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ <h3>瀏覽</h3>
301301
<br />
302302
<br />
303303

304-
最後更新於 11月 09, 2022。
304+
最後更新於 11月 12, 2022。
305305
<a href="/bugs.html">Found a bug</a>?
306306
<br />
307307

c-api/import.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,7 @@ <h3>瀏覽</h3>
576576
<br />
577577
<br />
578578

579-
最後更新於 11月 09, 2022。
579+
最後更新於 11月 12, 2022。
580580
<a href="/bugs.html">Found a bug</a>?
581581
<br />
582582

c-api/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ <h3>瀏覽</h3>
378378
<br />
379379
<br />
380380

381-
最後更新於 11月 09, 2022。
381+
最後更新於 11月 12, 2022。
382382
<a href="/bugs.html">Found a bug</a>?
383383
<br />
384384

c-api/init.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -2131,7 +2131,7 @@ <h3>瀏覽</h3>
21312131
<br />
21322132
<br />
21332133

2134-
最後更新於 11月 09, 2022。
2134+
最後更新於 11月 12, 2022。
21352135
<a href="/bugs.html">Found a bug</a>?
21362136
<br />
21372137

c-api/init_config.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1855,7 +1855,7 @@ <h3>瀏覽</h3>
18551855
<br />
18561856
<br />
18571857

1858-
最後更新於 11月 09, 2022。
1858+
最後更新於 11月 12, 2022。
18591859
<a href="/bugs.html">Found a bug</a>?
18601860
<br />
18611861

c-api/intro.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -996,7 +996,7 @@ <h3>瀏覽</h3>
996996
<br />
997997
<br />
998998

999-
最後更新於 11月 09, 2022。
999+
最後更新於 11月 12, 2022。
10001000
<a href="/bugs.html">Found a bug</a>?
10011001
<br />
10021002

c-api/iter.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ <h3>瀏覽</h3>
332332
<br />
333333
<br />
334334

335-
最後更新於 11月 09, 2022。
335+
最後更新於 11月 12, 2022。
336336
<a href="/bugs.html">Found a bug</a>?
337337
<br />
338338

0 commit comments

Comments
 (0)