Skip to content

Commit 46f6dd8

Browse files
sync with cpython 5720f7fc
1 parent bcb6610 commit 46f6dd8

File tree

14 files changed

+1467
-1406
lines changed

14 files changed

+1467
-1406
lines changed

c-api/frame.po

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgid ""
88
msgstr ""
99
"Project-Id-Version: Python 3.12\n"
1010
"Report-Msgid-Bugs-To: \n"
11-
"POT-Creation-Date: 2023-07-17 17:39+0800\n"
11+
"POT-Creation-Date: 2023-12-06 00:03+0000\n"
1212
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
1313
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
1414
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -76,7 +76,7 @@ msgid ""
7676
msgstr ""
7777

7878
#: ../../c-api/frame.rst:53
79-
msgid "Get the *frame*'s ``f_builtins`` attribute."
79+
msgid "Get the *frame*'s :attr:`~frame.f_builtins` attribute."
8080
msgstr ""
8181

8282
#: ../../c-api/frame.rst:55 ../../c-api/frame.rst:86
@@ -107,11 +107,11 @@ msgid "Return a :term:`strong reference`, or ``NULL``."
107107
msgstr ""
108108

109109
#: ../../c-api/frame.rst:84
110-
msgid "Get the *frame*'s ``f_globals`` attribute."
110+
msgid "Get the *frame*'s :attr:`~frame.f_globals` attribute."
111111
msgstr ""
112112

113113
#: ../../c-api/frame.rst:93
114-
msgid "Get the *frame*'s ``f_lasti`` attribute."
114+
msgid "Get the *frame*'s :attr:`~frame.f_lasti` attribute."
115115
msgstr ""
116116

117117
#: ../../c-api/frame.rst:95
@@ -146,7 +146,7 @@ msgid ""
146146
msgstr ""
147147

148148
#: ../../c-api/frame.rst:123
149-
msgid "Get the *frame*'s ``f_locals`` attribute (:class:`dict`)."
149+
msgid "Get the *frame*'s :attr:`~frame.f_locals` attribute (:class:`dict`)."
150150
msgstr ""
151151

152152
#: ../../c-api/frame.rst:132

c-api/init.po

Lines changed: 53 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgid ""
88
msgstr ""
99
"Project-Id-Version: Python 3.12\n"
1010
"Report-Msgid-Bugs-To: \n"
11-
"POT-Creation-Date: 2023-08-01 00:03+0000\n"
11+
"POT-Creation-Date: 2023-12-06 00:03+0000\n"
1212
"PO-Revision-Date: 2023-04-24 20:49+0800\n"
1313
"Last-Translator: Adrian Liaw <adrianliaw2000@gmail.com>\n"
1414
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -2197,43 +2197,43 @@ msgstr ""
21972197
msgid ""
21982198
"The value passed as the *what* parameter to a :c:type:`Py_tracefunc` "
21992199
"function (but not a profiling function) when a line-number event is being "
2200-
"reported. It may be disabled for a frame by setting :attr:`f_trace_lines` to "
2201-
"*0* on that frame."
2200+
"reported. It may be disabled for a frame by setting :attr:`~frame."
2201+
"f_trace_lines` to *0* on that frame."
22022202
msgstr ""
22032203

2204-
#: ../../c-api/init.rst:1917
2204+
#: ../../c-api/init.rst:1918
22052205
msgid ""
22062206
"The value for the *what* parameter to :c:type:`Py_tracefunc` functions when "
22072207
"a call is about to return."
22082208
msgstr ""
22092209

2210-
#: ../../c-api/init.rst:1923
2210+
#: ../../c-api/init.rst:1924
22112211
msgid ""
22122212
"The value for the *what* parameter to :c:type:`Py_tracefunc` functions when "
22132213
"a C function is about to be called."
22142214
msgstr ""
22152215

2216-
#: ../../c-api/init.rst:1929
2216+
#: ../../c-api/init.rst:1930
22172217
msgid ""
22182218
"The value for the *what* parameter to :c:type:`Py_tracefunc` functions when "
22192219
"a C function has raised an exception."
22202220
msgstr ""
22212221

2222-
#: ../../c-api/init.rst:1935
2222+
#: ../../c-api/init.rst:1936
22232223
msgid ""
22242224
"The value for the *what* parameter to :c:type:`Py_tracefunc` functions when "
22252225
"a C function has returned."
22262226
msgstr ""
22272227

2228-
#: ../../c-api/init.rst:1941
2228+
#: ../../c-api/init.rst:1942
22292229
msgid ""
22302230
"The value for the *what* parameter to :c:type:`Py_tracefunc` functions (but "
22312231
"not profiling functions) when a new opcode is about to be executed. This "
22322232
"event is not emitted by default: it must be explicitly requested by setting :"
2233-
"attr:`f_trace_opcodes` to *1* on the frame."
2233+
"attr:`~frame.f_trace_opcodes` to *1* on the frame."
22342234
msgstr ""
22352235

2236-
#: ../../c-api/init.rst:1949
2236+
#: ../../c-api/init.rst:1950
22372237
msgid ""
22382238
"Set the profiler function to *func*. The *obj* parameter is passed to the "
22392239
"function as its first parameter, and may be any Python object, or ``NULL``. "
@@ -2243,29 +2243,29 @@ msgid ""
22432243
"`PyTrace_LINE` :c:data:`PyTrace_OPCODE` and :c:data:`PyTrace_EXCEPTION`."
22442244
msgstr ""
22452245

2246-
#: ../../c-api/init.rst:1956
2246+
#: ../../c-api/init.rst:1957
22472247
msgid "See also the :func:`sys.setprofile` function."
22482248
msgstr ""
22492249

2250-
#: ../../c-api/init.rst:1958 ../../c-api/init.rst:1965
2251-
#: ../../c-api/init.rst:1984 ../../c-api/init.rst:1991
2250+
#: ../../c-api/init.rst:1959 ../../c-api/init.rst:1966
2251+
#: ../../c-api/init.rst:1985 ../../c-api/init.rst:1992
22522252
msgid "The caller must hold the :term:`GIL`."
22532253
msgstr "呼叫者必須持有 :term:`GIL`。"
22542254

2255-
#: ../../c-api/init.rst:1962
2255+
#: ../../c-api/init.rst:1963
22562256
msgid ""
22572257
"Like :c:func:`PyEval_SetProfile` but sets the profile function in all "
22582258
"running threads belonging to the current interpreter instead of the setting "
22592259
"it only on the current thread."
22602260
msgstr ""
22612261

2262-
#: ../../c-api/init.rst:1967
2262+
#: ../../c-api/init.rst:1968
22632263
msgid ""
22642264
"As :c:func:`PyEval_SetProfile`, this function ignores any exceptions raised "
22652265
"while setting the profile functions in all threads."
22662266
msgstr ""
22672267

2268-
#: ../../c-api/init.rst:1975
2268+
#: ../../c-api/init.rst:1976
22692269
msgid ""
22702270
"Set the tracing function to *func*. This is similar to :c:func:"
22712271
"`PyEval_SetProfile`, except the tracing function does receive line-number "
@@ -2276,65 +2276,65 @@ msgid ""
22762276
"*what* parameter."
22772277
msgstr ""
22782278

2279-
#: ../../c-api/init.rst:1982
2279+
#: ../../c-api/init.rst:1983
22802280
msgid "See also the :func:`sys.settrace` function."
22812281
msgstr "也請見 :func:`sys.settrace` 函式。"
22822282

2283-
#: ../../c-api/init.rst:1988
2283+
#: ../../c-api/init.rst:1989
22842284
msgid ""
22852285
"Like :c:func:`PyEval_SetTrace` but sets the tracing function in all running "
22862286
"threads belonging to the current interpreter instead of the setting it only "
22872287
"on the current thread."
22882288
msgstr ""
22892289

2290-
#: ../../c-api/init.rst:1993
2290+
#: ../../c-api/init.rst:1994
22912291
msgid ""
22922292
"As :c:func:`PyEval_SetTrace`, this function ignores any exceptions raised "
22932293
"while setting the trace functions in all threads."
22942294
msgstr ""
22952295

2296-
#: ../../c-api/init.rst:2002
2296+
#: ../../c-api/init.rst:2003
22972297
msgid "Advanced Debugger Support"
22982298
msgstr ""
22992299

2300-
#: ../../c-api/init.rst:2007
2300+
#: ../../c-api/init.rst:2008
23012301
msgid ""
23022302
"These functions are only intended to be used by advanced debugging tools."
23032303
msgstr ""
23042304

2305-
#: ../../c-api/init.rst:2012
2305+
#: ../../c-api/init.rst:2013
23062306
msgid ""
23072307
"Return the interpreter state object at the head of the list of all such "
23082308
"objects."
23092309
msgstr ""
23102310

2311-
#: ../../c-api/init.rst:2017
2311+
#: ../../c-api/init.rst:2018
23122312
msgid "Return the main interpreter state object."
23132313
msgstr ""
23142314

2315-
#: ../../c-api/init.rst:2022
2315+
#: ../../c-api/init.rst:2023
23162316
msgid ""
23172317
"Return the next interpreter state object after *interp* from the list of all "
23182318
"such objects."
23192319
msgstr ""
23202320

2321-
#: ../../c-api/init.rst:2028
2321+
#: ../../c-api/init.rst:2029
23222322
msgid ""
23232323
"Return the pointer to the first :c:type:`PyThreadState` object in the list "
23242324
"of threads associated with the interpreter *interp*."
23252325
msgstr ""
23262326

2327-
#: ../../c-api/init.rst:2034
2327+
#: ../../c-api/init.rst:2035
23282328
msgid ""
23292329
"Return the next thread state object after *tstate* from the list of all such "
23302330
"objects belonging to the same :c:type:`PyInterpreterState` object."
23312331
msgstr ""
23322332

2333-
#: ../../c-api/init.rst:2041
2333+
#: ../../c-api/init.rst:2042
23342334
msgid "Thread Local Storage Support"
23352335
msgstr ""
23362336

2337-
#: ../../c-api/init.rst:2045
2337+
#: ../../c-api/init.rst:2046
23382338
msgid ""
23392339
"The Python interpreter provides low-level support for thread-local storage "
23402340
"(TLS) which wraps the underlying native TLS implementation to support the "
@@ -2344,109 +2344,109 @@ msgid ""
23442344
"thread."
23452345
msgstr ""
23462346

2347-
#: ../../c-api/init.rst:2052
2347+
#: ../../c-api/init.rst:2053
23482348
msgid ""
23492349
"The GIL does *not* need to be held when calling these functions; they supply "
23502350
"their own locking."
23512351
msgstr ""
23522352

2353-
#: ../../c-api/init.rst:2055
2353+
#: ../../c-api/init.rst:2056
23542354
msgid ""
23552355
"Note that :file:`Python.h` does not include the declaration of the TLS APIs, "
23562356
"you need to include :file:`pythread.h` to use thread-local storage."
23572357
msgstr ""
23582358

2359-
#: ../../c-api/init.rst:2059
2359+
#: ../../c-api/init.rst:2060
23602360
msgid ""
23612361
"None of these API functions handle memory management on behalf of the :c:"
23622362
"expr:`void*` values. You need to allocate and deallocate them yourself. If "
23632363
"the :c:expr:`void*` values happen to be :c:expr:`PyObject*`, these functions "
23642364
"don't do refcount operations on them either."
23652365
msgstr ""
23662366

2367-
#: ../../c-api/init.rst:2067
2367+
#: ../../c-api/init.rst:2068
23682368
msgid "Thread Specific Storage (TSS) API"
23692369
msgstr ""
23702370

2371-
#: ../../c-api/init.rst:2069
2371+
#: ../../c-api/init.rst:2070
23722372
msgid ""
23732373
"TSS API is introduced to supersede the use of the existing TLS API within "
23742374
"the CPython interpreter. This API uses a new type :c:type:`Py_tss_t` "
23752375
"instead of :c:expr:`int` to represent thread keys."
23762376
msgstr ""
23772377

2378-
#: ../../c-api/init.rst:2075
2378+
#: ../../c-api/init.rst:2076
23792379
msgid "\"A New C-API for Thread-Local Storage in CPython\" (:pep:`539`)"
23802380
msgstr ""
23812381

2382-
#: ../../c-api/init.rst:2080
2382+
#: ../../c-api/init.rst:2081
23832383
msgid ""
23842384
"This data structure represents the state of a thread key, the definition of "
23852385
"which may depend on the underlying TLS implementation, and it has an "
23862386
"internal field representing the key's initialization state. There are no "
23872387
"public members in this structure."
23882388
msgstr ""
23892389

2390-
#: ../../c-api/init.rst:2085
2390+
#: ../../c-api/init.rst:2086
23912391
msgid ""
23922392
"When :ref:`Py_LIMITED_API <stable>` is not defined, static allocation of "
23932393
"this type by :c:macro:`Py_tss_NEEDS_INIT` is allowed."
23942394
msgstr ""
23952395

2396-
#: ../../c-api/init.rst:2091
2396+
#: ../../c-api/init.rst:2092
23972397
msgid ""
23982398
"This macro expands to the initializer for :c:type:`Py_tss_t` variables. Note "
23992399
"that this macro won't be defined with :ref:`Py_LIMITED_API <stable>`."
24002400
msgstr ""
24012401

2402-
#: ../../c-api/init.rst:2096
2402+
#: ../../c-api/init.rst:2097
24032403
msgid "Dynamic Allocation"
24042404
msgstr ""
24052405

2406-
#: ../../c-api/init.rst:2098
2406+
#: ../../c-api/init.rst:2099
24072407
msgid ""
24082408
"Dynamic allocation of the :c:type:`Py_tss_t`, required in extension modules "
24092409
"built with :ref:`Py_LIMITED_API <stable>`, where static allocation of this "
24102410
"type is not possible due to its implementation being opaque at build time."
24112411
msgstr ""
24122412

2413-
#: ../../c-api/init.rst:2105
2413+
#: ../../c-api/init.rst:2106
24142414
msgid ""
24152415
"Return a value which is the same state as a value initialized with :c:macro:"
24162416
"`Py_tss_NEEDS_INIT`, or ``NULL`` in the case of dynamic allocation failure."
24172417
msgstr ""
24182418

2419-
#: ../../c-api/init.rst:2112
2419+
#: ../../c-api/init.rst:2113
24202420
msgid ""
24212421
"Free the given *key* allocated by :c:func:`PyThread_tss_alloc`, after first "
24222422
"calling :c:func:`PyThread_tss_delete` to ensure any associated thread locals "
24232423
"have been unassigned. This is a no-op if the *key* argument is ``NULL``."
24242424
msgstr ""
24252425

2426-
#: ../../c-api/init.rst:2118
2426+
#: ../../c-api/init.rst:2119
24272427
msgid ""
24282428
"A freed key becomes a dangling pointer. You should reset the key to ``NULL``."
24292429
msgstr ""
24302430

2431-
#: ../../c-api/init.rst:2123
2431+
#: ../../c-api/init.rst:2124
24322432
msgid "Methods"
24332433
msgstr "方法"
24342434

2435-
#: ../../c-api/init.rst:2125
2435+
#: ../../c-api/init.rst:2126
24362436
msgid ""
24372437
"The parameter *key* of these functions must not be ``NULL``. Moreover, the "
24382438
"behaviors of :c:func:`PyThread_tss_set` and :c:func:`PyThread_tss_get` are "
24392439
"undefined if the given :c:type:`Py_tss_t` has not been initialized by :c:"
24402440
"func:`PyThread_tss_create`."
24412441
msgstr ""
24422442

2443-
#: ../../c-api/init.rst:2133
2443+
#: ../../c-api/init.rst:2134
24442444
msgid ""
24452445
"Return a non-zero value if the given :c:type:`Py_tss_t` has been initialized "
24462446
"by :c:func:`PyThread_tss_create`."
24472447
msgstr ""
24482448

2449-
#: ../../c-api/init.rst:2139
2449+
#: ../../c-api/init.rst:2140
24502450
msgid ""
24512451
"Return a zero value on successful initialization of a TSS key. The behavior "
24522452
"is undefined if the value pointed to by the *key* argument is not "
@@ -2455,7 +2455,7 @@ msgid ""
24552455
"no-op and immediately returns success."
24562456
msgstr ""
24572457

2458-
#: ../../c-api/init.rst:2148
2458+
#: ../../c-api/init.rst:2149
24592459
msgid ""
24602460
"Destroy a TSS key to forget the values associated with the key across all "
24612461
"threads, and change the key's initialization state to uninitialized. A "
@@ -2464,31 +2464,31 @@ msgid ""
24642464
"key -- calling it on an already destroyed key is a no-op."
24652465
msgstr ""
24662466

2467-
#: ../../c-api/init.rst:2157
2467+
#: ../../c-api/init.rst:2158
24682468
msgid ""
24692469
"Return a zero value to indicate successfully associating a :c:expr:`void*` "
24702470
"value with a TSS key in the current thread. Each thread has a distinct "
24712471
"mapping of the key to a :c:expr:`void*` value."
24722472
msgstr ""
24732473

2474-
#: ../../c-api/init.rst:2164
2474+
#: ../../c-api/init.rst:2165
24752475
msgid ""
24762476
"Return the :c:expr:`void*` value associated with a TSS key in the current "
24772477
"thread. This returns ``NULL`` if no value is associated with the key in the "
24782478
"current thread."
24792479
msgstr ""
24802480

2481-
#: ../../c-api/init.rst:2172
2481+
#: ../../c-api/init.rst:2173
24822482
msgid "Thread Local Storage (TLS) API"
24832483
msgstr ""
24842484

2485-
#: ../../c-api/init.rst:2174
2485+
#: ../../c-api/init.rst:2175
24862486
msgid ""
24872487
"This API is superseded by :ref:`Thread Specific Storage (TSS) API <thread-"
24882488
"specific-storage-api>`."
24892489
msgstr ""
24902490

2491-
#: ../../c-api/init.rst:2179
2491+
#: ../../c-api/init.rst:2180
24922492
msgid ""
24932493
"This version of the API does not support platforms where the native TLS key "
24942494
"is defined in a way that cannot be safely cast to ``int``. On such "
@@ -2497,7 +2497,7 @@ msgid ""
24972497
"platforms."
24982498
msgstr ""
24992499

2500-
#: ../../c-api/init.rst:2184
2500+
#: ../../c-api/init.rst:2185
25012501
msgid ""
25022502
"Due to the compatibility problem noted above, this version of the API should "
25032503
"not be used in new code."

0 commit comments

Comments
 (0)