Skip to content

Commit 89e0f65

Browse files
sync with cpython c7aa3928
1 parent 688f9e4 commit 89e0f65

File tree

2 files changed

+75
-66
lines changed

2 files changed

+75
-66
lines changed

library/email.mime.po

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version: Python 3.11\n"
99
"Report-Msgid-Bugs-To: \n"
10-
"POT-Creation-Date: 2022-10-15 20:43+0000\n"
10+
"POT-Creation-Date: 2023-01-15 00:34+0000\n"
1111
"PO-Revision-Date: 2018-05-23 16:00+0000\n"
1212
"Last-Translator: Adrian Liaw <[email protected]>\n"
1313
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -165,9 +165,9 @@ msgstr "模組:\\ :mod:`email.mime.application`"
165165
msgid ""
166166
"A subclass of :class:`~email.mime.nonmultipart.MIMENonMultipart`, the :class:"
167167
"`MIMEApplication` class is used to represent MIME message objects of major "
168-
"type :mimetype:`application`. *_data* is a string containing the raw byte "
169-
"data. Optional *_subtype* specifies the MIME subtype and defaults to :"
170-
"mimetype:`octet-stream`."
168+
"type :mimetype:`application`. *_data* contains the bytes for the raw "
169+
"application data. Optional *_subtype* specifies the MIME subtype and "
170+
"defaults to :mimetype:`octet-stream`."
171171
msgstr ""
172172

173173
#: ../../library/email.mime.rst:121
@@ -194,7 +194,7 @@ msgstr "模組:\\ :mod:`email.mime.audio`"
194194
msgid ""
195195
"A subclass of :class:`~email.mime.nonmultipart.MIMENonMultipart`, the :class:"
196196
"`MIMEAudio` class is used to create MIME message objects of major type :"
197-
"mimetype:`audio`. *_audiodata* is a string containing the raw audio data. "
197+
"mimetype:`audio`. *_audiodata* contains the bytes for the raw audio data. "
198198
"If this data can be decoded as au, wav, aiff, or aifc, then the subtype will "
199199
"be automatically included in the :mailheader:`Content-Type` header. "
200200
"Otherwise you can explicitly specify the audio subtype via the *_subtype* "
@@ -222,7 +222,7 @@ msgstr "模組:\\ :mod:`email.mime.image`"
222222
msgid ""
223223
"A subclass of :class:`~email.mime.nonmultipart.MIMENonMultipart`, the :class:"
224224
"`MIMEImage` class is used to create MIME message objects of major type :"
225-
"mimetype:`image`. *_imagedata* is a string containing the raw image data. "
225+
"mimetype:`image`. *_imagedata* contains the bytes for the raw image data. "
226226
"If this data type can be detected (jpeg, png, gif, tiff, rgb, pbm, pgm, ppm, "
227227
"rast, xbm, bmp, webp, and exr attempted), then the subtype will be "
228228
"automatically included in the :mailheader:`Content-Type` header. Otherwise "

library/sqlite3.po

Lines changed: 69 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version: Python 3.11\n"
99
"Report-Msgid-Bugs-To: \n"
10-
"POT-Creation-Date: 2023-01-02 00:31+0000\n"
10+
"POT-Creation-Date: 2023-01-15 00:34+0000\n"
1111
"PO-Revision-Date: 2018-05-23 16:10+0000\n"
1212
"Last-Translator: Adrian Liaw <[email protected]>\n"
1313
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -1760,29 +1760,38 @@ msgid ""
17601760
"Instead, use the DB-API's parameter substitution. To insert a variable into "
17611761
"a query string, use a placeholder in the string, and substitute the actual "
17621762
"values into the query by providing them as a :class:`tuple` of values to the "
1763-
"second argument of the cursor's :meth:`~Cursor.execute` method. An SQL "
1764-
"statement may use one of two kinds of placeholders: question marks (qmark "
1765-
"style) or named placeholders (named style). For the qmark style, "
1766-
"``parameters`` must be a :term:`sequence <sequence>`. For the named style, "
1767-
"it can be either a :term:`sequence <sequence>` or :class:`dict` instance. "
1768-
"The length of the :term:`sequence <sequence>` must match the number of "
1769-
"placeholders, or a :exc:`ProgrammingError` is raised. If a :class:`dict` is "
1770-
"given, it must contain keys for all named parameters. Any extra items are "
1771-
"ignored. Here's an example of both styles:"
1772-
msgstr ""
1773-
1774-
#: ../../library/sqlite3.rst:1865
1763+
"second argument of the cursor's :meth:`~Cursor.execute` method."
1764+
msgstr ""
1765+
1766+
#: ../../library/sqlite3.rst:1828
1767+
msgid ""
1768+
"An SQL statement may use one of two kinds of placeholders: question marks "
1769+
"(qmark style) or named placeholders (named style). For the qmark style, "
1770+
"*parameters* must be a :term:`sequence` whose length must match the number "
1771+
"of placeholders, or a :exc:`ProgrammingError` is raised. For the named "
1772+
"style, *parameters* should be an instance of a :class:`dict` (or a "
1773+
"subclass), which must contain keys for all named parameters; any extra items "
1774+
"are ignored. Here's an example of both styles:"
1775+
msgstr ""
1776+
1777+
#: ../../library/sqlite3.rst:1866
1778+
msgid ""
1779+
":pep:`249` numeric placeholders are *not* supported. If used, they will be "
1780+
"interpreted as named placeholders."
1781+
msgstr ""
1782+
1783+
#: ../../library/sqlite3.rst:1873
17751784
msgid "How to adapt custom Python types to SQLite values"
17761785
msgstr ""
17771786

1778-
#: ../../library/sqlite3.rst:1867
1787+
#: ../../library/sqlite3.rst:1875
17791788
msgid ""
17801789
"SQLite supports only a limited set of data types natively. To store custom "
17811790
"Python types in SQLite databases, *adapt* them to one of the :ref:`Python "
17821791
"types SQLite natively understands <sqlite3-types>`."
17831792
msgstr ""
17841793

1785-
#: ../../library/sqlite3.rst:1871
1794+
#: ../../library/sqlite3.rst:1879
17861795
msgid ""
17871796
"There are two ways to adapt Python objects to SQLite types: letting your "
17881797
"object adapt itself, or using an *adapter callable*. The latter will take "
@@ -1792,11 +1801,11 @@ msgid ""
17921801
"custom adapter functions."
17931802
msgstr ""
17941803

1795-
#: ../../library/sqlite3.rst:1883
1804+
#: ../../library/sqlite3.rst:1891
17961805
msgid "How to write adaptable objects"
17971806
msgstr ""
17981807

1799-
#: ../../library/sqlite3.rst:1885
1808+
#: ../../library/sqlite3.rst:1893
18001809
msgid ""
18011810
"Suppose we have a :class:`!Point` class that represents a pair of "
18021811
"coordinates, ``x`` and ``y``, in a Cartesian coordinate system. The "
@@ -1806,84 +1815,84 @@ msgid ""
18061815
"object passed to *protocol* will be of type :class:`PrepareProtocol`."
18071816
msgstr ""
18081817

1809-
#: ../../library/sqlite3.rst:1916
1818+
#: ../../library/sqlite3.rst:1924
18101819
msgid "How to register adapter callables"
18111820
msgstr ""
18121821

1813-
#: ../../library/sqlite3.rst:1918
1822+
#: ../../library/sqlite3.rst:1926
18141823
msgid ""
18151824
"The other possibility is to create a function that converts the Python "
18161825
"object to an SQLite-compatible type. This function can then be registered "
18171826
"using :func:`register_adapter`."
18181827
msgstr ""
18191828

1820-
#: ../../library/sqlite3.rst:1948
1829+
#: ../../library/sqlite3.rst:1956
18211830
msgid "How to convert SQLite values to custom Python types"
18221831
msgstr ""
18231832

1824-
#: ../../library/sqlite3.rst:1950
1833+
#: ../../library/sqlite3.rst:1958
18251834
msgid ""
18261835
"Writing an adapter lets you convert *from* custom Python types *to* SQLite "
18271836
"values. To be able to convert *from* SQLite values *to* custom Python types, "
18281837
"we use *converters*."
18291838
msgstr ""
18301839

1831-
#: ../../library/sqlite3.rst:1955
1840+
#: ../../library/sqlite3.rst:1963
18321841
msgid ""
18331842
"Let's go back to the :class:`!Point` class. We stored the x and y "
18341843
"coordinates separated via semicolons as strings in SQLite."
18351844
msgstr ""
18361845

1837-
#: ../../library/sqlite3.rst:1958
1846+
#: ../../library/sqlite3.rst:1966
18381847
msgid ""
18391848
"First, we'll define a converter function that accepts the string as a "
18401849
"parameter and constructs a :class:`!Point` object from it."
18411850
msgstr ""
18421851

1843-
#: ../../library/sqlite3.rst:1963
1852+
#: ../../library/sqlite3.rst:1971
18441853
msgid ""
18451854
"Converter functions are **always** passed a :class:`bytes` object, no matter "
18461855
"the underlying SQLite data type."
18471856
msgstr ""
18481857

1849-
#: ../../library/sqlite3.rst:1972
1858+
#: ../../library/sqlite3.rst:1980
18501859
msgid ""
18511860
"We now need to tell :mod:`!sqlite3` when it should convert a given SQLite "
18521861
"value. This is done when connecting to a database, using the *detect_types* "
18531862
"parameter of :func:`connect`. There are three options:"
18541863
msgstr ""
18551864

1856-
#: ../../library/sqlite3.rst:1976
1865+
#: ../../library/sqlite3.rst:1984
18571866
msgid "Implicit: set *detect_types* to :const:`PARSE_DECLTYPES`"
18581867
msgstr ""
18591868

1860-
#: ../../library/sqlite3.rst:1977
1869+
#: ../../library/sqlite3.rst:1985
18611870
msgid "Explicit: set *detect_types* to :const:`PARSE_COLNAMES`"
18621871
msgstr ""
18631872

1864-
#: ../../library/sqlite3.rst:1978
1873+
#: ../../library/sqlite3.rst:1986
18651874
msgid ""
18661875
"Both: set *detect_types* to ``sqlite3.PARSE_DECLTYPES | sqlite3."
18671876
"PARSE_COLNAMES``. Column names take precedence over declared types."
18681877
msgstr ""
18691878

1870-
#: ../../library/sqlite3.rst:1982
1879+
#: ../../library/sqlite3.rst:1990
18711880
msgid "The following example illustrates the implicit and explicit approaches:"
18721881
msgstr ""
18731882

1874-
#: ../../library/sqlite3.rst:2033
1883+
#: ../../library/sqlite3.rst:2041
18751884
msgid "Adapter and converter recipes"
18761885
msgstr ""
18771886

1878-
#: ../../library/sqlite3.rst:2035
1887+
#: ../../library/sqlite3.rst:2043
18791888
msgid "This section shows recipes for common adapters and converters."
18801889
msgstr ""
18811890

1882-
#: ../../library/sqlite3.rst:2097
1891+
#: ../../library/sqlite3.rst:2105
18831892
msgid "How to use connection shortcut methods"
18841893
msgstr ""
18851894

1886-
#: ../../library/sqlite3.rst:2099
1895+
#: ../../library/sqlite3.rst:2107
18871896
msgid ""
18881897
"Using the :meth:`~Connection.execute`, :meth:`~Connection.executemany`, and :"
18891898
"meth:`~Connection.executescript` methods of the :class:`Connection` class, "
@@ -1895,11 +1904,11 @@ msgid ""
18951904
"object."
18961905
msgstr ""
18971906

1898-
#: ../../library/sqlite3.rst:2140
1907+
#: ../../library/sqlite3.rst:2148
18991908
msgid "How to use the connection context manager"
19001909
msgstr ""
19011910

1902-
#: ../../library/sqlite3.rst:2142
1911+
#: ../../library/sqlite3.rst:2150
19031912
msgid ""
19041913
"A :class:`Connection` object can be used as a context manager that "
19051914
"automatically commits or rolls back open transactions when leaving the body "
@@ -1909,118 +1918,118 @@ msgid ""
19091918
"exception, the transaction is rolled back."
19101919
msgstr ""
19111920

1912-
#: ../../library/sqlite3.rst:2151
1921+
#: ../../library/sqlite3.rst:2159
19131922
msgid ""
19141923
"If there is no open transaction upon leaving the body of the ``with`` "
19151924
"statement, the context manager is a no-op."
19161925
msgstr ""
19171926

1918-
#: ../../library/sqlite3.rst:2156
1927+
#: ../../library/sqlite3.rst:2164
19191928
msgid ""
19201929
"The context manager neither implicitly opens a new transaction nor closes "
19211930
"the connection."
19221931
msgstr ""
19231932

1924-
#: ../../library/sqlite3.rst:2189
1933+
#: ../../library/sqlite3.rst:2197
19251934
msgid "How to work with SQLite URIs"
19261935
msgstr ""
19271936

1928-
#: ../../library/sqlite3.rst:2191
1937+
#: ../../library/sqlite3.rst:2199
19291938
msgid "Some useful URI tricks include:"
19301939
msgstr ""
19311940

1932-
#: ../../library/sqlite3.rst:2193
1941+
#: ../../library/sqlite3.rst:2201
19331942
msgid "Open a database in read-only mode:"
19341943
msgstr ""
19351944

1936-
#: ../../library/sqlite3.rst:2202
1945+
#: ../../library/sqlite3.rst:2210
19371946
msgid ""
19381947
"Do not implicitly create a new database file if it does not already exist; "
19391948
"will raise :exc:`~sqlite3.OperationalError` if unable to create a new file:"
19401949
msgstr ""
19411950

1942-
#: ../../library/sqlite3.rst:2212
1951+
#: ../../library/sqlite3.rst:2220
19431952
msgid "Create a shared named in-memory database:"
19441953
msgstr ""
19451954

1946-
#: ../../library/sqlite3.rst:2226
1955+
#: ../../library/sqlite3.rst:2234
19471956
msgid ""
19481957
"More information about this feature, including a list of parameters, can be "
19491958
"found in the `SQLite URI documentation`_."
19501959
msgstr ""
19511960

1952-
#: ../../library/sqlite3.rst:2235
1961+
#: ../../library/sqlite3.rst:2243
19531962
msgid "How to create and use row factories"
19541963
msgstr ""
19551964

1956-
#: ../../library/sqlite3.rst:2237
1965+
#: ../../library/sqlite3.rst:2245
19571966
msgid ""
19581967
"By default, :mod:`!sqlite3` represents each row as a :class:`tuple`. If a :"
19591968
"class:`!tuple` does not suit your needs, you can use the :class:`sqlite3."
19601969
"Row` class or a custom :attr:`~Cursor.row_factory`."
19611970
msgstr ""
19621971

1963-
#: ../../library/sqlite3.rst:2242
1972+
#: ../../library/sqlite3.rst:2250
19641973
msgid ""
19651974
"While :attr:`!row_factory` exists as an attribute both on the :class:"
19661975
"`Cursor` and the :class:`Connection`, it is recommended to set :class:"
19671976
"`Connection.row_factory`, so all cursors created from the connection will "
19681977
"use the same row factory."
19691978
msgstr ""
19701979

1971-
#: ../../library/sqlite3.rst:2247
1980+
#: ../../library/sqlite3.rst:2255
19721981
msgid ""
19731982
":class:`!Row` provides indexed and case-insensitive named access to columns, "
19741983
"with minimal memory overhead and performance impact over a :class:`!tuple`. "
19751984
"To use :class:`!Row` as a row factory, assign it to the :attr:`!row_factory` "
19761985
"attribute:"
19771986
msgstr ""
19781987

1979-
#: ../../library/sqlite3.rst:2257
1988+
#: ../../library/sqlite3.rst:2265
19801989
msgid "Queries now return :class:`!Row` objects:"
19811990
msgstr ""
19821991

1983-
#: ../../library/sqlite3.rst:2272
1992+
#: ../../library/sqlite3.rst:2280
19841993
msgid ""
19851994
"You can create a custom :attr:`~Cursor.row_factory` that returns each row as "
19861995
"a :class:`dict`, with column names mapped to values:"
19871996
msgstr ""
19881997

1989-
#: ../../library/sqlite3.rst:2281
1998+
#: ../../library/sqlite3.rst:2289
19901999
msgid ""
19912000
"Using it, queries now return a :class:`!dict` instead of a :class:`!tuple`:"
19922001
msgstr ""
19932002

1994-
#: ../../library/sqlite3.rst:2291
2003+
#: ../../library/sqlite3.rst:2299
19952004
msgid "The following row factory returns a :term:`named tuple`:"
19962005
msgstr ""
19972006

1998-
#: ../../library/sqlite3.rst:2302
2007+
#: ../../library/sqlite3.rst:2310
19992008
msgid ":func:`!namedtuple_factory` can be used as follows:"
20002009
msgstr ""
20012010

2002-
#: ../../library/sqlite3.rst:2317
2011+
#: ../../library/sqlite3.rst:2325
20032012
msgid ""
20042013
"With some adjustments, the above recipe can be adapted to use a :class:"
20052014
"`~dataclasses.dataclass`, or any other custom class, instead of a :class:"
20062015
"`~collections.namedtuple`."
20072016
msgstr ""
20082017

2009-
#: ../../library/sqlite3.rst:2325
2018+
#: ../../library/sqlite3.rst:2333
20102019
msgid "Explanation"
20112020
msgstr "解釋"
20122021

2013-
#: ../../library/sqlite3.rst:2330
2022+
#: ../../library/sqlite3.rst:2338
20142023
msgid "Transaction control"
20152024
msgstr ""
20162025

2017-
#: ../../library/sqlite3.rst:2332
2026+
#: ../../library/sqlite3.rst:2340
20182027
msgid ""
20192028
"The :mod:`!sqlite3` module does not adhere to the transaction handling "
20202029
"recommended by :pep:`249`."
20212030
msgstr ""
20222031

2023-
#: ../../library/sqlite3.rst:2335
2032+
#: ../../library/sqlite3.rst:2343
20242033
msgid ""
20252034
"If the connection attribute :attr:`~Connection.isolation_level` is not "
20262035
"``None``, new transactions are implicitly opened before :meth:`~Cursor."
@@ -2034,7 +2043,7 @@ msgid ""
20342043
"attribute."
20352044
msgstr ""
20362045

2037-
#: ../../library/sqlite3.rst:2348
2046+
#: ../../library/sqlite3.rst:2356
20382047
msgid ""
20392048
"If :attr:`~Connection.isolation_level` is set to ``None``, no transactions "
20402049
"are implicitly opened at all. This leaves the underlying SQLite library in "
@@ -2044,14 +2053,14 @@ msgid ""
20442053
"in_transaction` attribute."
20452054
msgstr ""
20462055

2047-
#: ../../library/sqlite3.rst:2356
2056+
#: ../../library/sqlite3.rst:2364
20482057
msgid ""
20492058
"The :meth:`~Cursor.executescript` method implicitly commits any pending "
20502059
"transaction before execution of the given SQL script, regardless of the "
20512060
"value of :attr:`~Connection.isolation_level`."
20522061
msgstr ""
20532062

2054-
#: ../../library/sqlite3.rst:2360
2063+
#: ../../library/sqlite3.rst:2368
20552064
msgid ""
20562065
":mod:`!sqlite3` used to implicitly commit an open transaction before DDL "
20572066
"statements. This is no longer the case."

0 commit comments

Comments
 (0)