7
7
msgstr ""
8
8
"Project-Id-Version : Python 3.10\n "
9
9
"Report-Msgid-Bugs-To : \n "
10
- "POT-Creation-Date : 2021-11-23 00:09 +0000\n "
10
+ "POT-Creation-Date : 2022-02-24 00:12 +0000\n "
11
11
"PO-Revision-Date : 2018-05-23 14:33+0000\n "
12
12
"
Last-Translator :
Adrian Liaw <[email protected] >\n "
13
13
"Language-Team : Chinese - TAIWAN (https://github.com/python/python-docs-zh- "
@@ -1145,11 +1145,10 @@ msgstr ""
1145
1145
#: ../../c-api/typeobj.rst:478
1146
1146
msgid ""
1147
1147
"The type object structure extends the :c:type:`PyVarObject` structure. The :"
1148
- "attr:`ob_size` field is used for dynamic types (created by :func:"
1149
- "`type_new`, usually called from a class statement). Note that :c:data:"
1150
- "`PyType_Type` (the metatype) initializes :c:member:`~PyTypeObject."
1151
- "tp_itemsize`, which means that its instances (i.e. type objects) *must* have "
1152
- "the :attr:`ob_size` field."
1148
+ "attr:`ob_size` field is used for dynamic types (created by :func:`type_new`, "
1149
+ "usually called from a class statement). Note that :c:data:`PyType_Type` (the "
1150
+ "metatype) initializes :c:member:`~PyTypeObject.tp_itemsize`, which means "
1151
+ "that its instances (i.e. type objects) *must* have the :attr:`ob_size` field."
1153
1152
msgstr ""
1154
1153
1155
1154
#: ../../c-api/typeobj.rst:487
@@ -1192,7 +1191,7 @@ msgstr ""
1192
1191
#: ../../c-api/typeobj.rst:1910 ../../c-api/typeobj.rst:1921
1193
1192
#: ../../c-api/typeobj.rst:1931 ../../c-api/typeobj.rst:1940
1194
1193
#: ../../c-api/typeobj.rst:1950 ../../c-api/typeobj.rst:1964
1195
- #: ../../c-api/typeobj.rst:2002 ../../c-api/typeobj.rst:2019
1194
+ #: ../../c-api/typeobj.rst:2013 ../../c-api/typeobj.rst:2030
1196
1195
msgid "**Inheritance:**"
1197
1196
msgstr ""
1198
1197
@@ -1226,7 +1225,7 @@ msgstr ""
1226
1225
#: ../../c-api/typeobj.rst:934 ../../c-api/typeobj.rst:1533
1227
1226
#: ../../c-api/typeobj.rst:1556 ../../c-api/typeobj.rst:1674
1228
1227
#: ../../c-api/typeobj.rst:1692 ../../c-api/typeobj.rst:1783
1229
- #: ../../c-api/typeobj.rst:1895 ../../c-api/typeobj.rst:2004
1228
+ #: ../../c-api/typeobj.rst:1895 ../../c-api/typeobj.rst:2015
1230
1229
msgid "This field is inherited by subtypes."
1231
1230
msgstr ""
1232
1231
@@ -2879,39 +2878,39 @@ msgid ""
2879
2878
"also set the :const:`Py_TPFLAGS_HAVE_FINALIZE` flags bit."
2880
2879
msgstr ""
2881
2880
2882
- #: ../../c-api/typeobj.rst:2008
2881
+ #: ../../c-api/typeobj.rst:2002
2882
+ msgid ""
2883
+ "Also, note that, in a garbage collected Python, :c:member:`~PyTypeObject."
2884
+ "tp_dealloc` may be called from any Python thread, not just the thread which "
2885
+ "created the object (if the object becomes part of a refcount cycle, that "
2886
+ "cycle might be collected by a garbage collection on any thread). This is "
2887
+ "not a problem for Python API calls, since the thread on which tp_dealloc is "
2888
+ "called will own the Global Interpreter Lock (GIL). However, if the object "
2889
+ "being destroyed in turn destroys objects from some other C or C++ library, "
2890
+ "care should be taken to ensure that destroying those objects on the thread "
2891
+ "which called tp_dealloc will not violate any assumptions of the library."
2892
+ msgstr ""
2893
+
2894
+ #: ../../c-api/typeobj.rst:2019
2883
2895
msgid "\" Safe object finalization\" (:pep:`442`)"
2884
2896
msgstr ""
2885
2897
2886
- #: ../../c-api/typeobj.rst:2013
2898
+ #: ../../c-api/typeobj.rst:2024
2887
2899
msgid ""
2888
2900
"Vectorcall function to use for calls of this type object. In other words, it "
2889
2901
"is used to implement :ref:`vectorcall <vectorcall>` for ``type.__call__``. "
2890
2902
"If ``tp_vectorcall`` is ``NULL``, the default call implementation using :"
2891
2903
"attr:`__new__` and :attr:`__init__` is used."
2892
2904
msgstr ""
2893
2905
2894
- #: ../../c-api/typeobj.rst:2021
2906
+ #: ../../c-api/typeobj.rst:2032
2895
2907
msgid "This field is never inherited."
2896
2908
msgstr ""
2897
2909
2898
- #: ../../c-api/typeobj.rst:2023
2910
+ #: ../../c-api/typeobj.rst:2034
2899
2911
msgid "(the field exists since 3.8 but it's only used since 3.9)"
2900
2912
msgstr ""
2901
2913
2902
- #: ../../c-api/typeobj.rst:2026
2903
- msgid ""
2904
- "Also, note that, in a garbage collected Python, :c:member:`~PyTypeObject."
2905
- "tp_dealloc` may be called from any Python thread, not just the thread which "
2906
- "created the object (if the object becomes part of a refcount cycle, that "
2907
- "cycle might be collected by a garbage collection on any thread). This is "
2908
- "not a problem for Python API calls, since the thread on which tp_dealloc is "
2909
- "called will own the Global Interpreter Lock (GIL). However, if the object "
2910
- "being destroyed in turn destroys objects from some other C or C++ library, "
2911
- "care should be taken to ensure that destroying those objects on the thread "
2912
- "which called tp_dealloc will not violate any assumptions of the library."
2913
- msgstr ""
2914
-
2915
2914
#: ../../c-api/typeobj.rst:2040
2916
2915
msgid "Static Types"
2917
2916
msgstr ""
@@ -3137,7 +3136,7 @@ msgstr ""
3137
3136
3138
3137
#: ../../c-api/typeobj.rst:2324 ../../c-api/typeobj.rst:2373
3139
3138
#: ../../c-api/typeobj.rst:2427 ../../c-api/typeobj.rst:2438
3140
- #: ../../c-api/typeobj.rst:2449 ../../c-api/typeobj.rst:2458
3139
+ #: ../../c-api/typeobj.rst:2450 ../../c-api/typeobj.rst:2459
3141
3140
msgid "The signature of this function is::"
3142
3141
msgstr ""
3143
3142
@@ -3278,31 +3277,32 @@ msgstr ""
3278
3277
3279
3278
#: ../../c-api/typeobj.rst:2442
3280
3279
msgid ""
3281
- "Must return an :term:`awaitable` object. See :meth:`__anext__` for details."
3280
+ "Must return an :term:`asynchronous iterator` object. See :meth:`__anext__` "
3281
+ "for details."
3282
3282
msgstr ""
3283
3283
3284
- #: ../../c-api/typeobj.rst:2444
3284
+ #: ../../c-api/typeobj.rst:2445
3285
3285
msgid ""
3286
3286
"This slot may be set to ``NULL`` if an object does not implement "
3287
3287
"asynchronous iteration protocol."
3288
3288
msgstr ""
3289
3289
3290
- #: ../../c-api/typeobj.rst:2453
3290
+ #: ../../c-api/typeobj.rst:2454
3291
3291
msgid ""
3292
3292
"Must return an :term:`awaitable` object. See :meth:`__anext__` for details. "
3293
3293
"This slot may be set to ``NULL``."
3294
3294
msgstr ""
3295
3295
3296
- #: ../../c-api/typeobj.rst:2462
3296
+ #: ../../c-api/typeobj.rst:2463
3297
3297
msgid ""
3298
3298
"See :c:func:`PyIter_Send` for details. This slot may be set to ``NULL``."
3299
3299
msgstr ""
3300
3300
3301
- #: ../../c-api/typeobj.rst:2471
3301
+ #: ../../c-api/typeobj.rst:2472
3302
3302
msgid "Slot Type typedefs"
3303
3303
msgstr ""
3304
3304
3305
- #: ../../c-api/typeobj.rst:2475
3305
+ #: ../../c-api/typeobj.rst:2476
3306
3306
msgid ""
3307
3307
"The purpose of this function is to separate memory allocation from memory "
3308
3308
"initialization. It should return a pointer to a block of memory of adequate "
@@ -3316,114 +3316,114 @@ msgid ""
3316
3316
"member:`~PyTypeObject.tp_basicsize`."
3317
3317
msgstr ""
3318
3318
3319
- #: ../../c-api/typeobj.rst:2485
3319
+ #: ../../c-api/typeobj.rst:2486
3320
3320
msgid ""
3321
3321
"This function should not do any other instance initialization, not even to "
3322
3322
"allocate additional memory; that should be done by :c:member:`~PyTypeObject."
3323
3323
"tp_new`."
3324
3324
msgstr ""
3325
3325
3326
- #: ../../c-api/typeobj.rst:2492
3326
+ #: ../../c-api/typeobj.rst:2493
3327
3327
msgid "See :c:member:`~PyTypeObject.tp_free`."
3328
3328
msgstr "請見 :c:member:`~PyTypeObject.tp_free`\\ 。"
3329
3329
3330
- #: ../../c-api/typeobj.rst:2496
3330
+ #: ../../c-api/typeobj.rst:2497
3331
3331
msgid "See :c:member:`~PyTypeObject.tp_new`."
3332
3332
msgstr "請見 :c:member:`~PyTypeObject.tp_new`\\ 。"
3333
3333
3334
- #: ../../c-api/typeobj.rst:2500
3334
+ #: ../../c-api/typeobj.rst:2501
3335
3335
msgid "See :c:member:`~PyTypeObject.tp_init`."
3336
3336
msgstr "請見 :c:member:`~PyTypeObject.tp_init`\\ 。"
3337
3337
3338
- #: ../../c-api/typeobj.rst:2504
3338
+ #: ../../c-api/typeobj.rst:2505
3339
3339
msgid "See :c:member:`~PyTypeObject.tp_repr`."
3340
3340
msgstr "請見 :c:member:`~PyTypeObject.tp_repr`\\ 。"
3341
3341
3342
- #: ../../c-api/typeobj.rst:2508 ../../c-api/typeobj.rst:2517
3342
+ #: ../../c-api/typeobj.rst:2509 ../../c-api/typeobj.rst:2518
3343
3343
msgid "Return the value of the named attribute for the object."
3344
3344
msgstr ""
3345
3345
3346
- #: ../../c-api/typeobj.rst:2512 ../../c-api/typeobj.rst:2523
3346
+ #: ../../c-api/typeobj.rst:2513 ../../c-api/typeobj.rst:2524
3347
3347
msgid ""
3348
3348
"Set the value of the named attribute for the object. The value argument is "
3349
3349
"set to ``NULL`` to delete the attribute."
3350
3350
msgstr ""
3351
3351
3352
- #: ../../c-api/typeobj.rst:2519
3352
+ #: ../../c-api/typeobj.rst:2520
3353
3353
msgid "See :c:member:`~PyTypeObject.tp_getattro`."
3354
3354
msgstr "請見 :c:member:`~PyTypeObject.tp_getattro`\\ 。"
3355
3355
3356
- #: ../../c-api/typeobj.rst:2526
3356
+ #: ../../c-api/typeobj.rst:2527
3357
3357
msgid "See :c:member:`~PyTypeObject.tp_setattro`."
3358
3358
msgstr "請見 :c:member:`~PyTypeObject.tp_setattro`\\ 。"
3359
3359
3360
- #: ../../c-api/typeobj.rst:2530
3360
+ #: ../../c-api/typeobj.rst:2531
3361
3361
msgid "See :c:member:`~PyTypeObject.tp_descrget`."
3362
3362
msgstr "請見 :c:member:`~PyTypeObject.tp_descrget`\\ 。"
3363
3363
3364
- #: ../../c-api/typeobj.rst:2534
3364
+ #: ../../c-api/typeobj.rst:2535
3365
3365
msgid "See :c:member:`~PyTypeObject.tp_descrset`."
3366
3366
msgstr "請見 :c:member:`~PyTypeObject.tp_descrset`\\ 。"
3367
3367
3368
- #: ../../c-api/typeobj.rst:2538
3368
+ #: ../../c-api/typeobj.rst:2539
3369
3369
msgid "See :c:member:`~PyTypeObject.tp_hash`."
3370
3370
msgstr "請見 :c:member:`~PyTypeObject.tp_hash`\\ 。"
3371
3371
3372
- #: ../../c-api/typeobj.rst:2542
3372
+ #: ../../c-api/typeobj.rst:2543
3373
3373
msgid "See :c:member:`~PyTypeObject.tp_richcompare`."
3374
3374
msgstr "請見 :c:member:`~PyTypeObject.tp_richcompare`\\ 。"
3375
3375
3376
- #: ../../c-api/typeobj.rst:2546
3376
+ #: ../../c-api/typeobj.rst:2547
3377
3377
msgid "See :c:member:`~PyTypeObject.tp_iter`."
3378
3378
msgstr "請見 :c:member:`~PyTypeObject.tp_iter`\\ 。"
3379
3379
3380
- #: ../../c-api/typeobj.rst:2550
3380
+ #: ../../c-api/typeobj.rst:2551
3381
3381
msgid "See :c:member:`~PyTypeObject.tp_iternext`."
3382
3382
msgstr "請見 :c:member:`~PyTypeObject.tp_iternext`\\ 。"
3383
3383
3384
- #: ../../c-api/typeobj.rst:2564
3384
+ #: ../../c-api/typeobj.rst:2565
3385
3385
msgid "See :c:member:`~PyAsyncMethods.am_send`."
3386
3386
msgstr "請見 :c:member:`~PyAsyncMethods.am_send`\\ 。"
3387
3387
3388
- #: ../../c-api/typeobj.rst:2580
3388
+ #: ../../c-api/typeobj.rst:2581
3389
3389
msgid "Examples"
3390
3390
msgstr "範例"
3391
3391
3392
- #: ../../c-api/typeobj.rst:2582
3392
+ #: ../../c-api/typeobj.rst:2583
3393
3393
msgid ""
3394
3394
"The following are simple examples of Python type definitions. They include "
3395
3395
"common usage you may encounter. Some demonstrate tricky corner cases. For "
3396
3396
"more examples, practical info, and a tutorial, see :ref:`defining-new-types` "
3397
3397
"and :ref:`new-types-topics`."
3398
3398
msgstr ""
3399
3399
3400
- #: ../../c-api/typeobj.rst:2587
3400
+ #: ../../c-api/typeobj.rst:2588
3401
3401
msgid "A basic :ref:`static type <static-types>`::"
3402
3402
msgstr ""
3403
3403
3404
- #: ../../c-api/typeobj.rst:2604
3404
+ #: ../../c-api/typeobj.rst:2605
3405
3405
msgid ""
3406
3406
"You may also find older code (especially in the CPython code base) with a "
3407
3407
"more verbose initializer::"
3408
3408
msgstr ""
3409
3409
3410
- #: ../../c-api/typeobj.rst:2648
3410
+ #: ../../c-api/typeobj.rst:2649
3411
3411
msgid "A type that supports weakrefs, instance dicts, and hashing::"
3412
3412
msgstr ""
3413
3413
3414
- #: ../../c-api/typeobj.rst:2675
3414
+ #: ../../c-api/typeobj.rst:2676
3415
3415
msgid ""
3416
3416
"A str subclass that cannot be subclassed and cannot be called to create "
3417
3417
"instances (e.g. uses a separate factory func) using :c:data:"
3418
3418
"`Py_TPFLAGS_DISALLOW_INSTANTIATION` flag::"
3419
3419
msgstr ""
3420
3420
3421
- #: ../../c-api/typeobj.rst:2694
3421
+ #: ../../c-api/typeobj.rst:2695
3422
3422
msgid ""
3423
3423
"The simplest :ref:`static type <static-types>` with fixed-length instances::"
3424
3424
msgstr ""
3425
3425
3426
- #: ../../c-api/typeobj.rst:2705
3426
+ #: ../../c-api/typeobj.rst:2706
3427
3427
msgid ""
3428
3428
"The simplest :ref:`static type <static-types>` with variable-length "
3429
3429
"instances::"
0 commit comments