Skip to content

Commit 46f68ec

Browse files
sync with cpython c7aa3928
1 parent 948ae73 commit 46f68ec

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:18+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:15+0000\n"
10+
"POT-Creation-Date: 2023-01-15 00:18+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-"
@@ -1759,29 +1759,38 @@ msgid ""
17591759
"Instead, use the DB-API's parameter substitution. To insert a variable into "
17601760
"a query string, use a placeholder in the string, and substitute the actual "
17611761
"values into the query by providing them as a :class:`tuple` of values to the "
1762-
"second argument of the cursor's :meth:`~Cursor.execute` method. An SQL "
1763-
"statement may use one of two kinds of placeholders: question marks (qmark "
1764-
"style) or named placeholders (named style). For the qmark style, "
1765-
"``parameters`` must be a :term:`sequence <sequence>`. For the named style, "
1766-
"it can be either a :term:`sequence <sequence>` or :class:`dict` instance. "
1767-
"The length of the :term:`sequence <sequence>` must match the number of "
1768-
"placeholders, or a :exc:`ProgrammingError` is raised. If a :class:`dict` is "
1769-
"given, it must contain keys for all named parameters. Any extra items are "
1770-
"ignored. Here's an example of both styles:"
1771-
msgstr ""
1772-
1773-
#: ../../library/sqlite3.rst:1865
1762+
"second argument of the cursor's :meth:`~Cursor.execute` method."
1763+
msgstr ""
1764+
1765+
#: ../../library/sqlite3.rst:1828
1766+
msgid ""
1767+
"An SQL statement may use one of two kinds of placeholders: question marks "
1768+
"(qmark style) or named placeholders (named style). For the qmark style, "
1769+
"*parameters* must be a :term:`sequence` whose length must match the number "
1770+
"of placeholders, or a :exc:`ProgrammingError` is raised. For the named "
1771+
"style, *parameters* should be an instance of a :class:`dict` (or a "
1772+
"subclass), which must contain keys for all named parameters; any extra items "
1773+
"are ignored. Here's an example of both styles:"
1774+
msgstr ""
1775+
1776+
#: ../../library/sqlite3.rst:1866
1777+
msgid ""
1778+
":pep:`249` numeric placeholders are *not* supported. If used, they will be "
1779+
"interpreted as named placeholders."
1780+
msgstr ""
1781+
1782+
#: ../../library/sqlite3.rst:1873
17741783
msgid "How to adapt custom Python types to SQLite values"
17751784
msgstr ""
17761785

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

1784-
#: ../../library/sqlite3.rst:1871
1793+
#: ../../library/sqlite3.rst:1879
17851794
msgid ""
17861795
"There are two ways to adapt Python objects to SQLite types: letting your "
17871796
"object adapt itself, or using an *adapter callable*. The latter will take "
@@ -1791,11 +1800,11 @@ msgid ""
17911800
"custom adapter functions."
17921801
msgstr ""
17931802

1794-
#: ../../library/sqlite3.rst:1883
1803+
#: ../../library/sqlite3.rst:1891
17951804
msgid "How to write adaptable objects"
17961805
msgstr ""
17971806

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

1808-
#: ../../library/sqlite3.rst:1916
1817+
#: ../../library/sqlite3.rst:1924
18091818
msgid "How to register adapter callables"
18101819
msgstr ""
18111820

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

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

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

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

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

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

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

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

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

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

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

1873-
#: ../../library/sqlite3.rst:2033
1882+
#: ../../library/sqlite3.rst:2041
18741883
msgid "Adapter and converter recipes"
18751884
msgstr ""
18761885

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

1881-
#: ../../library/sqlite3.rst:2097
1890+
#: ../../library/sqlite3.rst:2105
18821891
msgid "How to use connection shortcut methods"
18831892
msgstr ""
18841893

1885-
#: ../../library/sqlite3.rst:2099
1894+
#: ../../library/sqlite3.rst:2107
18861895
msgid ""
18871896
"Using the :meth:`~Connection.execute`, :meth:`~Connection.executemany`, and :"
18881897
"meth:`~Connection.executescript` methods of the :class:`Connection` class, "
@@ -1894,11 +1903,11 @@ msgid ""
18941903
"object."
18951904
msgstr ""
18961905

1897-
#: ../../library/sqlite3.rst:2140
1906+
#: ../../library/sqlite3.rst:2148
18981907
msgid "How to use the connection context manager"
18991908
msgstr ""
19001909

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

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

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

1923-
#: ../../library/sqlite3.rst:2189
1932+
#: ../../library/sqlite3.rst:2197
19241933
msgid "How to work with SQLite URIs"
19251934
msgstr ""
19261935

1927-
#: ../../library/sqlite3.rst:2191
1936+
#: ../../library/sqlite3.rst:2199
19281937
msgid "Some useful URI tricks include:"
19291938
msgstr ""
19301939

1931-
#: ../../library/sqlite3.rst:2193
1940+
#: ../../library/sqlite3.rst:2201
19321941
msgid "Open a database in read-only mode:"
19331942
msgstr ""
19341943

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

1941-
#: ../../library/sqlite3.rst:2212
1950+
#: ../../library/sqlite3.rst:2220
19421951
msgid "Create a shared named in-memory database:"
19431952
msgstr ""
19441953

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

1951-
#: ../../library/sqlite3.rst:2235
1960+
#: ../../library/sqlite3.rst:2243
19521961
msgid "How to create and use row factories"
19531962
msgstr ""
19541963

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

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

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

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

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

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

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

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

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

2008-
#: ../../library/sqlite3.rst:2325
2017+
#: ../../library/sqlite3.rst:2333
20092018
msgid "Explanation"
20102019
msgstr "解釋"
20112020

2012-
#: ../../library/sqlite3.rst:2330
2021+
#: ../../library/sqlite3.rst:2338
20132022
msgid "Transaction control"
20142023
msgstr ""
20152024

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

2022-
#: ../../library/sqlite3.rst:2335
2031+
#: ../../library/sqlite3.rst:2343
20232032
msgid ""
20242033
"If the connection attribute :attr:`~Connection.isolation_level` is not "
20252034
"``None``, new transactions are implicitly opened before :meth:`~Cursor."
@@ -2033,7 +2042,7 @@ msgid ""
20332042
"attribute."
20342043
msgstr ""
20352044

2036-
#: ../../library/sqlite3.rst:2348
2045+
#: ../../library/sqlite3.rst:2356
20372046
msgid ""
20382047
"If :attr:`~Connection.isolation_level` is set to ``None``, no transactions "
20392048
"are implicitly opened at all. This leaves the underlying SQLite library in "
@@ -2043,14 +2052,14 @@ msgid ""
20432052
"in_transaction` attribute."
20442053
msgstr ""
20452054

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

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

0 commit comments

Comments
 (0)