diff --git a/library/sqlite3.po b/library/sqlite3.po index e1babbccac..26ee869167 100644 --- a/library/sqlite3.po +++ b/library/sqlite3.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-07-15 00:18+0000\n" +"POT-Creation-Date: 2022-07-23 00:17+0000\n" "PO-Revision-Date: 2018-05-23 16:10+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -857,27 +857,14 @@ msgstr "" #: ../../library/sqlite3.rst:796 msgid "" -"Although the :class:`Cursor` class of the :mod:`sqlite3` module implements " -"this attribute, the database engine's own support for the determination of " -"\"rows affected\"/\"rows selected\" is quirky." +"Read-only attribute that provides the number of modified rows for " +"``INSERT``, ``UPDATE``, ``DELETE``, and ``REPLACE`` statements; is ``-1`` " +"for other statements, including :abbr:`CTE (Common Table Expression)` " +"queries. It is only updated by the :meth:`execute` and :meth:`executemany` " +"methods." msgstr "" -#: ../../library/sqlite3.rst:800 -msgid "" -"For :meth:`executemany` statements, the number of modifications are summed " -"up into :attr:`rowcount`." -msgstr "" - -#: ../../library/sqlite3.rst:803 -msgid "" -"As required by the Python DB API Spec, the :attr:`rowcount` attribute \"is " -"-1 in case no ``executeXX()`` has been performed on the cursor or the " -"rowcount of the last operation is not determinable by the interface\". This " -"includes ``SELECT`` statements because we cannot determine the number of " -"rows a query produced until all rows were fetched." -msgstr "" - -#: ../../library/sqlite3.rst:811 +#: ../../library/sqlite3.rst:804 msgid "" "This read-only attribute provides the row id of the last inserted row. It is " "only updated after successful ``INSERT`` or ``REPLACE`` statements using " @@ -887,33 +874,33 @@ msgid "" "const:`None`." msgstr "" -#: ../../library/sqlite3.rst:819 +#: ../../library/sqlite3.rst:812 msgid "Inserts into ``WITHOUT ROWID`` tables are not recorded." msgstr "" -#: ../../library/sqlite3.rst:821 +#: ../../library/sqlite3.rst:814 msgid "Added support for the ``REPLACE`` statement." msgstr "新增 ``REPLACE`` 陳述式的支援。" -#: ../../library/sqlite3.rst:826 +#: ../../library/sqlite3.rst:819 msgid "" "Read/write attribute that controls the number of rows returned by :meth:" "`fetchmany`. The default value is 1 which means a single row would be " "fetched per call." msgstr "" -#: ../../library/sqlite3.rst:831 +#: ../../library/sqlite3.rst:824 msgid "" "This read-only attribute provides the column names of the last query. To " "remain compatible with the Python DB API, it returns a 7-tuple for each " "column where the last six items of each tuple are :const:`None`." msgstr "" -#: ../../library/sqlite3.rst:835 +#: ../../library/sqlite3.rst:828 msgid "It is set for ``SELECT`` statements without any matching rows as well." msgstr "" -#: ../../library/sqlite3.rst:839 +#: ../../library/sqlite3.rst:832 msgid "" "This read-only attribute provides the SQLite database :class:`Connection` " "used by the :class:`Cursor` object. A :class:`Cursor` object created by " @@ -921,67 +908,67 @@ msgid "" "`connection` attribute that refers to *con*::" msgstr "" -#: ../../library/sqlite3.rst:852 +#: ../../library/sqlite3.rst:845 msgid "Row Objects" msgstr "" -#: ../../library/sqlite3.rst:856 +#: ../../library/sqlite3.rst:849 msgid "" "A :class:`Row` instance serves as a highly optimized :attr:`~Connection." "row_factory` for :class:`Connection` objects. It tries to mimic a tuple in " "most of its features." msgstr "" -#: ../../library/sqlite3.rst:860 +#: ../../library/sqlite3.rst:853 msgid "" "It supports mapping access by column name and index, iteration, " "representation, equality testing and :func:`len`." msgstr "" -#: ../../library/sqlite3.rst:863 +#: ../../library/sqlite3.rst:856 msgid "" "If two :class:`Row` objects have exactly the same columns and their members " "are equal, they compare equal." msgstr "" -#: ../../library/sqlite3.rst:868 +#: ../../library/sqlite3.rst:861 msgid "" "This method returns a list of column names. Immediately after a query, it is " "the first member of each tuple in :attr:`Cursor.description`." msgstr "" -#: ../../library/sqlite3.rst:871 +#: ../../library/sqlite3.rst:864 msgid "Added support of slicing." msgstr "" -#: ../../library/sqlite3.rst:874 +#: ../../library/sqlite3.rst:867 msgid "Let's assume we initialize a table as in the example given above::" msgstr "" -#: ../../library/sqlite3.rst:886 +#: ../../library/sqlite3.rst:879 msgid "Now we plug :class:`Row` in::" msgstr "" -#: ../../library/sqlite3.rst:916 +#: ../../library/sqlite3.rst:909 msgid "PrepareProtocol Objects" msgstr "" -#: ../../library/sqlite3.rst:920 +#: ../../library/sqlite3.rst:913 msgid "" "The PrepareProtocol type's single purpose is to act as a :pep:`246` style " "adaption protocol for objects that can :ref:`adapt themselves ` to :ref:`native SQLite types `." msgstr "" -#: ../../library/sqlite3.rst:928 +#: ../../library/sqlite3.rst:921 msgid "Exceptions" msgstr "例外" -#: ../../library/sqlite3.rst:930 +#: ../../library/sqlite3.rst:923 msgid "The exception hierarchy is defined by the DB-API 2.0 (:pep:`249`)." msgstr "" -#: ../../library/sqlite3.rst:934 +#: ../../library/sqlite3.rst:927 msgid "" "This exception is raised by ``sqlite3`` if an SQL query is not a :class:" "`string `, or if multiple statements are passed to :meth:`~Cursor." @@ -989,21 +976,21 @@ msgid "" "`Exception`." msgstr "" -#: ../../library/sqlite3.rst:941 +#: ../../library/sqlite3.rst:934 msgid "" "The base class of the other exceptions in this module. Use this to catch all " "errors with one single :keyword:`except` statement. ``Error`` is a subclass " "of :exc:`Exception`." msgstr "" -#: ../../library/sqlite3.rst:947 +#: ../../library/sqlite3.rst:940 msgid "" "This exception is raised by ``sqlite3`` for fetch across rollback, or if " "``sqlite3`` is unable to bind parameters. ``InterfaceError`` is a subclass " "of :exc:`Error`." msgstr "" -#: ../../library/sqlite3.rst:953 +#: ../../library/sqlite3.rst:946 msgid "" "Exception raised for errors that are related to the database. This serves as " "the base exception for several types of database errors. It is only raised " @@ -1011,14 +998,14 @@ msgid "" "subclass of :exc:`Error`." msgstr "" -#: ../../library/sqlite3.rst:960 +#: ../../library/sqlite3.rst:953 msgid "" "Exception raised for errors caused by problems with the processed data, like " "numeric values out of range, and strings which are too long. ``DataError`` " "is a subclass of :exc:`DatabaseError`." msgstr "" -#: ../../library/sqlite3.rst:966 +#: ../../library/sqlite3.rst:959 msgid "" "Exception raised for errors that are related to the database's operation, " "and not necessarily under the control of the programmer. For example, the " @@ -1026,20 +1013,20 @@ msgid "" "``OperationalError`` is a subclass of :exc:`DatabaseError`." msgstr "" -#: ../../library/sqlite3.rst:974 +#: ../../library/sqlite3.rst:967 msgid "" "Exception raised when the relational integrity of the database is affected, " "e.g. a foreign key check fails. It is a subclass of :exc:`DatabaseError`." msgstr "" -#: ../../library/sqlite3.rst:979 +#: ../../library/sqlite3.rst:972 msgid "" "Exception raised when SQLite encounters an internal error. If this is " "raised, it may indicate that there is a problem with the runtime SQLite " "library. ``InternalError`` is a subclass of :exc:`DatabaseError`." msgstr "" -#: ../../library/sqlite3.rst:986 +#: ../../library/sqlite3.rst:979 msgid "" "Exception raised for ``sqlite3`` API programming errors, for example trying " "to operate on a closed :class:`Connection`, or trying to execute non-DML " @@ -1047,7 +1034,7 @@ msgid "" "subclass of :exc:`DatabaseError`." msgstr "" -#: ../../library/sqlite3.rst:993 +#: ../../library/sqlite3.rst:986 msgid "" "Exception raised in case a method or database API is not supported by the " "underlying SQLite library. For example, setting *deterministic* to :const:" @@ -1056,82 +1043,82 @@ msgid "" "subclass of :exc:`DatabaseError`." msgstr "" -#: ../../library/sqlite3.rst:1003 +#: ../../library/sqlite3.rst:996 msgid "SQLite and Python types" msgstr "" -#: ../../library/sqlite3.rst:1007 +#: ../../library/sqlite3.rst:1000 msgid "Introduction" msgstr "簡介" -#: ../../library/sqlite3.rst:1009 +#: ../../library/sqlite3.rst:1002 msgid "" "SQLite natively supports the following types: ``NULL``, ``INTEGER``, " "``REAL``, ``TEXT``, ``BLOB``." msgstr "" -#: ../../library/sqlite3.rst:1012 +#: ../../library/sqlite3.rst:1005 msgid "" "The following Python types can thus be sent to SQLite without any problem:" msgstr "" -#: ../../library/sqlite3.rst:1015 ../../library/sqlite3.rst:1032 +#: ../../library/sqlite3.rst:1008 ../../library/sqlite3.rst:1025 msgid "Python type" msgstr "" -#: ../../library/sqlite3.rst:1015 ../../library/sqlite3.rst:1032 +#: ../../library/sqlite3.rst:1008 ../../library/sqlite3.rst:1025 msgid "SQLite type" msgstr "" -#: ../../library/sqlite3.rst:1017 ../../library/sqlite3.rst:1034 +#: ../../library/sqlite3.rst:1010 ../../library/sqlite3.rst:1027 msgid ":const:`None`" msgstr ":const:`None`" -#: ../../library/sqlite3.rst:1017 ../../library/sqlite3.rst:1034 +#: ../../library/sqlite3.rst:1010 ../../library/sqlite3.rst:1027 msgid "``NULL``" msgstr "``NULL``" -#: ../../library/sqlite3.rst:1019 ../../library/sqlite3.rst:1036 +#: ../../library/sqlite3.rst:1012 ../../library/sqlite3.rst:1029 msgid ":class:`int`" msgstr ":class:`int`" -#: ../../library/sqlite3.rst:1019 ../../library/sqlite3.rst:1036 +#: ../../library/sqlite3.rst:1012 ../../library/sqlite3.rst:1029 msgid "``INTEGER``" msgstr "``INTEGER``" -#: ../../library/sqlite3.rst:1021 ../../library/sqlite3.rst:1038 +#: ../../library/sqlite3.rst:1014 ../../library/sqlite3.rst:1031 msgid ":class:`float`" msgstr ":class:`float`" -#: ../../library/sqlite3.rst:1021 ../../library/sqlite3.rst:1038 +#: ../../library/sqlite3.rst:1014 ../../library/sqlite3.rst:1031 msgid "``REAL``" msgstr "``REAL``" -#: ../../library/sqlite3.rst:1023 +#: ../../library/sqlite3.rst:1016 msgid ":class:`str`" msgstr ":class:`str`" -#: ../../library/sqlite3.rst:1023 ../../library/sqlite3.rst:1040 +#: ../../library/sqlite3.rst:1016 ../../library/sqlite3.rst:1033 msgid "``TEXT``" msgstr "``TEXT``" -#: ../../library/sqlite3.rst:1025 ../../library/sqlite3.rst:1043 +#: ../../library/sqlite3.rst:1018 ../../library/sqlite3.rst:1036 msgid ":class:`bytes`" msgstr ":class:`bytes`" -#: ../../library/sqlite3.rst:1025 ../../library/sqlite3.rst:1043 +#: ../../library/sqlite3.rst:1018 ../../library/sqlite3.rst:1036 msgid "``BLOB``" msgstr "``BLOB``" -#: ../../library/sqlite3.rst:1029 +#: ../../library/sqlite3.rst:1022 msgid "This is how SQLite types are converted to Python types by default:" msgstr "" -#: ../../library/sqlite3.rst:1040 +#: ../../library/sqlite3.rst:1033 msgid "depends on :attr:`~Connection.text_factory`, :class:`str` by default" msgstr "" -#: ../../library/sqlite3.rst:1046 +#: ../../library/sqlite3.rst:1039 msgid "" "The type system of the :mod:`sqlite3` module is extensible in two ways: you " "can store additional Python types in an SQLite database via object " @@ -1139,18 +1126,18 @@ msgid "" "to different Python types via converters." msgstr "" -#: ../../library/sqlite3.rst:1053 +#: ../../library/sqlite3.rst:1046 msgid "Using adapters to store custom Python types in SQLite databases" msgstr "" -#: ../../library/sqlite3.rst:1055 +#: ../../library/sqlite3.rst:1048 msgid "" "SQLite supports only a limited set of data types natively. To store custom " "Python types in SQLite databases, *adapt* them to one of the :ref:`Python " "types SQLite natively understands`." msgstr "" -#: ../../library/sqlite3.rst:1059 +#: ../../library/sqlite3.rst:1052 msgid "" "There are two ways to adapt Python objects to SQLite types: letting your " "object adapt itself, or using an *adapter callable*. The latter will take " @@ -1160,11 +1147,11 @@ msgid "" "custom adapter functions." msgstr "" -#: ../../library/sqlite3.rst:1071 +#: ../../library/sqlite3.rst:1064 msgid "Letting your object adapt itself" msgstr "" -#: ../../library/sqlite3.rst:1073 +#: ../../library/sqlite3.rst:1066 msgid "" "Suppose we have a ``Point`` class that represents a pair of coordinates, " "``x`` and ``y``, in a Cartesian coordinate system. The coordinate pair will " @@ -1174,107 +1161,107 @@ msgid "" "*protocol* will be of type :class:`PrepareProtocol`." msgstr "" -#: ../../library/sqlite3.rst:1085 +#: ../../library/sqlite3.rst:1078 msgid "Registering an adapter callable" msgstr "" -#: ../../library/sqlite3.rst:1087 +#: ../../library/sqlite3.rst:1080 msgid "" "The other possibility is to create a function that converts the Python " "object to an SQLite-compatible type. This function can then be registered " "using :func:`register_adapter`." msgstr "" -#: ../../library/sqlite3.rst:1095 +#: ../../library/sqlite3.rst:1088 msgid "Converting SQLite values to custom Python types" msgstr "" -#: ../../library/sqlite3.rst:1097 +#: ../../library/sqlite3.rst:1090 msgid "" "Writing an adapter lets you convert *from* custom Python types *to* SQLite " "values. To be able to convert *from* SQLite values *to* custom Python types, " "we use *converters*." msgstr "" -#: ../../library/sqlite3.rst:1102 +#: ../../library/sqlite3.rst:1095 msgid "" "Let's go back to the :class:`Point` class. We stored the x and y coordinates " "separated via semicolons as strings in SQLite." msgstr "" -#: ../../library/sqlite3.rst:1105 +#: ../../library/sqlite3.rst:1098 msgid "" "First, we'll define a converter function that accepts the string as a " "parameter and constructs a :class:`Point` object from it." msgstr "" -#: ../../library/sqlite3.rst:1110 +#: ../../library/sqlite3.rst:1103 msgid "" "Converter functions are **always** passed a :class:`bytes` object, no matter " "the underlying SQLite data type." msgstr "" -#: ../../library/sqlite3.rst:1119 +#: ../../library/sqlite3.rst:1112 msgid "" "We now need to tell ``sqlite3`` when it should convert a given SQLite value. " "This is done when connecting to a database, using the *detect_types* " "parameter of :func:`connect`. There are three options:" msgstr "" -#: ../../library/sqlite3.rst:1123 +#: ../../library/sqlite3.rst:1116 msgid "Implicit: set *detect_types* to :const:`PARSE_DECLTYPES`" msgstr "" -#: ../../library/sqlite3.rst:1124 +#: ../../library/sqlite3.rst:1117 msgid "Explicit: set *detect_types* to :const:`PARSE_COLNAMES`" msgstr "" -#: ../../library/sqlite3.rst:1125 +#: ../../library/sqlite3.rst:1118 msgid "" "Both: set *detect_types* to ``sqlite3.PARSE_DECLTYPES | sqlite3." "PARSE_COLNAMES``. Column names take precedence over declared types." msgstr "" -#: ../../library/sqlite3.rst:1129 +#: ../../library/sqlite3.rst:1122 msgid "The following example illustrates the implicit and explicit approaches:" msgstr "" -#: ../../library/sqlite3.rst:1135 +#: ../../library/sqlite3.rst:1128 msgid "Default adapters and converters" msgstr "" -#: ../../library/sqlite3.rst:1137 +#: ../../library/sqlite3.rst:1130 msgid "" "There are default adapters for the date and datetime types in the datetime " "module. They will be sent as ISO dates/ISO timestamps to SQLite." msgstr "" -#: ../../library/sqlite3.rst:1140 +#: ../../library/sqlite3.rst:1133 msgid "" "The default converters are registered under the name \"date\" for :class:" "`datetime.date` and under the name \"timestamp\" for :class:`datetime." "datetime`." msgstr "" -#: ../../library/sqlite3.rst:1144 +#: ../../library/sqlite3.rst:1137 msgid "" "This way, you can use date/timestamps from Python without any additional " "fiddling in most cases. The format of the adapters is also compatible with " "the experimental SQLite date/time functions." msgstr "" -#: ../../library/sqlite3.rst:1148 +#: ../../library/sqlite3.rst:1141 msgid "The following example demonstrates this." msgstr "" -#: ../../library/sqlite3.rst:1152 +#: ../../library/sqlite3.rst:1145 msgid "" "If a timestamp stored in SQLite has a fractional part longer than 6 numbers, " "its value will be truncated to microsecond precision by the timestamp " "converter." msgstr "" -#: ../../library/sqlite3.rst:1158 +#: ../../library/sqlite3.rst:1151 msgid "" "The default \"timestamp\" converter ignores UTC offsets in the database and " "always returns a naive :class:`datetime.datetime` object. To preserve UTC " @@ -1282,25 +1269,25 @@ msgid "" "offset-aware converter with :func:`register_converter`." msgstr "" -#: ../../library/sqlite3.rst:1167 +#: ../../library/sqlite3.rst:1160 msgid "Adapter and Converter Recipes" msgstr "" -#: ../../library/sqlite3.rst:1169 +#: ../../library/sqlite3.rst:1162 msgid "This section shows recipes for common adapters and converters." msgstr "" -#: ../../library/sqlite3.rst:1212 +#: ../../library/sqlite3.rst:1205 msgid "Controlling Transactions" msgstr "" -#: ../../library/sqlite3.rst:1214 +#: ../../library/sqlite3.rst:1207 msgid "" "The ``sqlite3`` module does not adhere to the transaction handling " "recommended by :pep:`249`." msgstr "" -#: ../../library/sqlite3.rst:1217 +#: ../../library/sqlite3.rst:1210 msgid "" "If the connection attribute :attr:`~Connection.isolation_level` is not :" "const:`None`, new transactions are implicitly opened before :meth:`~Cursor." @@ -1313,7 +1300,7 @@ msgid "" "isolation_level` attribute." msgstr "" -#: ../../library/sqlite3.rst:1229 +#: ../../library/sqlite3.rst:1222 msgid "" "If :attr:`~Connection.isolation_level` is set to :const:`None`, no " "transactions are implicitly opened at all. This leaves the underlying SQLite " @@ -1323,56 +1310,56 @@ msgid "" "in_transaction` attribute." msgstr "" -#: ../../library/sqlite3.rst:1237 +#: ../../library/sqlite3.rst:1230 msgid "" "The :meth:`~Cursor.executescript` method implicitly commits any pending " "transaction before execution of the given SQL script, regardless of the " "value of :attr:`~Connection.isolation_level`." msgstr "" -#: ../../library/sqlite3.rst:1241 +#: ../../library/sqlite3.rst:1234 msgid "" ":mod:`sqlite3` used to implicitly commit an open transaction before DDL " "statements. This is no longer the case." msgstr "" -#: ../../library/sqlite3.rst:1255 +#: ../../library/sqlite3.rst:1248 msgid "SQLite URI tricks" msgstr "" -#: ../../library/sqlite3.rst:1257 +#: ../../library/sqlite3.rst:1250 msgid "Some useful URI tricks include:" msgstr "" -#: ../../library/sqlite3.rst:1259 +#: ../../library/sqlite3.rst:1252 msgid "Open a database in read-only mode::" msgstr "" -#: ../../library/sqlite3.rst:1263 +#: ../../library/sqlite3.rst:1256 msgid "" "Do not implicitly create a new database file if it does not already exist; " "will raise :exc:`~sqlite3.OperationalError` if unable to create a new file::" msgstr "" -#: ../../library/sqlite3.rst:1268 +#: ../../library/sqlite3.rst:1261 msgid "Create a shared named in-memory database::" msgstr "" -#: ../../library/sqlite3.rst:1277 +#: ../../library/sqlite3.rst:1270 msgid "" "More information about this feature, including a list of parameters, can be " "found in the `SQLite URI documentation`_." msgstr "" -#: ../../library/sqlite3.rst:1283 +#: ../../library/sqlite3.rst:1276 msgid "Using :mod:`sqlite3` efficiently" msgstr "" -#: ../../library/sqlite3.rst:1287 +#: ../../library/sqlite3.rst:1280 msgid "Using shortcut methods" msgstr "" -#: ../../library/sqlite3.rst:1289 +#: ../../library/sqlite3.rst:1282 msgid "" "Using the nonstandard :meth:`execute`, :meth:`executemany` and :meth:" "`executescript` methods of the :class:`Connection` object, your code can be " @@ -1384,27 +1371,27 @@ msgid "" "object." msgstr "" -#: ../../library/sqlite3.rst:1301 +#: ../../library/sqlite3.rst:1294 msgid "Accessing columns by name instead of by index" msgstr "" -#: ../../library/sqlite3.rst:1303 +#: ../../library/sqlite3.rst:1296 msgid "" "One useful feature of the :mod:`sqlite3` module is the built-in :class:" "`sqlite3.Row` class designed to be used as a row factory." msgstr "" -#: ../../library/sqlite3.rst:1306 +#: ../../library/sqlite3.rst:1299 msgid "" "Rows wrapped with this class can be accessed both by index (like tuples) and " "case-insensitively by name:" msgstr "" -#: ../../library/sqlite3.rst:1315 +#: ../../library/sqlite3.rst:1308 msgid "Using the connection as a context manager" msgstr "" -#: ../../library/sqlite3.rst:1317 +#: ../../library/sqlite3.rst:1310 msgid "" "A :class:`Connection` object can be used as a context manager that " "automatically commits or rolls back open transactions when leaving the body " @@ -1414,23 +1401,23 @@ msgid "" "exception, the transaction is rolled back." msgstr "" -#: ../../library/sqlite3.rst:1326 +#: ../../library/sqlite3.rst:1319 msgid "" "If there is no open transaction upon leaving the body of the ``with`` " "statement, the context manager is a no-op." msgstr "" -#: ../../library/sqlite3.rst:1331 +#: ../../library/sqlite3.rst:1324 msgid "" "The context manager neither implicitly opens a new transaction nor closes " "the connection." msgstr "" -#: ../../library/sqlite3.rst:1338 +#: ../../library/sqlite3.rst:1331 msgid "Footnotes" msgstr "註解" -#: ../../library/sqlite3.rst:1339 +#: ../../library/sqlite3.rst:1332 msgid "" "The sqlite3 module is not built with loadable extension support by default, " "because some platforms (notably macOS) have SQLite libraries which are " diff --git a/reference/compound_stmts.po b/reference/compound_stmts.po index 2e3292e85a..b196d015d8 100644 --- a/reference/compound_stmts.po +++ b/reference/compound_stmts.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-03-22 00:14+0000\n" +"POT-Creation-Date: 2022-07-23 00:17+0000\n" "PO-Revision-Date: 2018-05-23 16:17+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -1625,8 +1625,9 @@ msgid "Is semantically equivalent to::" msgstr "" #: ../../reference/compound_stmts.rst:1450 -msgid "See also :meth:`__aiter__` and :meth:`__anext__` for details." -msgstr "更多細節請見 :meth:`__aiter__` 與 :meth:`__anext__`\\ 。" +msgid "" +"See also :meth:`~object.__aiter__` and :meth:`~object.__anext__` for details." +msgstr "更多細節請見 :meth:`~object.__aiter__` 與 :meth:`~object.__anext__`\\ 。" #: ../../reference/compound_stmts.rst:1452 msgid "" @@ -1645,8 +1646,10 @@ msgid "" msgstr "" #: ../../reference/compound_stmts.rst:1492 -msgid "See also :meth:`__aenter__` and :meth:`__aexit__` for details." -msgstr "更多細節請見 :meth:`__aenter__` 與 :meth:`__aexit__`\\ 。" +msgid "" +"See also :meth:`~object.__aenter__` and :meth:`~object.__aexit__` for " +"details." +msgstr "更多細節請見 :meth:`~object.__aenter__` 與 :meth:`~object.__aexit__`\\ 。" #: ../../reference/compound_stmts.rst:1494 msgid "" diff --git a/tutorial/stdlib2.po b/tutorial/stdlib2.po index f303eb0cb3..bcb9501e1c 100644 --- a/tutorial/stdlib2.po +++ b/tutorial/stdlib2.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-06-26 18:54+0800\n" +"POT-Creation-Date: 2022-07-23 00:17+0000\n" "PO-Revision-Date: 2021-06-19 14:24+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -93,9 +93,9 @@ msgid "" "allows users to customize their applications without having to alter the " "application." msgstr "" -":mod:`string` 模組包含一個多功能的 :class:`~string.Template` class,提供的簡化語法" -"適合使用者進行編輯時使用。它容許使用者客製化自己的應用程式,但不必對原應用程" -"式做出變更。" +":mod:`string` 模組包含一個多功能的 :class:`~string.Template` class,提供的簡" +"化語法適合使用者進行編輯時使用。它容許使用者客製化自己的應用程式,但不必對原" +"應用程式做出變更。" #: ../../tutorial/stdlib2.rst:78 msgid "" @@ -106,9 +106,8 @@ msgid "" "``$``::" msgstr "" "格式化方式是使用佔位符號名稱 (placeholder name),它是由 ``$`` 加上合法的 " -"Python 識別符(字母、數字和下底線)構成。使用大括號包覆佔位符號以允許" -"在後面接上更多的字母和數字而無需插入空格。使用 ``$$`` 將會跳脫為單一字元 `" -"$`:\n" +"Python 識別符(字母、數字和下底線)構成。使用大括號包覆佔位符號以允許在後面接" +"上更多的字母和數字而無需插入空格。使用 ``$$`` 將會跳脫為單一字元 `$`:\n" "\n" "::" @@ -141,7 +140,7 @@ msgstr "" "\n" "::" -#: ../../tutorial/stdlib2.rst:125 +#: ../../tutorial/stdlib2.rst:126 msgid "" "Another application for templating is separating program logic from the " "details of multiple output formats. This makes it possible to substitute " @@ -150,11 +149,11 @@ msgstr "" "模板化的另一個應用,是將程式邏輯與多樣的輸出格式細節分離開來。這樣就可以為 " "XML 檔案、純文字報表和 HTML 網路報表替換自訂的模板。" -#: ../../tutorial/stdlib2.rst:133 +#: ../../tutorial/stdlib2.rst:134 msgid "Working with Binary Data Record Layouts" msgstr "二進制資料記錄編排 (Binary Data Record Layouts) " -#: ../../tutorial/stdlib2.rst:135 +#: ../../tutorial/stdlib2.rst:136 msgid "" "The :mod:`struct` module provides :func:`~struct.pack` and :func:`~struct." "unpack` functions for working with variable length binary record formats. " @@ -172,11 +171,11 @@ msgstr "" "\n" "::" -#: ../../tutorial/stdlib2.rst:166 +#: ../../tutorial/stdlib2.rst:167 msgid "Multi-threading" msgstr "多執行緒 (Multi-threading)" -#: ../../tutorial/stdlib2.rst:168 +#: ../../tutorial/stdlib2.rst:169 msgid "" "Threading is a technique for decoupling tasks which are not sequentially " "dependent. Threads can be used to improve the responsiveness of " @@ -184,12 +183,12 @@ msgid "" "background. A related use case is running I/O in parallel with computations " "in another thread." msgstr "" -"執行緒是一種用來對非順序相依 (sequentially dependent) 的多個任務進" -"行解耦 (decoupling) 的技術。當其他任務在背景執行時,多執行緒可以用來提升應用程式在接" +"執行緒是一種用來對非順序相依 (sequentially dependent) 的多個任務進行解耦 " +"(decoupling) 的技術。當其他任務在背景執行時,多執行緒可以用來提升應用程式在接" "收使用者輸入時的反應能力。一個相關的用例是,運行 I/O 的同時,在另一個執行緒中" "進行計算。" -#: ../../tutorial/stdlib2.rst:173 +#: ../../tutorial/stdlib2.rst:174 msgid "" "The following code shows how the high level :mod:`threading` module can run " "tasks in background while the main program continues to run::" @@ -199,7 +198,7 @@ msgstr "" "\n" "::" -#: ../../tutorial/stdlib2.rst:197 +#: ../../tutorial/stdlib2.rst:198 msgid "" "The principal challenge of multi-threaded applications is coordinating " "threads that share data or other resources. To that end, the threading " @@ -210,7 +209,7 @@ msgstr "" "threading 模組提供了多個同步處理原始物件 (synchronization primitive),包括鎖 " "(lock)、事件 (event)、條件變數 (condition variable) 和號誌 (semaphore)。" -#: ../../tutorial/stdlib2.rst:202 +#: ../../tutorial/stdlib2.rst:203 msgid "" "While those tools are powerful, minor design errors can result in problems " "that are difficult to reproduce. So, the preferred approach to task " @@ -225,11 +224,11 @@ msgstr "" "`queue` 模組向該執行緒饋送來自其他執行緒的請求。應用程式若使用 :class:" "`~queue.Queue` 物件進行執行緒間的通信和協調,會更易於設計、更易讀、更可靠。" -#: ../../tutorial/stdlib2.rst:213 +#: ../../tutorial/stdlib2.rst:214 msgid "Logging" msgstr "日誌記錄 (Logging)" -#: ../../tutorial/stdlib2.rst:215 +#: ../../tutorial/stdlib2.rst:216 msgid "" "The :mod:`logging` module offers a full featured and flexible logging " "system. At its simplest, log messages are sent to a file or to ``sys." @@ -240,11 +239,11 @@ msgstr "" "\n" "::" -#: ../../tutorial/stdlib2.rst:225 +#: ../../tutorial/stdlib2.rst:226 msgid "This produces the following output:" msgstr "這會產生以下輸出:" -#: ../../tutorial/stdlib2.rst:233 +#: ../../tutorial/stdlib2.rst:234 msgid "" "By default, informational and debugging messages are suppressed and the " "output is sent to standard error. Other output options include routing " @@ -260,7 +259,7 @@ msgstr "" "\\ ,\\ :const:`~logging.WARNING`\\ ,\\ :const:`~logging.ERROR`\\ ,及 :" "const:`~logging.CRITICAL`\\ 。" -#: ../../tutorial/stdlib2.rst:240 +#: ../../tutorial/stdlib2.rst:241 msgid "" "The logging system can be configured directly from Python or can be loaded " "from a user editable configuration file for customized logging without " @@ -269,11 +268,11 @@ msgstr "" "日誌記錄系統可以直接從 Python 配置,也可以透過載入使用者可編輯的配置檔案以進" "行客製化的日誌記錄,而無須對應用程式做出變更。" -#: ../../tutorial/stdlib2.rst:248 +#: ../../tutorial/stdlib2.rst:249 msgid "Weak References" msgstr "弱引用 (Weak References)" -#: ../../tutorial/stdlib2.rst:250 +#: ../../tutorial/stdlib2.rst:251 msgid "" "Python does automatic memory management (reference counting for most objects " "and :term:`garbage collection` to eliminate cycles). The memory is freed " @@ -283,7 +282,7 @@ msgstr "" "使用 :term:`garbage collection` 來消除循環參照)。當一個參照從記憶體被移除後" "不久,該記憶體就會被釋出。" -#: ../../tutorial/stdlib2.rst:254 +#: ../../tutorial/stdlib2.rst:255 msgid "" "This approach works fine for most applications but occasionally there is a " "need to track objects only as long as they are being used by something else. " @@ -298,16 +297,16 @@ msgstr "" "持續追蹤它們。可惜的是,儘管只是追蹤它們,也會建立一個使它們永久化 " "(permanent) 的參照。\\ :mod:`weakref` 模組提供的工具可以不必建立參照就能追蹤" "物件。當該物件不再被需要時,它會自動從一個弱引用表 (weakref table) 中被移除," -"並為弱引用物件觸發一個回呼 (callback)。典型的應用包括暫存 (cache) 那些成本較為" -"昂貴的物件:\n" +"並為弱引用物件觸發一個回呼 (callback)。典型的應用包括暫存 (cache) 那些成本較" +"為昂貴的物件:\n" "\n" "::" -#: ../../tutorial/stdlib2.rst:289 +#: ../../tutorial/stdlib2.rst:290 msgid "Tools for Working with Lists" msgstr "使用於 List 的工具" -#: ../../tutorial/stdlib2.rst:291 +#: ../../tutorial/stdlib2.rst:292 msgid "" "Many data structure needs can be met with the built-in list type. However, " "sometimes there is a need for alternative implementations with different " @@ -316,7 +315,7 @@ msgstr "" "許多對於資料結構的需求,可以透過內建的 list(串列)型別來滿足。但是,有時也會" "根據效能的各種取捨,需要一些替代的實作。" -#: ../../tutorial/stdlib2.rst:295 +#: ../../tutorial/stdlib2.rst:296 msgid "" "The :mod:`array` module provides an :class:`~array.array()` object that is " "like a list that stores only homogeneous data and stores it more compactly. " @@ -331,7 +330,7 @@ msgstr "" "\n" "::" -#: ../../tutorial/stdlib2.rst:308 +#: ../../tutorial/stdlib2.rst:309 msgid "" "The :mod:`collections` module provides a :class:`~collections.deque()` " "object that is like a list with faster appends and pops from the left side " @@ -345,7 +344,7 @@ msgstr "" "\n" "::" -#: ../../tutorial/stdlib2.rst:329 +#: ../../tutorial/stdlib2.rst:330 msgid "" "In addition to alternative list implementations, the library also offers " "other tools such as the :mod:`bisect` module with functions for manipulating " @@ -356,7 +355,7 @@ msgstr "" "\n" "::" -#: ../../tutorial/stdlib2.rst:339 +#: ../../tutorial/stdlib2.rst:340 msgid "" "The :mod:`heapq` module provides functions for implementing heaps based on " "regular lists. The lowest valued entry is always kept at position zero. " @@ -369,44 +368,45 @@ msgstr "" "\n" "::" -#: ../../tutorial/stdlib2.rst:355 +#: ../../tutorial/stdlib2.rst:356 msgid "Decimal Floating Point Arithmetic" msgstr "十進制 (Decimal) 浮點數運算" -#: ../../tutorial/stdlib2.rst:357 +#: ../../tutorial/stdlib2.rst:358 msgid "" "The :mod:`decimal` module offers a :class:`~decimal.Decimal` datatype for " "decimal floating point arithmetic. Compared to the built-in :class:`float` " "implementation of binary floating point, the class is especially helpful for" msgstr "" ":mod:`decimal` 模組提供了一個 :class:`~decimal.Decimal` 資料類型,用於十進制" -"浮點數運算。相較於內建的二進制浮點數 :class:`float` 實作,該 class 特別適用於下列情境" +"浮點數運算。相較於內建的二進制浮點數 :class:`float` 實作,該 class 特別適用於" +"下列情境" -#: ../../tutorial/stdlib2.rst:361 +#: ../../tutorial/stdlib2.rst:362 msgid "" "financial applications and other uses which require exact decimal " "representation," msgstr "金融應用程式及其他需要準確十進位制表示法的應用," -#: ../../tutorial/stdlib2.rst:363 +#: ../../tutorial/stdlib2.rst:364 msgid "control over precision," msgstr "對於精確度 (precision) 的控制," -#: ../../tutorial/stdlib2.rst:364 +#: ../../tutorial/stdlib2.rst:365 msgid "control over rounding to meet legal or regulatory requirements," msgstr "控制四捨五入,以滿足法律或監管規範," -#: ../../tutorial/stdlib2.rst:365 +#: ../../tutorial/stdlib2.rst:366 msgid "tracking of significant decimal places, or" msgstr "追蹤有效的小數位數 (decimal place),或" -#: ../../tutorial/stdlib2.rst:366 +#: ../../tutorial/stdlib2.rst:367 msgid "" "applications where the user expects the results to match calculations done " "by hand." msgstr "使用者會期望計算結果與手工計算相符的應用程式。" -#: ../../tutorial/stdlib2.rst:369 +#: ../../tutorial/stdlib2.rst:370 msgid "" "For example, calculating a 5% tax on a 70 cent phone charge gives different " "results in decimal floating point and binary floating point. The difference " @@ -418,7 +418,7 @@ msgstr "" "\n" "::" -#: ../../tutorial/stdlib2.rst:379 +#: ../../tutorial/stdlib2.rst:380 msgid "" "The :class:`~decimal.Decimal` result keeps a trailing zero, automatically " "inferring four place significance from multiplicands with two place " @@ -430,7 +430,7 @@ msgstr "" "被乘數自動推斷出有四個有效位數的乘積。Decimal 可以重現手工計算的結果,以避免" "產生二進制浮點數無法準確表示十進制數值時會導致的問題。" -#: ../../tutorial/stdlib2.rst:385 +#: ../../tutorial/stdlib2.rst:386 msgid "" "Exact representation enables the :class:`~decimal.Decimal` class to perform " "modulo calculations and equality tests that are unsuitable for binary " @@ -441,7 +441,7 @@ msgstr "" "\n" "::" -#: ../../tutorial/stdlib2.rst:399 +#: ../../tutorial/stdlib2.rst:400 msgid "" "The :mod:`decimal` module provides arithmetic with as much precision as " "needed::" diff --git a/using/windows.po b/using/windows.po index 6310a6ef23..f7e637b73a 100644 --- a/using/windows.po +++ b/using/windows.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-06-22 00:18+0000\n" +"POT-Creation-Date: 2022-07-21 00:17+0000\n" "PO-Revision-Date: 2018-05-23 16:19+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -66,9 +66,9 @@ msgstr "" msgid "" ":ref:`windows-store` is a simple installation of Python that is suitable for " "running scripts and packages, and using IDLE or other development " -"environments. It requires Windows 10, but can be safely installed without " -"corrupting other programs. It also provides many convenient commands for " -"launching Python and its tools." +"environments. It requires Windows 10 and above, but can be safely installed " +"without corrupting other programs. It also provides many convenient commands " +"for launching Python and its tools." msgstr "" #: ../../using/windows.rst:41 @@ -648,18 +648,70 @@ msgid "" msgstr "" #: ../../using/windows.rst:335 -msgid "Known Issues" +msgid "Known issues" msgstr "" -#: ../../using/windows.rst:337 +#: ../../using/windows.rst:338 +msgid "Redirection of local data, registry, and temporary paths" +msgstr "" + +#: ../../using/windows.rst:340 msgid "" "Because of restrictions on Microsoft Store apps, Python scripts may not have " -"full write access to shared locations such as ``TEMP`` and the registry. " -"Instead, it will write to a private copy. If your scripts must modify the " -"shared locations, you will need to install the full installer." +"full write access to shared locations such as :envvar:`TEMP` and the " +"registry. Instead, it will write to a private copy. If your scripts must " +"modify the shared locations, you will need to install the full installer." +msgstr "" + +#: ../../using/windows.rst:345 +msgid "" +"At runtime, Python will use a private copy of well-known Windows folders and " +"the registry. For example, if the environment variable :envvar:`%APPDATA%` " +"is :file:`c:\\\\Users\\\\\\\\AppData\\\\`, then when writing to :file:" +"`C:\\\\Users\\\\\\\\AppData\\\\Local` will write to :file:`C:\\\\Users" +"\\\\\\\\AppData\\\\Local\\\\Packages\\\\PythonSoftwareFoundation." +"Python.3.8_qbz5n2kfra8p0\\\\LocalCache\\\\Local\\\\`." +msgstr "" + +#: ../../using/windows.rst:350 +msgid "" +"When reading files, Windows will return the file from the private folder, or " +"if that does not exist, the real Windows directory. For example reading :" +"file:`C:\\\\Windows\\\\System32` returns the contents of :file:`C:\\\\Windows" +"\\\\System32` plus the contents of :file:`C:\\\\Program Files\\\\WindowsApps" +"\\\\package_name\\\\VFS\\\\SystemX86`." +msgstr "" + +#: ../../using/windows.rst:354 +msgid "" +"You can find the real path of any existing file using :func:`os.path." +"realpath`:" +msgstr "" + +#: ../../using/windows.rst:363 +msgid "When writing to the Windows Registry, the following behaviors exist:" msgstr "" -#: ../../using/windows.rst:342 +#: ../../using/windows.rst:365 +msgid "" +"Reading from ``HKLM\\\\Software`` is allowed and results are merged with " +"the :file:`registry.dat` file in the package." +msgstr "" + +#: ../../using/windows.rst:366 +msgid "" +"Writing to ``HKLM\\\\Software`` is not allowed if the corresponding key/" +"value exists, i.e. modifying existing keys." +msgstr "" + +#: ../../using/windows.rst:367 +msgid "" +"Writing to ``HKLM\\\\Software`` is allowed as long as a corresponding key/" +"value does not exist in the package and the user has the correct access " +"permissions." +msgstr "" + +#: ../../using/windows.rst:370 msgid "" "For more detail on the technical basis for these limitations, please consult " "Microsoft's documentation on packaged full-trust apps, currently available " @@ -668,11 +720,11 @@ msgid "" "behind-the-scenes>`_" msgstr "" -#: ../../using/windows.rst:351 +#: ../../using/windows.rst:379 msgid "The nuget.org packages" msgstr "" -#: ../../using/windows.rst:355 +#: ../../using/windows.rst:383 msgid "" "The nuget.org package is a reduced size Python environment intended for use " "on continuous integration and build systems that do not have a system-wide " @@ -680,14 +732,14 @@ msgid "" "works perfectly fine for packages containing build-time tools." msgstr "" -#: ../../using/windows.rst:360 +#: ../../using/windows.rst:388 msgid "" "Visit `nuget.org `_ for the most up-to-date " "information on using nuget. What follows is a summary that is sufficient for " "Python developers." msgstr "" -#: ../../using/windows.rst:364 +#: ../../using/windows.rst:392 msgid "" "The ``nuget.exe`` command line tool may be downloaded directly from " "``https://aka.ms/nugetclidl``, for example, using curl or PowerShell. With " @@ -695,7 +747,7 @@ msgid "" "installed using::" msgstr "" -#: ../../using/windows.rst:372 +#: ../../using/windows.rst:400 msgid "" "To select a particular version, add a ``-Version 3.x.y``. The output " "directory may be changed from ``.``, and the package will be installed into " @@ -705,7 +757,7 @@ msgid "" "directory that contains the Python installation:" msgstr "" -#: ../../using/windows.rst:389 +#: ../../using/windows.rst:417 msgid "" "In general, nuget packages are not upgradeable, and newer versions should be " "installed side-by-side and referenced using the full path. Alternatively, " @@ -713,7 +765,7 @@ msgid "" "will do this automatically if they do not preserve files between builds." msgstr "" -#: ../../using/windows.rst:394 +#: ../../using/windows.rst:422 msgid "" "Alongside the ``tools`` directory is a ``build\\native`` directory. This " "contains a MSBuild properties file ``python.props`` that can be used in a C+" @@ -721,7 +773,7 @@ msgid "" "automatically use the headers and import libraries in your build." msgstr "" -#: ../../using/windows.rst:399 +#: ../../using/windows.rst:427 msgid "" "The package information pages on nuget.org are `www.nuget.org/packages/" "python `_ for the 64-bit version and " @@ -729,18 +781,18 @@ msgid "" "pythonx86>`_ for the 32-bit version." msgstr "" -#: ../../using/windows.rst:408 +#: ../../using/windows.rst:436 msgid "The embeddable package" msgstr "" -#: ../../using/windows.rst:412 +#: ../../using/windows.rst:440 msgid "" "The embedded distribution is a ZIP file containing a minimal Python " "environment. It is intended for acting as part of another application, " "rather than being directly accessed by end-users." msgstr "" -#: ../../using/windows.rst:416 +#: ../../using/windows.rst:444 msgid "" "When extracted, the embedded distribution is (almost) fully isolated from " "the user's system, including environment variables, system registry " @@ -751,7 +803,7 @@ msgid "" "documentation are not included." msgstr "" -#: ../../using/windows.rst:425 +#: ../../using/windows.rst:453 msgid "" "The embedded distribution does not include the `Microsoft C Runtime `_" msgstr "`ActivePython `_" -#: ../../using/windows.rst:493 +#: ../../using/windows.rst:521 msgid "Installer with multi-platform compatibility, documentation, PyWin32" msgstr "" -#: ../../using/windows.rst:497 +#: ../../using/windows.rst:525 msgid "`Anaconda `_" msgstr "`Anaconda `_" -#: ../../using/windows.rst:496 +#: ../../using/windows.rst:524 msgid "" "Popular scientific modules (such as numpy, scipy and pandas) and the " "``conda`` package manager." msgstr "" -#: ../../using/windows.rst:503 +#: ../../using/windows.rst:531 msgid "`Enthought Deployment Manager `_" msgstr "`Enthought Deployment Manager `_" -#: ../../using/windows.rst:500 +#: ../../using/windows.rst:528 msgid "\"The Next Generation Python Environment and Package Manager\"." msgstr "" -#: ../../using/windows.rst:502 +#: ../../using/windows.rst:530 msgid "" "Previously Enthought provided Canopy, but it `reached end of life in 2016 " "`_." msgstr "" -#: ../../using/windows.rst:507 +#: ../../using/windows.rst:535 msgid "`WinPython `_" msgstr "`WinPython `_" -#: ../../using/windows.rst:506 +#: ../../using/windows.rst:534 msgid "" "Windows-specific distribution with prebuilt scientific packages and tools " "for building packages." msgstr "" -#: ../../using/windows.rst:509 +#: ../../using/windows.rst:537 msgid "" "Note that these packages may not include the latest versions of Python or " "other libraries, and are not maintained or supported by the core Python team." msgstr "" -#: ../../using/windows.rst:515 +#: ../../using/windows.rst:543 msgid "Configuring Python" msgstr "設定 Python" -#: ../../using/windows.rst:517 +#: ../../using/windows.rst:545 msgid "" "To run Python conveniently from a command prompt, you might consider " "changing some default environment variables in Windows. While the installer " @@ -916,29 +968,29 @@ msgid "" "use multiple versions of Python, consider using the :ref:`launcher`." msgstr "" -#: ../../using/windows.rst:527 +#: ../../using/windows.rst:555 msgid "Excursus: Setting environment variables" msgstr "" -#: ../../using/windows.rst:529 +#: ../../using/windows.rst:557 msgid "" "Windows allows environment variables to be configured permanently at both " "the User level and the System level, or temporarily in a command prompt." msgstr "" -#: ../../using/windows.rst:532 +#: ../../using/windows.rst:560 msgid "" "To temporarily set environment variables, open Command Prompt and use the :" "command:`set` command:" msgstr "" -#: ../../using/windows.rst:541 +#: ../../using/windows.rst:569 msgid "" "These changes will apply to any further commands executed in that console, " "and will be inherited by any applications started from the console." msgstr "" -#: ../../using/windows.rst:544 +#: ../../using/windows.rst:572 msgid "" "Including the variable name within percent signs will expand to the existing " "value, allowing you to add your new value at either the start or the end. " @@ -947,7 +999,7 @@ msgid "" "launched." msgstr "" -#: ../../using/windows.rst:550 +#: ../../using/windows.rst:578 msgid "" "To permanently modify the default environment variables, click Start and " "search for 'edit environment variables', or open System properties, :" @@ -957,20 +1009,20 @@ msgid "" "your machine (i.e. Administrator rights)." msgstr "" -#: ../../using/windows.rst:559 +#: ../../using/windows.rst:587 msgid "" "Windows will concatenate User variables *after* System variables, which may " "cause unexpected results when modifying :envvar:`PATH`." msgstr "" -#: ../../using/windows.rst:562 +#: ../../using/windows.rst:590 msgid "" "The :envvar:`PYTHONPATH` variable is used by all versions of Python, so you " "should not permanently configure it unless the listed paths only include " "code that is compatible with all of your installed Python versions." msgstr "" -#: ../../using/windows.rst:570 +#: ../../using/windows.rst:598 msgid "" "https://docs.microsoft.com/en-us/windows/win32/procthread/environment-" "variables" @@ -978,11 +1030,11 @@ msgstr "" "https://docs.microsoft.com/en-us/windows/win32/procthread/environment-" "variables" -#: ../../using/windows.rst:570 +#: ../../using/windows.rst:598 msgid "Overview of environment variables on Windows" msgstr "Windows 上的環境變數概要" -#: ../../using/windows.rst:573 +#: ../../using/windows.rst:601 msgid "" "https://docs.microsoft.com/en-us/windows-server/administration/windows-" "commands/set_1" @@ -990,11 +1042,11 @@ msgstr "" "https://docs.microsoft.com/en-us/windows-server/administration/windows-" "commands/set_1" -#: ../../using/windows.rst:573 +#: ../../using/windows.rst:601 msgid "The ``set`` command, for temporarily modifying environment variables" msgstr "" -#: ../../using/windows.rst:575 +#: ../../using/windows.rst:603 msgid "" "https://docs.microsoft.com/en-us/windows-server/administration/windows-" "commands/setx" @@ -1002,22 +1054,22 @@ msgstr "" "https://docs.microsoft.com/en-us/windows-server/administration/windows-" "commands/setx" -#: ../../using/windows.rst:576 +#: ../../using/windows.rst:604 msgid "The ``setx`` command, for permanently modifying environment variables" msgstr "" -#: ../../using/windows.rst:582 +#: ../../using/windows.rst:610 msgid "Finding the Python executable" msgstr "" -#: ../../using/windows.rst:586 +#: ../../using/windows.rst:614 msgid "" "Besides using the automatically created start menu entry for the Python " "interpreter, you might want to start Python in the command prompt. The " "installer has an option to set that up for you." msgstr "" -#: ../../using/windows.rst:590 +#: ../../using/windows.rst:618 msgid "" "On the first page of the installer, an option labelled \"Add Python to PATH" "\" may be selected to have the installer add the install location into the :" @@ -1028,7 +1080,7 @@ msgid "" "documentation." msgstr "" -#: ../../using/windows.rst:597 +#: ../../using/windows.rst:625 msgid "" "If you don't enable this option at install time, you can always re-run the " "installer, select Modify, and enable it. Alternatively, you can manually " @@ -1039,24 +1091,24 @@ msgid "" "entries already existed)::" msgstr "" -#: ../../using/windows.rst:610 +#: ../../using/windows.rst:638 msgid "UTF-8 mode" msgstr "" -#: ../../using/windows.rst:614 +#: ../../using/windows.rst:642 msgid "" "Windows still uses legacy encodings for the system encoding (the ANSI Code " "Page). Python uses it for the default encoding of text files (e.g. :func:" "`locale.getpreferredencoding`)." msgstr "" -#: ../../using/windows.rst:618 +#: ../../using/windows.rst:646 msgid "" "This may cause issues because UTF-8 is widely used on the internet and most " "Unix systems, including WSL (Windows Subsystem for Linux)." msgstr "" -#: ../../using/windows.rst:621 +#: ../../using/windows.rst:649 msgid "" "You can use the :ref:`Python UTF-8 Mode ` to change the default " "text encoding to UTF-8. You can enable the :ref:`Python UTF-8 Mode ` is enabled, you can still use " "the system encoding (the ANSI Code Page) via the \"mbcs\" codec." msgstr "" -#: ../../using/windows.rst:630 +#: ../../using/windows.rst:658 msgid "" "Note that adding ``PYTHONUTF8=1`` to the default environment variables will " "affect all Python 3.7+ applications on your system. If you have any Python " @@ -1080,27 +1132,27 @@ msgid "" "utf8`` command line option." msgstr "" -#: ../../using/windows.rst:637 +#: ../../using/windows.rst:665 msgid "" "Even when UTF-8 mode is disabled, Python uses UTF-8 by default on Windows " "for:" msgstr "" -#: ../../using/windows.rst:640 +#: ../../using/windows.rst:668 msgid "Console I/O including standard I/O (see :pep:`528` for details)." msgstr "" -#: ../../using/windows.rst:641 +#: ../../using/windows.rst:669 msgid "" "The :term:`filesystem encoding ` " "(see :pep:`529` for details)." msgstr "" -#: ../../using/windows.rst:648 +#: ../../using/windows.rst:676 msgid "Python Launcher for Windows" msgstr "" -#: ../../using/windows.rst:652 +#: ../../using/windows.rst:680 msgid "" "The Python launcher for Windows is a utility which aids in locating and " "executing of different Python versions. It allows scripts (or the command-" @@ -1108,7 +1160,7 @@ msgid "" "locate and execute that version." msgstr "" -#: ../../using/windows.rst:657 +#: ../../using/windows.rst:685 msgid "" "Unlike the :envvar:`PATH` variable, the launcher will correctly select the " "most appropriate version of Python. It will prefer per-user installations " @@ -1116,19 +1168,19 @@ msgid "" "most recently installed version." msgstr "" -#: ../../using/windows.rst:662 +#: ../../using/windows.rst:690 msgid "The launcher was originally specified in :pep:`397`." msgstr "" -#: ../../using/windows.rst:665 +#: ../../using/windows.rst:693 msgid "Getting started" msgstr "開始" -#: ../../using/windows.rst:668 +#: ../../using/windows.rst:696 msgid "From the command-line" msgstr "" -#: ../../using/windows.rst:672 +#: ../../using/windows.rst:700 msgid "" "System-wide installations of Python 3.3 and later will put the launcher on " "your :envvar:`PATH`. The launcher is compatible with all available versions " @@ -1136,54 +1188,54 @@ msgid "" "the launcher is available, execute the following command in Command Prompt::" msgstr "" -#: ../../using/windows.rst:679 +#: ../../using/windows.rst:707 msgid "" "You should find that the latest version of Python you have installed is " "started - it can be exited as normal, and any additional command-line " "arguments specified will be sent directly to Python." msgstr "" -#: ../../using/windows.rst:683 +#: ../../using/windows.rst:711 msgid "" "If you have multiple versions of Python installed (e.g., 3.7 and |version|) " "you will have noticed that Python |version| was started - to launch Python " "3.7, try the command::" msgstr "" -#: ../../using/windows.rst:689 +#: ../../using/windows.rst:717 msgid "" "If you want the latest version of Python 2 you have installed, try the " "command::" msgstr "" -#: ../../using/windows.rst:694 +#: ../../using/windows.rst:722 msgid "You should find the latest version of Python 3.x starts." msgstr "" -#: ../../using/windows.rst:696 +#: ../../using/windows.rst:724 msgid "" "If you see the following error, you do not have the launcher installed::" msgstr "" -#: ../../using/windows.rst:701 +#: ../../using/windows.rst:729 msgid "" "Per-user installations of Python do not add the launcher to :envvar:`PATH` " "unless the option was selected on installation." msgstr "" -#: ../../using/windows.rst:704 +#: ../../using/windows.rst:732 msgid "The command::" msgstr "" -#: ../../using/windows.rst:708 +#: ../../using/windows.rst:736 msgid "displays the currently installed version(s) of Python." msgstr "" -#: ../../using/windows.rst:711 +#: ../../using/windows.rst:739 msgid "Virtual environments" msgstr "虛擬環境(Virtual environment)" -#: ../../using/windows.rst:715 +#: ../../using/windows.rst:743 msgid "" "If the launcher is run with no explicit Python version specification, and a " "virtual environment (created with the standard library :mod:`venv` module or " @@ -1193,27 +1245,27 @@ msgid "" "specify the global Python version." msgstr "" -#: ../../using/windows.rst:723 +#: ../../using/windows.rst:751 msgid "From a script" msgstr "" -#: ../../using/windows.rst:725 +#: ../../using/windows.rst:753 msgid "" "Let's create a test Python script - create a file called ``hello.py`` with " "the following contents" msgstr "" -#: ../../using/windows.rst:734 +#: ../../using/windows.rst:762 msgid "From the directory in which hello.py lives, execute the command::" msgstr "" -#: ../../using/windows.rst:738 +#: ../../using/windows.rst:766 msgid "" "You should notice the version number of your latest Python 2.x installation " "is printed. Now try changing the first line to be:" msgstr "" -#: ../../using/windows.rst:745 +#: ../../using/windows.rst:773 msgid "" "Re-executing the command should now print the latest Python 3.x information. " "As with the above command-line examples, you can specify a more explicit " @@ -1222,7 +1274,7 @@ msgid "" "information printed." msgstr "" -#: ../../using/windows.rst:751 +#: ../../using/windows.rst:779 msgid "" "Note that unlike interactive use, a bare \"python\" will use the latest " "version of Python 2.x that you have installed. This is for backward " @@ -1230,11 +1282,11 @@ msgid "" "typically refers to Python 2." msgstr "" -#: ../../using/windows.rst:757 +#: ../../using/windows.rst:785 msgid "From file associations" msgstr "從檔案關聯" -#: ../../using/windows.rst:759 +#: ../../using/windows.rst:787 msgid "" "The launcher should have been associated with Python files (i.e. ``.py``, ``." "pyw``, ``.pyc`` files) when it was installed. This means that when you " @@ -1243,17 +1295,17 @@ msgid "" "have the script specify the version which should be used." msgstr "" -#: ../../using/windows.rst:765 +#: ../../using/windows.rst:793 msgid "" "The key benefit of this is that a single launcher can support multiple " "Python versions at the same time depending on the contents of the first line." msgstr "" -#: ../../using/windows.rst:769 +#: ../../using/windows.rst:797 msgid "Shebang Lines" msgstr "" -#: ../../using/windows.rst:771 +#: ../../using/windows.rst:799 msgid "" "If the first line of a script file starts with ``#!``, it is known as a " "\"shebang\" line. Linux and other Unix like operating systems have native " @@ -1263,34 +1315,34 @@ msgid "" "demonstrate their use." msgstr "" -#: ../../using/windows.rst:778 +#: ../../using/windows.rst:806 msgid "" "To allow shebang lines in Python scripts to be portable between Unix and " "Windows, this launcher supports a number of 'virtual' commands to specify " "which interpreter to use. The supported virtual commands are:" msgstr "" -#: ../../using/windows.rst:782 +#: ../../using/windows.rst:810 msgid "``/usr/bin/env python``" msgstr "``/usr/bin/env python``" -#: ../../using/windows.rst:783 +#: ../../using/windows.rst:811 msgid "``/usr/bin/python``" msgstr "``/usr/bin/python``" -#: ../../using/windows.rst:784 +#: ../../using/windows.rst:812 msgid "``/usr/local/bin/python``" msgstr "``/usr/local/bin/python``" -#: ../../using/windows.rst:785 +#: ../../using/windows.rst:813 msgid "``python``" msgstr "``python``" -#: ../../using/windows.rst:787 +#: ../../using/windows.rst:815 msgid "For example, if the first line of your script starts with" msgstr "" -#: ../../using/windows.rst:793 +#: ../../using/windows.rst:821 msgid "" "The default Python will be located and used. As many Python scripts written " "to work on Unix will already have this line, you should find these scripts " @@ -1299,7 +1351,7 @@ msgid "" "of the shebang lines starting with ``/usr``." msgstr "" -#: ../../using/windows.rst:799 +#: ../../using/windows.rst:827 msgid "" "Any of the above virtual commands can be suffixed with an explicit version " "(either just the major version, or the major and minor version). Furthermore " @@ -1308,14 +1360,14 @@ msgid "" "python 3.7." msgstr "" -#: ../../using/windows.rst:807 +#: ../../using/windows.rst:835 msgid "" "Beginning with python launcher 3.7 it is possible to request 64-bit version " "by the \"-64\" suffix. Furthermore it is possible to specify a major and " "architecture without minor (i.e. ``/usr/bin/python3-64``)." msgstr "" -#: ../../using/windows.rst:811 +#: ../../using/windows.rst:839 msgid "" "The ``/usr/bin/env`` form of shebang line has one further special property. " "Before looking for installed Python interpreters, this form will search the " @@ -1324,29 +1376,29 @@ msgid "" "search." msgstr "" -#: ../../using/windows.rst:817 +#: ../../using/windows.rst:845 msgid "Arguments in shebang lines" msgstr "" -#: ../../using/windows.rst:819 +#: ../../using/windows.rst:847 msgid "" "The shebang lines can also specify additional options to be passed to the " "Python interpreter. For example, if you have a shebang line:" msgstr "" -#: ../../using/windows.rst:826 +#: ../../using/windows.rst:854 msgid "Then Python will be started with the ``-v`` option" msgstr "" -#: ../../using/windows.rst:829 +#: ../../using/windows.rst:857 msgid "Customization" msgstr "" -#: ../../using/windows.rst:832 +#: ../../using/windows.rst:860 msgid "Customization via INI files" msgstr "" -#: ../../using/windows.rst:834 +#: ../../using/windows.rst:862 msgid "" "Two .ini files will be searched by the launcher - ``py.ini`` in the current " "user's \"application data\" directory (i.e. the directory returned by " @@ -1356,7 +1408,7 @@ msgid "" "launcher (i.e. py.exe) and for the 'windows' version (i.e. pyw.exe)." msgstr "" -#: ../../using/windows.rst:841 +#: ../../using/windows.rst:869 msgid "" "Customization specified in the \"application directory\" will have " "precedence over the one next to the executable, so a user, who may not have " @@ -1364,11 +1416,11 @@ msgid "" "that global .ini file." msgstr "" -#: ../../using/windows.rst:846 +#: ../../using/windows.rst:874 msgid "Customizing default Python versions" msgstr "" -#: ../../using/windows.rst:848 +#: ../../using/windows.rst:876 msgid "" "In some cases, a version qualifier can be included in a command to dictate " "which version of Python will be used by the command. A version qualifier " @@ -1378,13 +1430,13 @@ msgid "" "\"-32\" or \"-64\"." msgstr "" -#: ../../using/windows.rst:854 +#: ../../using/windows.rst:882 msgid "" "For example, a shebang line of ``#!python`` has no version qualifier, while " "``#!python3`` has a version qualifier which specifies only a major version." msgstr "" -#: ../../using/windows.rst:857 +#: ../../using/windows.rst:885 msgid "" "If no version qualifiers are found in a command, the environment variable :" "envvar:`PY_PYTHON` can be set to specify the default version qualifier. If " @@ -1394,7 +1446,7 @@ msgid "" "launcher included with Python 3.7 or newer.)" msgstr "" -#: ../../using/windows.rst:864 +#: ../../using/windows.rst:892 msgid "" "If no minor version qualifiers are found, the environment variable " "``PY_PYTHON{major}`` (where ``{major}`` is the current major version " @@ -1405,7 +1457,7 @@ msgid "" "version in that family." msgstr "" -#: ../../using/windows.rst:872 +#: ../../using/windows.rst:900 msgid "" "On 64-bit Windows with both 32-bit and 64-bit implementations of the same " "(major.minor) Python version installed, the 64-bit version will always be " @@ -1419,30 +1471,30 @@ msgid "" "suffix can be used on a version specifier to change this behaviour." msgstr "" -#: ../../using/windows.rst:883 +#: ../../using/windows.rst:911 msgid "Examples:" msgstr "範例:" -#: ../../using/windows.rst:885 +#: ../../using/windows.rst:913 msgid "" "If no relevant options are set, the commands ``python`` and ``python2`` will " "use the latest Python 2.x version installed and the command ``python3`` will " "use the latest Python 3.x installed." msgstr "" -#: ../../using/windows.rst:889 +#: ../../using/windows.rst:917 msgid "" "The command ``python3.7`` will not consult any options at all as the " "versions are fully specified." msgstr "" -#: ../../using/windows.rst:892 +#: ../../using/windows.rst:920 msgid "" "If ``PY_PYTHON=3``, the commands ``python`` and ``python3`` will both use " "the latest installed Python 3 version." msgstr "" -#: ../../using/windows.rst:895 +#: ../../using/windows.rst:923 msgid "" "If ``PY_PYTHON=3.7-32``, the command ``python`` will use the 32-bit " "implementation of 3.7 whereas the command ``python3`` will use the latest " @@ -1450,13 +1502,13 @@ msgid "" "specified.)" msgstr "" -#: ../../using/windows.rst:900 +#: ../../using/windows.rst:928 msgid "" "If ``PY_PYTHON=3`` and ``PY_PYTHON3=3.7``, the commands ``python`` and " "``python3`` will both use specifically 3.7" msgstr "" -#: ../../using/windows.rst:903 +#: ../../using/windows.rst:931 msgid "" "In addition to environment variables, the same settings can be configured in " "the .INI file used by the launcher. The section in the INI file is called " @@ -1466,25 +1518,25 @@ msgid "" "will override things specified in the INI file." msgstr "" -#: ../../using/windows.rst:910 +#: ../../using/windows.rst:938 msgid "For example:" msgstr "" -#: ../../using/windows.rst:912 +#: ../../using/windows.rst:940 msgid "Setting ``PY_PYTHON=3.7`` is equivalent to the INI file containing:" msgstr "" -#: ../../using/windows.rst:919 +#: ../../using/windows.rst:947 msgid "" "Setting ``PY_PYTHON=3`` and ``PY_PYTHON3=3.7`` is equivalent to the INI file " "containing:" msgstr "" -#: ../../using/windows.rst:929 +#: ../../using/windows.rst:957 msgid "Diagnostics" msgstr "" -#: ../../using/windows.rst:931 +#: ../../using/windows.rst:959 msgid "" "If an environment variable ``PYLAUNCH_DEBUG`` is set (to any value), the " "launcher will print diagnostic information to stderr (i.e. to the console). " @@ -1494,11 +1546,11 @@ msgid "" "target Python." msgstr "" -#: ../../using/windows.rst:943 +#: ../../using/windows.rst:971 msgid "Finding modules" msgstr "" -#: ../../using/windows.rst:945 +#: ../../using/windows.rst:973 msgid "" "Python usually stores its library (and thereby your site-packages folder) in " "the installation directory. So, if you had installed Python to :file:`C:\\" @@ -1507,7 +1559,7 @@ msgid "" "\\\\site-packages\\\\`." msgstr "" -#: ../../using/windows.rst:951 +#: ../../using/windows.rst:979 msgid "" "To completely override :data:`sys.path`, create a ``._pth`` file with the " "same name as the DLL (``python37._pth``) or the executable (``python._pth``) " @@ -1516,7 +1568,7 @@ msgid "" "allows paths to be restricted for any program loading the runtime if desired." msgstr "" -#: ../../using/windows.rst:957 +#: ../../using/windows.rst:985 msgid "" "When the file exists, all registry and environment variables are ignored, " "isolated mode is enabled, and :mod:`site` is not imported unless one line in " @@ -1526,25 +1578,25 @@ msgid "" "arbitrary code cannot be specified." msgstr "" -#: ../../using/windows.rst:964 +#: ../../using/windows.rst:992 msgid "" "Note that ``.pth`` files (without leading underscore) will be processed " "normally by the :mod:`site` module when ``import site`` has been specified." msgstr "" -#: ../../using/windows.rst:967 +#: ../../using/windows.rst:995 msgid "" "When no ``._pth`` file is found, this is how :data:`sys.path` is populated " "on Windows:" msgstr "" -#: ../../using/windows.rst:970 +#: ../../using/windows.rst:998 msgid "" "An empty entry is added at the start, which corresponds to the current " "directory." msgstr "" -#: ../../using/windows.rst:973 +#: ../../using/windows.rst:1001 msgid "" "If the environment variable :envvar:`PYTHONPATH` exists, as described in :" "ref:`using-on-envvars`, its entries are added next. Note that on Windows, " @@ -1552,7 +1604,7 @@ msgid "" "from the colon used in drive identifiers (``C:\\`` etc.)." msgstr "" -#: ../../using/windows.rst:978 +#: ../../using/windows.rst:1006 msgid "" "Additional \"application paths\" can be added in the registry as subkeys of :" "samp:`\\\\SOFTWARE\\\\Python\\\\PythonCore\\\\{version}\\\\PythonPath` under " @@ -1562,7 +1614,7 @@ msgid "" "installers only use HKLM, so HKCU is typically empty.)" msgstr "" -#: ../../using/windows.rst:985 +#: ../../using/windows.rst:1013 msgid "" "If the environment variable :envvar:`PYTHONHOME` is set, it is assumed as " "\"Python Home\". Otherwise, the path of the main Python executable is used " @@ -1573,31 +1625,31 @@ msgid "" "PythonPath stored in the registry." msgstr "" -#: ../../using/windows.rst:993 +#: ../../using/windows.rst:1021 msgid "" "If the Python Home cannot be located, no :envvar:`PYTHONPATH` is specified " "in the environment, and no registry entries can be found, a default path " "with relative entries is used (e.g. ``.\\Lib;.\\plat-win``, etc)." msgstr "" -#: ../../using/windows.rst:997 +#: ../../using/windows.rst:1025 msgid "" "If a ``pyvenv.cfg`` file is found alongside the main executable or in the " "directory one level above the executable, the following variations apply:" msgstr "" -#: ../../using/windows.rst:1000 +#: ../../using/windows.rst:1028 msgid "" "If ``home`` is an absolute path and :envvar:`PYTHONHOME` is not set, this " "path is used instead of the path to the main executable when deducing the " "home location." msgstr "" -#: ../../using/windows.rst:1004 +#: ../../using/windows.rst:1032 msgid "The end result of all this is:" msgstr "最終這所有的結果為:" -#: ../../using/windows.rst:1006 +#: ../../using/windows.rst:1034 msgid "" "When running :file:`python.exe`, or any other .exe in the main Python " "directory (either an installed version, or directly from the PCbuild " @@ -1605,7 +1657,7 @@ msgid "" "ignored. Other \"application paths\" in the registry are always read." msgstr "" -#: ../../using/windows.rst:1011 +#: ../../using/windows.rst:1039 msgid "" "When Python is hosted in another .exe (different directory, embedded via " "COM, etc), the \"Python Home\" will not be deduced, so the core path from " @@ -1613,20 +1665,20 @@ msgid "" "always read." msgstr "" -#: ../../using/windows.rst:1015 +#: ../../using/windows.rst:1043 msgid "" "If Python can't find its home and there are no registry value (frozen .exe, " "some very strange installation setup) you get a path with some default, but " "relative, paths." msgstr "" -#: ../../using/windows.rst:1019 +#: ../../using/windows.rst:1047 msgid "" "For those who want to bundle Python into their application or distribution, " "the following advice will prevent conflicts with other installations:" msgstr "" -#: ../../using/windows.rst:1022 +#: ../../using/windows.rst:1050 msgid "" "Include a ``._pth`` file alongside your executable containing the " "directories to include. This will ignore paths listed in the registry and " @@ -1634,20 +1686,20 @@ msgid "" "listed." msgstr "" -#: ../../using/windows.rst:1027 +#: ../../using/windows.rst:1055 msgid "" "If you are loading :file:`python3.dll` or :file:`python37.dll` in your own " "executable, explicitly call :c:func:`Py_SetPath` or (at least) :c:func:" "`Py_SetProgramName` before :c:func:`Py_Initialize`." msgstr "" -#: ../../using/windows.rst:1031 +#: ../../using/windows.rst:1059 msgid "" "Clear and/or overwrite :envvar:`PYTHONPATH` and set :envvar:`PYTHONHOME` " "before launching :file:`python.exe` from your application." msgstr "" -#: ../../using/windows.rst:1034 +#: ../../using/windows.rst:1062 msgid "" "If you cannot use the previous suggestions (for example, you are a " "distribution that allows people to run :file:`python.exe` directly), ensure " @@ -1656,7 +1708,7 @@ msgid "" "correctly named ZIP file will be detected instead.)" msgstr "" -#: ../../using/windows.rst:1040 +#: ../../using/windows.rst:1068 msgid "" "These will ensure that the files in a system-wide installation will not take " "precedence over the copy of the standard library bundled with your " @@ -1666,19 +1718,19 @@ msgid "" "packages." msgstr "" -#: ../../using/windows.rst:1049 +#: ../../using/windows.rst:1077 msgid "" "Adds ``._pth`` file support and removes ``applocal`` option from ``pyvenv." "cfg``." msgstr "" -#: ../../using/windows.rst:1051 +#: ../../using/windows.rst:1079 msgid "" "Adds ``pythonXX.zip`` as a potential landmark when directly adjacent to the " "executable." msgstr "" -#: ../../using/windows.rst:1057 +#: ../../using/windows.rst:1085 msgid "" "Modules specified in the registry under ``Modules`` (not ``PythonPath``) may " "be imported by :class:`importlib.machinery.WindowsRegistryFinder`. This " @@ -1686,88 +1738,88 @@ msgid "" "explicitly added to :attr:`sys.meta_path` in the future." msgstr "" -#: ../../using/windows.rst:1063 +#: ../../using/windows.rst:1091 msgid "Additional modules" msgstr "" -#: ../../using/windows.rst:1065 +#: ../../using/windows.rst:1093 msgid "" "Even though Python aims to be portable among all platforms, there are " "features that are unique to Windows. A couple of modules, both in the " "standard library and external, and snippets exist to use these features." msgstr "" -#: ../../using/windows.rst:1069 +#: ../../using/windows.rst:1097 msgid "" "The Windows-specific standard modules are documented in :ref:`mswin-specific-" "services`." msgstr "" -#: ../../using/windows.rst:1073 +#: ../../using/windows.rst:1101 msgid "PyWin32" msgstr "PyWin32" -#: ../../using/windows.rst:1075 +#: ../../using/windows.rst:1103 msgid "" "The `PyWin32 `_ module by Mark Hammond is " "a collection of modules for advanced Windows-specific support. This " "includes utilities for:" msgstr "" -#: ../../using/windows.rst:1079 +#: ../../using/windows.rst:1107 msgid "" "`Component Object Model `_ (COM)" msgstr "" -#: ../../using/windows.rst:1082 +#: ../../using/windows.rst:1110 msgid "Win32 API calls" msgstr "" -#: ../../using/windows.rst:1083 +#: ../../using/windows.rst:1111 msgid "Registry" msgstr "登錄檔(Registry)" -#: ../../using/windows.rst:1084 +#: ../../using/windows.rst:1112 msgid "Event log" msgstr "事件日誌(Event log)" -#: ../../using/windows.rst:1085 +#: ../../using/windows.rst:1113 msgid "" "`Microsoft Foundation Classes `_ (MFC) user interfaces" msgstr "" -#: ../../using/windows.rst:1089 +#: ../../using/windows.rst:1117 msgid "" "`PythonWin `_ is a sample MFC application shipped with PyWin32. " "It is an embeddable IDE with a built-in debugger." msgstr "" -#: ../../using/windows.rst:1096 +#: ../../using/windows.rst:1124 msgid "" "`Win32 How Do I...? `_" msgstr "" "`Win32 How Do I...? `_" -#: ../../using/windows.rst:1096 +#: ../../using/windows.rst:1124 msgid "by Tim Golden" msgstr "由 Tim Golden 所著" -#: ../../using/windows.rst:1098 +#: ../../using/windows.rst:1126 msgid "`Python and COM `_" msgstr "`Python and COM `_" -#: ../../using/windows.rst:1099 +#: ../../using/windows.rst:1127 msgid "by David and Paul Boddie" msgstr "由 David 與 Paul Boddie 所著" -#: ../../using/windows.rst:1103 +#: ../../using/windows.rst:1131 msgid "cx_Freeze" msgstr "cx_Freeze" -#: ../../using/windows.rst:1105 +#: ../../using/windows.rst:1133 msgid "" "`cx_Freeze `_ is a :mod:" "`distutils` extension (see :ref:`extending-distutils`) which wraps Python " @@ -1776,11 +1828,11 @@ msgid "" "users to install Python." msgstr "" -#: ../../using/windows.rst:1113 +#: ../../using/windows.rst:1141 msgid "Compiling Python on Windows" msgstr "編譯 Python 在 Windows" -#: ../../using/windows.rst:1115 +#: ../../using/windows.rst:1143 msgid "" "If you want to compile CPython yourself, first thing you should do is get " "the `source `_. You can download " @@ -1788,48 +1840,48 @@ msgid "" "devguide.python.org/setup/#get-the-source-code>`_." msgstr "" -#: ../../using/windows.rst:1120 +#: ../../using/windows.rst:1148 msgid "" "The source tree contains a build solution and project files for Microsoft " "Visual Studio, which is the compiler used to build the official Python " "releases. These files are in the :file:`PCbuild` directory." msgstr "" -#: ../../using/windows.rst:1124 +#: ../../using/windows.rst:1152 msgid "" "Check :file:`PCbuild/readme.txt` for general information on the build " "process." msgstr "" -#: ../../using/windows.rst:1126 +#: ../../using/windows.rst:1154 msgid "For extension modules, consult :ref:`building-on-windows`." msgstr "" -#: ../../using/windows.rst:1130 +#: ../../using/windows.rst:1158 msgid "Other Platforms" msgstr "其他平台" -#: ../../using/windows.rst:1132 +#: ../../using/windows.rst:1160 msgid "" "With ongoing development of Python, some platforms that used to be supported " "earlier are no longer supported (due to the lack of users or developers). " "Check :pep:`11` for details on all unsupported platforms." msgstr "" -#: ../../using/windows.rst:1136 +#: ../../using/windows.rst:1164 msgid "" "`Windows CE `_ is `no longer supported " "`__ since Python 3 (if it " "ever was)." msgstr "" -#: ../../using/windows.rst:1139 +#: ../../using/windows.rst:1167 msgid "" "The `Cygwin `_ installer offers to install the `Python " "interpreter `__ as well" msgstr "" -#: ../../using/windows.rst:1143 +#: ../../using/windows.rst:1171 msgid "" "See `Python for Windows `_ for " "detailed information about platforms with pre-compiled installers." diff --git a/whatsnew/3.10.po b/whatsnew/3.10.po index 3b38bc2dba..e57abe7012 100644 --- a/whatsnew/3.10.po +++ b/whatsnew/3.10.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-06-20 00:14+0000\n" +"POT-Creation-Date: 2022-07-22 00:19+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -243,7 +243,7 @@ msgid "Missing ``:`` before blocks:" msgstr "" #: ../../whatsnew/3.10.rst:233 -msgid "(Contributed by Pablo Galindo in :issue:`42997`)" +msgid "(Contributed by Pablo Galindo in :issue:`42997`.)" msgstr "" #: ../../whatsnew/3.10.rst:235 @@ -251,7 +251,7 @@ msgid "Unparenthesised tuples in comprehensions targets:" msgstr "" #: ../../whatsnew/3.10.rst:245 -msgid "(Contributed by Pablo Galindo in :issue:`43017`)" +msgid "(Contributed by Pablo Galindo in :issue:`43017`.)" msgstr "" #: ../../whatsnew/3.10.rst:247 @@ -259,7 +259,7 @@ msgid "Missing commas in collection literals and between expressions:" msgstr "" #: ../../whatsnew/3.10.rst:260 -msgid "(Contributed by Pablo Galindo in :issue:`43822`)" +msgid "(Contributed by Pablo Galindo in :issue:`43822`.)" msgstr "" #: ../../whatsnew/3.10.rst:262 @@ -267,7 +267,7 @@ msgid "Multiple Exception types without parentheses:" msgstr "" #: ../../whatsnew/3.10.rst:274 -msgid "(Contributed by Pablo Galindo in :issue:`43149`)" +msgid "(Contributed by Pablo Galindo in :issue:`43149`.)" msgstr "" #: ../../whatsnew/3.10.rst:276 @@ -275,7 +275,7 @@ msgid "Missing ``:`` and values in dictionary literals:" msgstr "" #: ../../whatsnew/3.10.rst:296 -msgid "(Contributed by Pablo Galindo in :issue:`43823`)" +msgid "(Contributed by Pablo Galindo in :issue:`43823`.)" msgstr "" #: ../../whatsnew/3.10.rst:298 @@ -283,7 +283,7 @@ msgid "``try`` blocks without ``except`` or ``finally`` blocks:" msgstr "" #: ../../whatsnew/3.10.rst:310 -msgid "(Contributed by Pablo Galindo in :issue:`44305`)" +msgid "(Contributed by Pablo Galindo in :issue:`44305`.)" msgstr "" #: ../../whatsnew/3.10.rst:312 @@ -291,7 +291,7 @@ msgid "Usage of ``=`` instead of ``==`` in comparisons:" msgstr "" #: ../../whatsnew/3.10.rst:322 -msgid "(Contributed by Pablo Galindo in :issue:`43797`)" +msgid "(Contributed by Pablo Galindo in :issue:`43797`.)" msgstr "" #: ../../whatsnew/3.10.rst:324 @@ -299,7 +299,7 @@ msgid "Usage of ``*`` in f-strings:" msgstr "" #: ../../whatsnew/3.10.rst:334 -msgid "(Contributed by Pablo Galindo in :issue:`41064`)" +msgid "(Contributed by Pablo Galindo in :issue:`41064`.)" msgstr "" #: ../../whatsnew/3.10.rst:337 @@ -1164,7 +1164,7 @@ msgstr "" #: ../../whatsnew/3.10.rst:1049 msgid "" "Here, ``z`` and ``t`` are keyword-only parameters, while ``x`` and ``y`` are " -"not. (Contributed by Eric V. Smith in :issue:`43532`)" +"not. (Contributed by Eric V. Smith in :issue:`43532`.)" msgstr "" #: ../../whatsnew/3.10.rst:1056 @@ -1469,13 +1469,13 @@ msgstr "pathlib" #: ../../whatsnew/3.10.rst:1257 msgid "" "Add slice support to :attr:`PurePath.parents `. " -"(Contributed by Joshua Cannon in :issue:`35498`)" +"(Contributed by Joshua Cannon in :issue:`35498`.)" msgstr "" #: ../../whatsnew/3.10.rst:1260 msgid "" "Add negative indexing support to :attr:`PurePath.parents `. (Contributed by Yaroslav Pankovych in :issue:`21041`)" +"parents>`. (Contributed by Yaroslav Pankovych in :issue:`21041`.)" msgstr "" #: ../../whatsnew/3.10.rst:1264 @@ -1503,7 +1503,7 @@ msgid "" "Add :func:`platform.freedesktop_os_release()` to retrieve operation system " "identification from `freedesktop.org os-release `_ standard file. (Contributed by " -"Christian Heimes in :issue:`28468`)" +"Christian Heimes in :issue:`28468`.)" msgstr "" #: ../../whatsnew/3.10.rst:1283 @@ -1784,7 +1784,7 @@ msgstr "" msgid "" "Add new function :func:`typing.is_typeddict` to introspect if an annotation " "is a :class:`typing.TypedDict`. (Contributed by Patrick Reader in :issue:" -"`41792`)" +"`41792`.)" msgstr "" #: ../../whatsnew/3.10.rst:1467 @@ -1794,7 +1794,7 @@ msgid "" "are decorated with :func:`runtime_checkable`. Previously, these checks " "passed silently. Users should decorate their subclasses with the :func:" "`runtime_checkable` decorator if they want runtime protocols. (Contributed " -"by Yurii Karabas in :issue:`38908`)" +"by Yurii Karabas in :issue:`38908`.)" msgstr "" #: ../../whatsnew/3.10.rst:1475 @@ -1803,7 +1803,7 @@ msgid "" "exc:`DeprecationWarning`. These submodules have been deprecated since " "Python 3.8 and will be removed in a future version of Python. Anything " "belonging to those submodules should be imported directly from :mod:`typing` " -"instead. (Contributed by Sebastian Rittau in :issue:`38291`)" +"instead. (Contributed by Sebastian Rittau in :issue:`38291`.)" msgstr "" #: ../../whatsnew/3.10.rst:1483 @@ -1930,7 +1930,7 @@ msgid "" "tuple of strings, and the function object lazily converts this into the " "annotations dict on demand. This optimization cuts the CPU time needed to " "define an annotated function by half. (Contributed by Yurii Karabas and " -"Inada Naoki in :issue:`42202`)" +"Inada Naoki in :issue:`42202`.)" msgstr "" #: ../../whatsnew/3.10.rst:1567 @@ -1946,7 +1946,7 @@ msgid "" "Add micro-optimizations to ``_PyType_Lookup()`` to improve type attribute " "cache lookup performance in the common case of cache hits. This makes the " "interpreter 1.04 times faster on average. (Contributed by Dino Viehland in :" -"issue:`43452`)" +"issue:`43452`.)" msgstr "" #: ../../whatsnew/3.10.rst:1576 @@ -1955,7 +1955,7 @@ msgid "" "vectorcall calling convention: :func:`map`, :func:`filter`, :func:" "`reversed`, :func:`bool` and :func:`float`. (Contributed by Dong-hee Na and " "Jeroen Demeyer in :issue:`43575`, :issue:`43287`, :issue:`41922`, :issue:" -"`41873` and :issue:`41870`)" +"`41873` and :issue:`41870`.)" msgstr "" #: ../../whatsnew/3.10.rst:1580 @@ -1964,7 +1964,7 @@ msgid "" "This makes :class:`BZ2File` thread unsafe in the face of multiple " "simultaneous readers or writers, just like its equivalent classes in :mod:" "`gzip` and :mod:`lzma` have always been. (Contributed by Inada Naoki in :" -"issue:`43785`)." +"issue:`43785`.)" msgstr "" #: ../../whatsnew/3.10.rst:1588 ../../whatsnew/3.10.rst:2209 @@ -1981,7 +1981,7 @@ msgid "" "by one of keywords :keyword:`and`, :keyword:`else`, :keyword:`for`, :keyword:" "`if`, :keyword:`in`, :keyword:`is` and :keyword:`or`. In future releases it " "will be changed to syntax warning, and finally to syntax error. (Contributed " -"by Serhiy Storchaka in :issue:`43833`)." +"by Serhiy Storchaka in :issue:`43833`.)" msgstr "" #: ../../whatsnew/3.10.rst:1601 @@ -2251,7 +2251,7 @@ msgid "" "exc:`DeprecationWarning`. These submodules will be removed in a future " "version of Python. Anything belonging to these submodules should be " "imported directly from :mod:`typing` instead. (Contributed by Sebastian " -"Rittau in :issue:`38291`)" +"Rittau in :issue:`38291`.)" msgstr "" #: ../../whatsnew/3.10.rst:1792 ../../whatsnew/3.10.rst:2217 @@ -2380,7 +2380,7 @@ msgid "" "x``). In future releases it will be changed to syntax warning, and finally " "to a syntax error. To get rid of the warning and make the code compatible " "with future releases just add a space between the numeric literal and the " -"following keyword. (Contributed by Serhiy Storchaka in :issue:`43833`)." +"following keyword. (Contributed by Serhiy Storchaka in :issue:`43833`.)" msgstr "" #: ../../whatsnew/3.10.rst:1875 @@ -2521,7 +2521,7 @@ msgstr "" msgid "" "The ``MAKE_FUNCTION`` instruction now accepts either a dict or a tuple of " "strings as the function's annotations. (Contributed by Yurii Karabas and " -"Inada Naoki in :issue:`42202`)" +"Inada Naoki in :issue:`42202`.)" msgstr "" #: ../../whatsnew/3.10.rst:1983 @@ -2838,7 +2838,7 @@ msgid "" "These files must not be included directly, as they are already included in " "``Python.h``: :ref:`Include Files `. If they have been " "included directly, consider including ``Python.h`` instead. (Contributed by " -"Nicholas Sim in :issue:`35134`)" +"Nicholas Sim in :issue:`35134`.)" msgstr "" #: ../../whatsnew/3.10.rst:2198 @@ -2854,7 +2854,7 @@ msgstr "" msgid "" "The undocumented function ``Py_FrozenMain`` has been removed from the " "limited API. The function is mainly useful for custom builds of Python. " -"(Contributed by Petr Viktorin in :issue:`26241`)" +"(Contributed by Petr Viktorin in :issue:`26241`.)" msgstr "" #: ../../whatsnew/3.10.rst:2211 pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy