From 1c4094bc033def27c132e2eb932dfc1d74b09217 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 2 Sep 2022 00:19:19 +0000 Subject: [PATCH 1/6] sync with cpython bbcb03e7 --- library/sqlite3.po | 354 ++++++++++++++++++++++----------------------- 1 file changed, 177 insertions(+), 177 deletions(-) diff --git a/library/sqlite3.po b/library/sqlite3.po index 060976f8f0..45699a7600 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-08-31 08:54+0000\n" +"POT-Creation-Date: 2022-09-02 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-" @@ -572,14 +572,14 @@ msgid "" "SQLite row." msgstr "" -#: ../../library/sqlite3.rst:547 ../../library/sqlite3.rst:586 -#: ../../library/sqlite3.rst:695 ../../library/sqlite3.rst:733 -#: ../../library/sqlite3.rst:952 ../../library/sqlite3.rst:1098 -#: ../../library/sqlite3.rst:1119 ../../library/sqlite3.rst:1255 +#: ../../library/sqlite3.rst:547 ../../library/sqlite3.rst:577 +#: ../../library/sqlite3.rst:686 ../../library/sqlite3.rst:724 +#: ../../library/sqlite3.rst:943 ../../library/sqlite3.rst:1089 +#: ../../library/sqlite3.rst:1110 ../../library/sqlite3.rst:1246 msgid "Example:" msgstr "範例:" -#: ../../library/sqlite3.rst:569 +#: ../../library/sqlite3.rst:560 msgid "" "If returning a tuple doesn't suffice and you want name-based access to " "columns, you should consider setting :attr:`row_factory` to the highly " @@ -589,7 +589,7 @@ msgid "" "approach or even a db_row based solution." msgstr "" -#: ../../library/sqlite3.rst:580 +#: ../../library/sqlite3.rst:571 msgid "" "A callable that accepts a :class:`bytes` parameter and returns a text " "representation of it. The callable is invoked for SQLite values with the " @@ -597,78 +597,78 @@ msgid "" "you want to return ``bytes`` instead, set *text_factory* to ``bytes``." msgstr "" -#: ../../library/sqlite3.rst:620 +#: ../../library/sqlite3.rst:611 msgid "" "Return the total number of database rows that have been modified, inserted, " "or deleted since the database connection was opened." msgstr "" -#: ../../library/sqlite3.rst:626 +#: ../../library/sqlite3.rst:617 msgid "" "Create and return a :class:`Cursor` object. The cursor method accepts a " "single optional parameter *factory*. If supplied, this must be a callable " "returning an instance of :class:`Cursor` or its subclasses." msgstr "" -#: ../../library/sqlite3.rst:633 +#: ../../library/sqlite3.rst:624 msgid "" "Commit any pending transaction to the database. If there is no open " "transaction, this method is a no-op." msgstr "" -#: ../../library/sqlite3.rst:638 +#: ../../library/sqlite3.rst:629 msgid "" "Roll back to the start of any pending transaction. If there is no open " "transaction, this method is a no-op." msgstr "" -#: ../../library/sqlite3.rst:643 +#: ../../library/sqlite3.rst:634 msgid "" "Close the database connection. Any pending transaction is not committed " "implicitly; make sure to :meth:`commit` before closing to avoid losing " "pending changes." msgstr "" -#: ../../library/sqlite3.rst:650 +#: ../../library/sqlite3.rst:641 msgid "" "Create a new :class:`Cursor` object and call :meth:`~Cursor.execute` on it " "with the given *sql* and *parameters*. Return the new cursor object." msgstr "" -#: ../../library/sqlite3.rst:656 +#: ../../library/sqlite3.rst:647 msgid "" "Create a new :class:`Cursor` object and call :meth:`~Cursor.executemany` on " "it with the given *sql* and *parameters*. Return the new cursor object." msgstr "" -#: ../../library/sqlite3.rst:662 +#: ../../library/sqlite3.rst:653 msgid "" "Create a new :class:`Cursor` object and call :meth:`~Cursor.executescript` " "on it with the given *sql_script*. Return the new cursor object." msgstr "" -#: ../../library/sqlite3.rst:668 +#: ../../library/sqlite3.rst:659 msgid "Create or remove a user-defined SQL function." msgstr "" -#: ../../library/sqlite3.rst:670 +#: ../../library/sqlite3.rst:661 msgid "The name of the SQL function." msgstr "" -#: ../../library/sqlite3.rst:673 +#: ../../library/sqlite3.rst:664 msgid "" "The number of arguments the SQL function can accept. If ``-1``, it may take " "any number of arguments." msgstr "" -#: ../../library/sqlite3.rst:677 +#: ../../library/sqlite3.rst:668 msgid "" "A callable that is called when the SQL function is invoked. The callable " "must return :ref:`a type natively supported by SQLite `. Set " "to ``None`` to remove an existing SQL function." msgstr "" -#: ../../library/sqlite3.rst:684 +#: ../../library/sqlite3.rst:675 msgid "" "If ``True``, the created SQL function is marked as `deterministic `_, which allows SQLite to perform additional " @@ -679,29 +679,29 @@ msgstr "" msgid "Raises" msgstr "" -#: ../../library/sqlite3.rst:689 +#: ../../library/sqlite3.rst:680 msgid "If *deterministic* is used with SQLite versions older than 3.8.3." msgstr "" -#: ../../library/sqlite3.rst:692 +#: ../../library/sqlite3.rst:683 msgid "The *deterministic* parameter." msgstr "新增 *deterministic* 參數。" -#: ../../library/sqlite3.rst:711 +#: ../../library/sqlite3.rst:702 msgid "Create or remove a user-defined SQL aggregate function." msgstr "" -#: ../../library/sqlite3.rst:713 +#: ../../library/sqlite3.rst:704 msgid "The name of the SQL aggregate function." msgstr "" -#: ../../library/sqlite3.rst:716 +#: ../../library/sqlite3.rst:707 msgid "" "The number of arguments the SQL aggregate function can accept. If ``-1``, it " "may take any number of arguments." msgstr "" -#: ../../library/sqlite3.rst:720 +#: ../../library/sqlite3.rst:711 msgid "" "A class must implement the following methods: * ``step()``: Add a row to " "the aggregate. * ``finalize()``: Return the final result of the aggregate " @@ -710,64 +710,64 @@ msgid "" "*n_arg*. Set to ``None`` to remove an existing SQL aggregate function." msgstr "" -#: ../../library/sqlite3.rst:721 +#: ../../library/sqlite3.rst:712 msgid "A class must implement the following methods:" msgstr "" -#: ../../library/sqlite3.rst:723 +#: ../../library/sqlite3.rst:714 msgid "``step()``: Add a row to the aggregate." msgstr "" -#: ../../library/sqlite3.rst:724 +#: ../../library/sqlite3.rst:715 msgid "" "``finalize()``: Return the final result of the aggregate as :ref:`a type " "natively supported by SQLite `." msgstr "" -#: ../../library/sqlite3.rst:727 +#: ../../library/sqlite3.rst:718 msgid "" "The number of arguments that the ``step()`` method must accept is controlled " "by *n_arg*." msgstr "" -#: ../../library/sqlite3.rst:730 +#: ../../library/sqlite3.rst:721 msgid "Set to ``None`` to remove an existing SQL aggregate function." msgstr "" -#: ../../library/sqlite3.rst:765 +#: ../../library/sqlite3.rst:756 msgid "" "Create a collation named *name* using the collating function *callable*. " "*callable* is passed two :class:`string ` arguments, and it should " "return an :class:`integer `:" msgstr "" -#: ../../library/sqlite3.rst:769 +#: ../../library/sqlite3.rst:760 msgid "``1`` if the first is ordered higher than the second" msgstr "" -#: ../../library/sqlite3.rst:770 +#: ../../library/sqlite3.rst:761 msgid "``-1`` if the first is ordered lower than the second" msgstr "" -#: ../../library/sqlite3.rst:771 +#: ../../library/sqlite3.rst:762 msgid "``0`` if they are ordered equal" msgstr "" -#: ../../library/sqlite3.rst:773 +#: ../../library/sqlite3.rst:764 msgid "The following example shows a reverse sorting collation:" msgstr "" -#: ../../library/sqlite3.rst:801 +#: ../../library/sqlite3.rst:792 msgid "Remove a collation function by setting *callable* to ``None``." msgstr "" -#: ../../library/sqlite3.rst:806 +#: ../../library/sqlite3.rst:797 msgid "" "Call this method from a different thread to abort any queries that might be " "executing on the connection. Aborted queries will raise an exception." msgstr "" -#: ../../library/sqlite3.rst:813 +#: ../../library/sqlite3.rst:804 msgid "" "Register callable *authorizer_callback* to be invoked for each attempt to " "access a column of a table in the database. The callback should return one " @@ -776,7 +776,7 @@ msgid "" "library." msgstr "" -#: ../../library/sqlite3.rst:819 +#: ../../library/sqlite3.rst:810 msgid "" "The first argument to the callback signifies what kind of operation is to be " "authorized. The second and third argument will be arguments or ``None`` " @@ -786,7 +786,7 @@ msgid "" "attempt or ``None`` if this access attempt is directly from input SQL code." msgstr "" -#: ../../library/sqlite3.rst:826 +#: ../../library/sqlite3.rst:817 msgid "" "Please consult the SQLite documentation about the possible values for the " "first argument and the meaning of the second and third argument depending on " @@ -794,7 +794,7 @@ msgid "" "module." msgstr "" -#: ../../library/sqlite3.rst:833 +#: ../../library/sqlite3.rst:824 msgid "" "Register callable *progress_handler* to be invoked for every *n* " "instructions of the SQLite virtual machine. This is useful if you want to " @@ -802,26 +802,26 @@ msgid "" "a GUI." msgstr "" -#: ../../library/sqlite3.rst:838 +#: ../../library/sqlite3.rst:829 msgid "" "If you want to clear any previously installed progress handler, call the " "method with ``None`` for *progress_handler*." msgstr "" -#: ../../library/sqlite3.rst:841 +#: ../../library/sqlite3.rst:832 msgid "" "Returning a non-zero value from the handler function will terminate the " "currently executing query and cause it to raise an :exc:`OperationalError` " "exception." msgstr "" -#: ../../library/sqlite3.rst:848 +#: ../../library/sqlite3.rst:839 msgid "" "Register callable *trace_callback* to be invoked for each SQL statement that " "is actually executed by the SQLite backend." msgstr "" -#: ../../library/sqlite3.rst:851 +#: ../../library/sqlite3.rst:842 msgid "" "The only argument passed to the callback is the statement (as :class:`str`) " "that is being executed. The return value of the callback is ignored. Note " @@ -831,18 +831,18 @@ msgid "" "execution of triggers defined in the current database." msgstr "" -#: ../../library/sqlite3.rst:859 +#: ../../library/sqlite3.rst:850 msgid "Passing ``None`` as *trace_callback* will disable the trace callback." msgstr "" -#: ../../library/sqlite3.rst:862 +#: ../../library/sqlite3.rst:853 msgid "" "Exceptions raised in the trace callback are not propagated. As a development " "and debugging aid, use :meth:`~sqlite3.enable_callback_tracebacks` to enable " "printing tracebacks from exceptions raised in the trace callback." msgstr "" -#: ../../library/sqlite3.rst:872 +#: ../../library/sqlite3.rst:863 msgid "" "Enable the SQLite engine to load SQLite extensions from shared libraries if " "*enabled* is ``True``; else, disallow loading SQLite extensions. SQLite " @@ -851,7 +851,7 @@ msgid "" "distributed with SQLite." msgstr "" -#: ../../library/sqlite3.rst:881 +#: ../../library/sqlite3.rst:872 msgid "" "The :mod:`!sqlite3` module is not built with loadable extension support by " "default, because some platforms (notably macOS) have SQLite libraries which " @@ -860,61 +860,61 @@ msgid "" "program:`configure`." msgstr "" -#: ../../library/sqlite3.rst:888 +#: ../../library/sqlite3.rst:879 msgid "" "Raises an :ref:`auditing event ` ``sqlite3.enable_load_extension`` " "with arguments ``connection``, ``enabled``." msgstr "" -#: ../../library/sqlite3.rst:892 +#: ../../library/sqlite3.rst:883 msgid "Added the ``sqlite3.enable_load_extension`` auditing event." msgstr "" -#: ../../library/sqlite3.rst:935 +#: ../../library/sqlite3.rst:926 msgid "" "Load an SQLite extension from a shared library located at *path*. Enable " "extension loading with :meth:`enable_load_extension` before calling this " "method." msgstr "" -#: ../../library/sqlite3.rst:939 +#: ../../library/sqlite3.rst:930 msgid "" "Raises an :ref:`auditing event ` ``sqlite3.load_extension`` with " "arguments ``connection``, ``path``." msgstr "" -#: ../../library/sqlite3.rst:943 +#: ../../library/sqlite3.rst:934 msgid "Added the ``sqlite3.load_extension`` auditing event." msgstr "" -#: ../../library/sqlite3.rst:948 +#: ../../library/sqlite3.rst:939 msgid "" "Return an :term:`iterator` to dump the database as SQL source code. Useful " "when saving an in-memory database for later restoration. Similar to the ``." "dump`` command in the :program:`sqlite3` shell." msgstr "" -#: ../../library/sqlite3.rst:966 +#: ../../library/sqlite3.rst:957 msgid "Create a backup of an SQLite database." msgstr "" -#: ../../library/sqlite3.rst:968 +#: ../../library/sqlite3.rst:959 msgid "" "Works even if the database is being accessed by other clients or " "concurrently by the same connection." msgstr "" -#: ../../library/sqlite3.rst:971 +#: ../../library/sqlite3.rst:962 msgid "The database connection to save the backup to." msgstr "" -#: ../../library/sqlite3.rst:974 +#: ../../library/sqlite3.rst:965 msgid "" "The number of pages to copy at a time. If equal to or less than ``0``, the " "entire database is copied in a single step. Defaults to ``-1``." msgstr "" -#: ../../library/sqlite3.rst:980 +#: ../../library/sqlite3.rst:971 msgid "" "If set to a callable, it is invoked with three integer arguments for every " "backup iteration: the *status* of the last iteration, the *remaining* number " @@ -922,32 +922,32 @@ msgid "" "``None``." msgstr "" -#: ../../library/sqlite3.rst:989 +#: ../../library/sqlite3.rst:980 msgid "" "The name of the database to back up. Either ``\"main\"`` (the default) for " "the main database, ``\"temp\"`` for the temporary database, or the name of a " "custom database as attached using the ``ATTACH DATABASE`` SQL statement." msgstr "" -#: ../../library/sqlite3.rst:996 +#: ../../library/sqlite3.rst:987 msgid "" "The number of seconds to sleep between successive attempts to back up " "remaining pages." msgstr "" -#: ../../library/sqlite3.rst:1000 +#: ../../library/sqlite3.rst:991 msgid "Example 1, copy an existing database into another:" msgstr "" -#: ../../library/sqlite3.rst:1019 +#: ../../library/sqlite3.rst:1010 msgid "Example 2, copy an existing database into a transient copy:" msgstr "" -#: ../../library/sqlite3.rst:1033 +#: ../../library/sqlite3.rst:1024 msgid "Cursor objects" msgstr "" -#: ../../library/sqlite3.rst:1035 +#: ../../library/sqlite3.rst:1026 msgid "" "A ``Cursor`` object represents a `database cursor`_ which is used to execute " "SQL statements, and manage the context of a fetch operation. Cursors are " @@ -955,25 +955,25 @@ msgid "" "`connection shortcut methods `." msgstr "" -#: ../../library/sqlite3.rst:1042 +#: ../../library/sqlite3.rst:1033 msgid "" "Cursor objects are :term:`iterators `, meaning that if you :meth:" "`~Cursor.execute` a ``SELECT`` query, you can simply iterate over the cursor " "to fetch the resulting rows:" msgstr "" -#: ../../library/sqlite3.rst:1067 +#: ../../library/sqlite3.rst:1058 msgid "A :class:`Cursor` instance has the following attributes and methods." msgstr "" -#: ../../library/sqlite3.rst:1074 +#: ../../library/sqlite3.rst:1065 msgid "" "Execute SQL statement *sql*. Bind values to the statement using :ref:" "`placeholders ` that map to the :term:`sequence` or :" "class:`dict` *parameters*." msgstr "" -#: ../../library/sqlite3.rst:1079 +#: ../../library/sqlite3.rst:1070 msgid "" ":meth:`execute` will only execute a single SQL statement. If you try to " "execute more than one statement with it, it will raise a :exc:`Warning`. " @@ -981,7 +981,7 @@ msgid "" "with one call." msgstr "" -#: ../../library/sqlite3.rst:1084 +#: ../../library/sqlite3.rst:1075 msgid "" "If :attr:`~Connection.isolation_level` is not ``None``, *sql* is an " "``INSERT``, ``UPDATE``, ``DELETE``, or ``REPLACE`` statement, and there is " @@ -989,7 +989,7 @@ msgid "" "*sql*." msgstr "" -#: ../../library/sqlite3.rst:1092 +#: ../../library/sqlite3.rst:1083 msgid "" "Execute :ref:`parameterized ` SQL statement *sql* " "against all parameter sequences or mappings found in the sequence " @@ -998,7 +998,7 @@ msgid "" "handling as :meth:`~Cursor.execute`." msgstr "" -#: ../../library/sqlite3.rst:1111 +#: ../../library/sqlite3.rst:1102 msgid "" "Execute the SQL statements in *sql_script*. If there is a pending " "transaction, an implicit ``COMMIT`` statement is executed first. No other " @@ -1006,23 +1006,23 @@ msgid "" "added to *sql_script*." msgstr "" -#: ../../library/sqlite3.rst:1117 +#: ../../library/sqlite3.rst:1108 msgid "*sql_script* must be a :class:`string `." msgstr "" -#: ../../library/sqlite3.rst:1135 +#: ../../library/sqlite3.rst:1126 msgid "" "Return the next row of a query result set as a :class:`tuple`. Return " "``None`` if no more data is available." msgstr "" -#: ../../library/sqlite3.rst:1141 +#: ../../library/sqlite3.rst:1132 msgid "" "Return the next set of rows of a query result as a :class:`list`. Return an " "empty list if no more rows are available." msgstr "" -#: ../../library/sqlite3.rst:1144 +#: ../../library/sqlite3.rst:1135 msgid "" "The number of rows to fetch per call is specified by the *size* parameter. " "If *size* is not given, :attr:`arraysize` determines the number of rows to " @@ -1030,7 +1030,7 @@ msgid "" "available are returned." msgstr "" -#: ../../library/sqlite3.rst:1150 +#: ../../library/sqlite3.rst:1141 msgid "" "Note there are performance considerations involved with the *size* " "parameter. For optimal performance, it is usually best to use the arraysize " @@ -1038,29 +1038,29 @@ msgid "" "the same value from one :meth:`fetchmany` call to the next." msgstr "" -#: ../../library/sqlite3.rst:1157 +#: ../../library/sqlite3.rst:1148 msgid "" "Return all (remaining) rows of a query result as a :class:`list`. Return an " "empty list if no rows are available. Note that the :attr:`arraysize` " "attribute can affect the performance of this operation." msgstr "" -#: ../../library/sqlite3.rst:1164 +#: ../../library/sqlite3.rst:1155 msgid "Close the cursor now (rather than whenever ``__del__`` is called)." msgstr "" -#: ../../library/sqlite3.rst:1166 +#: ../../library/sqlite3.rst:1157 msgid "" "The cursor will be unusable from this point forward; a :exc:" "`ProgrammingError` exception will be raised if any operation is attempted " "with the cursor." msgstr "" -#: ../../library/sqlite3.rst:1171 ../../library/sqlite3.rst:1175 +#: ../../library/sqlite3.rst:1162 ../../library/sqlite3.rst:1166 msgid "Required by the DB-API. Does nothing in :mod:`!sqlite3`." msgstr "" -#: ../../library/sqlite3.rst:1179 +#: ../../library/sqlite3.rst:1170 msgid "" "Read-only attribute that provides the number of modified rows for " "``INSERT``, ``UPDATE``, ``DELETE``, and ``REPLACE`` statements; is ``-1`` " @@ -1069,7 +1069,7 @@ msgid "" "methods." msgstr "" -#: ../../library/sqlite3.rst:1187 +#: ../../library/sqlite3.rst:1178 msgid "" "Read-only attribute that provides the row id of the last inserted row. It is " "only updated after successful ``INSERT`` or ``REPLACE`` statements using " @@ -1079,33 +1079,33 @@ msgid "" "``None``." msgstr "" -#: ../../library/sqlite3.rst:1195 +#: ../../library/sqlite3.rst:1186 msgid "Inserts into ``WITHOUT ROWID`` tables are not recorded." msgstr "" -#: ../../library/sqlite3.rst:1197 +#: ../../library/sqlite3.rst:1188 msgid "Added support for the ``REPLACE`` statement." msgstr "新增 ``REPLACE`` 陳述式的支援。" -#: ../../library/sqlite3.rst:1202 +#: ../../library/sqlite3.rst:1193 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:1207 +#: ../../library/sqlite3.rst:1198 msgid "" "Read-only attribute that 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 ``None``." msgstr "" -#: ../../library/sqlite3.rst:1211 +#: ../../library/sqlite3.rst:1202 msgid "It is set for ``SELECT`` statements without any matching rows as well." msgstr "" -#: ../../library/sqlite3.rst:1215 +#: ../../library/sqlite3.rst:1206 msgid "" "Read-only attribute that provides the SQLite database :class:`Connection` " "belonging to the cursor. A :class:`Cursor` object created by calling :meth:" @@ -1113,11 +1113,11 @@ msgid "" "that refers to *con*:" msgstr "" -#: ../../library/sqlite3.rst:1235 +#: ../../library/sqlite3.rst:1226 msgid "Row objects" msgstr "" -#: ../../library/sqlite3.rst:1239 +#: ../../library/sqlite3.rst:1230 msgid "" "A :class:`!Row` instance serves as a highly optimized :attr:`~Connection." "row_factory` for :class:`Connection` objects. It supports iteration, " @@ -1125,41 +1125,41 @@ msgid "" "index." msgstr "" -#: ../../library/sqlite3.rst:1244 +#: ../../library/sqlite3.rst:1235 msgid "Two row objects compare equal if have equal columns and equal members." msgstr "" -#: ../../library/sqlite3.rst:1248 +#: ../../library/sqlite3.rst:1239 msgid "" "Return a :class:`list` of column names as :class:`strings `. " "Immediately after a query, it is the first member of each tuple in :attr:" "`Cursor.description`." msgstr "" -#: ../../library/sqlite3.rst:1252 +#: ../../library/sqlite3.rst:1243 msgid "Added support of slicing." msgstr "" -#: ../../library/sqlite3.rst:1272 +#: ../../library/sqlite3.rst:1263 msgid "PrepareProtocol objects" msgstr "" -#: ../../library/sqlite3.rst:1276 +#: ../../library/sqlite3.rst:1267 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:1284 +#: ../../library/sqlite3.rst:1275 msgid "Exceptions" msgstr "例外" -#: ../../library/sqlite3.rst:1286 +#: ../../library/sqlite3.rst:1277 msgid "The exception hierarchy is defined by the DB-API 2.0 (:pep:`249`)." msgstr "" -#: ../../library/sqlite3.rst:1290 +#: ../../library/sqlite3.rst:1281 msgid "" "This exception is raised by :mod:`!sqlite3` if an SQL query is not a :class:" "`string `, or if multiple statements are passed to :meth:`~Cursor." @@ -1167,21 +1167,21 @@ msgid "" "`Exception`." msgstr "" -#: ../../library/sqlite3.rst:1297 +#: ../../library/sqlite3.rst:1288 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:1303 +#: ../../library/sqlite3.rst:1294 msgid "" "This exception is raised by :mod:`!sqlite3` for fetch across rollback, or " "if :mod:`!sqlite3` is unable to bind parameters. ``InterfaceError`` is a " "subclass of :exc:`Error`." msgstr "" -#: ../../library/sqlite3.rst:1309 +#: ../../library/sqlite3.rst:1300 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 " @@ -1189,14 +1189,14 @@ msgid "" "subclass of :exc:`Error`." msgstr "" -#: ../../library/sqlite3.rst:1316 +#: ../../library/sqlite3.rst:1307 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:1322 +#: ../../library/sqlite3.rst:1313 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 " @@ -1204,20 +1204,20 @@ msgid "" "``OperationalError`` is a subclass of :exc:`DatabaseError`." msgstr "" -#: ../../library/sqlite3.rst:1330 +#: ../../library/sqlite3.rst:1321 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:1335 +#: ../../library/sqlite3.rst:1326 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:1342 +#: ../../library/sqlite3.rst:1333 msgid "" "Exception raised for :mod:`!sqlite3` API programming errors, for example " "trying to operate on a closed :class:`Connection`, or trying to execute non-" @@ -1225,7 +1225,7 @@ msgid "" "subclass of :exc:`DatabaseError`." msgstr "" -#: ../../library/sqlite3.rst:1349 +#: ../../library/sqlite3.rst:1340 msgid "" "Exception raised in case a method or database API is not supported by the " "underlying SQLite library. For example, setting *deterministic* to ``True`` " @@ -1234,78 +1234,78 @@ msgid "" "subclass of :exc:`DatabaseError`." msgstr "" -#: ../../library/sqlite3.rst:1359 +#: ../../library/sqlite3.rst:1350 msgid "SQLite and Python types" msgstr "" -#: ../../library/sqlite3.rst:1361 +#: ../../library/sqlite3.rst:1352 msgid "" "SQLite natively supports the following types: ``NULL``, ``INTEGER``, " "``REAL``, ``TEXT``, ``BLOB``." msgstr "" -#: ../../library/sqlite3.rst:1364 +#: ../../library/sqlite3.rst:1355 msgid "" "The following Python types can thus be sent to SQLite without any problem:" msgstr "" -#: ../../library/sqlite3.rst:1367 ../../library/sqlite3.rst:1384 +#: ../../library/sqlite3.rst:1358 ../../library/sqlite3.rst:1375 msgid "Python type" msgstr "" -#: ../../library/sqlite3.rst:1367 ../../library/sqlite3.rst:1384 +#: ../../library/sqlite3.rst:1358 ../../library/sqlite3.rst:1375 msgid "SQLite type" msgstr "" -#: ../../library/sqlite3.rst:1369 ../../library/sqlite3.rst:1386 +#: ../../library/sqlite3.rst:1360 ../../library/sqlite3.rst:1377 msgid "``None``" msgstr "" -#: ../../library/sqlite3.rst:1369 ../../library/sqlite3.rst:1386 +#: ../../library/sqlite3.rst:1360 ../../library/sqlite3.rst:1377 msgid "``NULL``" msgstr "``NULL``" -#: ../../library/sqlite3.rst:1371 ../../library/sqlite3.rst:1388 +#: ../../library/sqlite3.rst:1362 ../../library/sqlite3.rst:1379 msgid ":class:`int`" msgstr ":class:`int`" -#: ../../library/sqlite3.rst:1371 ../../library/sqlite3.rst:1388 +#: ../../library/sqlite3.rst:1362 ../../library/sqlite3.rst:1379 msgid "``INTEGER``" msgstr "``INTEGER``" -#: ../../library/sqlite3.rst:1373 ../../library/sqlite3.rst:1390 +#: ../../library/sqlite3.rst:1364 ../../library/sqlite3.rst:1381 msgid ":class:`float`" msgstr ":class:`float`" -#: ../../library/sqlite3.rst:1373 ../../library/sqlite3.rst:1390 +#: ../../library/sqlite3.rst:1364 ../../library/sqlite3.rst:1381 msgid "``REAL``" msgstr "``REAL``" -#: ../../library/sqlite3.rst:1375 +#: ../../library/sqlite3.rst:1366 msgid ":class:`str`" msgstr ":class:`str`" -#: ../../library/sqlite3.rst:1375 ../../library/sqlite3.rst:1392 +#: ../../library/sqlite3.rst:1366 ../../library/sqlite3.rst:1383 msgid "``TEXT``" msgstr "``TEXT``" -#: ../../library/sqlite3.rst:1377 ../../library/sqlite3.rst:1395 +#: ../../library/sqlite3.rst:1368 ../../library/sqlite3.rst:1386 msgid ":class:`bytes`" msgstr ":class:`bytes`" -#: ../../library/sqlite3.rst:1377 ../../library/sqlite3.rst:1395 +#: ../../library/sqlite3.rst:1368 ../../library/sqlite3.rst:1386 msgid "``BLOB``" msgstr "``BLOB``" -#: ../../library/sqlite3.rst:1381 +#: ../../library/sqlite3.rst:1372 msgid "This is how SQLite types are converted to Python types by default:" msgstr "" -#: ../../library/sqlite3.rst:1392 +#: ../../library/sqlite3.rst:1383 msgid "depends on :attr:`~Connection.text_factory`, :class:`str` by default" msgstr "" -#: ../../library/sqlite3.rst:1398 +#: ../../library/sqlite3.rst:1389 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 :ref:`object " @@ -1314,42 +1314,42 @@ msgid "" "converters>`." msgstr "" -#: ../../library/sqlite3.rst:1408 +#: ../../library/sqlite3.rst:1399 msgid "Default adapters and converters" msgstr "" -#: ../../library/sqlite3.rst:1410 +#: ../../library/sqlite3.rst:1401 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:1413 +#: ../../library/sqlite3.rst:1404 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:1417 +#: ../../library/sqlite3.rst:1408 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:1421 +#: ../../library/sqlite3.rst:1412 msgid "The following example demonstrates this." msgstr "" -#: ../../library/sqlite3.rst:1425 +#: ../../library/sqlite3.rst:1416 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:1431 +#: ../../library/sqlite3.rst:1422 msgid "" "The default \"timestamp\" converter ignores UTC offsets in the database and " "always returns a naive :class:`datetime.datetime` object. To preserve UTC " @@ -1357,15 +1357,15 @@ msgid "" "offset-aware converter with :func:`register_converter`." msgstr "" -#: ../../library/sqlite3.rst:1440 +#: ../../library/sqlite3.rst:1431 msgid "How-to guides" msgstr "" -#: ../../library/sqlite3.rst:1445 +#: ../../library/sqlite3.rst:1436 msgid "How to use placeholders to bind values in SQL queries" msgstr "" -#: ../../library/sqlite3.rst:1447 +#: ../../library/sqlite3.rst:1438 msgid "" "SQL operations usually need to use values from Python variables. However, " "beware of using Python's string operations to assemble queries, as they are " @@ -1373,7 +1373,7 @@ msgid "" "com/327/>`_ for a humorous example of what can go wrong)::" msgstr "" -#: ../../library/sqlite3.rst:1456 +#: ../../library/sqlite3.rst:1447 msgid "" "Instead, use the DB-API's parameter substitution. To insert a variable into " "a query string, use a placeholder in the string, and substitute the actual " @@ -1389,18 +1389,18 @@ msgid "" "ignored. Here's an example of both styles:" msgstr "" -#: ../../library/sqlite3.rst:1498 +#: ../../library/sqlite3.rst:1489 msgid "How to adapt custom Python types to SQLite values" msgstr "" -#: ../../library/sqlite3.rst:1500 +#: ../../library/sqlite3.rst:1491 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:1504 +#: ../../library/sqlite3.rst:1495 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 " @@ -1410,11 +1410,11 @@ msgid "" "custom adapter functions." msgstr "" -#: ../../library/sqlite3.rst:1516 +#: ../../library/sqlite3.rst:1507 msgid "How to write adaptable objects" msgstr "" -#: ../../library/sqlite3.rst:1518 +#: ../../library/sqlite3.rst:1509 msgid "" "Suppose we have a :class:`!Point` class that represents a pair of " "coordinates, ``x`` and ``y``, in a Cartesian coordinate system. The " @@ -1424,84 +1424,84 @@ msgid "" "object passed to *protocol* will be of type :class:`PrepareProtocol`." msgstr "" -#: ../../library/sqlite3.rst:1549 +#: ../../library/sqlite3.rst:1540 msgid "How to register adapter callables" msgstr "" -#: ../../library/sqlite3.rst:1551 +#: ../../library/sqlite3.rst:1542 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:1581 +#: ../../library/sqlite3.rst:1572 msgid "How to convert SQLite values to custom Python types" msgstr "" -#: ../../library/sqlite3.rst:1583 +#: ../../library/sqlite3.rst:1574 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:1588 +#: ../../library/sqlite3.rst:1579 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:1591 +#: ../../library/sqlite3.rst:1582 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:1596 +#: ../../library/sqlite3.rst:1587 msgid "" "Converter functions are **always** passed a :class:`bytes` object, no matter " "the underlying SQLite data type." msgstr "" -#: ../../library/sqlite3.rst:1605 +#: ../../library/sqlite3.rst:1596 msgid "" "We now need to tell :mod:`!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:1609 +#: ../../library/sqlite3.rst:1600 msgid "Implicit: set *detect_types* to :const:`PARSE_DECLTYPES`" msgstr "" -#: ../../library/sqlite3.rst:1610 +#: ../../library/sqlite3.rst:1601 msgid "Explicit: set *detect_types* to :const:`PARSE_COLNAMES`" msgstr "" -#: ../../library/sqlite3.rst:1611 +#: ../../library/sqlite3.rst:1602 msgid "" "Both: set *detect_types* to ``sqlite3.PARSE_DECLTYPES | sqlite3." "PARSE_COLNAMES``. Column names take precedence over declared types." msgstr "" -#: ../../library/sqlite3.rst:1615 +#: ../../library/sqlite3.rst:1606 msgid "The following example illustrates the implicit and explicit approaches:" msgstr "" -#: ../../library/sqlite3.rst:1666 +#: ../../library/sqlite3.rst:1657 msgid "Adapter and converter recipes" msgstr "" -#: ../../library/sqlite3.rst:1668 +#: ../../library/sqlite3.rst:1659 msgid "This section shows recipes for common adapters and converters." msgstr "" -#: ../../library/sqlite3.rst:1711 +#: ../../library/sqlite3.rst:1702 msgid "How to use connection shortcut methods" msgstr "" -#: ../../library/sqlite3.rst:1713 +#: ../../library/sqlite3.rst:1704 msgid "" "Using the :meth:`~Connection.execute`, :meth:`~Connection.executemany`, and :" "meth:`~Connection.executescript` methods of the :class:`Connection` class, " @@ -1513,11 +1513,11 @@ msgid "" "object." msgstr "" -#: ../../library/sqlite3.rst:1754 +#: ../../library/sqlite3.rst:1745 msgid "How to use the connection context manager" msgstr "" -#: ../../library/sqlite3.rst:1756 +#: ../../library/sqlite3.rst:1747 msgid "" "A :class:`Connection` object can be used as a context manager that " "automatically commits or rolls back open transactions when leaving the body " @@ -1527,61 +1527,61 @@ msgid "" "exception, the transaction is rolled back." msgstr "" -#: ../../library/sqlite3.rst:1765 +#: ../../library/sqlite3.rst:1756 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:1770 +#: ../../library/sqlite3.rst:1761 msgid "" "The context manager neither implicitly opens a new transaction nor closes " "the connection." msgstr "" -#: ../../library/sqlite3.rst:1803 +#: ../../library/sqlite3.rst:1794 msgid "How to work with SQLite URIs" msgstr "" -#: ../../library/sqlite3.rst:1805 +#: ../../library/sqlite3.rst:1796 msgid "Some useful URI tricks include:" msgstr "" -#: ../../library/sqlite3.rst:1807 +#: ../../library/sqlite3.rst:1798 msgid "Open a database in read-only mode:" msgstr "" -#: ../../library/sqlite3.rst:1816 +#: ../../library/sqlite3.rst:1807 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:1826 +#: ../../library/sqlite3.rst:1817 msgid "Create a shared named in-memory database:" msgstr "" -#: ../../library/sqlite3.rst:1840 +#: ../../library/sqlite3.rst:1831 msgid "" "More information about this feature, including a list of parameters, can be " "found in the `SQLite URI documentation`_." msgstr "" -#: ../../library/sqlite3.rst:1849 +#: ../../library/sqlite3.rst:1840 msgid "Explanation" msgstr "解釋" -#: ../../library/sqlite3.rst:1854 +#: ../../library/sqlite3.rst:1845 msgid "Transaction control" msgstr "" -#: ../../library/sqlite3.rst:1856 +#: ../../library/sqlite3.rst:1847 msgid "" "The :mod:`!sqlite3` module does not adhere to the transaction handling " "recommended by :pep:`249`." msgstr "" -#: ../../library/sqlite3.rst:1859 +#: ../../library/sqlite3.rst:1850 msgid "" "If the connection attribute :attr:`~Connection.isolation_level` is not " "``None``, new transactions are implicitly opened before :meth:`~Cursor." @@ -1594,7 +1594,7 @@ msgid "" "attribute." msgstr "" -#: ../../library/sqlite3.rst:1871 +#: ../../library/sqlite3.rst:1862 msgid "" "If :attr:`~Connection.isolation_level` is set to ``None``, no transactions " "are implicitly opened at all. This leaves the underlying SQLite library in " @@ -1604,14 +1604,14 @@ msgid "" "in_transaction` attribute." msgstr "" -#: ../../library/sqlite3.rst:1879 +#: ../../library/sqlite3.rst:1870 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:1883 +#: ../../library/sqlite3.rst:1874 msgid "" ":mod:`!sqlite3` used to implicitly commit an open transaction before DDL " "statements. This is no longer the case." From 517203fa5bb7fe84e5fbe6573511db4077b648f0 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 3 Sep 2022 00:17:50 +0000 Subject: [PATCH 2/6] sync with cpython cb39a44e --- library/bdb.po | 344 +++++--- library/functions.po | 400 ++++----- library/json.po | 300 ++++--- library/stdtypes.po | 1990 +++++++++++++++++++++++------------------- library/sys.po | 658 +++++++------- library/test.po | 280 +++--- using/cmdline.po | 220 ++--- whatsnew/3.10.po | 20 +- 8 files changed, 2318 insertions(+), 1894 deletions(-) diff --git a/library/bdb.po b/library/bdb.po index 5fb7e78d02..bd799b3710 100644 --- a/library/bdb.po +++ b/library/bdb.po @@ -7,7 +7,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-09-03 00:15+0000\n" "PO-Revision-Date: 2018-05-23 14:39+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -60,79 +60,128 @@ msgstr "" #: ../../library/bdb.rst:33 msgid "" -"When creating a breakpoint, its associated filename should be in canonical " -"form. If a *funcname* is defined, a breakpoint hit will be counted when the " -"first line of that function is executed. A conditional breakpoint always " -"counts a hit." +"When creating a breakpoint, its associated :attr:`file name ` should " +"be in canonical form. If a :attr:`funcname` is defined, a breakpoint :attr:" +"`hit ` will be counted when the first line of that function is " +"executed. A :attr:`conditional ` breakpoint always counts a :attr:" +"`hit `." msgstr "" -#: ../../library/bdb.rst:38 +#: ../../library/bdb.rst:39 msgid ":class:`Breakpoint` instances have the following methods:" msgstr "" -#: ../../library/bdb.rst:42 +#: ../../library/bdb.rst:43 msgid "" "Delete the breakpoint from the list associated to a file/line. If it is the " "last breakpoint in that position, it also deletes the entry for the file/" "line." msgstr "" -#: ../../library/bdb.rst:49 +#: ../../library/bdb.rst:50 msgid "Mark the breakpoint as enabled." msgstr "" -#: ../../library/bdb.rst:54 +#: ../../library/bdb.rst:55 msgid "Mark the breakpoint as disabled." msgstr "" -#: ../../library/bdb.rst:59 +#: ../../library/bdb.rst:60 msgid "" "Return a string with all the information about the breakpoint, nicely " "formatted:" msgstr "" -#: ../../library/bdb.rst:62 -msgid "The breakpoint number." -msgstr "" - #: ../../library/bdb.rst:63 -msgid "If it is temporary or not." +msgid "Breakpoint number." msgstr "" #: ../../library/bdb.rst:64 -msgid "Its file,line position." +msgid "Temporary status (del or keep)." msgstr "" #: ../../library/bdb.rst:65 -msgid "The condition that causes a break." +msgid "File/line position." msgstr "" #: ../../library/bdb.rst:66 -msgid "If it must be ignored the next N times." +msgid "Break condition." msgstr "" #: ../../library/bdb.rst:67 -msgid "The breakpoint hit count." +msgid "Number of times to ignore." msgstr "" -#: ../../library/bdb.rst:73 +#: ../../library/bdb.rst:68 +msgid "Number of times hit." +msgstr "" + +#: ../../library/bdb.rst:74 msgid "" "Print the output of :meth:`bpformat` to the file *out*, or if it is " "``None``, to standard output." msgstr "" -#: ../../library/bdb.rst:79 -msgid "The :class:`Bdb` class acts as a generic Python debugger base class." +#: ../../library/bdb.rst:77 +msgid ":class:`Breakpoint` instances have the following attributes:" msgstr "" #: ../../library/bdb.rst:81 +msgid "File name of the :class:`Breakpoint`." +msgstr "" + +#: ../../library/bdb.rst:85 +msgid "Line number of the :class:`Breakpoint` within :attr:`file`." +msgstr "" + +#: ../../library/bdb.rst:89 +msgid "True if a :class:`Breakpoint` at (file, line) is temporary." +msgstr "" + +#: ../../library/bdb.rst:93 +msgid "Condition for evaluating a :class:`Breakpoint` at (file, line)." +msgstr "" + +#: ../../library/bdb.rst:97 +msgid "" +"Function name that defines whether a :class:`Breakpoint` is hit upon " +"entering the function." +msgstr "" + +#: ../../library/bdb.rst:102 +msgid "True if :class:`Breakpoint` is enabled." +msgstr "" + +#: ../../library/bdb.rst:106 +msgid "Numeric index for a single instance of a :class:`Breakpoint`." +msgstr "" + +#: ../../library/bdb.rst:110 +msgid "" +"Dictionary of :class:`Breakpoint` instances indexed by (:attr:`file`, :attr:" +"`line`) tuples." +msgstr "" + +#: ../../library/bdb.rst:115 +msgid "Number of times to ignore a :class:`Breakpoint`." +msgstr "" + +#: ../../library/bdb.rst:119 +msgid "Count of the number of times a :class:`Breakpoint` has been hit." +msgstr "" + +#: ../../library/bdb.rst:123 +msgid "The :class:`Bdb` class acts as a generic Python debugger base class." +msgstr "" + +#: ../../library/bdb.rst:125 msgid "" "This class takes care of the details of the trace facility; a derived class " "should implement user interaction. The standard debugger class (:class:`pdb." "Pdb`) is an example." msgstr "" -#: ../../library/bdb.rst:85 +#: ../../library/bdb.rst:129 msgid "" "The *skip* argument, if given, must be an iterable of glob-style module name " "patterns. The debugger will not step into frames that originate in a module " @@ -141,89 +190,94 @@ msgid "" "globals." msgstr "" -#: ../../library/bdb.rst:91 +#: ../../library/bdb.rst:135 msgid "The *skip* argument." msgstr "*skip* 引數。" -#: ../../library/bdb.rst:94 +#: ../../library/bdb.rst:138 msgid "" "The following methods of :class:`Bdb` normally don't need to be overridden." msgstr "" -#: ../../library/bdb.rst:98 +#: ../../library/bdb.rst:142 +msgid "Return canonical form of *filename*." +msgstr "" + +#: ../../library/bdb.rst:144 msgid "" -"Auxiliary method for getting a filename in a canonical form, that is, as a " -"case-normalized (on case-insensitive filesystems) absolute path, stripped of " -"surrounding angle brackets." +"For real file names, the canonical form is an operating-system-dependent, :" +"func:`case-normalized ` :func:`absolute path `. A *filename* with angle brackets, such as `\"\"` generated " +"in interactive mode, is returned unchanged." msgstr "" -#: ../../library/bdb.rst:104 +#: ../../library/bdb.rst:151 msgid "" "Set the :attr:`botframe`, :attr:`stopframe`, :attr:`returnframe` and :attr:" "`quitting` attributes with values ready to start debugging." msgstr "" -#: ../../library/bdb.rst:109 +#: ../../library/bdb.rst:156 msgid "" "This function is installed as the trace function of debugged frames. Its " "return value is the new trace function (in most cases, that is, itself)." msgstr "" -#: ../../library/bdb.rst:112 +#: ../../library/bdb.rst:159 msgid "" "The default implementation decides how to dispatch a frame, depending on the " "type of event (passed as a string) that is about to be executed. *event* can " "be one of the following:" msgstr "" -#: ../../library/bdb.rst:116 +#: ../../library/bdb.rst:163 msgid "``\"line\"``: A new line of code is going to be executed." msgstr "" -#: ../../library/bdb.rst:117 +#: ../../library/bdb.rst:164 msgid "" "``\"call\"``: A function is about to be called, or another code block " "entered." msgstr "" -#: ../../library/bdb.rst:119 +#: ../../library/bdb.rst:166 msgid "``\"return\"``: A function or other code block is about to return." msgstr "" -#: ../../library/bdb.rst:120 +#: ../../library/bdb.rst:167 msgid "``\"exception\"``: An exception has occurred." msgstr "" -#: ../../library/bdb.rst:121 +#: ../../library/bdb.rst:168 msgid "``\"c_call\"``: A C function is about to be called." msgstr "" -#: ../../library/bdb.rst:122 +#: ../../library/bdb.rst:169 msgid "``\"c_return\"``: A C function has returned." msgstr "" -#: ../../library/bdb.rst:123 +#: ../../library/bdb.rst:170 msgid "``\"c_exception\"``: A C function has raised an exception." msgstr "" -#: ../../library/bdb.rst:125 +#: ../../library/bdb.rst:172 msgid "" "For the Python events, specialized functions (see below) are called. For " "the C events, no action is taken." msgstr "" -#: ../../library/bdb.rst:128 +#: ../../library/bdb.rst:175 msgid "The *arg* parameter depends on the previous event." msgstr "" -#: ../../library/bdb.rst:130 +#: ../../library/bdb.rst:177 msgid "" "See the documentation for :func:`sys.settrace` for more information on the " "trace function. For more information on code and frame objects, refer to :" "ref:`types`." msgstr "" -#: ../../library/bdb.rst:136 +#: ../../library/bdb.rst:183 msgid "" "If the debugger should stop on the current line, invoke the :meth:" "`user_line` method (which should be overridden in subclasses). Raise a :exc:" @@ -232,7 +286,7 @@ msgid "" "`trace_dispatch` method for further tracing in that scope." msgstr "" -#: ../../library/bdb.rst:144 +#: ../../library/bdb.rst:191 msgid "" "If the debugger should stop on this function call, invoke the :meth:" "`user_call` method (which should be overridden in subclasses). Raise a :exc:" @@ -241,7 +295,7 @@ msgid "" "`trace_dispatch` method for further tracing in that scope." msgstr "" -#: ../../library/bdb.rst:152 +#: ../../library/bdb.rst:199 msgid "" "If the debugger should stop on this function return, invoke the :meth:" "`user_return` method (which should be overridden in subclasses). Raise a :" @@ -250,7 +304,7 @@ msgid "" "`trace_dispatch` method for further tracing in that scope." msgstr "" -#: ../../library/bdb.rst:160 +#: ../../library/bdb.rst:207 msgid "" "If the debugger should stop at this exception, invokes the :meth:" "`user_exception` method (which should be overridden in subclasses). Raise a :" @@ -259,150 +313,152 @@ msgid "" "`trace_dispatch` method for further tracing in that scope." msgstr "" -#: ../../library/bdb.rst:166 +#: ../../library/bdb.rst:213 msgid "" "Normally derived classes don't override the following methods, but they may " "if they want to redefine the definition of stopping and breakpoints." msgstr "" -#: ../../library/bdb.rst:171 -msgid "" -"This method checks if the *frame* is somewhere below :attr:`botframe` in the " -"call stack. :attr:`botframe` is the frame in which debugging started." +#: ../../library/bdb.rst:218 +msgid "Return True if *module_name* matches any skip pattern." msgstr "" -#: ../../library/bdb.rst:176 -msgid "" -"This method checks if there is a breakpoint in the filename and line " -"belonging to *frame* or, at least, in the current function. If the " -"breakpoint is a temporary one, this method deletes it." +#: ../../library/bdb.rst:222 +msgid "Return True if *frame* is below the starting frame in the stack." msgstr "" -#: ../../library/bdb.rst:182 +#: ../../library/bdb.rst:226 +msgid "Return True if there is an effective breakpoint for this line." +msgstr "" + +#: ../../library/bdb.rst:228 msgid "" -"This method checks if there is a breakpoint in the filename of the current " -"frame." +"Check whether a line or function breakpoint exists and is in effect. Delete " +"temporary breakpoints based on information from :func:`effective`." +msgstr "" + +#: ../../library/bdb.rst:233 +msgid "Return True if any breakpoint exists for *frame*'s filename." msgstr "" -#: ../../library/bdb.rst:185 +#: ../../library/bdb.rst:235 msgid "" "Derived classes should override these methods to gain control over debugger " "operation." msgstr "" -#: ../../library/bdb.rst:190 +#: ../../library/bdb.rst:240 msgid "" -"This method is called from :meth:`dispatch_call` when there is the " -"possibility that a break might be necessary anywhere inside the called " +"Called from :meth:`dispatch_call` if a break might stop inside the called " "function." msgstr "" -#: ../../library/bdb.rst:196 +#: ../../library/bdb.rst:245 msgid "" -"This method is called from :meth:`dispatch_line` when either :meth:" -"`stop_here` or :meth:`break_here` yields ``True``." +"Called from :meth:`dispatch_line` when either :meth:`stop_here` or :meth:" +"`break_here` returns ``True``." msgstr "" -#: ../../library/bdb.rst:201 +#: ../../library/bdb.rst:250 msgid "" -"This method is called from :meth:`dispatch_return` when :meth:`stop_here` " -"yields ``True``." +"Called from :meth:`dispatch_return` when :meth:`stop_here` returns ``True``." msgstr "" -#: ../../library/bdb.rst:206 +#: ../../library/bdb.rst:254 msgid "" -"This method is called from :meth:`dispatch_exception` when :meth:`stop_here` " -"yields ``True``." +"Called from :meth:`dispatch_exception` when :meth:`stop_here` returns " +"``True``." msgstr "" -#: ../../library/bdb.rst:211 +#: ../../library/bdb.rst:259 msgid "Handle how a breakpoint must be removed when it is a temporary one." msgstr "" -#: ../../library/bdb.rst:213 +#: ../../library/bdb.rst:261 msgid "This method must be implemented by derived classes." msgstr "" -#: ../../library/bdb.rst:216 +#: ../../library/bdb.rst:264 msgid "" "Derived classes and clients can call the following methods to affect the " "stepping state." msgstr "" -#: ../../library/bdb.rst:221 +#: ../../library/bdb.rst:269 msgid "Stop after one line of code." msgstr "" -#: ../../library/bdb.rst:225 +#: ../../library/bdb.rst:273 msgid "Stop on the next line in or below the given frame." msgstr "" -#: ../../library/bdb.rst:229 +#: ../../library/bdb.rst:277 msgid "Stop when returning from the given frame." msgstr "" -#: ../../library/bdb.rst:233 +#: ../../library/bdb.rst:281 msgid "" -"Stop when the line with the line no greater than the current one is reached " +"Stop when the line with the *lineno* greater than the current one is reached " "or when returning from current frame." msgstr "" -#: ../../library/bdb.rst:238 +#: ../../library/bdb.rst:286 msgid "" "Start debugging from *frame*. If *frame* is not specified, debugging starts " "from caller's frame." msgstr "" -#: ../../library/bdb.rst:243 +#: ../../library/bdb.rst:291 msgid "" "Stop only at breakpoints or when finished. If there are no breakpoints, set " "the system trace function to ``None``." msgstr "" -#: ../../library/bdb.rst:248 +#: ../../library/bdb.rst:296 msgid "" "Set the :attr:`quitting` attribute to ``True``. This raises :exc:`BdbQuit` " "in the next call to one of the :meth:`dispatch_\\*` methods." msgstr "" -#: ../../library/bdb.rst:252 +#: ../../library/bdb.rst:300 msgid "" "Derived classes and clients can call the following methods to manipulate " "breakpoints. These methods return a string containing an error message if " "something went wrong, or ``None`` if all is well." msgstr "" -#: ../../library/bdb.rst:258 +#: ../../library/bdb.rst:306 msgid "" "Set a new breakpoint. If the *lineno* line doesn't exist for the *filename* " "passed as argument, return an error message. The *filename* should be in " "canonical form, as described in the :meth:`canonic` method." msgstr "" -#: ../../library/bdb.rst:264 +#: ../../library/bdb.rst:312 msgid "" -"Delete the breakpoints in *filename* and *lineno*. If none were set, an " -"error message is returned." +"Delete the breakpoints in *filename* and *lineno*. If none were set, return " +"an error message." msgstr "" -#: ../../library/bdb.rst:269 +#: ../../library/bdb.rst:317 msgid "" "Delete the breakpoint which has the index *arg* in the :attr:`Breakpoint." "bpbynumber`. If *arg* is not numeric or out of range, return an error " "message." msgstr "" -#: ../../library/bdb.rst:275 +#: ../../library/bdb.rst:323 msgid "" -"Delete all breakpoints in *filename*. If none were set, an error message is " -"returned." +"Delete all breakpoints in *filename*. If none were set, return an error " +"message." msgstr "" -#: ../../library/bdb.rst:280 -msgid "Delete all existing breakpoints." +#: ../../library/bdb.rst:328 +msgid "" +"Delete all existing breakpoints. If none were set, return an error message." msgstr "" -#: ../../library/bdb.rst:284 +#: ../../library/bdb.rst:333 msgid "" "Return a breakpoint specified by the given number. If *arg* is a string, it " "will be converted to a number. If *arg* is a non-numeric string, if the " @@ -410,114 +466,134 @@ msgid "" "raised." msgstr "" -#: ../../library/bdb.rst:293 -msgid "Check if there is a breakpoint for *lineno* of *filename*." +#: ../../library/bdb.rst:342 +msgid "Return True if there is a breakpoint for *lineno* in *filename*." msgstr "" -#: ../../library/bdb.rst:297 +#: ../../library/bdb.rst:346 msgid "" "Return all breakpoints for *lineno* in *filename*, or an empty list if none " "are set." msgstr "" -#: ../../library/bdb.rst:302 +#: ../../library/bdb.rst:351 msgid "Return all breakpoints in *filename*, or an empty list if none are set." msgstr "" -#: ../../library/bdb.rst:306 +#: ../../library/bdb.rst:355 msgid "Return all breakpoints that are set." msgstr "" -#: ../../library/bdb.rst:309 +#: ../../library/bdb.rst:358 msgid "" "Derived classes and clients can call the following methods to get a data " "structure representing a stack trace." msgstr "" -#: ../../library/bdb.rst:314 +#: ../../library/bdb.rst:363 +msgid "Return a list of (frame, lineno) tuples in a stack trace, and a size." +msgstr "" + +#: ../../library/bdb.rst:365 msgid "" -"Get a list of records for a frame and all higher (calling) and lower frames, " -"and the size of the higher part." +"The most recently called frame is last in the list. The size is the number " +"of frames below the frame where the debugger was invoked." msgstr "" -#: ../../library/bdb.rst:319 +#: ../../library/bdb.rst:370 msgid "" -"Return a string with information about a stack entry, identified by a " -"``(frame, lineno)`` tuple:" +"Return a string with information about a stack entry, which is a ``(frame, " +"lineno)`` tuple. The return string contains:" msgstr "" -#: ../../library/bdb.rst:322 -msgid "The canonical form of the filename which contains the frame." +#: ../../library/bdb.rst:373 +msgid "The canonical filename which contains the frame." msgstr "" -#: ../../library/bdb.rst:323 -msgid "The function name, or ``\"\"``." +#: ../../library/bdb.rst:374 +msgid "The function name or ``\"\"``." msgstr "" -#: ../../library/bdb.rst:324 +#: ../../library/bdb.rst:375 msgid "The input arguments." msgstr "" -#: ../../library/bdb.rst:325 +#: ../../library/bdb.rst:376 msgid "The return value." msgstr "" -#: ../../library/bdb.rst:326 +#: ../../library/bdb.rst:377 msgid "The line of code (if it exists)." msgstr "" -#: ../../library/bdb.rst:329 +#: ../../library/bdb.rst:380 msgid "" "The following two methods can be called by clients to use a debugger to " "debug a :term:`statement`, given as a string." msgstr "" -#: ../../library/bdb.rst:334 +#: ../../library/bdb.rst:385 msgid "" "Debug a statement executed via the :func:`exec` function. *globals* " "defaults to :attr:`__main__.__dict__`, *locals* defaults to *globals*." msgstr "" -#: ../../library/bdb.rst:339 +#: ../../library/bdb.rst:390 msgid "" "Debug an expression executed via the :func:`eval` function. *globals* and " "*locals* have the same meaning as in :meth:`run`." msgstr "" -#: ../../library/bdb.rst:344 +#: ../../library/bdb.rst:395 msgid "For backwards compatibility. Calls the :meth:`run` method." msgstr "" -#: ../../library/bdb.rst:348 +#: ../../library/bdb.rst:399 msgid "Debug a single function call, and return its result." msgstr "" -#: ../../library/bdb.rst:351 +#: ../../library/bdb.rst:402 msgid "Finally, the module defines the following functions:" msgstr "" -#: ../../library/bdb.rst:355 +#: ../../library/bdb.rst:406 msgid "" -"Check whether we should break here, depending on the way the breakpoint *b* " -"was set." +"Return True if we should break here, depending on the way the :class:" +"`Breakpoint` *b* was set." msgstr "" -#: ../../library/bdb.rst:358 +#: ../../library/bdb.rst:409 msgid "" -"If it was set via line number, it checks if ``b.line`` is the same as the " -"one in the frame also passed as argument. If the breakpoint was set via " -"function name, we have to check we are in the right frame (the right " -"function) and if we are in its first executable line." +"If it was set via line number, it checks if :attr:`b.line ` is the same as the one in *frame*. If the breakpoint was set via :" +"attr:`function name `, we have to check we are in " +"the right *frame* (the right function) and if we are on its first executable " +"line." msgstr "" -#: ../../library/bdb.rst:365 +#: ../../library/bdb.rst:418 msgid "" -"Determine if there is an effective (active) breakpoint at this line of code. " -"Return a tuple of the breakpoint and a boolean that indicates if it is ok to " -"delete a temporary breakpoint. Return ``(None, None)`` if there is no " -"matching breakpoint." +"Return ``(active breakpoint, delete temporary flag)`` or ``(None, None)`` as " +"the breakpoint to act upon." +msgstr "" + +#: ../../library/bdb.rst:421 +msgid "" +"The *active breakpoint* is the first entry in :attr:`bplist ` for the (:attr:`file `, :attr:`line `) (which must exist) that is :attr:`enabled `, for which :func:`checkfuncname` is True, and that has neither a " +"False :attr:`condition ` nor positive :attr:`ignore " +"` count. The *flag*, meaning that a temporary " +"breakpoint should be deleted, is False only when the :attr:`cond ` cannot be evaluated (in which case, :attr:`ignore ` count is ignored)." +msgstr "" + +#: ../../library/bdb.rst:432 +msgid "If no such entry exists, then (None, None) is returned." msgstr "" -#: ../../library/bdb.rst:372 +#: ../../library/bdb.rst:437 msgid "Start debugging with a :class:`Bdb` instance from caller's frame." msgstr "" diff --git a/library/functions.po b/library/functions.po index 2045a69219..6fb7e10bf7 100644 --- a/library/functions.po +++ b/library/functions.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-08-27 00:16+0000\n" +"POT-Creation-Date: 2022-09-03 00:15+0000\n" "PO-Revision-Date: 2022-05-22 02:44+0800\n" "Last-Translator: Phil Lin \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -483,7 +483,7 @@ msgid "" msgstr "如果不一定需要 \"0b\" 前綴,還可以使用如下的方法。" #: ../../library/functions.rst:139 ../../library/functions.rst:806 -#: ../../library/functions.rst:1102 +#: ../../library/functions.rst:1110 msgid "See also :func:`format` for more information." msgstr "可參考 :func:`format` 獲取更多資訊。" @@ -1609,7 +1609,17 @@ msgstr "" msgid "Falls back to :meth:`__index__` if :meth:`__int__` is not defined." msgstr "" -#: ../../library/functions.rst:899 +#: ../../library/functions.rst:896 +msgid "" +":class:`int` string inputs and string representations can be limited to help " +"avoid denial of service attacks. A :exc:`ValueError` is raised when the " +"limit is exceeded while converting a string *x* to an :class:`int` or when " +"converting an :class:`int` into a string would exceed the limit. See the :" +"ref:`integer string conversion length limitation ` " +"documentation." +msgstr "" + +#: ../../library/functions.rst:907 msgid "" "Return ``True`` if the *object* argument is an instance of the *classinfo* " "argument, or of a (direct, indirect, or :term:`virtual `) of *classinfo*. A class is considered a " @@ -1647,7 +1657,7 @@ msgstr "" "*class* 是 *classinfo* 中任一元素的 subclass 時則回傳 ``True``。其他情況,會" "觸發 :exc:`TypeError`。" -#: ../../library/functions.rst:929 +#: ../../library/functions.rst:937 msgid "" "Return an :term:`iterator` object. The first argument is interpreted very " "differently depending on the presence of the second argument. Without a " @@ -1670,18 +1680,18 @@ msgstr "" "帶引數地呼叫 *object*\\ ;如果回傳的結果是 *sentinel* 則觸發 :exc:" "`StopIteration`,否則回傳呼叫結果。" -#: ../../library/functions.rst:942 +#: ../../library/functions.rst:950 msgid "See also :ref:`typeiter`." msgstr "另請參閱 :ref:`typeiter`。" -#: ../../library/functions.rst:944 +#: ../../library/functions.rst:952 msgid "" "One useful application of the second form of :func:`iter` is to build a " "block-reader. For example, reading fixed-width blocks from a binary database " "file until the end of file is reached::" msgstr "" -#: ../../library/functions.rst:956 +#: ../../library/functions.rst:964 msgid "" "Return the length (the number of items) of an object. The argument may be a " "sequence (such as a string, bytes, tuple, list, or range) or a collection " @@ -1690,13 +1700,13 @@ msgstr "" "回傳物件的長度(元素個數)。引數可以是序列(如 string、bytes、tuple、list 或 " "range)或集合(如 dictionary、set 或 frozen set)。" -#: ../../library/functions.rst:962 +#: ../../library/functions.rst:970 msgid "" "``len`` raises :exc:`OverflowError` on lengths larger than :data:`sys." "maxsize`, such as :class:`range(2 ** 100) `." msgstr "" -#: ../../library/functions.rst:970 +#: ../../library/functions.rst:978 msgid "" "Rather than being a function, :class:`list` is actually a mutable sequence " "type, as documented in :ref:`typesseq-list` and :ref:`typesseq`." @@ -1704,7 +1714,7 @@ msgstr "" "除了是函式,:class:`list` 也是可變序列型別,詳情請參閱 :ref:`typesseq-list` " "和 :ref:`typesseq`。" -#: ../../library/functions.rst:976 +#: ../../library/functions.rst:984 msgid "" "Update and return a dictionary representing the current local symbol table. " "Free variables are returned by :func:`locals` when it is called in function " @@ -1715,7 +1725,7 @@ msgstr "" "叫 :func:`locals` 時會回傳自由變數。請注意,在 module 階層中,\\ :func:" "`locals` 和 :func:`globals` 是相同的 dictionary。" -#: ../../library/functions.rst:982 +#: ../../library/functions.rst:990 msgid "" "The contents of this dictionary should not be modified; changes may not " "affect the values of local and free variables used by the interpreter." @@ -1723,7 +1733,7 @@ msgstr "" "此 dictionary 的內容不應該被更動;更改可能不會影響直譯器使用的本地變數或自由" "變數的值。" -#: ../../library/functions.rst:987 +#: ../../library/functions.rst:995 msgid "" "Return an iterator that applies *function* to every item of *iterable*, " "yielding the results. If additional *iterable* arguments are passed, " @@ -1738,13 +1748,13 @@ msgstr "" "iteratable 耗盡時 iterator 也會結束。如果函式的輸入已經是 tuple 的引數,請參" "閱 :func:`itertools.starmap`\\。" -#: ../../library/functions.rst:998 +#: ../../library/functions.rst:1006 msgid "" "Return the largest item in an iterable or the largest of two or more " "arguments." msgstr "回傳 iterable 中最大的元素,或者回傳兩個及以上引數中最大的。" -#: ../../library/functions.rst:1001 +#: ../../library/functions.rst:1009 msgid "" "If one positional argument is provided, it should be an :term:`iterable`. " "The largest item in the iterable is returned. If two or more positional " @@ -1753,7 +1763,7 @@ msgstr "" "如果只提供了一個位置引數,它必須是個 :term:`iterable`,iterable 中最大的元素" "會被回傳。如果提供了兩個或以上的位置引數,則回傳最大的位置引數。" -#: ../../library/functions.rst:1006 ../../library/functions.rst:1043 +#: ../../library/functions.rst:1014 ../../library/functions.rst:1051 msgid "" "There are two optional keyword-only arguments. The *key* argument specifies " "a one-argument ordering function like that used for :meth:`list.sort`. The " @@ -1765,7 +1775,7 @@ msgstr "" "式,如同 :meth:`list.sort` 使用方式。*default* 引數是當 iterable 為空時回傳的" "值。如果 iterable 為空,並且沒有提供 *default*,則會觸發 :exc:`ValueError`。" -#: ../../library/functions.rst:1012 +#: ../../library/functions.rst:1020 msgid "" "If multiple items are maximal, the function returns the first one " "encountered. This is consistent with other sort-stability preserving tools " @@ -1776,15 +1786,15 @@ msgstr "" "``sorted(iterable, key=keyfunc, reverse=True)[0]`` 和 ``heapq.nlargest(1, " "iterable, key=keyfunc)`` 一致。" -#: ../../library/functions.rst:1017 ../../library/functions.rst:1054 +#: ../../library/functions.rst:1025 ../../library/functions.rst:1062 msgid "The *default* keyword-only argument." msgstr "*default* 僅限關鍵字引數。" -#: ../../library/functions.rst:1020 ../../library/functions.rst:1057 +#: ../../library/functions.rst:1028 ../../library/functions.rst:1065 msgid "The *key* can be ``None``." msgstr "" -#: ../../library/functions.rst:1028 +#: ../../library/functions.rst:1036 msgid "" "Return a \"memory view\" object created from the given argument. See :ref:" "`typememoryview` for more information." @@ -1792,13 +1802,13 @@ msgstr "" "回傳由給定的引數建立之 \"memory view\" 物件。有關詳細資訊,請參閱 :ref:" "`typememoryview`。" -#: ../../library/functions.rst:1035 +#: ../../library/functions.rst:1043 msgid "" "Return the smallest item in an iterable or the smallest of two or more " "arguments." msgstr "回傳 iterable 中最小的元素,或者回傳兩個及以上引數中最小的。" -#: ../../library/functions.rst:1038 +#: ../../library/functions.rst:1046 msgid "" "If one positional argument is provided, it should be an :term:`iterable`. " "The smallest item in the iterable is returned. If two or more positional " @@ -1807,7 +1817,7 @@ msgstr "" "如果只提供了一個位置引數,它必須是 :term:`iterable`,iterable 中最小的元素會" "被回傳。如果提供了兩個或以上的位置引數,則回傳最小的位置引數。" -#: ../../library/functions.rst:1049 +#: ../../library/functions.rst:1057 msgid "" "If multiple items are minimal, the function returns the first one " "encountered. This is consistent with other sort-stability preserving tools " @@ -1818,7 +1828,7 @@ msgstr "" "``sorted(iterable, key=keyfunc)[0]`` 和 ``heapq.nsmallest(1, iterable, " "key=keyfunc)`` 一致。" -#: ../../library/functions.rst:1063 +#: ../../library/functions.rst:1071 msgid "" "Retrieve the next item from the :term:`iterator` by calling its :meth:" "`~iterator.__next__` method. If *default* is given, it is returned if the " @@ -1828,7 +1838,7 @@ msgstr "" "素。如果 iterator 耗盡,則回傳給定的預設值 *default*,如果沒有預設值則觸發 :" "exc:`StopIteration`。" -#: ../../library/functions.rst:1070 +#: ../../library/functions.rst:1078 msgid "" "Return a new featureless object. :class:`object` is a base for all classes. " "It has methods that are common to all instances of Python classes. This " @@ -1837,7 +1847,7 @@ msgstr "" "回傳一個沒有特徵的新物件。:class:`object` 是所有 class 的基礎,它具有所有 " "Python class 實例的通用 method。這個函式不接受任何引數。" -#: ../../library/functions.rst:1076 +#: ../../library/functions.rst:1084 msgid "" ":class:`object` does *not* have a :attr:`~object.__dict__`, so you can't " "assign arbitrary attributes to an instance of the :class:`object` class." @@ -1845,7 +1855,7 @@ msgstr "" "由於 :class:`object` *沒有* :attr:`~object.__dict__`,因此無法將任意屬性賦" "給 :class:`object` class 的實例。" -#: ../../library/functions.rst:1082 +#: ../../library/functions.rst:1090 msgid "" "Convert an integer number to an octal string prefixed with \"0o\". The " "result is a valid Python expression. If *x* is not a Python :class:`int` " @@ -1856,7 +1866,7 @@ msgstr "" "Python 運算式。如果 *x* 不是 Python 的 :class:`int` 物件,那它需要定義 :meth:" "`__index__` method 回傳一個整數。舉例來說:" -#: ../../library/functions.rst:1092 +#: ../../library/functions.rst:1100 msgid "" "If you want to convert an integer number to an octal string either with the " "prefix \"0o\" or not, you can use either of the following ways." @@ -1864,7 +1874,7 @@ msgstr "" "如果要將整數轉換為八進位制字串,不論是否具備 \"0o\" 前綴,都可以使用下面的方" "法。" -#: ../../library/functions.rst:1109 +#: ../../library/functions.rst:1117 msgid "" "Open *file* and return a corresponding :term:`file object`. If the file " "cannot be opened, an :exc:`OSError` is raised. See :ref:`tut-files` for more " @@ -1873,7 +1883,7 @@ msgstr "" "開啟 *file* 並回傳對應的 :term:`file object`。如果該檔案不能開啟,則觸發 :" "exc:`OSError`。關於使用此函式的更多方法請參閱\\ :ref:`tut-files`。" -#: ../../library/functions.rst:1113 +#: ../../library/functions.rst:1121 msgid "" "*file* is a :term:`path-like object` giving the pathname (absolute or " "relative to the current working directory) of the file to be opened or an " @@ -1886,7 +1896,7 @@ msgstr "" "果有提供檔案描述器,它會隨著回傳的 I/O 物件關閉而關閉,除非 *closefd* 被設為 " "``False``。)" -#: ../../library/functions.rst:1119 +#: ../../library/functions.rst:1127 msgid "" "*mode* is an optional string that specifies the mode in which the file is " "opened. It defaults to ``'r'`` which means open for reading in text mode. " @@ -1907,71 +1917,71 @@ msgstr "" "getpreferredencoding(False)`` 來獲取當前的本地編碼。(要讀取和寫入原始 " "bytes,請使用二進位制模式且不要指定 *encoding*。)可用的模式有:" -#: ../../library/functions.rst:1136 +#: ../../library/functions.rst:1144 msgid "Character" msgstr "字元" -#: ../../library/functions.rst:1136 +#: ../../library/functions.rst:1144 msgid "Meaning" msgstr "意義" -#: ../../library/functions.rst:1138 +#: ../../library/functions.rst:1146 msgid "``'r'``" msgstr "``'r'``" -#: ../../library/functions.rst:1138 +#: ../../library/functions.rst:1146 msgid "open for reading (default)" msgstr "讀取(預設)" -#: ../../library/functions.rst:1139 +#: ../../library/functions.rst:1147 msgid "``'w'``" msgstr "``'w'``" -#: ../../library/functions.rst:1139 +#: ../../library/functions.rst:1147 msgid "open for writing, truncating the file first" msgstr "" -#: ../../library/functions.rst:1140 +#: ../../library/functions.rst:1148 msgid "``'x'``" msgstr "``'x'``" -#: ../../library/functions.rst:1140 +#: ../../library/functions.rst:1148 msgid "open for exclusive creation, failing if the file already exists" msgstr "唯一性創建,如果文件已存在則會失敗" -#: ../../library/functions.rst:1141 +#: ../../library/functions.rst:1149 msgid "``'a'``" msgstr "``'a'``" -#: ../../library/functions.rst:1141 +#: ../../library/functions.rst:1149 msgid "open for writing, appending to the end of file if it exists" msgstr "寫入,如果文件存在則在末尾追加寫入內容" -#: ../../library/functions.rst:1142 +#: ../../library/functions.rst:1150 msgid "``'b'``" msgstr "``'b'``" -#: ../../library/functions.rst:1142 +#: ../../library/functions.rst:1150 msgid "binary mode" msgstr "二進制模式" -#: ../../library/functions.rst:1143 +#: ../../library/functions.rst:1151 msgid "``'t'``" msgstr "``'t'``" -#: ../../library/functions.rst:1143 +#: ../../library/functions.rst:1151 msgid "text mode (default)" msgstr "文字模式(預設)" -#: ../../library/functions.rst:1144 +#: ../../library/functions.rst:1152 msgid "``'+'``" msgstr "``'+'``" -#: ../../library/functions.rst:1144 +#: ../../library/functions.rst:1152 msgid "open for updating (reading and writing)" msgstr "更新(讀取並寫入)" -#: ../../library/functions.rst:1147 +#: ../../library/functions.rst:1155 msgid "" "The default mode is ``'r'`` (open for reading text, a synonym of ``'rt'``). " "Modes ``'w+'`` and ``'w+b'`` open and truncate the file. Modes ``'r+'`` and " @@ -1980,7 +1990,7 @@ msgstr "" "預設的模式是 ``'r'``\\ (開啟並讀取文字,同 ``'rt'``)。對於二進位制寫入," "``'w+b'`` 模式開啟並把檔案內容變成 0 bytes,``'r+b'`` 則不會捨棄原始內容。" -#: ../../library/functions.rst:1151 +#: ../../library/functions.rst:1159 msgid "" "As mentioned in the :ref:`io-overview`, Python distinguishes between binary " "and text I/O. Files opened in binary mode (including ``'b'`` in the *mode* " @@ -1991,7 +2001,7 @@ msgid "" "specified *encoding* if given." msgstr "" -#: ../../library/functions.rst:1159 +#: ../../library/functions.rst:1167 msgid "" "There is an additional mode character permitted, ``'U'``, which no longer " "has any effect, and is considered deprecated. It previously enabled :term:" @@ -2000,14 +2010,14 @@ msgid "" "parameter>` parameter for further details." msgstr "" -#: ../../library/functions.rst:1167 +#: ../../library/functions.rst:1175 msgid "" "Python doesn't depend on the underlying operating system's notion of text " "files; all the processing is done by Python itself, and is therefore " "platform-independent." msgstr "" -#: ../../library/functions.rst:1171 +#: ../../library/functions.rst:1179 msgid "" "*buffering* is an optional integer used to set the buffering policy. Pass 0 " "to switch buffering off (only allowed in binary mode), 1 to select line " @@ -2020,7 +2030,7 @@ msgid "" "given, the default buffering policy works as follows:" msgstr "" -#: ../../library/functions.rst:1181 +#: ../../library/functions.rst:1189 msgid "" "Binary files are buffered in fixed-size chunks; the size of the buffer is " "chosen using a heuristic trying to determine the underlying device's \"block " @@ -2028,14 +2038,14 @@ msgid "" "the buffer will typically be 4096 or 8192 bytes long." msgstr "" -#: ../../library/functions.rst:1186 +#: ../../library/functions.rst:1194 msgid "" "\"Interactive\" text files (files for which :meth:`~io.IOBase.isatty` " "returns ``True``) use line buffering. Other text files use the policy " "described above for binary files." msgstr "" -#: ../../library/functions.rst:1190 +#: ../../library/functions.rst:1198 msgid "" "*encoding* is the name of the encoding used to decode or encode the file. " "This should only be used in text mode. The default encoding is platform " @@ -2044,7 +2054,7 @@ msgid "" "module for the list of supported encodings." msgstr "" -#: ../../library/functions.rst:1197 +#: ../../library/functions.rst:1205 msgid "" "*errors* is an optional string that specifies how encoding and decoding " "errors are to be handled—this cannot be used in binary mode. A variety of " @@ -2053,25 +2063,25 @@ msgid "" "register_error` is also valid. The standard names include:" msgstr "" -#: ../../library/functions.rst:1205 +#: ../../library/functions.rst:1213 msgid "" "``'strict'`` to raise a :exc:`ValueError` exception if there is an encoding " "error. The default value of ``None`` has the same effect." msgstr "" -#: ../../library/functions.rst:1209 +#: ../../library/functions.rst:1217 msgid "" "``'ignore'`` ignores errors. Note that ignoring encoding errors can lead to " "data loss." msgstr "" -#: ../../library/functions.rst:1212 +#: ../../library/functions.rst:1220 msgid "" "``'replace'`` causes a replacement marker (such as ``'?'``) to be inserted " "where there is malformed data." msgstr "" -#: ../../library/functions.rst:1215 +#: ../../library/functions.rst:1223 msgid "" "``'surrogateescape'`` will represent any incorrect bytes as low surrogate " "code units ranging from U+DC80 to U+DCFF. These surrogate code units will " @@ -2080,33 +2090,33 @@ msgid "" "an unknown encoding." msgstr "" -#: ../../library/functions.rst:1222 +#: ../../library/functions.rst:1230 msgid "" "``'xmlcharrefreplace'`` is only supported when writing to a file. Characters " "not supported by the encoding are replaced with the appropriate XML " "character reference ``&#nnn;``." msgstr "" -#: ../../library/functions.rst:1226 +#: ../../library/functions.rst:1234 msgid "" "``'backslashreplace'`` replaces malformed data by Python's backslashed " "escape sequences." msgstr "" -#: ../../library/functions.rst:1229 +#: ../../library/functions.rst:1237 msgid "" "``'namereplace'`` (also only supported when writing) replaces unsupported " "characters with ``\\N{...}`` escape sequences." msgstr "" -#: ../../library/functions.rst:1237 +#: ../../library/functions.rst:1245 msgid "" "*newline* controls how :term:`universal newlines` mode works (it only " "applies to text mode). It can be ``None``, ``''``, ``'\\n'``, ``'\\r'``, " "and ``'\\r\\n'``. It works as follows:" msgstr "" -#: ../../library/functions.rst:1241 +#: ../../library/functions.rst:1249 msgid "" "When reading input from the stream, if *newline* is ``None``, universal " "newlines mode is enabled. Lines in the input can end in ``'\\n'``, " @@ -2117,7 +2127,7 @@ msgid "" "given string, and the line ending is returned to the caller untranslated." msgstr "" -#: ../../library/functions.rst:1249 +#: ../../library/functions.rst:1257 msgid "" "When writing output to the stream, if *newline* is ``None``, any ``'\\n'`` " "characters written are translated to the system default line separator, :" @@ -2126,7 +2136,7 @@ msgid "" "characters written are translated to the given string." msgstr "" -#: ../../library/functions.rst:1255 +#: ../../library/functions.rst:1263 msgid "" "If *closefd* is ``False`` and a file descriptor rather than a filename was " "given, the underlying file descriptor will be kept open when the file is " @@ -2134,7 +2144,7 @@ msgid "" "otherwise, an error will be raised." msgstr "" -#: ../../library/functions.rst:1260 +#: ../../library/functions.rst:1268 msgid "" "A custom opener can be used by passing a callable as *opener*. The " "underlying file descriptor for the file object is then obtained by calling " @@ -2143,11 +2153,11 @@ msgid "" "similar to passing ``None``)." msgstr "" -#: ../../library/functions.rst:1266 +#: ../../library/functions.rst:1274 msgid "The newly created file is :ref:`non-inheritable `." msgstr "新建立的檔案是\\ :ref:`不可繼承的 `。" -#: ../../library/functions.rst:1268 +#: ../../library/functions.rst:1276 msgid "" "The following example uses the :ref:`dir_fd ` parameter of the :func:" "`os.open` function to open a file relative to a given directory::" @@ -2157,7 +2167,7 @@ msgstr "" "\n" "::" -#: ../../library/functions.rst:1281 +#: ../../library/functions.rst:1289 msgid "" "The type of :term:`file object` returned by the :func:`open` function " "depends on the mode. When :func:`open` is used to open a file in a text " @@ -2172,7 +2182,7 @@ msgid "" "FileIO`, is returned." msgstr "" -#: ../../library/functions.rst:1302 +#: ../../library/functions.rst:1310 msgid "" "See also the file handling modules, such as :mod:`fileinput`, :mod:`io` " "(where :func:`open` is declared), :mod:`os`, :mod:`os.path`, :mod:" @@ -2182,31 +2192,31 @@ msgstr "" "`open` 的 module )、:mod:`os`、:mod:`os.path`、:mod:`tempfile` 以及 :mod:" "`shutil`。" -#: ../../library/functions.rst:1306 +#: ../../library/functions.rst:1314 msgid "" "Raises an :ref:`auditing event ` ``open`` with arguments ``file``, " "``mode``, ``flags``." msgstr "" -#: ../../library/functions.rst:1308 +#: ../../library/functions.rst:1316 msgid "" "The ``mode`` and ``flags`` arguments may have been modified or inferred from " "the original call." msgstr "" -#: ../../library/functions.rst:1314 +#: ../../library/functions.rst:1322 msgid "The *opener* parameter was added." msgstr "增加了 *opener* 參數。" -#: ../../library/functions.rst:1315 +#: ../../library/functions.rst:1323 msgid "The ``'x'`` mode was added." msgstr "增加了 ``'x'`` 模式。" -#: ../../library/functions.rst:1316 +#: ../../library/functions.rst:1324 msgid ":exc:`IOError` used to be raised, it is now an alias of :exc:`OSError`." msgstr "過去觸發的 :exc:`IOError`,現在是 :exc:`OSError` 的別名。" -#: ../../library/functions.rst:1317 +#: ../../library/functions.rst:1325 msgid "" ":exc:`FileExistsError` is now raised if the file opened in exclusive " "creation mode (``'x'``) already exists." @@ -2214,15 +2224,15 @@ msgstr "" "如果檔案已存在但使用了唯一性建立模式 (\\ ``'x'``\\ ),現在會觸發 :exc:" "`FileExistsError`。" -#: ../../library/functions.rst:1323 +#: ../../library/functions.rst:1331 msgid "The file is now non-inheritable." msgstr "檔案在當前版本開始禁止繼承。" -#: ../../library/functions.rst:1327 +#: ../../library/functions.rst:1335 msgid "The ``'U'`` mode." msgstr "``'U'`` 模式。" -#: ../../library/functions.rst:1332 +#: ../../library/functions.rst:1340 msgid "" "If the system call is interrupted and the signal handler does not raise an " "exception, the function now retries the system call instead of raising an :" @@ -2231,15 +2241,15 @@ msgstr "" "如果系統呼叫被中斷,但訊號處理程序沒有觸發例外,此函式現在會重試系統呼叫,而" "不是觸發 :exc:`InterruptedError`\\ (原因詳見 :pep:`475`)。" -#: ../../library/functions.rst:1335 +#: ../../library/functions.rst:1343 msgid "The ``'namereplace'`` error handler was added." msgstr "增加了 ``'namereplace'`` 錯誤處理程式。" -#: ../../library/functions.rst:1340 +#: ../../library/functions.rst:1348 msgid "Support added to accept objects implementing :class:`os.PathLike`." msgstr "增加對實現了 :class:`os.PathLike` 物件的支援。" -#: ../../library/functions.rst:1341 +#: ../../library/functions.rst:1349 msgid "" "On Windows, opening a console buffer may return a subclass of :class:`io." "RawIOBase` other than :class:`io.FileIO`." @@ -2247,7 +2257,7 @@ msgstr "" "在 Windows 上,開啟一個控制臺緩衝區可能會回傳 :class:`io.RawIOBase` 的 " "subclass,而不是 :class:`io.FileIO`。" -#: ../../library/functions.rst:1346 +#: ../../library/functions.rst:1354 msgid "" "Given a string representing one Unicode character, return an integer " "representing the Unicode code point of that character. For example, " @@ -2258,7 +2268,7 @@ msgstr "" "``ord('a')`` 回傳整數 ``97``、\\ ``ord('€')``\\ (歐元符號)回傳 ``8364``。這" "是 :func:`chr` 的逆函式。" -#: ../../library/functions.rst:1354 +#: ../../library/functions.rst:1362 msgid "" "Return *base* to the power *exp*; if *mod* is present, return *base* to the " "power *exp*, modulo *mod* (computed more efficiently than ``pow(base, exp) % " @@ -2269,7 +2279,7 @@ msgstr "" "*mod* 取餘數(比直接呼叫 ``pow(base, exp) % mod`` 計算更高效)。兩個引數形式" "的 ``pow(exp, exp)`` 等價於次方運算子:``base**exp``。" -#: ../../library/functions.rst:1359 +#: ../../library/functions.rst:1367 msgid "" "The arguments must have numeric types. With mixed operand types, the " "coercion rules for binary arithmetic operators apply. For :class:`int` " @@ -2282,7 +2292,7 @@ msgid "" "close to ``3j``." msgstr "" -#: ../../library/functions.rst:1369 +#: ../../library/functions.rst:1377 msgid "" "For :class:`int` operands *base* and *exp*, if *mod* is present, *mod* must " "also be of integer type and *mod* must be nonzero. If *mod* is present and " @@ -2291,29 +2301,29 @@ msgid "" "*base* modulo *mod*." msgstr "" -#: ../../library/functions.rst:1375 +#: ../../library/functions.rst:1383 msgid "Here's an example of computing an inverse for ``38`` modulo ``97``::" msgstr "" -#: ../../library/functions.rst:1382 +#: ../../library/functions.rst:1390 msgid "" "For :class:`int` operands, the three-argument form of ``pow`` now allows the " "second argument to be negative, permitting computation of modular inverses." msgstr "" -#: ../../library/functions.rst:1387 +#: ../../library/functions.rst:1395 msgid "" "Allow keyword arguments. Formerly, only positional arguments were supported." msgstr "" -#: ../../library/functions.rst:1394 +#: ../../library/functions.rst:1402 msgid "" "Print *objects* to the text stream *file*, separated by *sep* and followed " "by *end*. *sep*, *end*, *file*, and *flush*, if present, must be given as " "keyword arguments." msgstr "" -#: ../../library/functions.rst:1398 +#: ../../library/functions.rst:1406 msgid "" "All non-keyword arguments are converted to strings like :func:`str` does and " "written to the stream, separated by *sep* and followed by *end*. Both *sep* " @@ -2322,7 +2332,7 @@ msgid "" "*end*." msgstr "" -#: ../../library/functions.rst:1404 +#: ../../library/functions.rst:1412 msgid "" "The *file* argument must be an object with a ``write(string)`` method; if it " "is not present or ``None``, :data:`sys.stdout` will be used. Since printed " @@ -2330,38 +2340,38 @@ msgid "" "binary mode file objects. For these, use ``file.write(...)`` instead." msgstr "" -#: ../../library/functions.rst:1409 +#: ../../library/functions.rst:1417 msgid "" "Whether the output is buffered is usually determined by *file*, but if the " "*flush* keyword argument is true, the stream is forcibly flushed." msgstr "" -#: ../../library/functions.rst:1412 +#: ../../library/functions.rst:1420 msgid "Added the *flush* keyword argument." msgstr "增加了 *flush* 關鍵字引數。" -#: ../../library/functions.rst:1418 +#: ../../library/functions.rst:1426 msgid "Return a property attribute." msgstr "回傳 property 屬性。" -#: ../../library/functions.rst:1420 +#: ../../library/functions.rst:1428 msgid "" "*fget* is a function for getting an attribute value. *fset* is a function " "for setting an attribute value. *fdel* is a function for deleting an " "attribute value. And *doc* creates a docstring for the attribute." msgstr "" -#: ../../library/functions.rst:1424 +#: ../../library/functions.rst:1432 msgid "A typical use is to define a managed attribute ``x``::" msgstr "" -#: ../../library/functions.rst:1441 +#: ../../library/functions.rst:1449 msgid "" "If *c* is an instance of *C*, ``c.x`` will invoke the getter, ``c.x = " "value`` will invoke the setter, and ``del c.x`` the deleter." msgstr "" -#: ../../library/functions.rst:1444 +#: ../../library/functions.rst:1452 msgid "" "If given, *doc* will be the docstring of the property attribute. Otherwise, " "the property will copy *fget*'s docstring (if it exists). This makes it " @@ -2369,14 +2379,14 @@ msgid "" "term:`decorator`::" msgstr "" -#: ../../library/functions.rst:1457 +#: ../../library/functions.rst:1465 msgid "" "The ``@property`` decorator turns the :meth:`voltage` method into a \"getter" "\" for a read-only attribute with the same name, and it sets the docstring " "for *voltage* to \"Get the current voltage.\"" msgstr "" -#: ../../library/functions.rst:1461 +#: ../../library/functions.rst:1469 msgid "" "A property object has :attr:`~property.getter`, :attr:`~property.setter`, " "and :attr:`~property.deleter` methods usable as decorators that create a " @@ -2384,30 +2394,30 @@ msgid "" "decorated function. This is best explained with an example::" msgstr "" -#: ../../library/functions.rst:1483 +#: ../../library/functions.rst:1491 msgid "" "This code is exactly equivalent to the first example. Be sure to give the " "additional functions the same name as the original property (``x`` in this " "case.)" msgstr "" -#: ../../library/functions.rst:1487 +#: ../../library/functions.rst:1495 msgid "" "The returned property object also has the attributes ``fget``, ``fset``, and " "``fdel`` corresponding to the constructor arguments." msgstr "" -#: ../../library/functions.rst:1490 +#: ../../library/functions.rst:1498 msgid "The docstrings of property objects are now writeable." msgstr "" -#: ../../library/functions.rst:1499 +#: ../../library/functions.rst:1507 msgid "" "Rather than being a function, :class:`range` is actually an immutable " "sequence type, as documented in :ref:`typesseq-range` and :ref:`typesseq`." msgstr "" -#: ../../library/functions.rst:1505 +#: ../../library/functions.rst:1513 msgid "" "Return a string containing a printable representation of an object. For " "many types, this function makes an attempt to return a string that would " @@ -2420,7 +2430,7 @@ msgid "" "`RuntimeError`." msgstr "" -#: ../../library/functions.rst:1518 +#: ../../library/functions.rst:1526 msgid "" "Return a reverse :term:`iterator`. *seq* must be an object which has a :" "meth:`__reversed__` method or supports the sequence protocol (the :meth:" @@ -2428,14 +2438,14 @@ msgid "" "starting at ``0``)." msgstr "" -#: ../../library/functions.rst:1526 +#: ../../library/functions.rst:1534 msgid "" "Return *number* rounded to *ndigits* precision after the decimal point. If " "*ndigits* is omitted or is ``None``, it returns the nearest integer to its " "input." msgstr "" -#: ../../library/functions.rst:1530 +#: ../../library/functions.rst:1538 msgid "" "For the built-in types supporting :func:`round`, values are rounded to the " "closest multiple of 10 to the power minus *ndigits*; if two multiples are " @@ -2446,13 +2456,13 @@ msgid "" "``None``. Otherwise, the return value has the same type as *number*." msgstr "" -#: ../../library/functions.rst:1539 +#: ../../library/functions.rst:1547 msgid "" "For a general Python object ``number``, ``round`` delegates to ``number." "__round__``." msgstr "" -#: ../../library/functions.rst:1544 +#: ../../library/functions.rst:1552 msgid "" "The behavior of :func:`round` for floats can be surprising: for example, " "``round(2.675, 2)`` gives ``2.67`` instead of the expected ``2.68``. This is " @@ -2461,21 +2471,21 @@ msgid "" "information." msgstr "" -#: ../../library/functions.rst:1555 +#: ../../library/functions.rst:1563 msgid "" "Return a new :class:`set` object, optionally with elements taken from " "*iterable*. ``set`` is a built-in class. See :class:`set` and :ref:`types-" "set` for documentation about this class." msgstr "" -#: ../../library/functions.rst:1559 +#: ../../library/functions.rst:1567 msgid "" "For other containers see the built-in :class:`frozenset`, :class:`list`, :" "class:`tuple`, and :class:`dict` classes, as well as the :mod:`collections` " "module." msgstr "" -#: ../../library/functions.rst:1566 +#: ../../library/functions.rst:1574 msgid "" "This is the counterpart of :func:`getattr`. The arguments are an object, a " "string, and an arbitrary value. The string may name an existing attribute " @@ -2484,14 +2494,14 @@ msgid "" "is equivalent to ``x.foobar = 123``." msgstr "" -#: ../../library/functions.rst:1574 +#: ../../library/functions.rst:1582 msgid "" "Since :ref:`private name mangling ` happens at " "compilation time, one must manually mangle a private attribute's (attributes " "with two leading underscores) name in order to set it with :func:`setattr`." msgstr "" -#: ../../library/functions.rst:1583 +#: ../../library/functions.rst:1591 msgid "" "Return a :term:`slice` object representing the set of indices specified by " "``range(start, stop, step)``. The *start* and *step* arguments default to " @@ -2504,35 +2514,35 @@ msgid "" "func:`itertools.islice` for an alternate version that returns an iterator." msgstr "" -#: ../../library/functions.rst:1596 +#: ../../library/functions.rst:1604 msgid "Return a new sorted list from the items in *iterable*." msgstr "" -#: ../../library/functions.rst:1598 +#: ../../library/functions.rst:1606 msgid "" "Has two optional arguments which must be specified as keyword arguments." msgstr "有兩個選擇性引數,只能使用關鍵字引數來指定。" -#: ../../library/functions.rst:1600 +#: ../../library/functions.rst:1608 msgid "" "*key* specifies a function of one argument that is used to extract a " "comparison key from each element in *iterable* (for example, ``key=str." "lower``). The default value is ``None`` (compare the elements directly)." msgstr "" -#: ../../library/functions.rst:1604 +#: ../../library/functions.rst:1612 msgid "" "*reverse* is a boolean value. If set to ``True``, then the list elements " "are sorted as if each comparison were reversed." msgstr "" -#: ../../library/functions.rst:1607 +#: ../../library/functions.rst:1615 msgid "" "Use :func:`functools.cmp_to_key` to convert an old-style *cmp* function to a " "*key* function." msgstr "" -#: ../../library/functions.rst:1610 +#: ../../library/functions.rst:1618 msgid "" "The built-in :func:`sorted` function is guaranteed to be stable. A sort is " "stable if it guarantees not to change the relative order of elements that " @@ -2540,7 +2550,7 @@ msgid "" "example, sort by department, then by salary grade)." msgstr "" -#: ../../library/functions.rst:1615 +#: ../../library/functions.rst:1623 msgid "" "The sort algorithm uses only ``<`` comparisons between items. While " "defining an :meth:`~object.__lt__` method will suffice for sorting, :PEP:`8` " @@ -2552,22 +2562,22 @@ msgid "" "method." msgstr "" -#: ../../library/functions.rst:1624 +#: ../../library/functions.rst:1632 msgid "" "For sorting examples and a brief sorting tutorial, see :ref:`sortinghowto`." msgstr "" -#: ../../library/functions.rst:1628 +#: ../../library/functions.rst:1636 msgid "Transform a method into a static method." msgstr "" -#: ../../library/functions.rst:1630 +#: ../../library/functions.rst:1638 msgid "" "A static method does not receive an implicit first argument. To declare a " "static method, use this idiom::" msgstr "" -#: ../../library/functions.rst:1637 +#: ../../library/functions.rst:1645 msgid "" "The ``@staticmethod`` form is a function :term:`decorator` -- see :ref:" "`function` for details." @@ -2575,21 +2585,21 @@ msgstr "" "``@staticmethod`` 語法是一個函式 :term:`decorator` - 參見 :ref:`function` 中" "的詳細介紹。" -#: ../../library/functions.rst:1640 +#: ../../library/functions.rst:1648 msgid "" "A static method can be called either on the class (such as ``C.f()``) or on " "an instance (such as ``C().f()``). Moreover, they can be called as regular " "functions (such as ``f()``)." msgstr "" -#: ../../library/functions.rst:1644 +#: ../../library/functions.rst:1652 msgid "" "Static methods in Python are similar to those found in Java or C++. Also, " "see :func:`classmethod` for a variant that is useful for creating alternate " "class constructors." msgstr "" -#: ../../library/functions.rst:1648 +#: ../../library/functions.rst:1656 msgid "" "Like all decorators, it is also possible to call ``staticmethod`` as a " "regular function and do something with its result. This is needed in some " @@ -2598,36 +2608,36 @@ msgid "" "cases, use this idiom::" msgstr "" -#: ../../library/functions.rst:1660 +#: ../../library/functions.rst:1668 msgid "For more information on static methods, see :ref:`types`." msgstr "關於 static method 的更多資訊,請參考 :ref:`types`。" -#: ../../library/functions.rst:1662 +#: ../../library/functions.rst:1670 msgid "" "Static methods now inherit the method attributes (``__module__``, " "``__name__``, ``__qualname__``, ``__doc__`` and ``__annotations__``), have a " "new ``__wrapped__`` attribute, and are now callable as regular functions." msgstr "" -#: ../../library/functions.rst:1677 +#: ../../library/functions.rst:1685 msgid "" "Return a :class:`str` version of *object*. See :func:`str` for details." msgstr "" -#: ../../library/functions.rst:1679 +#: ../../library/functions.rst:1687 msgid "" "``str`` is the built-in string :term:`class`. For general information about " "strings, see :ref:`textseq`." msgstr "" -#: ../../library/functions.rst:1685 +#: ../../library/functions.rst:1693 msgid "" "Sums *start* and the items of an *iterable* from left to right and returns " "the total. The *iterable*'s items are normally numbers, and the start value " "is not allowed to be a string." msgstr "" -#: ../../library/functions.rst:1689 +#: ../../library/functions.rst:1697 msgid "" "For some use cases, there are good alternatives to :func:`sum`. The " "preferred, fast way to concatenate a sequence of strings is by calling ``''." @@ -2636,31 +2646,31 @@ msgid "" "using :func:`itertools.chain`." msgstr "" -#: ../../library/functions.rst:1695 +#: ../../library/functions.rst:1703 msgid "The *start* parameter can be specified as a keyword argument." msgstr "*start* 參數可被指定為關鍵字引數。" -#: ../../library/functions.rst:1700 +#: ../../library/functions.rst:1708 msgid "" "Return a proxy object that delegates method calls to a parent or sibling " "class of *type*. This is useful for accessing inherited methods that have " "been overridden in a class." msgstr "" -#: ../../library/functions.rst:1704 +#: ../../library/functions.rst:1712 msgid "" "The *object-or-type* determines the :term:`method resolution order` to be " "searched. The search starts from the class right after the *type*." msgstr "" -#: ../../library/functions.rst:1708 +#: ../../library/functions.rst:1716 msgid "" "For example, if :attr:`~class.__mro__` of *object-or-type* is ``D -> B -> C -" "> A -> object`` and the value of *type* is ``B``, then :func:`super` " "searches ``C -> A -> object``." msgstr "" -#: ../../library/functions.rst:1712 +#: ../../library/functions.rst:1720 msgid "" "The :attr:`~class.__mro__` attribute of the *object-or-type* lists the " "method resolution search order used by both :func:`getattr` and :func:" @@ -2668,7 +2678,7 @@ msgid "" "hierarchy is updated." msgstr "" -#: ../../library/functions.rst:1717 +#: ../../library/functions.rst:1725 msgid "" "If the second argument is omitted, the super object returned is unbound. If " "the second argument is an object, ``isinstance(obj, type)`` must be true. " @@ -2676,7 +2686,7 @@ msgid "" "(this is useful for classmethods)." msgstr "" -#: ../../library/functions.rst:1722 +#: ../../library/functions.rst:1730 msgid "" "There are two typical use cases for *super*. In a class hierarchy with " "single inheritance, *super* can be used to refer to parent classes without " @@ -2684,7 +2694,7 @@ msgid "" "closely parallels the use of *super* in other programming languages." msgstr "" -#: ../../library/functions.rst:1727 +#: ../../library/functions.rst:1735 msgid "" "The second use case is to support cooperative multiple inheritance in a " "dynamic execution environment. This use case is unique to Python and is not " @@ -2697,18 +2707,18 @@ msgid "" "classes that are unknown prior to runtime)." msgstr "" -#: ../../library/functions.rst:1737 +#: ../../library/functions.rst:1745 msgid "For both use cases, a typical superclass call looks like this::" msgstr "" -#: ../../library/functions.rst:1744 +#: ../../library/functions.rst:1752 msgid "" "In addition to method lookups, :func:`super` also works for attribute " "lookups. One possible use case for this is calling :term:`descriptors " "` in a parent or sibling class." msgstr "" -#: ../../library/functions.rst:1748 +#: ../../library/functions.rst:1756 msgid "" "Note that :func:`super` is implemented as part of the binding process for " "explicit dotted attribute lookups such as ``super().__getitem__(name)``. It " @@ -2718,7 +2728,7 @@ msgid "" "using statements or operators such as ``super()[name]``." msgstr "" -#: ../../library/functions.rst:1755 +#: ../../library/functions.rst:1763 msgid "" "Also note that, aside from the zero argument form, :func:`super` is not " "limited to use inside methods. The two argument form specifies the " @@ -2728,33 +2738,33 @@ msgid "" "accessing the current instance for ordinary methods." msgstr "" -#: ../../library/functions.rst:1762 +#: ../../library/functions.rst:1770 msgid "" "For practical suggestions on how to design cooperative classes using :func:" "`super`, see `guide to using super() `_." msgstr "" -#: ../../library/functions.rst:1771 +#: ../../library/functions.rst:1779 msgid "" "Rather than being a function, :class:`tuple` is actually an immutable " "sequence type, as documented in :ref:`typesseq-tuple` and :ref:`typesseq`." msgstr "" -#: ../../library/functions.rst:1780 +#: ../../library/functions.rst:1788 msgid "" "With one argument, return the type of an *object*. The return value is a " "type object and generally the same object as returned by :attr:`object." "__class__ `." msgstr "" -#: ../../library/functions.rst:1784 +#: ../../library/functions.rst:1792 msgid "" "The :func:`isinstance` built-in function is recommended for testing the type " "of an object, because it takes subclasses into account." msgstr "" -#: ../../library/functions.rst:1788 +#: ../../library/functions.rst:1796 msgid "" "With three arguments, return a new type object. This is essentially a " "dynamic form of the :keyword:`class` statement. The *name* string is the " @@ -2767,11 +2777,11 @@ msgid "" "identical :class:`type` objects:" msgstr "" -#: ../../library/functions.rst:1803 +#: ../../library/functions.rst:1811 msgid "See also :ref:`bltin-type-objects`." msgstr "另請參閱 :ref:`bltin-type-objects`。" -#: ../../library/functions.rst:1805 +#: ../../library/functions.rst:1813 msgid "" "Keyword arguments provided to the three argument form are passed to the " "appropriate metaclass machinery (usually :meth:`~object.__init_subclass__`) " @@ -2779,23 +2789,23 @@ msgid "" "would." msgstr "" -#: ../../library/functions.rst:1810 +#: ../../library/functions.rst:1818 msgid "See also :ref:`class-customization`." msgstr "另請參閱 :ref:`class-customization`。" -#: ../../library/functions.rst:1812 +#: ../../library/functions.rst:1820 msgid "" "Subclasses of :class:`type` which don't override ``type.__new__`` may no " "longer use the one-argument form to get the type of an object." msgstr "" -#: ../../library/functions.rst:1818 +#: ../../library/functions.rst:1826 msgid "" "Return the :attr:`~object.__dict__` attribute for a module, class, instance, " "or any other object with a :attr:`~object.__dict__` attribute." msgstr "" -#: ../../library/functions.rst:1821 +#: ../../library/functions.rst:1829 msgid "" "Objects such as modules and instances have an updateable :attr:`~object." "__dict__` attribute; however, other objects may have write restrictions on " @@ -2803,54 +2813,54 @@ msgid "" "`types.MappingProxyType` to prevent direct dictionary updates)." msgstr "" -#: ../../library/functions.rst:1826 +#: ../../library/functions.rst:1834 msgid "" "Without an argument, :func:`vars` acts like :func:`locals`. Note, the " "locals dictionary is only useful for reads since updates to the locals " "dictionary are ignored." msgstr "" -#: ../../library/functions.rst:1830 +#: ../../library/functions.rst:1838 msgid "" "A :exc:`TypeError` exception is raised if an object is specified but it " "doesn't have a :attr:`~object.__dict__` attribute (for example, if its class " "defines the :attr:`~object.__slots__` attribute)." msgstr "" -#: ../../library/functions.rst:1836 +#: ../../library/functions.rst:1844 msgid "" "Iterate over several iterables in parallel, producing tuples with an item " "from each one." msgstr "" -#: ../../library/functions.rst:1839 +#: ../../library/functions.rst:1847 msgid "Example::" msgstr "" "例如:\n" "\n" "::" -#: ../../library/functions.rst:1848 +#: ../../library/functions.rst:1856 msgid "" "More formally: :func:`zip` returns an iterator of tuples, where the *i*-th " "tuple contains the *i*-th element from each of the argument iterables." msgstr "" -#: ../../library/functions.rst:1851 +#: ../../library/functions.rst:1859 msgid "" "Another way to think of :func:`zip` is that it turns rows into columns, and " "columns into rows. This is similar to `transposing a matrix `_." msgstr "" -#: ../../library/functions.rst:1855 +#: ../../library/functions.rst:1863 msgid "" ":func:`zip` is lazy: The elements won't be processed until the iterable is " "iterated on, e.g. by a :keyword:`!for` loop or by wrapping in a :class:" "`list`." msgstr "" -#: ../../library/functions.rst:1859 +#: ../../library/functions.rst:1867 msgid "" "One thing to consider is that the iterables passed to :func:`zip` could have " "different lengths; sometimes by design, and sometimes because of a bug in " @@ -2858,51 +2868,51 @@ msgid "" "approaches to dealing with this issue:" msgstr "" -#: ../../library/functions.rst:1864 +#: ../../library/functions.rst:1872 msgid "" "By default, :func:`zip` stops when the shortest iterable is exhausted. It " "will ignore the remaining items in the longer iterables, cutting off the " "result to the length of the shortest iterable::" msgstr "" -#: ../../library/functions.rst:1871 +#: ../../library/functions.rst:1879 msgid "" ":func:`zip` is often used in cases where the iterables are assumed to be of " "equal length. In such cases, it's recommended to use the ``strict=True`` " "option. Its output is the same as regular :func:`zip`::" msgstr "" -#: ../../library/functions.rst:1878 +#: ../../library/functions.rst:1886 msgid "" "Unlike the default behavior, it checks that the lengths of iterables are " "identical, raising a :exc:`ValueError` if they aren't:" msgstr "" -#: ../../library/functions.rst:1886 +#: ../../library/functions.rst:1894 msgid "" "Without the ``strict=True`` argument, any bug that results in iterables of " "different lengths will be silenced, possibly manifesting as a hard-to-find " "bug in another part of the program." msgstr "" -#: ../../library/functions.rst:1890 +#: ../../library/functions.rst:1898 msgid "" "Shorter iterables can be padded with a constant value to make all the " "iterables have the same length. This is done by :func:`itertools." "zip_longest`." msgstr "" -#: ../../library/functions.rst:1894 +#: ../../library/functions.rst:1902 msgid "" "Edge cases: With a single iterable argument, :func:`zip` returns an iterator " "of 1-tuples. With no arguments, it returns an empty iterator." msgstr "" -#: ../../library/functions.rst:1897 +#: ../../library/functions.rst:1905 msgid "Tips and tricks:" msgstr "" -#: ../../library/functions.rst:1899 +#: ../../library/functions.rst:1907 msgid "" "The left-to-right evaluation order of the iterables is guaranteed. This " "makes possible an idiom for clustering a data series into n-length groups " @@ -2911,23 +2921,23 @@ msgid "" "iterator. This has the effect of dividing the input into n-length chunks." msgstr "" -#: ../../library/functions.rst:1905 +#: ../../library/functions.rst:1913 msgid "" ":func:`zip` in conjunction with the ``*`` operator can be used to unzip a " "list::" msgstr "" -#: ../../library/functions.rst:1916 +#: ../../library/functions.rst:1924 msgid "Added the ``strict`` argument." msgstr "增加了 ``strict`` 引數。" -#: ../../library/functions.rst:1928 +#: ../../library/functions.rst:1936 msgid "" "This is an advanced function that is not needed in everyday Python " "programming, unlike :func:`importlib.import_module`." msgstr "" -#: ../../library/functions.rst:1931 +#: ../../library/functions.rst:1939 msgid "" "This function is invoked by the :keyword:`import` statement. It can be " "replaced (by importing the :mod:`builtins` module and assigning to " @@ -2939,7 +2949,7 @@ msgid "" "discouraged in favor of :func:`importlib.import_module`." msgstr "" -#: ../../library/functions.rst:1940 +#: ../../library/functions.rst:1948 msgid "" "The function imports the module *name*, potentially using the given " "*globals* and *locals* to determine how to interpret the name in a package " @@ -2949,7 +2959,7 @@ msgid "" "determine the package context of the :keyword:`import` statement." msgstr "" -#: ../../library/functions.rst:1947 +#: ../../library/functions.rst:1955 msgid "" "*level* specifies whether to use absolute or relative imports. ``0`` (the " "default) means only perform absolute imports. Positive values for *level* " @@ -2958,7 +2968,7 @@ msgid "" "details)." msgstr "" -#: ../../library/functions.rst:1953 +#: ../../library/functions.rst:1961 msgid "" "When the *name* variable is of the form ``package.module``, normally, the " "top-level package (the name up till the first dot) is returned, *not* the " @@ -2966,58 +2976,58 @@ msgid "" "given, the module named by *name* is returned." msgstr "" -#: ../../library/functions.rst:1958 +#: ../../library/functions.rst:1966 msgid "" "For example, the statement ``import spam`` results in bytecode resembling " "the following code::" msgstr "" -#: ../../library/functions.rst:1963 +#: ../../library/functions.rst:1971 msgid "The statement ``import spam.ham`` results in this call::" msgstr "" -#: ../../library/functions.rst:1967 +#: ../../library/functions.rst:1975 msgid "" "Note how :func:`__import__` returns the toplevel module here because this is " "the object that is bound to a name by the :keyword:`import` statement." msgstr "" -#: ../../library/functions.rst:1970 +#: ../../library/functions.rst:1978 msgid "" "On the other hand, the statement ``from spam.ham import eggs, sausage as " "saus`` results in ::" msgstr "" -#: ../../library/functions.rst:1977 +#: ../../library/functions.rst:1985 msgid "" "Here, the ``spam.ham`` module is returned from :func:`__import__`. From " "this object, the names to import are retrieved and assigned to their " "respective names." msgstr "" -#: ../../library/functions.rst:1981 +#: ../../library/functions.rst:1989 msgid "" "If you simply want to import a module (potentially within a package) by " "name, use :func:`importlib.import_module`." msgstr "" -#: ../../library/functions.rst:1984 +#: ../../library/functions.rst:1992 msgid "" "Negative values for *level* are no longer supported (which also changes the " "default value to 0)." msgstr "" -#: ../../library/functions.rst:1988 +#: ../../library/functions.rst:1996 msgid "" "When the command line options :option:`-E` or :option:`-I` are being used, " "the environment variable :envvar:`PYTHONCASEOK` is now ignored." msgstr "" -#: ../../library/functions.rst:1993 +#: ../../library/functions.rst:2001 msgid "Footnotes" msgstr "註解" -#: ../../library/functions.rst:1994 +#: ../../library/functions.rst:2002 msgid "" "Note that the parser only accepts the Unix-style end of line convention. If " "you are reading the code from a file, make sure to use newline conversion " diff --git a/library/json.po b/library/json.po index 4028ac1ceb..4d080ca4e5 100644 --- a/library/json.po +++ b/library/json.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-08-05 00:19+0000\n" +"POT-Creation-Date: 2022-09-03 00:15+0000\n" "PO-Revision-Date: 2018-05-23 16:04+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -37,45 +37,52 @@ msgid "" "strict subset of JavaScript [#rfc-errata]_ )." msgstr "" -#: ../../library/json.rst:21 +#: ../../library/json.rst:22 +msgid "" +"Be cautious when parsing JSON data from untrusted sources. A malicious JSON " +"string may cause the decoder to consume considerable CPU and memory " +"resources. Limiting the size of data to be parsed is recommended." +msgstr "" + +#: ../../library/json.rst:26 msgid "" ":mod:`json` exposes an API familiar to users of the standard library :mod:" "`marshal` and :mod:`pickle` modules." msgstr "" -#: ../../library/json.rst:24 +#: ../../library/json.rst:29 msgid "Encoding basic Python object hierarchies::" msgstr "" -#: ../../library/json.rst:43 +#: ../../library/json.rst:48 msgid "Compact encoding::" msgstr "" -#: ../../library/json.rst:49 +#: ../../library/json.rst:54 msgid "Pretty printing::" msgstr "美化輸出:" -#: ../../library/json.rst:58 +#: ../../library/json.rst:63 msgid "Decoding JSON::" msgstr "" -#: ../../library/json.rst:70 +#: ../../library/json.rst:75 msgid "Specializing JSON object decoding::" msgstr "" -#: ../../library/json.rst:85 +#: ../../library/json.rst:90 msgid "Extending :class:`JSONEncoder`::" msgstr "" -#: ../../library/json.rst:103 +#: ../../library/json.rst:108 msgid "Using :mod:`json.tool` from the shell to validate and pretty-print:" msgstr "" -#: ../../library/json.rst:114 +#: ../../library/json.rst:119 msgid "See :ref:`json-commandline` for detailed documentation." msgstr "更詳盡的文件請見 :ref:`json-commandline`\\ 。" -#: ../../library/json.rst:118 +#: ../../library/json.rst:123 msgid "" "JSON is a subset of `YAML `_ 1.2. The JSON produced by " "this module's default settings (in particular, the default *separators* " @@ -83,51 +90,51 @@ msgid "" "used as a YAML serializer." msgstr "" -#: ../../library/json.rst:125 +#: ../../library/json.rst:130 msgid "" "This module's encoders and decoders preserve input and output order by " "default. Order is only lost if the underlying containers are unordered." msgstr "" -#: ../../library/json.rst:130 +#: ../../library/json.rst:135 msgid "Basic Usage" msgstr "基本用法" -#: ../../library/json.rst:137 +#: ../../library/json.rst:142 msgid "" "Serialize *obj* as a JSON formatted stream to *fp* (a ``.write()``-" "supporting :term:`file-like object`) using this :ref:`conversion table `." msgstr "" -#: ../../library/json.rst:141 +#: ../../library/json.rst:146 msgid "" "If *skipkeys* is true (default: ``False``), then dict keys that are not of a " "basic type (:class:`str`, :class:`int`, :class:`float`, :class:`bool`, " "``None``) will be skipped instead of raising a :exc:`TypeError`." msgstr "" -#: ../../library/json.rst:145 +#: ../../library/json.rst:150 msgid "" "The :mod:`json` module always produces :class:`str` objects, not :class:" "`bytes` objects. Therefore, ``fp.write()`` must support :class:`str` input." msgstr "" -#: ../../library/json.rst:149 ../../library/json.rst:422 +#: ../../library/json.rst:154 ../../library/json.rst:433 msgid "" "If *ensure_ascii* is true (the default), the output is guaranteed to have " "all incoming non-ASCII characters escaped. If *ensure_ascii* is false, " "these characters will be output as-is." msgstr "" -#: ../../library/json.rst:153 +#: ../../library/json.rst:158 msgid "" "If *check_circular* is false (default: ``True``), then the circular " "reference check for container types will be skipped and a circular reference " "will result in an :exc:`RecursionError` (or worse)." msgstr "" -#: ../../library/json.rst:157 +#: ../../library/json.rst:162 msgid "" "If *allow_nan* is false (default: ``True``), then it will be a :exc:" "`ValueError` to serialize out of range :class:`float` values (``nan``, " @@ -136,7 +143,7 @@ msgid "" "Infinity``) will be used." msgstr "" -#: ../../library/json.rst:163 ../../library/json.rst:441 +#: ../../library/json.rst:168 ../../library/json.rst:452 msgid "" "If *indent* is a non-negative integer or string, then JSON array elements " "and object members will be pretty-printed with that indent level. An indent " @@ -146,11 +153,11 @@ msgid "" "``\"\\t\"``), that string is used to indent each level." msgstr "" -#: ../../library/json.rst:170 ../../library/json.rst:448 +#: ../../library/json.rst:175 ../../library/json.rst:459 msgid "Allow strings for *indent* in addition to integers." msgstr "" -#: ../../library/json.rst:173 ../../library/json.rst:451 +#: ../../library/json.rst:178 ../../library/json.rst:462 msgid "" "If specified, *separators* should be an ``(item_separator, key_separator)`` " "tuple. The default is ``(', ', ': ')`` if *indent* is ``None`` and ``(',', " @@ -158,11 +165,11 @@ msgid "" "specify ``(',', ':')`` to eliminate whitespace." msgstr "" -#: ../../library/json.rst:178 ../../library/json.rst:456 +#: ../../library/json.rst:183 ../../library/json.rst:467 msgid "Use ``(',', ': ')`` as default if *indent* is not ``None``." msgstr "" -#: ../../library/json.rst:181 ../../library/json.rst:459 +#: ../../library/json.rst:186 ../../library/json.rst:470 msgid "" "If specified, *default* should be a function that gets called for objects " "that can't otherwise be serialized. It should return a JSON encodable " @@ -170,39 +177,39 @@ msgid "" "`TypeError` is raised." msgstr "" -#: ../../library/json.rst:186 +#: ../../library/json.rst:191 msgid "" "If *sort_keys* is true (default: ``False``), then the output of dictionaries " "will be sorted by key." msgstr "" -#: ../../library/json.rst:189 +#: ../../library/json.rst:194 msgid "" "To use a custom :class:`JSONEncoder` subclass (e.g. one that overrides the :" "meth:`default` method to serialize additional types), specify it with the " "*cls* kwarg; otherwise :class:`JSONEncoder` is used." msgstr "" -#: ../../library/json.rst:193 ../../library/json.rst:266 +#: ../../library/json.rst:198 ../../library/json.rst:277 msgid "" "All optional parameters are now :ref:`keyword-only `." msgstr "" -#: ../../library/json.rst:198 +#: ../../library/json.rst:203 msgid "" "Unlike :mod:`pickle` and :mod:`marshal`, JSON is not a framed protocol, so " "trying to serialize multiple objects with repeated calls to :func:`dump` " "using the same *fp* will result in an invalid JSON file." msgstr "" -#: ../../library/json.rst:207 +#: ../../library/json.rst:212 msgid "" "Serialize *obj* to a JSON formatted :class:`str` using this :ref:`conversion " "table `. The arguments have the same meaning as in :func:" "`dump`." msgstr "" -#: ../../library/json.rst:213 +#: ../../library/json.rst:218 msgid "" "Keys in key/value pairs of JSON are always of the type :class:`str`. When a " "dictionary is converted into JSON, all the keys of the dictionary are " @@ -211,14 +218,14 @@ msgid "" "original one. That is, ``loads(dumps(x)) != x`` if x has non-string keys." msgstr "" -#: ../../library/json.rst:222 +#: ../../library/json.rst:227 msgid "" "Deserialize *fp* (a ``.read()``-supporting :term:`text file` or :term:" "`binary file` containing a JSON document) to a Python object using this :ref:" "`conversion table `." msgstr "" -#: ../../library/json.rst:226 +#: ../../library/json.rst:231 msgid "" "*object_hook* is an optional function that will be called with the result of " "any object literal decoded (a :class:`dict`). The return value of " @@ -227,7 +234,7 @@ msgid "" "org>`_ class hinting)." msgstr "" -#: ../../library/json.rst:232 +#: ../../library/json.rst:237 msgid "" "*object_pairs_hook* is an optional function that will be called with the " "result of any object literal decoded with an ordered list of pairs. The " @@ -236,11 +243,11 @@ msgid "" "*object_hook* is also defined, the *object_pairs_hook* takes priority." msgstr "" -#: ../../library/json.rst:238 ../../library/json.rst:337 +#: ../../library/json.rst:243 ../../library/json.rst:348 msgid "Added support for *object_pairs_hook*." msgstr "新增對於 *object_pairs_hook* 的支援。" -#: ../../library/json.rst:241 ../../library/json.rst:340 +#: ../../library/json.rst:246 ../../library/json.rst:351 msgid "" "*parse_float*, if specified, will be called with the string of every JSON " "float to be decoded. By default, this is equivalent to ``float(num_str)``. " @@ -248,7 +255,7 @@ msgid "" "class:`decimal.Decimal`)." msgstr "" -#: ../../library/json.rst:246 ../../library/json.rst:345 +#: ../../library/json.rst:251 ../../library/json.rst:356 msgid "" "*parse_int*, if specified, will be called with the string of every JSON int " "to be decoded. By default, this is equivalent to ``int(num_str)``. This " @@ -256,149 +263,156 @@ msgid "" "`float`)." msgstr "" -#: ../../library/json.rst:251 ../../library/json.rst:350 +#: ../../library/json.rst:256 +msgid "" +"The default *parse_int* of :func:`int` now limits the maximum length of the " +"integer string via the interpreter's :ref:`integer string conversion length " +"limitation ` to help avoid denial of service attacks." +msgstr "" + +#: ../../library/json.rst:262 ../../library/json.rst:361 msgid "" "*parse_constant*, if specified, will be called with one of the following " "strings: ``'-Infinity'``, ``'Infinity'``, ``'NaN'``. This can be used to " "raise an exception if invalid JSON numbers are encountered." msgstr "" -#: ../../library/json.rst:256 +#: ../../library/json.rst:267 msgid "*parse_constant* doesn't get called on 'null', 'true', 'false' anymore." msgstr "" -#: ../../library/json.rst:259 +#: ../../library/json.rst:270 msgid "" "To use a custom :class:`JSONDecoder` subclass, specify it with the ``cls`` " "kwarg; otherwise :class:`JSONDecoder` is used. Additional keyword arguments " "will be passed to the constructor of the class." msgstr "" -#: ../../library/json.rst:263 ../../library/json.rst:281 -#: ../../library/json.rst:360 +#: ../../library/json.rst:274 ../../library/json.rst:292 +#: ../../library/json.rst:371 msgid "" "If the data being deserialized is not a valid JSON document, a :exc:" "`JSONDecodeError` will be raised." msgstr "" -#: ../../library/json.rst:269 +#: ../../library/json.rst:280 msgid "" "*fp* can now be a :term:`binary file`. The input encoding should be UTF-8, " "UTF-16 or UTF-32." msgstr "" -#: ../../library/json.rst:275 +#: ../../library/json.rst:286 msgid "" "Deserialize *s* (a :class:`str`, :class:`bytes` or :class:`bytearray` " "instance containing a JSON document) to a Python object using this :ref:" "`conversion table `." msgstr "" -#: ../../library/json.rst:279 +#: ../../library/json.rst:290 msgid "The other arguments have the same meaning as in :func:`load`." msgstr "" -#: ../../library/json.rst:284 +#: ../../library/json.rst:295 msgid "" "*s* can now be of type :class:`bytes` or :class:`bytearray`. The input " "encoding should be UTF-8, UTF-16 or UTF-32." msgstr "" -#: ../../library/json.rst:288 +#: ../../library/json.rst:299 msgid "The keyword argument *encoding* has been removed." msgstr "" -#: ../../library/json.rst:293 +#: ../../library/json.rst:304 msgid "Encoders and Decoders" msgstr "" -#: ../../library/json.rst:297 +#: ../../library/json.rst:308 msgid "Simple JSON decoder." msgstr "" -#: ../../library/json.rst:299 +#: ../../library/json.rst:310 msgid "Performs the following translations in decoding by default:" msgstr "" -#: ../../library/json.rst:304 ../../library/json.rst:393 +#: ../../library/json.rst:315 ../../library/json.rst:404 msgid "JSON" msgstr "JSON" -#: ../../library/json.rst:304 ../../library/json.rst:393 +#: ../../library/json.rst:315 ../../library/json.rst:404 msgid "Python" msgstr "Python" -#: ../../library/json.rst:306 ../../library/json.rst:395 +#: ../../library/json.rst:317 ../../library/json.rst:406 msgid "object" msgstr "object" -#: ../../library/json.rst:306 ../../library/json.rst:395 +#: ../../library/json.rst:317 ../../library/json.rst:406 msgid "dict" msgstr "dict" -#: ../../library/json.rst:308 ../../library/json.rst:397 +#: ../../library/json.rst:319 ../../library/json.rst:408 msgid "array" msgstr "array" -#: ../../library/json.rst:308 +#: ../../library/json.rst:319 msgid "list" msgstr "list" -#: ../../library/json.rst:310 ../../library/json.rst:399 +#: ../../library/json.rst:321 ../../library/json.rst:410 msgid "string" msgstr "string" -#: ../../library/json.rst:310 ../../library/json.rst:399 +#: ../../library/json.rst:321 ../../library/json.rst:410 msgid "str" msgstr "str" -#: ../../library/json.rst:312 +#: ../../library/json.rst:323 msgid "number (int)" msgstr "number (int)" -#: ../../library/json.rst:312 +#: ../../library/json.rst:323 msgid "int" msgstr "int" -#: ../../library/json.rst:314 +#: ../../library/json.rst:325 msgid "number (real)" msgstr "" -#: ../../library/json.rst:314 +#: ../../library/json.rst:325 msgid "float" msgstr "float" -#: ../../library/json.rst:316 ../../library/json.rst:403 +#: ../../library/json.rst:327 ../../library/json.rst:414 msgid "true" msgstr "true" -#: ../../library/json.rst:316 ../../library/json.rst:403 +#: ../../library/json.rst:327 ../../library/json.rst:414 msgid "True" msgstr "True" -#: ../../library/json.rst:318 ../../library/json.rst:405 +#: ../../library/json.rst:329 ../../library/json.rst:416 msgid "false" msgstr "false" -#: ../../library/json.rst:318 ../../library/json.rst:405 +#: ../../library/json.rst:329 ../../library/json.rst:416 msgid "False" msgstr "False" -#: ../../library/json.rst:320 ../../library/json.rst:407 +#: ../../library/json.rst:331 ../../library/json.rst:418 msgid "null" msgstr "null" -#: ../../library/json.rst:320 ../../library/json.rst:407 +#: ../../library/json.rst:331 ../../library/json.rst:418 msgid "None" msgstr "None" -#: ../../library/json.rst:323 +#: ../../library/json.rst:334 msgid "" "It also understands ``NaN``, ``Infinity``, and ``-Infinity`` as their " "corresponding ``float`` values, which is outside the JSON spec." msgstr "" -#: ../../library/json.rst:326 +#: ../../library/json.rst:337 msgid "" "*object_hook*, if specified, will be called with the result of every JSON " "object decoded and its return value will be used in place of the given :" @@ -406,7 +420,7 @@ msgid "" "support `JSON-RPC `_ class hinting)." msgstr "" -#: ../../library/json.rst:331 +#: ../../library/json.rst:342 msgid "" "*object_pairs_hook*, if specified will be called with the result of every " "JSON object decoded with an ordered list of pairs. The return value of " @@ -415,7 +429,7 @@ msgid "" "the *object_pairs_hook* takes priority." msgstr "" -#: ../../library/json.rst:355 +#: ../../library/json.rst:366 msgid "" "If *strict* is false (``True`` is the default), then control characters will " "be allowed inside strings. Control characters in this context are those " @@ -423,60 +437,60 @@ msgid "" "``'\\n'``, ``'\\r'`` and ``'\\0'``." msgstr "" -#: ../../library/json.rst:363 ../../library/json.rst:464 +#: ../../library/json.rst:374 ../../library/json.rst:475 msgid "All parameters are now :ref:`keyword-only `." msgstr "" -#: ../../library/json.rst:368 +#: ../../library/json.rst:379 msgid "" "Return the Python representation of *s* (a :class:`str` instance containing " "a JSON document)." msgstr "" -#: ../../library/json.rst:371 +#: ../../library/json.rst:382 msgid "" ":exc:`JSONDecodeError` will be raised if the given JSON document is not " "valid." msgstr "" -#: ../../library/json.rst:376 +#: ../../library/json.rst:387 msgid "" "Decode a JSON document from *s* (a :class:`str` beginning with a JSON " "document) and return a 2-tuple of the Python representation and the index in " "*s* where the document ended." msgstr "" -#: ../../library/json.rst:380 +#: ../../library/json.rst:391 msgid "" "This can be used to decode a JSON document from a string that may have " "extraneous data at the end." msgstr "" -#: ../../library/json.rst:386 +#: ../../library/json.rst:397 msgid "Extensible JSON encoder for Python data structures." msgstr "" -#: ../../library/json.rst:388 +#: ../../library/json.rst:399 msgid "Supports the following objects and types by default:" msgstr "" -#: ../../library/json.rst:397 +#: ../../library/json.rst:408 msgid "list, tuple" msgstr "list, tuple" -#: ../../library/json.rst:401 +#: ../../library/json.rst:412 msgid "int, float, int- & float-derived Enums" msgstr "" -#: ../../library/json.rst:401 +#: ../../library/json.rst:412 msgid "number" msgstr "" -#: ../../library/json.rst:410 +#: ../../library/json.rst:421 msgid "Added support for int- and float-derived Enum classes." msgstr "" -#: ../../library/json.rst:413 +#: ../../library/json.rst:424 msgid "" "To extend this to recognize other objects, subclass and implement a :meth:" "`default` method with another method that returns a serializable object for " @@ -484,14 +498,14 @@ msgid "" "(to raise :exc:`TypeError`)." msgstr "" -#: ../../library/json.rst:418 +#: ../../library/json.rst:429 msgid "" "If *skipkeys* is false (the default), a :exc:`TypeError` will be raised when " "trying to encode keys that are not :class:`str`, :class:`int`, :class:" "`float` or ``None``. If *skipkeys* is true, such items are simply skipped." msgstr "" -#: ../../library/json.rst:426 +#: ../../library/json.rst:437 msgid "" "If *check_circular* is true (the default), then lists, dicts, and custom " "encoded objects will be checked for circular references during encoding to " @@ -499,7 +513,7 @@ msgid "" "Otherwise, no such check takes place." msgstr "" -#: ../../library/json.rst:431 +#: ../../library/json.rst:442 msgid "" "If *allow_nan* is true (the default), then ``NaN``, ``Infinity``, and ``-" "Infinity`` will be encoded as such. This behavior is not JSON specification " @@ -507,71 +521,71 @@ msgid "" "decoders. Otherwise, it will be a :exc:`ValueError` to encode such floats." msgstr "" -#: ../../library/json.rst:437 +#: ../../library/json.rst:448 msgid "" "If *sort_keys* is true (default: ``False``), then the output of dictionaries " "will be sorted by key; this is useful for regression tests to ensure that " "JSON serializations can be compared on a day-to-day basis." msgstr "" -#: ../../library/json.rst:470 +#: ../../library/json.rst:481 msgid "" "Implement this method in a subclass such that it returns a serializable " "object for *o*, or calls the base implementation (to raise a :exc:" "`TypeError`)." msgstr "" -#: ../../library/json.rst:474 +#: ../../library/json.rst:485 msgid "" "For example, to support arbitrary iterators, you could implement :meth:" "`default` like this::" msgstr "" -#: ../../library/json.rst:490 +#: ../../library/json.rst:501 msgid "" "Return a JSON string representation of a Python data structure, *o*. For " "example::" msgstr "" -#: ../../library/json.rst:499 +#: ../../library/json.rst:510 msgid "" "Encode the given object, *o*, and yield each string representation as " "available. For example::" msgstr "" -#: ../../library/json.rst:507 +#: ../../library/json.rst:518 msgid "Exceptions" msgstr "例外" -#: ../../library/json.rst:511 +#: ../../library/json.rst:522 msgid "Subclass of :exc:`ValueError` with the following additional attributes:" msgstr "" -#: ../../library/json.rst:515 +#: ../../library/json.rst:526 msgid "The unformatted error message." msgstr "" -#: ../../library/json.rst:519 +#: ../../library/json.rst:530 msgid "The JSON document being parsed." msgstr "" -#: ../../library/json.rst:523 +#: ../../library/json.rst:534 msgid "The start index of *doc* where parsing failed." msgstr "" -#: ../../library/json.rst:527 +#: ../../library/json.rst:538 msgid "The line corresponding to *pos*." msgstr "" -#: ../../library/json.rst:531 +#: ../../library/json.rst:542 msgid "The column corresponding to *pos*." msgstr "" -#: ../../library/json.rst:537 +#: ../../library/json.rst:548 msgid "Standard Compliance and Interoperability" msgstr "" -#: ../../library/json.rst:539 +#: ../../library/json.rst:550 msgid "" "The JSON format is specified by :rfc:`7159` and by `ECMA-404 `_. " @@ -580,48 +594,48 @@ msgid "" "parameters other than those explicitly mentioned, are not considered." msgstr "" -#: ../../library/json.rst:545 +#: ../../library/json.rst:556 msgid "" "This module does not comply with the RFC in a strict fashion, implementing " "some extensions that are valid JavaScript but not valid JSON. In particular:" msgstr "" -#: ../../library/json.rst:548 +#: ../../library/json.rst:559 msgid "Infinite and NaN number values are accepted and output;" msgstr "" -#: ../../library/json.rst:549 +#: ../../library/json.rst:560 msgid "" "Repeated names within an object are accepted, and only the value of the last " "name-value pair is used." msgstr "" -#: ../../library/json.rst:552 +#: ../../library/json.rst:563 msgid "" "Since the RFC permits RFC-compliant parsers to accept input texts that are " "not RFC-compliant, this module's deserializer is technically RFC-compliant " "under default settings." msgstr "" -#: ../../library/json.rst:557 +#: ../../library/json.rst:568 msgid "Character Encodings" msgstr "" -#: ../../library/json.rst:559 +#: ../../library/json.rst:570 msgid "" "The RFC requires that JSON be represented using either UTF-8, UTF-16, or " "UTF-32, with UTF-8 being the recommended default for maximum " "interoperability." msgstr "" -#: ../../library/json.rst:562 +#: ../../library/json.rst:573 msgid "" "As permitted, though not required, by the RFC, this module's serializer sets " "*ensure_ascii=True* by default, thus escaping the output so that the " "resulting strings only contain ASCII characters." msgstr "" -#: ../../library/json.rst:566 +#: ../../library/json.rst:577 msgid "" "Other than the *ensure_ascii* parameter, this module is defined strictly in " "terms of conversion between Python objects and :class:`Unicode strings " @@ -629,7 +643,7 @@ msgid "" "encodings." msgstr "" -#: ../../library/json.rst:571 +#: ../../library/json.rst:582 msgid "" "The RFC prohibits adding a byte order mark (BOM) to the start of a JSON " "text, and this module's serializer does not add a BOM to its output. The RFC " @@ -638,7 +652,7 @@ msgid "" "an initial BOM is present." msgstr "" -#: ../../library/json.rst:577 +#: ../../library/json.rst:588 msgid "" "The RFC does not explicitly forbid JSON strings which contain byte sequences " "that don't correspond to valid Unicode characters (e.g. unpaired UTF-16 " @@ -647,29 +661,29 @@ msgid "" "class:`str`) code points for such sequences." msgstr "" -#: ../../library/json.rst:585 +#: ../../library/json.rst:596 msgid "Infinite and NaN Number Values" msgstr "" -#: ../../library/json.rst:587 +#: ../../library/json.rst:598 msgid "" "The RFC does not permit the representation of infinite or NaN number values. " "Despite that, by default, this module accepts and outputs ``Infinity``, ``-" "Infinity``, and ``NaN`` as if they were valid JSON number literal values::" msgstr "" -#: ../../library/json.rst:602 +#: ../../library/json.rst:613 msgid "" "In the serializer, the *allow_nan* parameter can be used to alter this " "behavior. In the deserializer, the *parse_constant* parameter can be used " "to alter this behavior." msgstr "" -#: ../../library/json.rst:608 +#: ../../library/json.rst:619 msgid "Repeated Names Within an Object" msgstr "" -#: ../../library/json.rst:610 +#: ../../library/json.rst:621 msgid "" "The RFC specifies that the names within a JSON object should be unique, but " "does not mandate how repeated names in JSON objects should be handled. By " @@ -677,15 +691,15 @@ msgid "" "but the last name-value pair for a given name::" msgstr "" -#: ../../library/json.rst:619 +#: ../../library/json.rst:630 msgid "The *object_pairs_hook* parameter can be used to alter this behavior." msgstr "" -#: ../../library/json.rst:623 +#: ../../library/json.rst:634 msgid "Top-level Non-Object, Non-Array Values" msgstr "" -#: ../../library/json.rst:625 +#: ../../library/json.rst:636 msgid "" "The old version of JSON specified by the obsolete :rfc:`4627` required that " "the top-level value of a JSON text must be either a JSON object or array " @@ -695,43 +709,43 @@ msgid "" "its serializer or its deserializer." msgstr "" -#: ../../library/json.rst:632 +#: ../../library/json.rst:643 msgid "" "Regardless, for maximum interoperability, you may wish to voluntarily adhere " "to the restriction yourself." msgstr "" -#: ../../library/json.rst:637 +#: ../../library/json.rst:648 msgid "Implementation Limitations" msgstr "" -#: ../../library/json.rst:639 +#: ../../library/json.rst:650 msgid "Some JSON deserializer implementations may set limits on:" msgstr "" -#: ../../library/json.rst:641 +#: ../../library/json.rst:652 msgid "the size of accepted JSON texts" msgstr "" -#: ../../library/json.rst:642 +#: ../../library/json.rst:653 msgid "the maximum level of nesting of JSON objects and arrays" msgstr "" -#: ../../library/json.rst:643 +#: ../../library/json.rst:654 msgid "the range and precision of JSON numbers" msgstr "" -#: ../../library/json.rst:644 +#: ../../library/json.rst:655 msgid "the content and maximum length of JSON strings" msgstr "" -#: ../../library/json.rst:646 +#: ../../library/json.rst:657 msgid "" "This module does not impose any such limits beyond those of the relevant " "Python datatypes themselves or the Python interpreter itself." msgstr "" -#: ../../library/json.rst:649 +#: ../../library/json.rst:660 msgid "" "When serializing to JSON, beware any such limitations in applications that " "may consume your JSON. In particular, it is common for JSON numbers to be " @@ -742,77 +756,77 @@ msgid "" "as :class:`decimal.Decimal`." msgstr "" -#: ../../library/json.rst:662 +#: ../../library/json.rst:673 msgid "Command Line Interface" msgstr "" -#: ../../library/json.rst:667 +#: ../../library/json.rst:678 msgid "**Source code:** :source:`Lib/json/tool.py`" msgstr "**原始碼:**\\ :source:`Lib/json/tool.py`" -#: ../../library/json.rst:671 +#: ../../library/json.rst:682 msgid "" "The :mod:`json.tool` module provides a simple command line interface to " "validate and pretty-print JSON objects." msgstr "" -#: ../../library/json.rst:674 +#: ../../library/json.rst:685 msgid "" "If the optional ``infile`` and ``outfile`` arguments are not specified, :" "attr:`sys.stdin` and :attr:`sys.stdout` will be used respectively:" msgstr "" -#: ../../library/json.rst:686 +#: ../../library/json.rst:697 msgid "" "The output is now in the same order as the input. Use the :option:`--sort-" "keys` option to sort the output of dictionaries alphabetically by key." msgstr "" -#: ../../library/json.rst:693 +#: ../../library/json.rst:704 msgid "Command line options" msgstr "" -#: ../../library/json.rst:697 +#: ../../library/json.rst:708 msgid "The JSON file to be validated or pretty-printed:" msgstr "" -#: ../../library/json.rst:713 +#: ../../library/json.rst:724 msgid "If *infile* is not specified, read from :attr:`sys.stdin`." msgstr "" -#: ../../library/json.rst:717 +#: ../../library/json.rst:728 msgid "" "Write the output of the *infile* to the given *outfile*. Otherwise, write it " "to :attr:`sys.stdout`." msgstr "" -#: ../../library/json.rst:722 +#: ../../library/json.rst:733 msgid "Sort the output of dictionaries alphabetically by key." msgstr "" -#: ../../library/json.rst:728 +#: ../../library/json.rst:739 msgid "" "Disable escaping of non-ascii characters, see :func:`json.dumps` for more " "information." msgstr "" -#: ../../library/json.rst:734 +#: ../../library/json.rst:745 msgid "Parse every input line as separate JSON object." msgstr "" -#: ../../library/json.rst:740 +#: ../../library/json.rst:751 msgid "Mutually exclusive options for whitespace control." msgstr "" -#: ../../library/json.rst:746 +#: ../../library/json.rst:757 msgid "Show the help message." msgstr "" -#: ../../library/json.rst:750 +#: ../../library/json.rst:761 msgid "Footnotes" msgstr "註解" -#: ../../library/json.rst:751 +#: ../../library/json.rst:762 msgid "" "As noted in `the errata for RFC 7159 `_, JSON permits literal U+2028 (LINE SEPARATOR) " diff --git a/library/stdtypes.po b/library/stdtypes.po index 702d391dc8..330d43b8aa 100644 --- a/library/stdtypes.po +++ b/library/stdtypes.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-08-31 00:21+0000\n" +"POT-Creation-Date: 2022-09-03 00:15+0000\n" "PO-Revision-Date: 2022-06-12 15:22+0800\n" "Last-Translator: Matt Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -122,21 +122,21 @@ msgstr "" #: ../../library/stdtypes.rst:85 ../../library/stdtypes.rst:143 #: ../../library/stdtypes.rst:275 ../../library/stdtypes.rst:364 -#: ../../library/stdtypes.rst:414 ../../library/stdtypes.rst:883 -#: ../../library/stdtypes.rst:1088 +#: ../../library/stdtypes.rst:414 ../../library/stdtypes.rst:890 +#: ../../library/stdtypes.rst:1095 msgid "Operation" msgstr "" #: ../../library/stdtypes.rst:85 ../../library/stdtypes.rst:275 #: ../../library/stdtypes.rst:364 ../../library/stdtypes.rst:414 -#: ../../library/stdtypes.rst:883 ../../library/stdtypes.rst:1088 +#: ../../library/stdtypes.rst:890 ../../library/stdtypes.rst:1095 msgid "Result" msgstr "結果" #: ../../library/stdtypes.rst:85 ../../library/stdtypes.rst:275 -#: ../../library/stdtypes.rst:414 ../../library/stdtypes.rst:883 -#: ../../library/stdtypes.rst:1088 ../../library/stdtypes.rst:2325 -#: ../../library/stdtypes.rst:3537 +#: ../../library/stdtypes.rst:414 ../../library/stdtypes.rst:890 +#: ../../library/stdtypes.rst:1095 ../../library/stdtypes.rst:2332 +#: ../../library/stdtypes.rst:3544 msgid "Notes" msgstr "註解" @@ -149,9 +149,9 @@ msgid "if *x* is false, then *y*, else *x*" msgstr "" #: ../../library/stdtypes.rst:87 ../../library/stdtypes.rst:285 -#: ../../library/stdtypes.rst:885 ../../library/stdtypes.rst:888 -#: ../../library/stdtypes.rst:1099 ../../library/stdtypes.rst:2331 -#: ../../library/stdtypes.rst:3543 +#: ../../library/stdtypes.rst:892 ../../library/stdtypes.rst:895 +#: ../../library/stdtypes.rst:1106 ../../library/stdtypes.rst:2338 +#: ../../library/stdtypes.rst:3550 msgid "\\(1)" msgstr "\\(1)" @@ -164,9 +164,9 @@ msgid "if *x* is false, then *x*, else *y*" msgstr "" #: ../../library/stdtypes.rst:90 ../../library/stdtypes.rst:288 -#: ../../library/stdtypes.rst:308 ../../library/stdtypes.rst:1127 -#: ../../library/stdtypes.rst:2335 ../../library/stdtypes.rst:2337 -#: ../../library/stdtypes.rst:3547 ../../library/stdtypes.rst:3549 +#: ../../library/stdtypes.rst:308 ../../library/stdtypes.rst:1134 +#: ../../library/stdtypes.rst:2342 ../../library/stdtypes.rst:2344 +#: ../../library/stdtypes.rst:3554 ../../library/stdtypes.rst:3556 msgid "\\(2)" msgstr "\\(2)" @@ -178,19 +178,19 @@ msgstr "``not x``" msgid "if *x* is false, then ``True``, else ``False``" msgstr "" -#: ../../library/stdtypes.rst:93 ../../library/stdtypes.rst:897 -#: ../../library/stdtypes.rst:1130 ../../library/stdtypes.rst:2339 -#: ../../library/stdtypes.rst:2341 ../../library/stdtypes.rst:2343 -#: ../../library/stdtypes.rst:2345 ../../library/stdtypes.rst:3551 -#: ../../library/stdtypes.rst:3553 ../../library/stdtypes.rst:3555 -#: ../../library/stdtypes.rst:3557 +#: ../../library/stdtypes.rst:93 ../../library/stdtypes.rst:904 +#: ../../library/stdtypes.rst:1137 ../../library/stdtypes.rst:2346 +#: ../../library/stdtypes.rst:2348 ../../library/stdtypes.rst:2350 +#: ../../library/stdtypes.rst:2352 ../../library/stdtypes.rst:3558 +#: ../../library/stdtypes.rst:3560 ../../library/stdtypes.rst:3562 +#: ../../library/stdtypes.rst:3564 msgid "\\(3)" msgstr "\\(3)" #: ../../library/stdtypes.rst:102 ../../library/stdtypes.rst:319 -#: ../../library/stdtypes.rst:432 ../../library/stdtypes.rst:934 -#: ../../library/stdtypes.rst:1138 ../../library/stdtypes.rst:2371 -#: ../../library/stdtypes.rst:3587 +#: ../../library/stdtypes.rst:432 ../../library/stdtypes.rst:941 +#: ../../library/stdtypes.rst:1145 ../../library/stdtypes.rst:2378 +#: ../../library/stdtypes.rst:3594 msgid "Notes:" msgstr "註解:" @@ -229,9 +229,9 @@ msgstr "" msgid "This table summarizes the comparison operations:" msgstr "" -#: ../../library/stdtypes.rst:143 ../../library/stdtypes.rst:2302 -#: ../../library/stdtypes.rst:2325 ../../library/stdtypes.rst:3514 -#: ../../library/stdtypes.rst:3537 +#: ../../library/stdtypes.rst:143 ../../library/stdtypes.rst:2309 +#: ../../library/stdtypes.rst:2332 ../../library/stdtypes.rst:3521 +#: ../../library/stdtypes.rst:3544 msgid "Meaning" msgstr "" @@ -513,8 +513,8 @@ msgid "" "zero." msgstr "" -#: ../../library/stdtypes.rst:301 ../../library/stdtypes.rst:1120 -#: ../../library/stdtypes.rst:2333 ../../library/stdtypes.rst:3574 +#: ../../library/stdtypes.rst:301 ../../library/stdtypes.rst:1127 +#: ../../library/stdtypes.rst:2340 ../../library/stdtypes.rst:3581 msgid "\\(6)" msgstr "\\(6)" @@ -551,10 +551,10 @@ msgid "*x* to the power *y*" msgstr "" #: ../../library/stdtypes.rst:310 ../../library/stdtypes.rst:312 -#: ../../library/stdtypes.rst:1109 ../../library/stdtypes.rst:1112 -#: ../../library/stdtypes.rst:2358 ../../library/stdtypes.rst:2361 -#: ../../library/stdtypes.rst:2364 ../../library/stdtypes.rst:3570 -#: ../../library/stdtypes.rst:3577 +#: ../../library/stdtypes.rst:1116 ../../library/stdtypes.rst:1119 +#: ../../library/stdtypes.rst:2365 ../../library/stdtypes.rst:2368 +#: ../../library/stdtypes.rst:2371 ../../library/stdtypes.rst:3577 +#: ../../library/stdtypes.rst:3584 msgid "\\(5)" msgstr "\\(5)" @@ -689,9 +689,9 @@ msgid "bitwise :dfn:`or` of *x* and *y*" msgstr "" #: ../../library/stdtypes.rst:416 ../../library/stdtypes.rst:419 -#: ../../library/stdtypes.rst:422 ../../library/stdtypes.rst:1133 -#: ../../library/stdtypes.rst:2347 ../../library/stdtypes.rst:2351 -#: ../../library/stdtypes.rst:3559 ../../library/stdtypes.rst:3563 +#: ../../library/stdtypes.rst:422 ../../library/stdtypes.rst:1140 +#: ../../library/stdtypes.rst:2354 ../../library/stdtypes.rst:2358 +#: ../../library/stdtypes.rst:3566 ../../library/stdtypes.rst:3570 msgid "\\(4)" msgstr "\\(4)" @@ -875,11 +875,18 @@ msgstr "" #: ../../library/stdtypes.rst:589 msgid "" +"The values returned by ``as_integer_ratio()`` can be huge. Attempts to " +"render such integers into decimal strings may bump into the :ref:`integer " +"string conversion length limitation `." +msgstr "" + +#: ../../library/stdtypes.rst:596 +msgid "" "Return ``True`` if the float instance is finite with integral value, and " "``False`` otherwise::" msgstr "" -#: ../../library/stdtypes.rst:597 +#: ../../library/stdtypes.rst:604 msgid "" "Two methods support conversion to and from hexadecimal strings. Since " "Python's floats are stored internally as binary numbers, converting a float " @@ -889,30 +896,30 @@ msgid "" "numerical work." msgstr "" -#: ../../library/stdtypes.rst:608 +#: ../../library/stdtypes.rst:615 msgid "" "Return a representation of a floating-point number as a hexadecimal string. " "For finite floating-point numbers, this representation will always include a " "leading ``0x`` and a trailing ``p`` and exponent." msgstr "" -#: ../../library/stdtypes.rst:616 +#: ../../library/stdtypes.rst:623 msgid "" "Class method to return the float represented by a hexadecimal string *s*. " "The string *s* may have leading and trailing whitespace." msgstr "" -#: ../../library/stdtypes.rst:621 +#: ../../library/stdtypes.rst:628 msgid "" "Note that :meth:`float.hex` is an instance method, while :meth:`float." "fromhex` is a class method." msgstr "" -#: ../../library/stdtypes.rst:624 +#: ../../library/stdtypes.rst:631 msgid "A hexadecimal string takes the form::" msgstr "" -#: ../../library/stdtypes.rst:628 +#: ../../library/stdtypes.rst:635 msgid "" "where the optional ``sign`` may by either ``+`` or ``-``, ``integer`` and " "``fraction`` are strings of hexadecimal digits, and ``exponent`` is a " @@ -926,7 +933,7 @@ msgid "" "by :meth:`float.fromhex`." msgstr "" -#: ../../library/stdtypes.rst:641 +#: ../../library/stdtypes.rst:648 msgid "" "Note that the exponent is written in decimal rather than hexadecimal, and " "that it gives the power of 2 by which to multiply the coefficient. For " @@ -934,17 +941,17 @@ msgid "" "number ``(3 + 10./16 + 7./16**2) * 2.0**10``, or ``3740.0``::" msgstr "" -#: ../../library/stdtypes.rst:651 +#: ../../library/stdtypes.rst:658 msgid "" "Applying the reverse conversion to ``3740.0`` gives a different hexadecimal " "string representing the same number::" msgstr "" -#: ../../library/stdtypes.rst:661 +#: ../../library/stdtypes.rst:668 msgid "Hashing of numeric types" msgstr "" -#: ../../library/stdtypes.rst:663 +#: ../../library/stdtypes.rst:670 msgid "" "For numbers ``x`` and ``y``, possibly of different types, it's a requirement " "that ``hash(x) == hash(y)`` whenever ``x == y`` (see the :meth:`~object." @@ -960,24 +967,24 @@ msgid "" "of :data:`sys.hash_info`." msgstr "" -#: ../../library/stdtypes.rst:678 +#: ../../library/stdtypes.rst:685 msgid "" "Currently, the prime used is ``P = 2**31 - 1`` on machines with 32-bit C " "longs and ``P = 2**61 - 1`` on machines with 64-bit C longs." msgstr "" -#: ../../library/stdtypes.rst:681 +#: ../../library/stdtypes.rst:688 msgid "Here are the rules in detail:" msgstr "" -#: ../../library/stdtypes.rst:683 +#: ../../library/stdtypes.rst:690 msgid "" "If ``x = m / n`` is a nonnegative rational number and ``n`` is not divisible " "by ``P``, define ``hash(x)`` as ``m * invmod(n, P) % P``, where ``invmod(n, " "P)`` gives the inverse of ``n`` modulo ``P``." msgstr "" -#: ../../library/stdtypes.rst:687 +#: ../../library/stdtypes.rst:694 msgid "" "If ``x = m / n`` is a nonnegative rational number and ``n`` is divisible by " "``P`` (but ``m`` is not) then ``n`` has no inverse modulo ``P`` and the rule " @@ -985,20 +992,20 @@ msgid "" "value ``sys.hash_info.inf``." msgstr "" -#: ../../library/stdtypes.rst:692 +#: ../../library/stdtypes.rst:699 msgid "" "If ``x = m / n`` is a negative rational number define ``hash(x)`` as ``-" "hash(-x)``. If the resulting hash is ``-1``, replace it with ``-2``." msgstr "" -#: ../../library/stdtypes.rst:696 +#: ../../library/stdtypes.rst:703 msgid "" "The particular values ``sys.hash_info.inf`` and ``-sys.hash_info.inf`` are " "used as hash values for positive infinity or negative infinity " "(respectively)." msgstr "" -#: ../../library/stdtypes.rst:700 +#: ../../library/stdtypes.rst:707 msgid "" "For a :class:`complex` number ``z``, the hash values of the real and " "imaginary parts are combined by computing ``hash(z.real) + sys.hash_info." @@ -1007,18 +1014,18 @@ msgid "" "1))``. Again, if the result is ``-1``, it's replaced with ``-2``." msgstr "" -#: ../../library/stdtypes.rst:708 +#: ../../library/stdtypes.rst:715 msgid "" "To clarify the above rules, here's some example Python code, equivalent to " "the built-in hash, for computing the hash of a rational number, :class:" "`float`, or :class:`complex`::" msgstr "" -#: ../../library/stdtypes.rst:763 +#: ../../library/stdtypes.rst:770 msgid "Iterator Types" msgstr "" -#: ../../library/stdtypes.rst:771 +#: ../../library/stdtypes.rst:778 msgid "" "Python supports a concept of iteration over containers. This is implemented " "using two distinct methods; these are used to allow user-defined classes to " @@ -1026,13 +1033,13 @@ msgid "" "support the iteration methods." msgstr "" -#: ../../library/stdtypes.rst:776 +#: ../../library/stdtypes.rst:783 msgid "" "One method needs to be defined for container objects to provide :term:" "`iterable` support:" msgstr "" -#: ../../library/stdtypes.rst:783 +#: ../../library/stdtypes.rst:790 msgid "" "Return an :term:`iterator` object. The object is required to support the " "iterator protocol described below. If a container supports different types " @@ -1044,13 +1051,13 @@ msgid "" "in the Python/C API." msgstr "" -#: ../../library/stdtypes.rst:792 +#: ../../library/stdtypes.rst:799 msgid "" "The iterator objects themselves are required to support the following two " "methods, which together form the :dfn:`iterator protocol`:" msgstr "" -#: ../../library/stdtypes.rst:798 +#: ../../library/stdtypes.rst:805 msgid "" "Return the :term:`iterator` object itself. This is required to allow both " "containers and iterators to be used with the :keyword:`for` and :keyword:" @@ -1058,7 +1065,7 @@ msgid "" "tp_iter` slot of the type structure for Python objects in the Python/C API." msgstr "" -#: ../../library/stdtypes.rst:807 +#: ../../library/stdtypes.rst:814 msgid "" "Return the next item from the :term:`iterator`. If there are no further " "items, raise the :exc:`StopIteration` exception. This method corresponds to " @@ -1066,7 +1073,7 @@ msgid "" "Python objects in the Python/C API." msgstr "" -#: ../../library/stdtypes.rst:812 +#: ../../library/stdtypes.rst:819 msgid "" "Python defines several iterator objects to support iteration over general " "and specific sequence types, dictionaries, and other more specialized " @@ -1074,18 +1081,18 @@ msgid "" "the iterator protocol." msgstr "" -#: ../../library/stdtypes.rst:817 +#: ../../library/stdtypes.rst:824 msgid "" "Once an iterator's :meth:`~iterator.__next__` method raises :exc:" "`StopIteration`, it must continue to do so on subsequent calls. " "Implementations that do not obey this property are deemed broken." msgstr "" -#: ../../library/stdtypes.rst:825 +#: ../../library/stdtypes.rst:832 msgid "Generator Types" msgstr "" -#: ../../library/stdtypes.rst:827 +#: ../../library/stdtypes.rst:834 msgid "" "Python's :term:`generator`\\s provide a convenient way to implement the " "iterator protocol. If a container object's :meth:`__iter__` method is " @@ -1095,11 +1102,11 @@ msgid "" "found in :ref:`the documentation for the yield expression `." msgstr "" -#: ../../library/stdtypes.rst:839 +#: ../../library/stdtypes.rst:846 msgid "Sequence Types --- :class:`list`, :class:`tuple`, :class:`range`" msgstr "" -#: ../../library/stdtypes.rst:841 +#: ../../library/stdtypes.rst:848 msgid "" "There are three basic sequence types: lists, tuples, and range objects. " "Additional sequence types tailored for processing of :ref:`binary data " @@ -1107,11 +1114,11 @@ msgid "" "sections." msgstr "" -#: ../../library/stdtypes.rst:850 +#: ../../library/stdtypes.rst:857 msgid "Common Sequence Operations" msgstr "" -#: ../../library/stdtypes.rst:854 +#: ../../library/stdtypes.rst:861 msgid "" "The operations in the following table are supported by most sequence types, " "both mutable and immutable. The :class:`collections.abc.Sequence` ABC is " @@ -1119,7 +1126,7 @@ msgid "" "sequence types." msgstr "" -#: ../../library/stdtypes.rst:859 +#: ../../library/stdtypes.rst:866 msgid "" "This table lists the sequence operations sorted in ascending priority. In " "the table, *s* and *t* are sequences of the same type, *n*, *i*, *j* and *k* " @@ -1127,7 +1134,7 @@ msgid "" "restrictions imposed by *s*." msgstr "" -#: ../../library/stdtypes.rst:864 +#: ../../library/stdtypes.rst:871 msgid "" "The ``in`` and ``not in`` operations have the same priorities as the " "comparison operations. The ``+`` (concatenation) and ``*`` (repetition) " @@ -1135,125 +1142,125 @@ msgid "" "[3]_" msgstr "" -#: ../../library/stdtypes.rst:885 +#: ../../library/stdtypes.rst:892 msgid "``x in s``" msgstr "``x in s``" -#: ../../library/stdtypes.rst:885 +#: ../../library/stdtypes.rst:892 msgid "``True`` if an item of *s* is equal to *x*, else ``False``" msgstr "" -#: ../../library/stdtypes.rst:888 +#: ../../library/stdtypes.rst:895 msgid "``x not in s``" msgstr "``x not in s``" -#: ../../library/stdtypes.rst:888 +#: ../../library/stdtypes.rst:895 msgid "``False`` if an item of *s* is equal to *x*, else ``True``" msgstr "" -#: ../../library/stdtypes.rst:891 +#: ../../library/stdtypes.rst:898 msgid "``s + t``" msgstr "``s + t``" -#: ../../library/stdtypes.rst:891 +#: ../../library/stdtypes.rst:898 msgid "the concatenation of *s* and *t*" msgstr "" -#: ../../library/stdtypes.rst:891 +#: ../../library/stdtypes.rst:898 msgid "(6)(7)" msgstr "(6)(7)" -#: ../../library/stdtypes.rst:894 +#: ../../library/stdtypes.rst:901 msgid "``s * n`` or ``n * s``" msgstr "``s * n`` 或 ``n * s``" -#: ../../library/stdtypes.rst:894 +#: ../../library/stdtypes.rst:901 msgid "equivalent to adding *s* to itself *n* times" msgstr "" -#: ../../library/stdtypes.rst:894 +#: ../../library/stdtypes.rst:901 msgid "(2)(7)" msgstr "(2)(7)" -#: ../../library/stdtypes.rst:897 +#: ../../library/stdtypes.rst:904 msgid "``s[i]``" msgstr "``s[i]``" -#: ../../library/stdtypes.rst:897 +#: ../../library/stdtypes.rst:904 msgid "*i*\\ th item of *s*, origin 0" msgstr "" -#: ../../library/stdtypes.rst:899 +#: ../../library/stdtypes.rst:906 msgid "``s[i:j]``" msgstr "``s[i:j]``" -#: ../../library/stdtypes.rst:899 +#: ../../library/stdtypes.rst:906 msgid "slice of *s* from *i* to *j*" msgstr "" -#: ../../library/stdtypes.rst:899 +#: ../../library/stdtypes.rst:906 msgid "(3)(4)" msgstr "(3)(4)" -#: ../../library/stdtypes.rst:901 +#: ../../library/stdtypes.rst:908 msgid "``s[i:j:k]``" msgstr "``s[i:j:k]``" -#: ../../library/stdtypes.rst:901 +#: ../../library/stdtypes.rst:908 msgid "slice of *s* from *i* to *j* with step *k*" msgstr "" -#: ../../library/stdtypes.rst:901 +#: ../../library/stdtypes.rst:908 msgid "(3)(5)" msgstr "(3)(5)" -#: ../../library/stdtypes.rst:904 +#: ../../library/stdtypes.rst:911 msgid "``len(s)``" msgstr "``len(s)``" -#: ../../library/stdtypes.rst:904 +#: ../../library/stdtypes.rst:911 msgid "length of *s*" msgstr "" -#: ../../library/stdtypes.rst:906 +#: ../../library/stdtypes.rst:913 msgid "``min(s)``" msgstr "``min(s)``" -#: ../../library/stdtypes.rst:906 +#: ../../library/stdtypes.rst:913 msgid "smallest item of *s*" msgstr "" -#: ../../library/stdtypes.rst:908 +#: ../../library/stdtypes.rst:915 msgid "``max(s)``" msgstr "``max(s)``" -#: ../../library/stdtypes.rst:908 +#: ../../library/stdtypes.rst:915 msgid "largest item of *s*" msgstr "" -#: ../../library/stdtypes.rst:910 +#: ../../library/stdtypes.rst:917 msgid "``s.index(x[, i[, j]])``" msgstr "``s.index(x[, i[, j]])``" -#: ../../library/stdtypes.rst:910 +#: ../../library/stdtypes.rst:917 msgid "" "index of the first occurrence of *x* in *s* (at or after index *i* and " "before index *j*)" msgstr "" -#: ../../library/stdtypes.rst:910 ../../library/stdtypes.rst:3545 +#: ../../library/stdtypes.rst:917 ../../library/stdtypes.rst:3552 msgid "\\(8)" msgstr "\\(8)" -#: ../../library/stdtypes.rst:914 +#: ../../library/stdtypes.rst:921 msgid "``s.count(x)``" msgstr "``s.count(x)``" -#: ../../library/stdtypes.rst:914 +#: ../../library/stdtypes.rst:921 msgid "total number of occurrences of *x* in *s*" msgstr "" -#: ../../library/stdtypes.rst:918 +#: ../../library/stdtypes.rst:925 msgid "" "Sequences of the same type also support comparisons. In particular, tuples " "and lists are compared lexicographically by comparing corresponding " @@ -1262,7 +1269,7 @@ msgid "" "(For full details see :ref:`comparisons` in the language reference.)" msgstr "" -#: ../../library/stdtypes.rst:928 +#: ../../library/stdtypes.rst:935 msgid "" "Forward and reversed iterators over mutable sequences access values using an " "index. That index will continue to march forward (or backward) even if the " @@ -1271,7 +1278,7 @@ msgid "" "drops below zero)." msgstr "" -#: ../../library/stdtypes.rst:937 +#: ../../library/stdtypes.rst:944 msgid "" "While the ``in`` and ``not in`` operations are used only for simple " "containment testing in the general case, some specialised sequences (such " @@ -1279,7 +1286,7 @@ msgid "" "subsequence testing::" msgstr "" -#: ../../library/stdtypes.rst:946 +#: ../../library/stdtypes.rst:953 msgid "" "Values of *n* less than ``0`` are treated as ``0`` (which yields an empty " "sequence of the same type as *s*). Note that items in the sequence *s* are " @@ -1287,7 +1294,7 @@ msgid "" "Python programmers; consider::" msgstr "" -#: ../../library/stdtypes.rst:958 +#: ../../library/stdtypes.rst:965 msgid "" "What has happened is that ``[[]]`` is a one-element list containing an empty " "list, so all three elements of ``[[]] * 3`` are references to this single " @@ -1295,20 +1302,20 @@ msgid "" "list. You can create a list of different lists this way::" msgstr "" -#: ../../library/stdtypes.rst:970 +#: ../../library/stdtypes.rst:977 msgid "" "Further explanation is available in the FAQ entry :ref:`faq-multidimensional-" "list`." msgstr "" -#: ../../library/stdtypes.rst:974 +#: ../../library/stdtypes.rst:981 msgid "" "If *i* or *j* is negative, the index is relative to the end of sequence *s*: " "``len(s) + i`` or ``len(s) + j`` is substituted. But note that ``-0`` is " "still ``0``." msgstr "" -#: ../../library/stdtypes.rst:979 +#: ../../library/stdtypes.rst:986 msgid "" "The slice of *s* from *i* to *j* is defined as the sequence of items with " "index *k* such that ``i <= k < j``. If *i* or *j* is greater than " @@ -1317,7 +1324,7 @@ msgid "" "to *j*, the slice is empty." msgstr "" -#: ../../library/stdtypes.rst:986 +#: ../../library/stdtypes.rst:993 msgid "" "The slice of *s* from *i* to *j* with step *k* is defined as the sequence of " "items with index ``x = i + n*k`` such that ``0 <= n < (j-i)/k``. In other " @@ -1330,7 +1337,7 @@ msgid "" "``None``, it is treated like ``1``." msgstr "" -#: ../../library/stdtypes.rst:997 +#: ../../library/stdtypes.rst:1004 msgid "" "Concatenating immutable sequences always results in a new object. This " "means that building up a sequence by repeated concatenation will have a " @@ -1338,14 +1345,14 @@ msgid "" "runtime cost, you must switch to one of the alternatives below:" msgstr "" -#: ../../library/stdtypes.rst:1002 +#: ../../library/stdtypes.rst:1009 msgid "" "if concatenating :class:`str` objects, you can build a list and use :meth:" "`str.join` at the end or else write to an :class:`io.StringIO` instance and " "retrieve its value when complete" msgstr "" -#: ../../library/stdtypes.rst:1006 +#: ../../library/stdtypes.rst:1013 msgid "" "if concatenating :class:`bytes` objects, you can similarly use :meth:`bytes." "join` or :class:`io.BytesIO`, or you can do in-place concatenation with a :" @@ -1353,22 +1360,22 @@ msgid "" "an efficient overallocation mechanism" msgstr "" -#: ../../library/stdtypes.rst:1011 +#: ../../library/stdtypes.rst:1018 msgid "if concatenating :class:`tuple` objects, extend a :class:`list` instead" msgstr "" -#: ../../library/stdtypes.rst:1013 +#: ../../library/stdtypes.rst:1020 msgid "for other types, investigate the relevant class documentation" msgstr "" -#: ../../library/stdtypes.rst:1017 +#: ../../library/stdtypes.rst:1024 msgid "" "Some sequence types (such as :class:`range`) only support item sequences " "that follow specific patterns, and hence don't support sequence " "concatenation or repetition." msgstr "" -#: ../../library/stdtypes.rst:1022 +#: ../../library/stdtypes.rst:1029 msgid "" "``index`` raises :exc:`ValueError` when *x* is not found in *s*. Not all " "implementations support passing the additional arguments *i* and *j*. These " @@ -1378,42 +1385,42 @@ msgid "" "start of the sequence rather than the start of the slice." msgstr "" -#: ../../library/stdtypes.rst:1033 +#: ../../library/stdtypes.rst:1040 msgid "Immutable Sequence Types" msgstr "" -#: ../../library/stdtypes.rst:1040 +#: ../../library/stdtypes.rst:1047 msgid "" "The only operation that immutable sequence types generally implement that is " "not also implemented by mutable sequence types is support for the :func:" "`hash` built-in." msgstr "" -#: ../../library/stdtypes.rst:1044 +#: ../../library/stdtypes.rst:1051 msgid "" "This support allows immutable sequences, such as :class:`tuple` instances, " "to be used as :class:`dict` keys and stored in :class:`set` and :class:" "`frozenset` instances." msgstr "" -#: ../../library/stdtypes.rst:1048 +#: ../../library/stdtypes.rst:1055 msgid "" "Attempting to hash an immutable sequence that contains unhashable values " "will result in :exc:`TypeError`." msgstr "" -#: ../../library/stdtypes.rst:1055 +#: ../../library/stdtypes.rst:1062 msgid "Mutable Sequence Types" msgstr "" -#: ../../library/stdtypes.rst:1062 +#: ../../library/stdtypes.rst:1069 msgid "" "The operations in the following table are defined on mutable sequence types. " "The :class:`collections.abc.MutableSequence` ABC is provided to make it " "easier to correctly implement these operations on custom sequence types." msgstr "" -#: ../../library/stdtypes.rst:1066 +#: ../../library/stdtypes.rst:1073 msgid "" "In the table *s* is an instance of a mutable sequence type, *t* is any " "iterable object and *x* is an arbitrary object that meets any type and value " @@ -1421,145 +1428,145 @@ msgid "" "integers that meet the value restriction ``0 <= x <= 255``)." msgstr "" -#: ../../library/stdtypes.rst:1090 +#: ../../library/stdtypes.rst:1097 msgid "``s[i] = x``" msgstr "``s[i] = x``" -#: ../../library/stdtypes.rst:1090 +#: ../../library/stdtypes.rst:1097 msgid "item *i* of *s* is replaced by *x*" msgstr "" -#: ../../library/stdtypes.rst:1093 +#: ../../library/stdtypes.rst:1100 msgid "``s[i:j] = t``" msgstr "``s[i:j] = t``" -#: ../../library/stdtypes.rst:1093 +#: ../../library/stdtypes.rst:1100 msgid "" "slice of *s* from *i* to *j* is replaced by the contents of the iterable *t*" msgstr "" -#: ../../library/stdtypes.rst:1097 +#: ../../library/stdtypes.rst:1104 msgid "``del s[i:j]``" msgstr "``del s[i:j]``" -#: ../../library/stdtypes.rst:1097 +#: ../../library/stdtypes.rst:1104 msgid "same as ``s[i:j] = []``" msgstr "" -#: ../../library/stdtypes.rst:1099 +#: ../../library/stdtypes.rst:1106 msgid "``s[i:j:k] = t``" msgstr "``s[i:j:k] = t``" -#: ../../library/stdtypes.rst:1099 +#: ../../library/stdtypes.rst:1106 msgid "the elements of ``s[i:j:k]`` are replaced by those of *t*" msgstr "" -#: ../../library/stdtypes.rst:1102 +#: ../../library/stdtypes.rst:1109 msgid "``del s[i:j:k]``" msgstr "``del s[i:j:k]``" -#: ../../library/stdtypes.rst:1102 +#: ../../library/stdtypes.rst:1109 msgid "removes the elements of ``s[i:j:k]`` from the list" msgstr "" -#: ../../library/stdtypes.rst:1105 +#: ../../library/stdtypes.rst:1112 msgid "``s.append(x)``" msgstr "``s.append(x)``" -#: ../../library/stdtypes.rst:1105 +#: ../../library/stdtypes.rst:1112 msgid "" "appends *x* to the end of the sequence (same as ``s[len(s):len(s)] = [x]``)" msgstr "" -#: ../../library/stdtypes.rst:1109 +#: ../../library/stdtypes.rst:1116 msgid "``s.clear()``" msgstr "``s.clear()``" -#: ../../library/stdtypes.rst:1109 +#: ../../library/stdtypes.rst:1116 msgid "removes all items from *s* (same as ``del s[:]``)" msgstr "" -#: ../../library/stdtypes.rst:1112 +#: ../../library/stdtypes.rst:1119 msgid "``s.copy()``" msgstr "``s.copy()``" -#: ../../library/stdtypes.rst:1112 +#: ../../library/stdtypes.rst:1119 msgid "creates a shallow copy of *s* (same as ``s[:]``)" msgstr "" -#: ../../library/stdtypes.rst:1115 +#: ../../library/stdtypes.rst:1122 msgid "``s.extend(t)`` or ``s += t``" msgstr "``s.extend(t)`` 或 ``s += t``" -#: ../../library/stdtypes.rst:1115 +#: ../../library/stdtypes.rst:1122 msgid "" "extends *s* with the contents of *t* (for the most part the same as " "``s[len(s):len(s)] = t``)" msgstr "" -#: ../../library/stdtypes.rst:1120 +#: ../../library/stdtypes.rst:1127 msgid "``s *= n``" msgstr "``s *= n``" -#: ../../library/stdtypes.rst:1120 +#: ../../library/stdtypes.rst:1127 msgid "updates *s* with its contents repeated *n* times" msgstr "" -#: ../../library/stdtypes.rst:1123 +#: ../../library/stdtypes.rst:1130 msgid "``s.insert(i, x)``" msgstr "``s.insert(i, x)``" -#: ../../library/stdtypes.rst:1123 +#: ../../library/stdtypes.rst:1130 msgid "" "inserts *x* into *s* at the index given by *i* (same as ``s[i:i] = [x]``)" msgstr "" -#: ../../library/stdtypes.rst:1127 +#: ../../library/stdtypes.rst:1134 msgid "``s.pop()`` or ``s.pop(i)``" msgstr "``s.pop()`` 或 ``s.pop(i)``" -#: ../../library/stdtypes.rst:1127 +#: ../../library/stdtypes.rst:1134 msgid "retrieves the item at *i* and also removes it from *s*" msgstr "" -#: ../../library/stdtypes.rst:1130 +#: ../../library/stdtypes.rst:1137 msgid "``s.remove(x)``" msgstr "``s.remove(x)``" -#: ../../library/stdtypes.rst:1130 +#: ../../library/stdtypes.rst:1137 msgid "remove the first item from *s* where ``s[i]`` is equal to *x*" msgstr "" -#: ../../library/stdtypes.rst:1133 +#: ../../library/stdtypes.rst:1140 msgid "``s.reverse()``" msgstr "``s.reverse()``" -#: ../../library/stdtypes.rst:1133 +#: ../../library/stdtypes.rst:1140 msgid "reverses the items of *s* in place" msgstr "" -#: ../../library/stdtypes.rst:1141 +#: ../../library/stdtypes.rst:1148 msgid "*t* must have the same length as the slice it is replacing." msgstr "" -#: ../../library/stdtypes.rst:1144 +#: ../../library/stdtypes.rst:1151 msgid "" "The optional argument *i* defaults to ``-1``, so that by default the last " "item is removed and returned." msgstr "" -#: ../../library/stdtypes.rst:1148 +#: ../../library/stdtypes.rst:1155 msgid ":meth:`remove` raises :exc:`ValueError` when *x* is not found in *s*." msgstr "" -#: ../../library/stdtypes.rst:1151 +#: ../../library/stdtypes.rst:1158 msgid "" "The :meth:`reverse` method modifies the sequence in place for economy of " "space when reversing a large sequence. To remind users that it operates by " "side effect, it does not return the reversed sequence." msgstr "" -#: ../../library/stdtypes.rst:1156 +#: ../../library/stdtypes.rst:1163 msgid "" ":meth:`clear` and :meth:`!copy` are included for consistency with the " "interfaces of mutable containers that don't support slicing operations (such " @@ -1568,11 +1575,11 @@ msgid "" "classes provide it." msgstr "" -#: ../../library/stdtypes.rst:1162 +#: ../../library/stdtypes.rst:1169 msgid ":meth:`clear` and :meth:`!copy` methods." msgstr "" -#: ../../library/stdtypes.rst:1166 +#: ../../library/stdtypes.rst:1173 msgid "" "The value *n* is an integer, or an object implementing :meth:`~object." "__index__`. Zero and negative values of *n* clear the sequence. Items in " @@ -1580,39 +1587,39 @@ msgid "" "explained for ``s * n`` under :ref:`typesseq-common`." msgstr "" -#: ../../library/stdtypes.rst:1175 +#: ../../library/stdtypes.rst:1182 msgid "Lists" msgstr "List(串列)" -#: ../../library/stdtypes.rst:1179 +#: ../../library/stdtypes.rst:1186 msgid "" "Lists are mutable sequences, typically used to store collections of " "homogeneous items (where the precise degree of similarity will vary by " "application)." msgstr "" -#: ../../library/stdtypes.rst:1185 +#: ../../library/stdtypes.rst:1192 msgid "Lists may be constructed in several ways:" msgstr "" -#: ../../library/stdtypes.rst:1187 +#: ../../library/stdtypes.rst:1194 msgid "Using a pair of square brackets to denote the empty list: ``[]``" msgstr "" -#: ../../library/stdtypes.rst:1188 +#: ../../library/stdtypes.rst:1195 msgid "" "Using square brackets, separating items with commas: ``[a]``, ``[a, b, c]``" msgstr "" -#: ../../library/stdtypes.rst:1189 +#: ../../library/stdtypes.rst:1196 msgid "Using a list comprehension: ``[x for x in iterable]``" msgstr "" -#: ../../library/stdtypes.rst:1190 +#: ../../library/stdtypes.rst:1197 msgid "Using the type constructor: ``list()`` or ``list(iterable)``" msgstr "" -#: ../../library/stdtypes.rst:1192 +#: ../../library/stdtypes.rst:1199 msgid "" "The constructor builds a list whose items are the same and in the same order " "as *iterable*'s items. *iterable* may be either a sequence, a container " @@ -1623,20 +1630,20 @@ msgid "" "new empty list, ``[]``." msgstr "" -#: ../../library/stdtypes.rst:1201 +#: ../../library/stdtypes.rst:1208 msgid "" "Many other operations also produce lists, including the :func:`sorted` built-" "in." msgstr "" -#: ../../library/stdtypes.rst:1204 +#: ../../library/stdtypes.rst:1211 msgid "" "Lists implement all of the :ref:`common ` and :ref:`mutable " "` sequence operations. Lists also provide the following " "additional method:" msgstr "" -#: ../../library/stdtypes.rst:1210 +#: ../../library/stdtypes.rst:1217 msgid "" "This method sorts the list in place, using only ``<`` comparisons between " "items. Exceptions are not suppressed - if any comparison operations fail, " @@ -1644,13 +1651,13 @@ msgid "" "partially modified state)." msgstr "" -#: ../../library/stdtypes.rst:1215 +#: ../../library/stdtypes.rst:1222 msgid "" ":meth:`sort` accepts two arguments that can only be passed by keyword (:ref:" "`keyword-only arguments `):" msgstr "" -#: ../../library/stdtypes.rst:1218 +#: ../../library/stdtypes.rst:1225 msgid "" "*key* specifies a function of one argument that is used to extract a " "comparison key from each list element (for example, ``key=str.lower``). The " @@ -1659,19 +1666,19 @@ msgid "" "list items are sorted directly without calculating a separate key value." msgstr "" -#: ../../library/stdtypes.rst:1225 +#: ../../library/stdtypes.rst:1232 msgid "" "The :func:`functools.cmp_to_key` utility is available to convert a 2.x style " "*cmp* function to a *key* function." msgstr "" -#: ../../library/stdtypes.rst:1228 +#: ../../library/stdtypes.rst:1235 msgid "" "*reverse* is a boolean value. If set to ``True``, then the list elements " "are sorted as if each comparison were reversed." msgstr "" -#: ../../library/stdtypes.rst:1231 +#: ../../library/stdtypes.rst:1238 msgid "" "This method modifies the sequence in place for economy of space when sorting " "a large sequence. To remind users that it operates by side effect, it does " @@ -1679,7 +1686,7 @@ msgid "" "new sorted list instance)." msgstr "" -#: ../../library/stdtypes.rst:1236 +#: ../../library/stdtypes.rst:1243 msgid "" "The :meth:`sort` method is guaranteed to be stable. A sort is stable if it " "guarantees not to change the relative order of elements that compare equal " @@ -1687,12 +1694,12 @@ msgid "" "department, then by salary grade)." msgstr "" -#: ../../library/stdtypes.rst:1241 +#: ../../library/stdtypes.rst:1248 msgid "" "For sorting examples and a brief sorting tutorial, see :ref:`sortinghowto`." msgstr "" -#: ../../library/stdtypes.rst:1245 +#: ../../library/stdtypes.rst:1252 msgid "" "While a list is being sorted, the effect of attempting to mutate, or even " "inspect, the list is undefined. The C implementation of Python makes the " @@ -1700,11 +1707,11 @@ msgid "" "detect that the list has been mutated during a sort." msgstr "" -#: ../../library/stdtypes.rst:1254 +#: ../../library/stdtypes.rst:1261 msgid "Tuples" msgstr "" -#: ../../library/stdtypes.rst:1258 +#: ../../library/stdtypes.rst:1265 msgid "" "Tuples are immutable sequences, typically used to store collections of " "heterogeneous data (such as the 2-tuples produced by the :func:`enumerate` " @@ -1713,27 +1720,27 @@ msgid "" "class:`dict` instance)." msgstr "" -#: ../../library/stdtypes.rst:1266 +#: ../../library/stdtypes.rst:1273 msgid "Tuples may be constructed in a number of ways:" msgstr "" -#: ../../library/stdtypes.rst:1268 +#: ../../library/stdtypes.rst:1275 msgid "Using a pair of parentheses to denote the empty tuple: ``()``" msgstr "" -#: ../../library/stdtypes.rst:1269 +#: ../../library/stdtypes.rst:1276 msgid "Using a trailing comma for a singleton tuple: ``a,`` or ``(a,)``" msgstr "" -#: ../../library/stdtypes.rst:1270 +#: ../../library/stdtypes.rst:1277 msgid "Separating items with commas: ``a, b, c`` or ``(a, b, c)``" msgstr "" -#: ../../library/stdtypes.rst:1271 +#: ../../library/stdtypes.rst:1278 msgid "Using the :func:`tuple` built-in: ``tuple()`` or ``tuple(iterable)``" msgstr "" -#: ../../library/stdtypes.rst:1273 +#: ../../library/stdtypes.rst:1280 msgid "" "The constructor builds a tuple whose items are the same and in the same " "order as *iterable*'s items. *iterable* may be either a sequence, a " @@ -1744,7 +1751,7 @@ msgid "" "``()``." msgstr "" -#: ../../library/stdtypes.rst:1281 +#: ../../library/stdtypes.rst:1288 msgid "" "Note that it is actually the comma which makes a tuple, not the parentheses. " "The parentheses are optional, except in the empty tuple case, or when they " @@ -1753,30 +1760,30 @@ msgid "" "call with a 3-tuple as the sole argument." msgstr "" -#: ../../library/stdtypes.rst:1287 +#: ../../library/stdtypes.rst:1294 msgid "" "Tuples implement all of the :ref:`common ` sequence " "operations." msgstr "" -#: ../../library/stdtypes.rst:1290 +#: ../../library/stdtypes.rst:1297 msgid "" "For heterogeneous collections of data where access by name is clearer than " "access by index, :func:`collections.namedtuple` may be a more appropriate " "choice than a simple tuple object." msgstr "" -#: ../../library/stdtypes.rst:1298 +#: ../../library/stdtypes.rst:1305 msgid "Ranges" msgstr "" -#: ../../library/stdtypes.rst:1302 +#: ../../library/stdtypes.rst:1309 msgid "" "The :class:`range` type represents an immutable sequence of numbers and is " "commonly used for looping a specific number of times in :keyword:`for` loops." msgstr "" -#: ../../library/stdtypes.rst:1309 +#: ../../library/stdtypes.rst:1316 msgid "" "The arguments to the range constructor must be integers (either built-in :" "class:`int` or any object that implements the :meth:`~object.__index__` " @@ -1785,38 +1792,38 @@ msgid "" "zero, :exc:`ValueError` is raised." msgstr "" -#: ../../library/stdtypes.rst:1315 +#: ../../library/stdtypes.rst:1322 msgid "" "For a positive *step*, the contents of a range ``r`` are determined by the " "formula ``r[i] = start + step*i`` where ``i >= 0`` and ``r[i] < stop``." msgstr "" -#: ../../library/stdtypes.rst:1319 +#: ../../library/stdtypes.rst:1326 msgid "" "For a negative *step*, the contents of the range are still determined by the " "formula ``r[i] = start + step*i``, but the constraints are ``i >= 0`` and " "``r[i] > stop``." msgstr "" -#: ../../library/stdtypes.rst:1323 +#: ../../library/stdtypes.rst:1330 msgid "" "A range object will be empty if ``r[0]`` does not meet the value constraint. " "Ranges do support negative indices, but these are interpreted as indexing " "from the end of the sequence determined by the positive indices." msgstr "" -#: ../../library/stdtypes.rst:1328 +#: ../../library/stdtypes.rst:1335 msgid "" "Ranges containing absolute values larger than :data:`sys.maxsize` are " "permitted but some features (such as :func:`len`) may raise :exc:" "`OverflowError`." msgstr "" -#: ../../library/stdtypes.rst:1332 +#: ../../library/stdtypes.rst:1339 msgid "Range examples::" msgstr "" -#: ../../library/stdtypes.rst:1349 +#: ../../library/stdtypes.rst:1356 msgid "" "Ranges implement all of the :ref:`common ` sequence " "operations except concatenation and repetition (due to the fact that range " @@ -1824,23 +1831,23 @@ msgid "" "repetition and concatenation will usually violate that pattern)." msgstr "" -#: ../../library/stdtypes.rst:1356 +#: ../../library/stdtypes.rst:1363 msgid "" "The value of the *start* parameter (or ``0`` if the parameter was not " "supplied)" msgstr "" -#: ../../library/stdtypes.rst:1361 +#: ../../library/stdtypes.rst:1368 msgid "The value of the *stop* parameter" msgstr "" -#: ../../library/stdtypes.rst:1365 +#: ../../library/stdtypes.rst:1372 msgid "" "The value of the *step* parameter (or ``1`` if the parameter was not " "supplied)" msgstr "" -#: ../../library/stdtypes.rst:1368 +#: ../../library/stdtypes.rst:1375 msgid "" "The advantage of the :class:`range` type over a regular :class:`list` or :" "class:`tuple` is that a :class:`range` object will always take the same " @@ -1849,14 +1856,14 @@ msgid "" "individual items and subranges as needed)." msgstr "" -#: ../../library/stdtypes.rst:1374 +#: ../../library/stdtypes.rst:1381 msgid "" "Range objects implement the :class:`collections.abc.Sequence` ABC, and " "provide features such as containment tests, element index lookup, slicing " "and support for negative indices (see :ref:`typesseq`):" msgstr "" -#: ../../library/stdtypes.rst:1394 +#: ../../library/stdtypes.rst:1401 msgid "" "Testing range objects for equality with ``==`` and ``!=`` compares them as " "sequences. That is, two range objects are considered equal if they " @@ -1866,111 +1873,111 @@ msgid "" "3)`` or ``range(0, 3, 2) == range(0, 4, 2)``.)" msgstr "" -#: ../../library/stdtypes.rst:1401 +#: ../../library/stdtypes.rst:1408 msgid "" "Implement the Sequence ABC. Support slicing and negative indices. Test :" "class:`int` objects for membership in constant time instead of iterating " "through all items." msgstr "" -#: ../../library/stdtypes.rst:1407 +#: ../../library/stdtypes.rst:1414 msgid "" "Define '==' and '!=' to compare range objects based on the sequence of " "values they define (instead of comparing based on object identity)." msgstr "" -#: ../../library/stdtypes.rst:1412 +#: ../../library/stdtypes.rst:1419 msgid "" "The :attr:`~range.start`, :attr:`~range.stop` and :attr:`~range.step` " "attributes." msgstr "" -#: ../../library/stdtypes.rst:1418 +#: ../../library/stdtypes.rst:1425 msgid "" "The `linspace recipe `_ shows " "how to implement a lazy version of range suitable for floating point " "applications." msgstr "" -#: ../../library/stdtypes.rst:1430 +#: ../../library/stdtypes.rst:1437 msgid "Text Sequence Type --- :class:`str`" msgstr "" -#: ../../library/stdtypes.rst:1432 +#: ../../library/stdtypes.rst:1439 msgid "" "Textual data in Python is handled with :class:`str` objects, or :dfn:" "`strings`. Strings are immutable :ref:`sequences ` of Unicode code " "points. String literals are written in a variety of ways:" msgstr "" -#: ../../library/stdtypes.rst:1437 +#: ../../library/stdtypes.rst:1444 msgid "Single quotes: ``'allows embedded \"double\" quotes'``" msgstr "" -#: ../../library/stdtypes.rst:1438 +#: ../../library/stdtypes.rst:1445 msgid "Double quotes: ``\"allows embedded 'single' quotes\"``" msgstr "" -#: ../../library/stdtypes.rst:1439 +#: ../../library/stdtypes.rst:1446 msgid "" "Triple quoted: ``'''Three single quotes'''``, ``\"\"\"Three double quotes" "\"\"\"``" msgstr "" -#: ../../library/stdtypes.rst:1441 +#: ../../library/stdtypes.rst:1448 msgid "" "Triple quoted strings may span multiple lines - all associated whitespace " "will be included in the string literal." msgstr "" -#: ../../library/stdtypes.rst:1444 +#: ../../library/stdtypes.rst:1451 msgid "" "String literals that are part of a single expression and have only " "whitespace between them will be implicitly converted to a single string " "literal. That is, ``(\"spam \" \"eggs\") == \"spam eggs\"``." msgstr "" -#: ../../library/stdtypes.rst:1448 +#: ../../library/stdtypes.rst:1455 msgid "" "See :ref:`strings` for more about the various forms of string literal, " "including supported escape sequences, and the ``r`` (\"raw\") prefix that " "disables most escape sequence processing." msgstr "" -#: ../../library/stdtypes.rst:1452 +#: ../../library/stdtypes.rst:1459 msgid "" "Strings may also be created from other objects using the :class:`str` " "constructor." msgstr "" -#: ../../library/stdtypes.rst:1455 +#: ../../library/stdtypes.rst:1462 msgid "" "Since there is no separate \"character\" type, indexing a string produces " "strings of length 1. That is, for a non-empty string *s*, ``s[0] == s[0:1]``." msgstr "" -#: ../../library/stdtypes.rst:1461 +#: ../../library/stdtypes.rst:1468 msgid "" "There is also no mutable string type, but :meth:`str.join` or :class:`io." "StringIO` can be used to efficiently construct strings from multiple " "fragments." msgstr "" -#: ../../library/stdtypes.rst:1465 +#: ../../library/stdtypes.rst:1472 msgid "" "For backwards compatibility with the Python 2 series, the ``u`` prefix is " "once again permitted on string literals. It has no effect on the meaning of " "string literals and cannot be combined with the ``r`` prefix." msgstr "" -#: ../../library/stdtypes.rst:1477 +#: ../../library/stdtypes.rst:1484 msgid "" "Return a :ref:`string ` version of *object*. If *object* is not " "provided, returns the empty string. Otherwise, the behavior of ``str()`` " "depends on whether *encoding* or *errors* is given, as follows." msgstr "" -#: ../../library/stdtypes.rst:1481 +#: ../../library/stdtypes.rst:1488 msgid "" "If neither *encoding* nor *errors* is given, ``str(object)`` returns :meth:" "`type(object).__str__(object) `, which is the \"informal\" " @@ -1980,7 +1987,7 @@ msgid "" "`repr(object) `." msgstr "" -#: ../../library/stdtypes.rst:1493 +#: ../../library/stdtypes.rst:1500 msgid "" "If at least one of *encoding* or *errors* is given, *object* should be a :" "term:`bytes-like object` (e.g. :class:`bytes` or :class:`bytearray`). In " @@ -1992,7 +1999,7 @@ msgid "" "buffer objects." msgstr "" -#: ../../library/stdtypes.rst:1502 +#: ../../library/stdtypes.rst:1509 msgid "" "Passing a :class:`bytes` object to :func:`str` without the *encoding* or " "*errors* arguments falls under the first case of returning the informal " @@ -2000,7 +2007,7 @@ msgid "" "Python). For example::" msgstr "" -#: ../../library/stdtypes.rst:1510 +#: ../../library/stdtypes.rst:1517 msgid "" "For more information on the ``str`` class and its methods, see :ref:" "`textseq` and the :ref:`string-methods` section below. To output formatted " @@ -2008,17 +2015,17 @@ msgid "" "addition, see the :ref:`stringservices` section." msgstr "" -#: ../../library/stdtypes.rst:1522 +#: ../../library/stdtypes.rst:1529 msgid "String Methods" msgstr "" -#: ../../library/stdtypes.rst:1527 +#: ../../library/stdtypes.rst:1534 msgid "" "Strings implement all of the :ref:`common ` sequence " "operations, along with the additional methods described below." msgstr "" -#: ../../library/stdtypes.rst:1530 +#: ../../library/stdtypes.rst:1537 msgid "" "Strings also support two styles of string formatting, one providing a large " "degree of flexibility and customization (see :meth:`str.format`, :ref:" @@ -2028,33 +2035,33 @@ msgid "" "handle (:ref:`old-string-formatting`)." msgstr "" -#: ../../library/stdtypes.rst:1537 +#: ../../library/stdtypes.rst:1544 msgid "" "The :ref:`textservices` section of the standard library covers a number of " "other modules that provide various text related utilities (including regular " "expression support in the :mod:`re` module)." msgstr "" -#: ../../library/stdtypes.rst:1543 +#: ../../library/stdtypes.rst:1550 msgid "" "Return a copy of the string with its first character capitalized and the " "rest lowercased." msgstr "" -#: ../../library/stdtypes.rst:1546 +#: ../../library/stdtypes.rst:1553 msgid "" "The first character is now put into titlecase rather than uppercase. This " "means that characters like digraphs will only have their first letter " "capitalized, instead of the full character." msgstr "" -#: ../../library/stdtypes.rst:1553 +#: ../../library/stdtypes.rst:1560 msgid "" "Return a casefolded copy of the string. Casefolded strings may be used for " "caseless matching." msgstr "" -#: ../../library/stdtypes.rst:1556 +#: ../../library/stdtypes.rst:1563 msgid "" "Casefolding is similar to lowercasing but more aggressive because it is " "intended to remove all case distinctions in a string. For example, the " @@ -2063,27 +2070,27 @@ msgid "" "`casefold` converts it to ``\"ss\"``." msgstr "" -#: ../../library/stdtypes.rst:1562 +#: ../../library/stdtypes.rst:1569 msgid "" "The casefolding algorithm is described in section 3.13 of the Unicode " "Standard." msgstr "" -#: ../../library/stdtypes.rst:1570 +#: ../../library/stdtypes.rst:1577 msgid "" "Return centered in a string of length *width*. Padding is done using the " "specified *fillchar* (default is an ASCII space). The original string is " "returned if *width* is less than or equal to ``len(s)``." msgstr "" -#: ../../library/stdtypes.rst:1578 +#: ../../library/stdtypes.rst:1585 msgid "" "Return the number of non-overlapping occurrences of substring *sub* in the " "range [*start*, *end*]. Optional arguments *start* and *end* are " "interpreted as in slice notation." msgstr "" -#: ../../library/stdtypes.rst:1585 +#: ../../library/stdtypes.rst:1592 msgid "" "Return an encoded version of the string as a bytes object. Default encoding " "is ``'utf-8'``. *errors* may be given to set a different error handling " @@ -2095,24 +2102,24 @@ msgid "" "encodings`." msgstr "" -#: ../../library/stdtypes.rst:1594 +#: ../../library/stdtypes.rst:1601 msgid "" "By default, the *errors* argument is not checked for best performances, but " "only used at the first encoding error. Enable the :ref:`Python Development " "Mode `, or use a :ref:`debug build ` to check *errors*." msgstr "" -#: ../../library/stdtypes.rst:1599 +#: ../../library/stdtypes.rst:1606 msgid "Support for keyword arguments added." msgstr "" -#: ../../library/stdtypes.rst:1602 ../../library/stdtypes.rst:2733 +#: ../../library/stdtypes.rst:1609 ../../library/stdtypes.rst:2740 msgid "" "The *errors* is now checked in development mode and in :ref:`debug mode " "`." msgstr "" -#: ../../library/stdtypes.rst:1609 +#: ../../library/stdtypes.rst:1616 msgid "" "Return ``True`` if the string ends with the specified *suffix*, otherwise " "return ``False``. *suffix* can also be a tuple of suffixes to look for. " @@ -2120,7 +2127,7 @@ msgid "" "*end*, stop comparing at that position." msgstr "" -#: ../../library/stdtypes.rst:1617 +#: ../../library/stdtypes.rst:1624 msgid "" "Return a copy of the string where all tab characters are replaced by one or " "more spaces, depending on the current column and the given tab size. Tab " @@ -2136,21 +2143,21 @@ msgid "" "printed." msgstr "" -#: ../../library/stdtypes.rst:1638 +#: ../../library/stdtypes.rst:1645 msgid "" "Return the lowest index in the string where substring *sub* is found within " "the slice ``s[start:end]``. Optional arguments *start* and *end* are " "interpreted as in slice notation. Return ``-1`` if *sub* is not found." msgstr "" -#: ../../library/stdtypes.rst:1644 +#: ../../library/stdtypes.rst:1651 msgid "" "The :meth:`~str.find` method should be used only if you need to know the " "position of *sub*. To check if *sub* is a substring or not, use the :" "keyword:`in` operator::" msgstr "" -#: ../../library/stdtypes.rst:1654 +#: ../../library/stdtypes.rst:1661 msgid "" "Perform a string formatting operation. The string on which this method is " "called can contain literal text or replacement fields delimited by braces " @@ -2160,13 +2167,13 @@ msgid "" "the corresponding argument." msgstr "" -#: ../../library/stdtypes.rst:1664 +#: ../../library/stdtypes.rst:1671 msgid "" "See :ref:`formatstrings` for a description of the various formatting options " "that can be specified in format strings." msgstr "" -#: ../../library/stdtypes.rst:1668 +#: ../../library/stdtypes.rst:1675 msgid "" "When formatting a number (:class:`int`, :class:`float`, :class:`complex`, :" "class:`decimal.Decimal` and subclasses) with the ``n`` type (ex: ``'{:n}'." @@ -2177,26 +2184,26 @@ msgid "" "This temporary change affects other threads." msgstr "" -#: ../../library/stdtypes.rst:1677 +#: ../../library/stdtypes.rst:1684 msgid "" "When formatting a number with the ``n`` type, the function sets temporarily " "the ``LC_CTYPE`` locale to the ``LC_NUMERIC`` locale in some cases." msgstr "" -#: ../../library/stdtypes.rst:1685 +#: ../../library/stdtypes.rst:1692 msgid "" "Similar to ``str.format(**mapping)``, except that ``mapping`` is used " "directly and not copied to a :class:`dict`. This is useful if for example " "``mapping`` is a dict subclass:" msgstr "" -#: ../../library/stdtypes.rst:1701 +#: ../../library/stdtypes.rst:1708 msgid "" "Like :meth:`~str.find`, but raise :exc:`ValueError` when the substring is " "not found." msgstr "" -#: ../../library/stdtypes.rst:1707 +#: ../../library/stdtypes.rst:1714 msgid "" "Return ``True`` if all characters in the string are alphanumeric and there " "is at least one character, ``False`` otherwise. A character ``c`` is " @@ -2204,7 +2211,7 @@ msgid "" "isdecimal()``, ``c.isdigit()``, or ``c.isnumeric()``." msgstr "" -#: ../../library/stdtypes.rst:1715 +#: ../../library/stdtypes.rst:1722 msgid "" "Return ``True`` if all characters in the string are alphabetic and there is " "at least one character, ``False`` otherwise. Alphabetic characters are " @@ -2214,14 +2221,14 @@ msgid "" "property defined in the Unicode Standard." msgstr "" -#: ../../library/stdtypes.rst:1724 +#: ../../library/stdtypes.rst:1731 msgid "" "Return ``True`` if the string is empty or all characters in the string are " "ASCII, ``False`` otherwise. ASCII characters have code points in the range U" "+0000-U+007F." msgstr "" -#: ../../library/stdtypes.rst:1733 +#: ../../library/stdtypes.rst:1740 msgid "" "Return ``True`` if all characters in the string are decimal characters and " "there is at least one character, ``False`` otherwise. Decimal characters are " @@ -2230,7 +2237,7 @@ msgid "" "General Category \"Nd\"." msgstr "" -#: ../../library/stdtypes.rst:1743 +#: ../../library/stdtypes.rst:1750 msgid "" "Return ``True`` if all characters in the string are digits and there is at " "least one character, ``False`` otherwise. Digits include decimal characters " @@ -2240,32 +2247,32 @@ msgid "" "property value Numeric_Type=Digit or Numeric_Type=Decimal." msgstr "" -#: ../../library/stdtypes.rst:1753 +#: ../../library/stdtypes.rst:1760 msgid "" "Return ``True`` if the string is a valid identifier according to the " "language definition, section :ref:`identifiers`." msgstr "" -#: ../../library/stdtypes.rst:1756 +#: ../../library/stdtypes.rst:1763 msgid "" "Call :func:`keyword.iskeyword` to test whether string ``s`` is a reserved " "identifier, such as :keyword:`def` and :keyword:`class`." msgstr "" -#: ../../library/stdtypes.rst:1759 +#: ../../library/stdtypes.rst:1766 msgid "Example: ::" msgstr "" "範例:\n" "\n" "::" -#: ../../library/stdtypes.rst:1772 +#: ../../library/stdtypes.rst:1779 msgid "" "Return ``True`` if all cased characters [4]_ in the string are lowercase and " "there is at least one cased character, ``False`` otherwise." msgstr "" -#: ../../library/stdtypes.rst:1778 +#: ../../library/stdtypes.rst:1785 msgid "" "Return ``True`` if all characters in the string are numeric characters, and " "there is at least one character, ``False`` otherwise. Numeric characters " @@ -2275,7 +2282,7 @@ msgid "" "Numeric_Type=Decimal or Numeric_Type=Numeric." msgstr "" -#: ../../library/stdtypes.rst:1788 +#: ../../library/stdtypes.rst:1795 msgid "" "Return ``True`` if all characters in the string are printable or the string " "is empty, ``False`` otherwise. Nonprintable characters are those characters " @@ -2286,20 +2293,20 @@ msgid "" "of strings written to :data:`sys.stdout` or :data:`sys.stderr`.)" msgstr "" -#: ../../library/stdtypes.rst:1799 +#: ../../library/stdtypes.rst:1806 msgid "" "Return ``True`` if there are only whitespace characters in the string and " "there is at least one character, ``False`` otherwise." msgstr "" -#: ../../library/stdtypes.rst:1802 +#: ../../library/stdtypes.rst:1809 msgid "" "A character is *whitespace* if in the Unicode character database (see :mod:" "`unicodedata`), either its general category is ``Zs`` (\"Separator, space" "\"), or its bidirectional class is one of ``WS``, ``B``, or ``S``." msgstr "" -#: ../../library/stdtypes.rst:1810 +#: ../../library/stdtypes.rst:1817 msgid "" "Return ``True`` if the string is a titlecased string and there is at least " "one character, for example uppercase characters may only follow uncased " @@ -2307,13 +2314,13 @@ msgid "" "otherwise." msgstr "" -#: ../../library/stdtypes.rst:1817 +#: ../../library/stdtypes.rst:1824 msgid "" "Return ``True`` if all cased characters [4]_ in the string are uppercase and " "there is at least one cased character, ``False`` otherwise." msgstr "" -#: ../../library/stdtypes.rst:1833 +#: ../../library/stdtypes.rst:1840 msgid "" "Return a string which is the concatenation of the strings in *iterable*. A :" "exc:`TypeError` will be raised if there are any non-string values in " @@ -2321,26 +2328,26 @@ msgid "" "elements is the string providing this method." msgstr "" -#: ../../library/stdtypes.rst:1841 +#: ../../library/stdtypes.rst:1848 msgid "" "Return the string left justified in a string of length *width*. Padding is " "done using the specified *fillchar* (default is an ASCII space). The " "original string is returned if *width* is less than or equal to ``len(s)``." msgstr "" -#: ../../library/stdtypes.rst:1848 +#: ../../library/stdtypes.rst:1855 msgid "" "Return a copy of the string with all the cased characters [4]_ converted to " "lowercase." msgstr "" -#: ../../library/stdtypes.rst:1851 +#: ../../library/stdtypes.rst:1858 msgid "" "The lowercasing algorithm used is described in section 3.13 of the Unicode " "Standard." msgstr "" -#: ../../library/stdtypes.rst:1857 +#: ../../library/stdtypes.rst:1864 msgid "" "Return a copy of the string with leading characters removed. The *chars* " "argument is a string specifying the set of characters to be removed. If " @@ -2349,19 +2356,19 @@ msgid "" "are stripped::" msgstr "" -#: ../../library/stdtypes.rst:1867 +#: ../../library/stdtypes.rst:1874 msgid "" "See :meth:`str.removeprefix` for a method that will remove a single prefix " "string rather than all of a set of characters. For example::" msgstr "" -#: ../../library/stdtypes.rst:1878 +#: ../../library/stdtypes.rst:1885 msgid "" "This static method returns a translation table usable for :meth:`str." "translate`." msgstr "" -#: ../../library/stdtypes.rst:1880 +#: ../../library/stdtypes.rst:1887 msgid "" "If there is only one argument, it must be a dictionary mapping Unicode " "ordinals (integers) or characters (strings of length 1) to Unicode ordinals, " @@ -2369,7 +2376,7 @@ msgid "" "converted to ordinals." msgstr "" -#: ../../library/stdtypes.rst:1885 +#: ../../library/stdtypes.rst:1892 msgid "" "If there are two arguments, they must be strings of equal length, and in the " "resulting dictionary, each character in x will be mapped to the character at " @@ -2377,7 +2384,7 @@ msgid "" "whose characters will be mapped to ``None`` in the result." msgstr "" -#: ../../library/stdtypes.rst:1893 +#: ../../library/stdtypes.rst:1900 msgid "" "Split the string at the first occurrence of *sep*, and return a 3-tuple " "containing the part before the separator, the separator itself, and the part " @@ -2385,47 +2392,47 @@ msgid "" "containing the string itself, followed by two empty strings." msgstr "" -#: ../../library/stdtypes.rst:1901 +#: ../../library/stdtypes.rst:1908 msgid "" "If the string starts with the *prefix* string, return " "``string[len(prefix):]``. Otherwise, return a copy of the original string::" msgstr "" -#: ../../library/stdtypes.rst:1915 +#: ../../library/stdtypes.rst:1922 msgid "" "If the string ends with the *suffix* string and that *suffix* is not empty, " "return ``string[:-len(suffix)]``. Otherwise, return a copy of the original " "string::" msgstr "" -#: ../../library/stdtypes.rst:1929 +#: ../../library/stdtypes.rst:1936 msgid "" "Return a copy of the string with all occurrences of substring *old* replaced " "by *new*. If the optional argument *count* is given, only the first *count* " "occurrences are replaced." msgstr "" -#: ../../library/stdtypes.rst:1936 +#: ../../library/stdtypes.rst:1943 msgid "" "Return the highest index in the string where substring *sub* is found, such " "that *sub* is contained within ``s[start:end]``. Optional arguments *start* " "and *end* are interpreted as in slice notation. Return ``-1`` on failure." msgstr "" -#: ../../library/stdtypes.rst:1943 +#: ../../library/stdtypes.rst:1950 msgid "" "Like :meth:`rfind` but raises :exc:`ValueError` when the substring *sub* is " "not found." msgstr "" -#: ../../library/stdtypes.rst:1949 +#: ../../library/stdtypes.rst:1956 msgid "" "Return the string right justified in a string of length *width*. Padding is " "done using the specified *fillchar* (default is an ASCII space). The " "original string is returned if *width* is less than or equal to ``len(s)``." msgstr "" -#: ../../library/stdtypes.rst:1956 +#: ../../library/stdtypes.rst:1963 msgid "" "Split the string at the last occurrence of *sep*, and return a 3-tuple " "containing the part before the separator, the separator itself, and the part " @@ -2433,7 +2440,7 @@ msgid "" "containing two empty strings, followed by the string itself." msgstr "" -#: ../../library/stdtypes.rst:1964 +#: ../../library/stdtypes.rst:1971 msgid "" "Return a list of the words in the string, using *sep* as the delimiter " "string. If *maxsplit* is given, at most *maxsplit* splits are done, the " @@ -2442,7 +2449,7 @@ msgid "" "behaves like :meth:`split` which is described in detail below." msgstr "" -#: ../../library/stdtypes.rst:1973 +#: ../../library/stdtypes.rst:1980 msgid "" "Return a copy of the string with trailing characters removed. The *chars* " "argument is a string specifying the set of characters to be removed. If " @@ -2451,13 +2458,13 @@ msgid "" "are stripped::" msgstr "" -#: ../../library/stdtypes.rst:1983 +#: ../../library/stdtypes.rst:1990 msgid "" "See :meth:`str.removesuffix` for a method that will remove a single suffix " "string rather than all of a set of characters. For example::" msgstr "" -#: ../../library/stdtypes.rst:1993 +#: ../../library/stdtypes.rst:2000 msgid "" "Return a list of the words in the string, using *sep* as the delimiter " "string. If *maxsplit* is given, at most *maxsplit* splits are done (thus, " @@ -2466,7 +2473,7 @@ msgid "" "possible splits are made)." msgstr "" -#: ../../library/stdtypes.rst:1999 +#: ../../library/stdtypes.rst:2006 msgid "" "If *sep* is given, consecutive delimiters are not grouped together and are " "deemed to delimit empty strings (for example, ``'1,,2'.split(',')`` returns " @@ -2475,23 +2482,23 @@ msgid "" "Splitting an empty string with a specified separator returns ``['']``." msgstr "" -#: ../../library/stdtypes.rst:2005 ../../library/stdtypes.rst:2021 -#: ../../library/stdtypes.rst:2073 ../../library/stdtypes.rst:2141 -#: ../../library/stdtypes.rst:2208 ../../library/stdtypes.rst:3049 -#: ../../library/stdtypes.rst:3065 ../../library/stdtypes.rst:3156 -#: ../../library/stdtypes.rst:3172 ../../library/stdtypes.rst:3197 -#: ../../library/stdtypes.rst:3211 ../../library/stdtypes.rst:3239 -#: ../../library/stdtypes.rst:3253 ../../library/stdtypes.rst:3271 -#: ../../library/stdtypes.rst:3298 ../../library/stdtypes.rst:3321 -#: ../../library/stdtypes.rst:3348 ../../library/stdtypes.rst:3390 -#: ../../library/stdtypes.rst:3414 +#: ../../library/stdtypes.rst:2012 ../../library/stdtypes.rst:2028 +#: ../../library/stdtypes.rst:2080 ../../library/stdtypes.rst:2148 +#: ../../library/stdtypes.rst:2215 ../../library/stdtypes.rst:3056 +#: ../../library/stdtypes.rst:3072 ../../library/stdtypes.rst:3163 +#: ../../library/stdtypes.rst:3179 ../../library/stdtypes.rst:3204 +#: ../../library/stdtypes.rst:3218 ../../library/stdtypes.rst:3246 +#: ../../library/stdtypes.rst:3260 ../../library/stdtypes.rst:3278 +#: ../../library/stdtypes.rst:3305 ../../library/stdtypes.rst:3328 +#: ../../library/stdtypes.rst:3355 ../../library/stdtypes.rst:3397 +#: ../../library/stdtypes.rst:3421 msgid "For example::" msgstr "" "舉例來說:\n" "\n" "::" -#: ../../library/stdtypes.rst:2014 +#: ../../library/stdtypes.rst:2021 msgid "" "If *sep* is not specified or is ``None``, a different splitting algorithm is " "applied: runs of consecutive whitespace are regarded as a single separator, " @@ -2501,131 +2508,131 @@ msgid "" "returns ``[]``." msgstr "" -#: ../../library/stdtypes.rst:2036 +#: ../../library/stdtypes.rst:2043 msgid "" "Return a list of the lines in the string, breaking at line boundaries. Line " "breaks are not included in the resulting list unless *keepends* is given and " "true." msgstr "" -#: ../../library/stdtypes.rst:2040 +#: ../../library/stdtypes.rst:2047 msgid "" "This method splits on the following line boundaries. In particular, the " "boundaries are a superset of :term:`universal newlines`." msgstr "" -#: ../../library/stdtypes.rst:2044 +#: ../../library/stdtypes.rst:2051 msgid "Representation" msgstr "" -#: ../../library/stdtypes.rst:2044 +#: ../../library/stdtypes.rst:2051 msgid "Description" msgstr "描述" -#: ../../library/stdtypes.rst:2046 +#: ../../library/stdtypes.rst:2053 msgid "``\\n``" msgstr "``\\n``" -#: ../../library/stdtypes.rst:2046 +#: ../../library/stdtypes.rst:2053 msgid "Line Feed" msgstr "" -#: ../../library/stdtypes.rst:2048 +#: ../../library/stdtypes.rst:2055 msgid "``\\r``" msgstr "``\\r``" -#: ../../library/stdtypes.rst:2048 +#: ../../library/stdtypes.rst:2055 msgid "Carriage Return" msgstr "" -#: ../../library/stdtypes.rst:2050 +#: ../../library/stdtypes.rst:2057 msgid "``\\r\\n``" msgstr "``\\r\\n``" -#: ../../library/stdtypes.rst:2050 +#: ../../library/stdtypes.rst:2057 msgid "Carriage Return + Line Feed" msgstr "" -#: ../../library/stdtypes.rst:2052 +#: ../../library/stdtypes.rst:2059 msgid "``\\v`` or ``\\x0b``" msgstr "``\\v`` 或 ``\\x0b``" -#: ../../library/stdtypes.rst:2052 +#: ../../library/stdtypes.rst:2059 msgid "Line Tabulation" msgstr "" -#: ../../library/stdtypes.rst:2054 +#: ../../library/stdtypes.rst:2061 msgid "``\\f`` or ``\\x0c``" msgstr "``\\f`` 或 ``\\x0c``" -#: ../../library/stdtypes.rst:2054 +#: ../../library/stdtypes.rst:2061 msgid "Form Feed" msgstr "" -#: ../../library/stdtypes.rst:2056 +#: ../../library/stdtypes.rst:2063 msgid "``\\x1c``" msgstr "``\\x1c``" -#: ../../library/stdtypes.rst:2056 +#: ../../library/stdtypes.rst:2063 msgid "File Separator" msgstr "" -#: ../../library/stdtypes.rst:2058 +#: ../../library/stdtypes.rst:2065 msgid "``\\x1d``" msgstr "``\\x1d``" -#: ../../library/stdtypes.rst:2058 +#: ../../library/stdtypes.rst:2065 msgid "Group Separator" msgstr "" -#: ../../library/stdtypes.rst:2060 +#: ../../library/stdtypes.rst:2067 msgid "``\\x1e``" msgstr "``\\x1e``" -#: ../../library/stdtypes.rst:2060 +#: ../../library/stdtypes.rst:2067 msgid "Record Separator" msgstr "" -#: ../../library/stdtypes.rst:2062 +#: ../../library/stdtypes.rst:2069 msgid "``\\x85``" msgstr "``\\x85``" -#: ../../library/stdtypes.rst:2062 +#: ../../library/stdtypes.rst:2069 msgid "Next Line (C1 Control Code)" msgstr "" -#: ../../library/stdtypes.rst:2064 +#: ../../library/stdtypes.rst:2071 msgid "``\\u2028``" msgstr "``\\u2028``" -#: ../../library/stdtypes.rst:2064 +#: ../../library/stdtypes.rst:2071 msgid "Line Separator" msgstr "" -#: ../../library/stdtypes.rst:2066 +#: ../../library/stdtypes.rst:2073 msgid "``\\u2029``" msgstr "``\\u2029``" -#: ../../library/stdtypes.rst:2066 +#: ../../library/stdtypes.rst:2073 msgid "Paragraph Separator" msgstr "" -#: ../../library/stdtypes.rst:2071 +#: ../../library/stdtypes.rst:2078 msgid "``\\v`` and ``\\f`` added to list of line boundaries." msgstr "" -#: ../../library/stdtypes.rst:2080 +#: ../../library/stdtypes.rst:2087 msgid "" "Unlike :meth:`~str.split` when a delimiter string *sep* is given, this " "method returns an empty list for the empty string, and a terminal line break " "does not result in an extra line::" msgstr "" -#: ../../library/stdtypes.rst:2089 +#: ../../library/stdtypes.rst:2096 msgid "For comparison, ``split('\\n')`` gives::" msgstr "" -#: ../../library/stdtypes.rst:2099 +#: ../../library/stdtypes.rst:2106 msgid "" "Return ``True`` if string starts with the *prefix*, otherwise return " "``False``. *prefix* can also be a tuple of prefixes to look for. With " @@ -2633,7 +2640,7 @@ msgid "" "*end*, stop comparing string at that position." msgstr "" -#: ../../library/stdtypes.rst:2107 +#: ../../library/stdtypes.rst:2114 msgid "" "Return a copy of the string with the leading and trailing characters " "removed. The *chars* argument is a string specifying the set of characters " @@ -2642,7 +2649,7 @@ msgid "" "all combinations of its values are stripped::" msgstr "" -#: ../../library/stdtypes.rst:2118 +#: ../../library/stdtypes.rst:2125 msgid "" "The outermost leading and trailing *chars* argument values are stripped from " "the string. Characters are removed from the leading end until reaching a " @@ -2650,20 +2657,20 @@ msgid "" "A similar action takes place on the trailing end. For example::" msgstr "" -#: ../../library/stdtypes.rst:2131 +#: ../../library/stdtypes.rst:2138 msgid "" "Return a copy of the string with uppercase characters converted to lowercase " "and vice versa. Note that it is not necessarily true that ``s.swapcase()." "swapcase() == s``." msgstr "" -#: ../../library/stdtypes.rst:2138 +#: ../../library/stdtypes.rst:2145 msgid "" "Return a titlecased version of the string where words start with an " "uppercase character and the remaining characters are lowercase." msgstr "" -#: ../../library/stdtypes.rst:2146 ../../library/stdtypes.rst:3358 +#: ../../library/stdtypes.rst:2153 ../../library/stdtypes.rst:3365 msgid "" "The algorithm uses a simple language-independent definition of a word as " "groups of consecutive letters. The definition works in many contexts but it " @@ -2671,19 +2678,19 @@ msgid "" "which may not be the desired result::" msgstr "" -#: ../../library/stdtypes.rst:2154 +#: ../../library/stdtypes.rst:2161 msgid "" "The :func:`string.capwords` function does not have this problem, as it " "splits words on spaces only." msgstr "" -#: ../../library/stdtypes.rst:2157 +#: ../../library/stdtypes.rst:2164 msgid "" "Alternatively, a workaround for apostrophes can be constructed using regular " "expressions::" msgstr "" -#: ../../library/stdtypes.rst:2172 +#: ../../library/stdtypes.rst:2179 msgid "" "Return a copy of the string in which each character has been mapped through " "the given translation table. The table must be an object that implements " @@ -2695,19 +2702,19 @@ msgid "" "exception, to map the character to itself." msgstr "" -#: ../../library/stdtypes.rst:2181 +#: ../../library/stdtypes.rst:2188 msgid "" "You can use :meth:`str.maketrans` to create a translation map from character-" "to-character mappings in different formats." msgstr "" -#: ../../library/stdtypes.rst:2184 +#: ../../library/stdtypes.rst:2191 msgid "" "See also the :mod:`codecs` module for a more flexible approach to custom " "character mappings." msgstr "" -#: ../../library/stdtypes.rst:2190 +#: ../../library/stdtypes.rst:2197 msgid "" "Return a copy of the string with all the cased characters [4]_ converted to " "uppercase. Note that ``s.upper().isupper()`` might be ``False`` if ``s`` " @@ -2716,13 +2723,13 @@ msgid "" "titlecase)." msgstr "" -#: ../../library/stdtypes.rst:2196 +#: ../../library/stdtypes.rst:2203 msgid "" "The uppercasing algorithm used is described in section 3.13 of the Unicode " "Standard." msgstr "" -#: ../../library/stdtypes.rst:2202 +#: ../../library/stdtypes.rst:2209 msgid "" "Return a copy of the string left filled with ASCII ``'0'`` digits to make a " "string of length *width*. A leading sign prefix (``'+'``/``'-'``) is handled " @@ -2730,11 +2737,11 @@ msgid "" "original string is returned if *width* is less than or equal to ``len(s)``." msgstr "" -#: ../../library/stdtypes.rst:2220 +#: ../../library/stdtypes.rst:2227 msgid "``printf``-style String Formatting" msgstr "" -#: ../../library/stdtypes.rst:2233 +#: ../../library/stdtypes.rst:2240 msgid "" "The formatting operations described here exhibit a variety of quirks that " "lead to a number of common errors (such as failing to display tuples and " @@ -2745,7 +2752,7 @@ msgid "" "or extensibility." msgstr "" -#: ../../library/stdtypes.rst:2241 +#: ../../library/stdtypes.rst:2248 msgid "" "String objects have one unique built-in operation: the ``%`` operator " "(modulo). This is also known as the string *formatting* or *interpolation* " @@ -2755,7 +2762,7 @@ msgid "" "in the C language." msgstr "" -#: ../../library/stdtypes.rst:2247 +#: ../../library/stdtypes.rst:2254 msgid "" "If *format* requires a single argument, *values* may be a single non-tuple " "object. [5]_ Otherwise, *values* must be a tuple with exactly the number of " @@ -2763,36 +2770,36 @@ msgid "" "example, a dictionary)." msgstr "" -#: ../../library/stdtypes.rst:2257 ../../library/stdtypes.rst:3469 +#: ../../library/stdtypes.rst:2264 ../../library/stdtypes.rst:3476 msgid "" "A conversion specifier contains two or more characters and has the following " "components, which must occur in this order:" msgstr "" -#: ../../library/stdtypes.rst:2260 ../../library/stdtypes.rst:3472 +#: ../../library/stdtypes.rst:2267 ../../library/stdtypes.rst:3479 msgid "The ``'%'`` character, which marks the start of the specifier." msgstr "" -#: ../../library/stdtypes.rst:2262 ../../library/stdtypes.rst:3474 +#: ../../library/stdtypes.rst:2269 ../../library/stdtypes.rst:3481 msgid "" "Mapping key (optional), consisting of a parenthesised sequence of characters " "(for example, ``(somename)``)." msgstr "" -#: ../../library/stdtypes.rst:2265 ../../library/stdtypes.rst:3477 +#: ../../library/stdtypes.rst:2272 ../../library/stdtypes.rst:3484 msgid "" "Conversion flags (optional), which affect the result of some conversion " "types." msgstr "" -#: ../../library/stdtypes.rst:2268 ../../library/stdtypes.rst:3480 +#: ../../library/stdtypes.rst:2275 ../../library/stdtypes.rst:3487 msgid "" "Minimum field width (optional). If specified as an ``'*'`` (asterisk), the " "actual width is read from the next element of the tuple in *values*, and the " "object to convert comes after the minimum field width and optional precision." msgstr "" -#: ../../library/stdtypes.rst:2272 ../../library/stdtypes.rst:3484 +#: ../../library/stdtypes.rst:2279 ../../library/stdtypes.rst:3491 msgid "" "Precision (optional), given as a ``'.'`` (dot) followed by the precision. " "If specified as ``'*'`` (an asterisk), the actual precision is read from the " @@ -2800,15 +2807,15 @@ msgid "" "the precision." msgstr "" -#: ../../library/stdtypes.rst:2277 ../../library/stdtypes.rst:3489 +#: ../../library/stdtypes.rst:2284 ../../library/stdtypes.rst:3496 msgid "Length modifier (optional)." msgstr "" -#: ../../library/stdtypes.rst:2279 ../../library/stdtypes.rst:3491 +#: ../../library/stdtypes.rst:2286 ../../library/stdtypes.rst:3498 msgid "Conversion type." msgstr "" -#: ../../library/stdtypes.rst:2281 +#: ../../library/stdtypes.rst:2288 msgid "" "When the right argument is a dictionary (or other mapping type), then the " "formats in the string *must* include a parenthesised mapping key into that " @@ -2816,279 +2823,279 @@ msgid "" "selects the value to be formatted from the mapping. For example:" msgstr "" -#: ../../library/stdtypes.rst:2290 ../../library/stdtypes.rst:3502 +#: ../../library/stdtypes.rst:2297 ../../library/stdtypes.rst:3509 msgid "" "In this case no ``*`` specifiers may occur in a format (since they require a " "sequential parameter list)." msgstr "" -#: ../../library/stdtypes.rst:2293 ../../library/stdtypes.rst:3505 +#: ../../library/stdtypes.rst:2300 ../../library/stdtypes.rst:3512 msgid "The conversion flag characters are:" msgstr "" -#: ../../library/stdtypes.rst:2302 ../../library/stdtypes.rst:3514 +#: ../../library/stdtypes.rst:2309 ../../library/stdtypes.rst:3521 msgid "Flag" msgstr "" -#: ../../library/stdtypes.rst:2304 ../../library/stdtypes.rst:3516 +#: ../../library/stdtypes.rst:2311 ../../library/stdtypes.rst:3523 msgid "``'#'``" msgstr "``'#'``" -#: ../../library/stdtypes.rst:2304 ../../library/stdtypes.rst:3516 +#: ../../library/stdtypes.rst:2311 ../../library/stdtypes.rst:3523 msgid "" "The value conversion will use the \"alternate form\" (where defined below)." msgstr "" -#: ../../library/stdtypes.rst:2307 ../../library/stdtypes.rst:3519 +#: ../../library/stdtypes.rst:2314 ../../library/stdtypes.rst:3526 msgid "``'0'``" msgstr "``'0'``" -#: ../../library/stdtypes.rst:2307 ../../library/stdtypes.rst:3519 +#: ../../library/stdtypes.rst:2314 ../../library/stdtypes.rst:3526 msgid "The conversion will be zero padded for numeric values." msgstr "" -#: ../../library/stdtypes.rst:2309 ../../library/stdtypes.rst:3521 +#: ../../library/stdtypes.rst:2316 ../../library/stdtypes.rst:3528 msgid "``'-'``" msgstr "``'-'``" -#: ../../library/stdtypes.rst:2309 ../../library/stdtypes.rst:3521 +#: ../../library/stdtypes.rst:2316 ../../library/stdtypes.rst:3528 msgid "" "The converted value is left adjusted (overrides the ``'0'`` conversion if " "both are given)." msgstr "" -#: ../../library/stdtypes.rst:2312 ../../library/stdtypes.rst:3524 +#: ../../library/stdtypes.rst:2319 ../../library/stdtypes.rst:3531 msgid "``' '``" msgstr "``' '``" -#: ../../library/stdtypes.rst:2312 ../../library/stdtypes.rst:3524 +#: ../../library/stdtypes.rst:2319 ../../library/stdtypes.rst:3531 msgid "" "(a space) A blank should be left before a positive number (or empty string) " "produced by a signed conversion." msgstr "" -#: ../../library/stdtypes.rst:2315 ../../library/stdtypes.rst:3527 +#: ../../library/stdtypes.rst:2322 ../../library/stdtypes.rst:3534 msgid "``'+'``" msgstr "``'+'``" -#: ../../library/stdtypes.rst:2315 ../../library/stdtypes.rst:3527 +#: ../../library/stdtypes.rst:2322 ../../library/stdtypes.rst:3534 msgid "" "A sign character (``'+'`` or ``'-'``) will precede the conversion (overrides " "a \"space\" flag)." msgstr "" -#: ../../library/stdtypes.rst:2319 ../../library/stdtypes.rst:3531 +#: ../../library/stdtypes.rst:2326 ../../library/stdtypes.rst:3538 msgid "" "A length modifier (``h``, ``l``, or ``L``) may be present, but is ignored as " "it is not necessary for Python -- so e.g. ``%ld`` is identical to ``%d``." msgstr "" -#: ../../library/stdtypes.rst:2322 ../../library/stdtypes.rst:3534 +#: ../../library/stdtypes.rst:2329 ../../library/stdtypes.rst:3541 msgid "The conversion types are:" msgstr "" -#: ../../library/stdtypes.rst:2325 ../../library/stdtypes.rst:3537 +#: ../../library/stdtypes.rst:2332 ../../library/stdtypes.rst:3544 msgid "Conversion" msgstr "" -#: ../../library/stdtypes.rst:2327 ../../library/stdtypes.rst:3539 +#: ../../library/stdtypes.rst:2334 ../../library/stdtypes.rst:3546 msgid "``'d'``" msgstr "``'d'``" -#: ../../library/stdtypes.rst:2327 ../../library/stdtypes.rst:2329 -#: ../../library/stdtypes.rst:3539 ../../library/stdtypes.rst:3541 +#: ../../library/stdtypes.rst:2334 ../../library/stdtypes.rst:2336 +#: ../../library/stdtypes.rst:3546 ../../library/stdtypes.rst:3548 msgid "Signed integer decimal." msgstr "" -#: ../../library/stdtypes.rst:2329 ../../library/stdtypes.rst:3541 +#: ../../library/stdtypes.rst:2336 ../../library/stdtypes.rst:3548 msgid "``'i'``" msgstr "``'i'``" -#: ../../library/stdtypes.rst:2331 ../../library/stdtypes.rst:3543 +#: ../../library/stdtypes.rst:2338 ../../library/stdtypes.rst:3550 msgid "``'o'``" msgstr "``'o'``" -#: ../../library/stdtypes.rst:2331 ../../library/stdtypes.rst:3543 +#: ../../library/stdtypes.rst:2338 ../../library/stdtypes.rst:3550 msgid "Signed octal value." msgstr "" -#: ../../library/stdtypes.rst:2333 ../../library/stdtypes.rst:3545 +#: ../../library/stdtypes.rst:2340 ../../library/stdtypes.rst:3552 msgid "``'u'``" msgstr "``'u'``" -#: ../../library/stdtypes.rst:2333 ../../library/stdtypes.rst:3545 +#: ../../library/stdtypes.rst:2340 ../../library/stdtypes.rst:3552 msgid "Obsolete type -- it is identical to ``'d'``." msgstr "" -#: ../../library/stdtypes.rst:2335 ../../library/stdtypes.rst:3547 +#: ../../library/stdtypes.rst:2342 ../../library/stdtypes.rst:3554 msgid "``'x'``" msgstr "``'x'``" -#: ../../library/stdtypes.rst:2335 ../../library/stdtypes.rst:3547 +#: ../../library/stdtypes.rst:2342 ../../library/stdtypes.rst:3554 msgid "Signed hexadecimal (lowercase)." msgstr "" -#: ../../library/stdtypes.rst:2337 ../../library/stdtypes.rst:3549 +#: ../../library/stdtypes.rst:2344 ../../library/stdtypes.rst:3556 msgid "``'X'``" msgstr "``'X'``" -#: ../../library/stdtypes.rst:2337 ../../library/stdtypes.rst:3549 +#: ../../library/stdtypes.rst:2344 ../../library/stdtypes.rst:3556 msgid "Signed hexadecimal (uppercase)." msgstr "" -#: ../../library/stdtypes.rst:2339 ../../library/stdtypes.rst:3551 +#: ../../library/stdtypes.rst:2346 ../../library/stdtypes.rst:3558 msgid "``'e'``" msgstr "``'e'``" -#: ../../library/stdtypes.rst:2339 ../../library/stdtypes.rst:3551 +#: ../../library/stdtypes.rst:2346 ../../library/stdtypes.rst:3558 msgid "Floating point exponential format (lowercase)." msgstr "" -#: ../../library/stdtypes.rst:2341 ../../library/stdtypes.rst:3553 +#: ../../library/stdtypes.rst:2348 ../../library/stdtypes.rst:3560 msgid "``'E'``" msgstr "``'E'``" -#: ../../library/stdtypes.rst:2341 ../../library/stdtypes.rst:3553 +#: ../../library/stdtypes.rst:2348 ../../library/stdtypes.rst:3560 msgid "Floating point exponential format (uppercase)." msgstr "" -#: ../../library/stdtypes.rst:2343 ../../library/stdtypes.rst:3555 +#: ../../library/stdtypes.rst:2350 ../../library/stdtypes.rst:3562 msgid "``'f'``" msgstr "``'f'``" -#: ../../library/stdtypes.rst:2343 ../../library/stdtypes.rst:2345 -#: ../../library/stdtypes.rst:3555 ../../library/stdtypes.rst:3557 +#: ../../library/stdtypes.rst:2350 ../../library/stdtypes.rst:2352 +#: ../../library/stdtypes.rst:3562 ../../library/stdtypes.rst:3564 msgid "Floating point decimal format." msgstr "" -#: ../../library/stdtypes.rst:2345 ../../library/stdtypes.rst:3557 +#: ../../library/stdtypes.rst:2352 ../../library/stdtypes.rst:3564 msgid "``'F'``" msgstr "``'F'``" -#: ../../library/stdtypes.rst:2347 ../../library/stdtypes.rst:3559 +#: ../../library/stdtypes.rst:2354 ../../library/stdtypes.rst:3566 msgid "``'g'``" msgstr "``'g'``" -#: ../../library/stdtypes.rst:2347 ../../library/stdtypes.rst:3559 +#: ../../library/stdtypes.rst:2354 ../../library/stdtypes.rst:3566 msgid "" "Floating point format. Uses lowercase exponential format if exponent is less " "than -4 or not less than precision, decimal format otherwise." msgstr "" -#: ../../library/stdtypes.rst:2351 ../../library/stdtypes.rst:3563 +#: ../../library/stdtypes.rst:2358 ../../library/stdtypes.rst:3570 msgid "``'G'``" msgstr "``'G'``" -#: ../../library/stdtypes.rst:2351 ../../library/stdtypes.rst:3563 +#: ../../library/stdtypes.rst:2358 ../../library/stdtypes.rst:3570 msgid "" "Floating point format. Uses uppercase exponential format if exponent is less " "than -4 or not less than precision, decimal format otherwise." msgstr "" -#: ../../library/stdtypes.rst:2355 ../../library/stdtypes.rst:3567 +#: ../../library/stdtypes.rst:2362 ../../library/stdtypes.rst:3574 msgid "``'c'``" msgstr "``'c'``" -#: ../../library/stdtypes.rst:2355 +#: ../../library/stdtypes.rst:2362 msgid "Single character (accepts integer or single character string)." msgstr "" -#: ../../library/stdtypes.rst:2358 ../../library/stdtypes.rst:3580 +#: ../../library/stdtypes.rst:2365 ../../library/stdtypes.rst:3587 msgid "``'r'``" msgstr "``'r'``" -#: ../../library/stdtypes.rst:2358 +#: ../../library/stdtypes.rst:2365 msgid "String (converts any Python object using :func:`repr`)." msgstr "" -#: ../../library/stdtypes.rst:2361 ../../library/stdtypes.rst:3574 +#: ../../library/stdtypes.rst:2368 ../../library/stdtypes.rst:3581 msgid "``'s'``" msgstr "``'s'``" -#: ../../library/stdtypes.rst:2361 +#: ../../library/stdtypes.rst:2368 msgid "String (converts any Python object using :func:`str`)." msgstr "" -#: ../../library/stdtypes.rst:2364 ../../library/stdtypes.rst:3577 +#: ../../library/stdtypes.rst:2371 ../../library/stdtypes.rst:3584 msgid "``'a'``" msgstr "``'a'``" -#: ../../library/stdtypes.rst:2364 +#: ../../library/stdtypes.rst:2371 msgid "String (converts any Python object using :func:`ascii`)." msgstr "" -#: ../../library/stdtypes.rst:2367 ../../library/stdtypes.rst:3583 +#: ../../library/stdtypes.rst:2374 ../../library/stdtypes.rst:3590 msgid "``'%'``" msgstr "``'%'``" -#: ../../library/stdtypes.rst:2367 ../../library/stdtypes.rst:3583 +#: ../../library/stdtypes.rst:2374 ../../library/stdtypes.rst:3590 msgid "No argument is converted, results in a ``'%'`` character in the result." msgstr "" -#: ../../library/stdtypes.rst:2374 ../../library/stdtypes.rst:3590 +#: ../../library/stdtypes.rst:2381 ../../library/stdtypes.rst:3597 msgid "" "The alternate form causes a leading octal specifier (``'0o'``) to be " "inserted before the first digit." msgstr "" -#: ../../library/stdtypes.rst:2378 ../../library/stdtypes.rst:3594 +#: ../../library/stdtypes.rst:2385 ../../library/stdtypes.rst:3601 msgid "" "The alternate form causes a leading ``'0x'`` or ``'0X'`` (depending on " "whether the ``'x'`` or ``'X'`` format was used) to be inserted before the " "first digit." msgstr "" -#: ../../library/stdtypes.rst:2382 ../../library/stdtypes.rst:3598 +#: ../../library/stdtypes.rst:2389 ../../library/stdtypes.rst:3605 msgid "" "The alternate form causes the result to always contain a decimal point, even " "if no digits follow it." msgstr "" -#: ../../library/stdtypes.rst:2385 ../../library/stdtypes.rst:3601 +#: ../../library/stdtypes.rst:2392 ../../library/stdtypes.rst:3608 msgid "" "The precision determines the number of digits after the decimal point and " "defaults to 6." msgstr "" -#: ../../library/stdtypes.rst:2389 ../../library/stdtypes.rst:3605 +#: ../../library/stdtypes.rst:2396 ../../library/stdtypes.rst:3612 msgid "" "The alternate form causes the result to always contain a decimal point, and " "trailing zeroes are not removed as they would otherwise be." msgstr "" -#: ../../library/stdtypes.rst:2392 ../../library/stdtypes.rst:3608 +#: ../../library/stdtypes.rst:2399 ../../library/stdtypes.rst:3615 msgid "" "The precision determines the number of significant digits before and after " "the decimal point and defaults to 6." msgstr "" -#: ../../library/stdtypes.rst:2396 ../../library/stdtypes.rst:3612 +#: ../../library/stdtypes.rst:2403 ../../library/stdtypes.rst:3619 msgid "If precision is ``N``, the output is truncated to ``N`` characters." msgstr "" -#: ../../library/stdtypes.rst:2399 ../../library/stdtypes.rst:3621 +#: ../../library/stdtypes.rst:2406 ../../library/stdtypes.rst:3628 msgid "See :pep:`237`." msgstr "參閱 :pep:`237`\\ 。" -#: ../../library/stdtypes.rst:2401 +#: ../../library/stdtypes.rst:2408 msgid "" "Since Python strings have an explicit length, ``%s`` conversions do not " "assume that ``'\\0'`` is the end of the string." msgstr "" -#: ../../library/stdtypes.rst:2406 +#: ../../library/stdtypes.rst:2413 msgid "" "``%f`` conversions for numbers whose absolute value is over 1e50 are no " "longer replaced by ``%g`` conversions." msgstr "" -#: ../../library/stdtypes.rst:2417 +#: ../../library/stdtypes.rst:2424 msgid "" "Binary Sequence Types --- :class:`bytes`, :class:`bytearray`, :class:" "`memoryview`" msgstr "" -#: ../../library/stdtypes.rst:2425 +#: ../../library/stdtypes.rst:2432 msgid "" "The core built-in types for manipulating binary data are :class:`bytes` and :" "class:`bytearray`. They are supported by :class:`memoryview` which uses the :" @@ -3096,17 +3103,17 @@ msgid "" "objects without needing to make a copy." msgstr "" -#: ../../library/stdtypes.rst:2430 +#: ../../library/stdtypes.rst:2437 msgid "" "The :mod:`array` module supports efficient storage of basic data types like " "32-bit integers and IEEE754 double-precision floating values." msgstr "" -#: ../../library/stdtypes.rst:2436 +#: ../../library/stdtypes.rst:2443 msgid "Bytes Objects" msgstr "" -#: ../../library/stdtypes.rst:2440 +#: ../../library/stdtypes.rst:2447 msgid "" "Bytes objects are immutable sequences of single bytes. Since many major " "binary protocols are based on the ASCII text encoding, bytes objects offer " @@ -3114,40 +3121,40 @@ msgid "" "and are closely related to string objects in a variety of other ways." msgstr "" -#: ../../library/stdtypes.rst:2447 +#: ../../library/stdtypes.rst:2454 msgid "" "Firstly, the syntax for bytes literals is largely the same as that for " "string literals, except that a ``b`` prefix is added:" msgstr "" -#: ../../library/stdtypes.rst:2450 +#: ../../library/stdtypes.rst:2457 msgid "Single quotes: ``b'still allows embedded \"double\" quotes'``" msgstr "" -#: ../../library/stdtypes.rst:2451 +#: ../../library/stdtypes.rst:2458 msgid "Double quotes: ``b\"still allows embedded 'single' quotes\"``" msgstr "" -#: ../../library/stdtypes.rst:2452 +#: ../../library/stdtypes.rst:2459 msgid "" "Triple quoted: ``b'''3 single quotes'''``, ``b\"\"\"3 double quotes\"\"\"``" msgstr "" -#: ../../library/stdtypes.rst:2454 +#: ../../library/stdtypes.rst:2461 msgid "" "Only ASCII characters are permitted in bytes literals (regardless of the " "declared source code encoding). Any binary values over 127 must be entered " "into bytes literals using the appropriate escape sequence." msgstr "" -#: ../../library/stdtypes.rst:2458 +#: ../../library/stdtypes.rst:2465 msgid "" "As with string literals, bytes literals may also use a ``r`` prefix to " "disable processing of escape sequences. See :ref:`strings` for more about " "the various forms of bytes literal, including supported escape sequences." msgstr "" -#: ../../library/stdtypes.rst:2462 +#: ../../library/stdtypes.rst:2469 msgid "" "While bytes literals and representations are based on ASCII text, bytes " "objects actually behave like immutable sequences of integers, with each " @@ -3160,29 +3167,29 @@ msgid "" "compatible will usually lead to data corruption)." msgstr "" -#: ../../library/stdtypes.rst:2472 +#: ../../library/stdtypes.rst:2479 msgid "" "In addition to the literal forms, bytes objects can be created in a number " "of other ways:" msgstr "" -#: ../../library/stdtypes.rst:2475 +#: ../../library/stdtypes.rst:2482 msgid "A zero-filled bytes object of a specified length: ``bytes(10)``" msgstr "" -#: ../../library/stdtypes.rst:2476 +#: ../../library/stdtypes.rst:2483 msgid "From an iterable of integers: ``bytes(range(20))``" msgstr "" -#: ../../library/stdtypes.rst:2477 +#: ../../library/stdtypes.rst:2484 msgid "Copying existing binary data via the buffer protocol: ``bytes(obj)``" msgstr "" -#: ../../library/stdtypes.rst:2479 +#: ../../library/stdtypes.rst:2486 msgid "Also see the :ref:`bytes ` built-in." msgstr "" -#: ../../library/stdtypes.rst:2481 +#: ../../library/stdtypes.rst:2488 msgid "" "Since 2 hexadecimal digits correspond precisely to a single byte, " "hexadecimal numbers are a commonly used format for describing binary data. " @@ -3190,32 +3197,32 @@ msgid "" "that format:" msgstr "" -#: ../../library/stdtypes.rst:2487 +#: ../../library/stdtypes.rst:2494 msgid "" "This :class:`bytes` class method returns a bytes object, decoding the given " "string object. The string must contain two hexadecimal digits per byte, " "with ASCII whitespace being ignored." msgstr "" -#: ../../library/stdtypes.rst:2494 +#: ../../library/stdtypes.rst:2501 msgid "" ":meth:`bytes.fromhex` now skips all ASCII whitespace in the string, not just " "spaces." msgstr "" -#: ../../library/stdtypes.rst:2498 +#: ../../library/stdtypes.rst:2505 msgid "" "A reverse conversion function exists to transform a bytes object into its " "hexadecimal representation." msgstr "" -#: ../../library/stdtypes.rst:2503 ../../library/stdtypes.rst:2588 +#: ../../library/stdtypes.rst:2510 ../../library/stdtypes.rst:2595 msgid "" "Return a string object containing two hexadecimal digits for each byte in " "the instance." msgstr "" -#: ../../library/stdtypes.rst:2509 +#: ../../library/stdtypes.rst:2516 msgid "" "If you want to make the hex string easier to read, you can specify a single " "character separator *sep* parameter to include in the output. By default, " @@ -3224,13 +3231,13 @@ msgid "" "the separator position from the right, negative values from the left." msgstr "" -#: ../../library/stdtypes.rst:2526 +#: ../../library/stdtypes.rst:2533 msgid "" ":meth:`bytes.hex` now supports optional *sep* and *bytes_per_sep* parameters " "to insert separators between bytes in the hex output." msgstr "" -#: ../../library/stdtypes.rst:2530 +#: ../../library/stdtypes.rst:2537 msgid "" "Since bytes objects are sequences of integers (akin to a tuple), for a bytes " "object *b*, ``b[0]`` will be an integer, while ``b[0:1]`` will be a bytes " @@ -3238,58 +3245,58 @@ msgid "" "and slicing will produce a string of length 1)" msgstr "" -#: ../../library/stdtypes.rst:2535 +#: ../../library/stdtypes.rst:2542 msgid "" "The representation of bytes objects uses the literal format (``b'...'``) " "since it is often more useful than e.g. ``bytes([46, 46, 46])``. You can " "always convert a bytes object into a list of integers using ``list(b)``." msgstr "" -#: ../../library/stdtypes.rst:2543 +#: ../../library/stdtypes.rst:2550 msgid "Bytearray Objects" msgstr "" -#: ../../library/stdtypes.rst:2547 +#: ../../library/stdtypes.rst:2554 msgid "" ":class:`bytearray` objects are a mutable counterpart to :class:`bytes` " "objects." msgstr "" -#: ../../library/stdtypes.rst:2552 +#: ../../library/stdtypes.rst:2559 msgid "" "There is no dedicated literal syntax for bytearray objects, instead they are " "always created by calling the constructor:" msgstr "" -#: ../../library/stdtypes.rst:2555 +#: ../../library/stdtypes.rst:2562 msgid "Creating an empty instance: ``bytearray()``" msgstr "" -#: ../../library/stdtypes.rst:2556 +#: ../../library/stdtypes.rst:2563 msgid "Creating a zero-filled instance with a given length: ``bytearray(10)``" msgstr "" -#: ../../library/stdtypes.rst:2557 +#: ../../library/stdtypes.rst:2564 msgid "From an iterable of integers: ``bytearray(range(20))``" msgstr "" -#: ../../library/stdtypes.rst:2558 +#: ../../library/stdtypes.rst:2565 msgid "" "Copying existing binary data via the buffer protocol: ``bytearray(b'Hi!')``" msgstr "" -#: ../../library/stdtypes.rst:2560 +#: ../../library/stdtypes.rst:2567 msgid "" "As bytearray objects are mutable, they support the :ref:`mutable ` sequence operations in addition to the common bytes and bytearray " "operations described in :ref:`bytes-methods`." msgstr "" -#: ../../library/stdtypes.rst:2564 +#: ../../library/stdtypes.rst:2571 msgid "Also see the :ref:`bytearray ` built-in." msgstr "" -#: ../../library/stdtypes.rst:2566 +#: ../../library/stdtypes.rst:2573 msgid "" "Since 2 hexadecimal digits correspond precisely to a single byte, " "hexadecimal numbers are a commonly used format for describing binary data. " @@ -3297,33 +3304,33 @@ msgid "" "in that format:" msgstr "" -#: ../../library/stdtypes.rst:2572 +#: ../../library/stdtypes.rst:2579 msgid "" "This :class:`bytearray` class method returns bytearray object, decoding the " "given string object. The string must contain two hexadecimal digits per " "byte, with ASCII whitespace being ignored." msgstr "" -#: ../../library/stdtypes.rst:2579 +#: ../../library/stdtypes.rst:2586 msgid "" ":meth:`bytearray.fromhex` now skips all ASCII whitespace in the string, not " "just spaces." msgstr "" -#: ../../library/stdtypes.rst:2583 +#: ../../library/stdtypes.rst:2590 msgid "" "A reverse conversion function exists to transform a bytearray object into " "its hexadecimal representation." msgstr "" -#: ../../library/stdtypes.rst:2596 +#: ../../library/stdtypes.rst:2603 msgid "" "Similar to :meth:`bytes.hex`, :meth:`bytearray.hex` now supports optional " "*sep* and *bytes_per_sep* parameters to insert separators between bytes in " "the hex output." msgstr "" -#: ../../library/stdtypes.rst:2601 +#: ../../library/stdtypes.rst:2608 msgid "" "Since bytearray objects are sequences of integers (akin to a list), for a " "bytearray object *b*, ``b[0]`` will be an integer, while ``b[0:1]`` will be " @@ -3331,7 +3338,7 @@ msgid "" "both indexing and slicing will produce a string of length 1)" msgstr "" -#: ../../library/stdtypes.rst:2606 +#: ../../library/stdtypes.rst:2613 msgid "" "The representation of bytearray objects uses the bytes literal format " "(``bytearray(b'...')``) since it is often more useful than e.g. " @@ -3339,11 +3346,11 @@ msgid "" "a list of integers using ``list(b)``." msgstr "" -#: ../../library/stdtypes.rst:2615 +#: ../../library/stdtypes.rst:2622 msgid "Bytes and Bytearray Operations" msgstr "" -#: ../../library/stdtypes.rst:2620 +#: ../../library/stdtypes.rst:2627 msgid "" "Both bytes and bytearray objects support the :ref:`common ` " "sequence operations. They interoperate not just with operands of the same " @@ -3352,97 +3359,97 @@ msgid "" "return type of the result may depend on the order of operands." msgstr "" -#: ../../library/stdtypes.rst:2628 +#: ../../library/stdtypes.rst:2635 msgid "" "The methods on bytes and bytearray objects don't accept strings as their " "arguments, just as the methods on strings don't accept bytes as their " "arguments. For example, you have to write::" msgstr "" -#: ../../library/stdtypes.rst:2635 +#: ../../library/stdtypes.rst:2642 msgid "and::" msgstr "" "和:\n" "\n" "::" -#: ../../library/stdtypes.rst:2640 +#: ../../library/stdtypes.rst:2647 msgid "" "Some bytes and bytearray operations assume the use of ASCII compatible " "binary formats, and hence should be avoided when working with arbitrary " "binary data. These restrictions are covered below." msgstr "" -#: ../../library/stdtypes.rst:2645 +#: ../../library/stdtypes.rst:2652 msgid "" "Using these ASCII based operations to manipulate binary data that is not " "stored in an ASCII based format may lead to data corruption." msgstr "" -#: ../../library/stdtypes.rst:2648 +#: ../../library/stdtypes.rst:2655 msgid "" "The following methods on bytes and bytearray objects can be used with " "arbitrary binary data." msgstr "" -#: ../../library/stdtypes.rst:2654 +#: ../../library/stdtypes.rst:2661 msgid "" "Return the number of non-overlapping occurrences of subsequence *sub* in the " "range [*start*, *end*]. Optional arguments *start* and *end* are " "interpreted as in slice notation." msgstr "" -#: ../../library/stdtypes.rst:2658 ../../library/stdtypes.rst:2757 -#: ../../library/stdtypes.rst:2779 ../../library/stdtypes.rst:2845 -#: ../../library/stdtypes.rst:2858 +#: ../../library/stdtypes.rst:2665 ../../library/stdtypes.rst:2764 +#: ../../library/stdtypes.rst:2786 ../../library/stdtypes.rst:2852 +#: ../../library/stdtypes.rst:2865 msgid "" "The subsequence to search for may be any :term:`bytes-like object` or an " "integer in the range 0 to 255." msgstr "" -#: ../../library/stdtypes.rst:2661 ../../library/stdtypes.rst:2769 -#: ../../library/stdtypes.rst:2782 ../../library/stdtypes.rst:2848 -#: ../../library/stdtypes.rst:2861 +#: ../../library/stdtypes.rst:2668 ../../library/stdtypes.rst:2776 +#: ../../library/stdtypes.rst:2789 ../../library/stdtypes.rst:2855 +#: ../../library/stdtypes.rst:2868 msgid "Also accept an integer in the range 0 to 255 as the subsequence." msgstr "" -#: ../../library/stdtypes.rst:2668 +#: ../../library/stdtypes.rst:2675 msgid "" "If the binary data starts with the *prefix* string, return " "``bytes[len(prefix):]``. Otherwise, return a copy of the original binary " "data::" msgstr "" -#: ../../library/stdtypes.rst:2677 +#: ../../library/stdtypes.rst:2684 msgid "The *prefix* may be any :term:`bytes-like object`." msgstr "" -#: ../../library/stdtypes.rst:2681 ../../library/stdtypes.rst:2703 -#: ../../library/stdtypes.rst:2833 ../../library/stdtypes.rst:2926 -#: ../../library/stdtypes.rst:2940 ../../library/stdtypes.rst:2971 -#: ../../library/stdtypes.rst:2985 ../../library/stdtypes.rst:3027 -#: ../../library/stdtypes.rst:3097 ../../library/stdtypes.rst:3115 -#: ../../library/stdtypes.rst:3143 ../../library/stdtypes.rst:3282 -#: ../../library/stdtypes.rst:3337 ../../library/stdtypes.rst:3380 -#: ../../library/stdtypes.rst:3401 ../../library/stdtypes.rst:3423 -#: ../../library/stdtypes.rst:3625 +#: ../../library/stdtypes.rst:2688 ../../library/stdtypes.rst:2710 +#: ../../library/stdtypes.rst:2840 ../../library/stdtypes.rst:2933 +#: ../../library/stdtypes.rst:2947 ../../library/stdtypes.rst:2978 +#: ../../library/stdtypes.rst:2992 ../../library/stdtypes.rst:3034 +#: ../../library/stdtypes.rst:3104 ../../library/stdtypes.rst:3122 +#: ../../library/stdtypes.rst:3150 ../../library/stdtypes.rst:3289 +#: ../../library/stdtypes.rst:3344 ../../library/stdtypes.rst:3387 +#: ../../library/stdtypes.rst:3408 ../../library/stdtypes.rst:3430 +#: ../../library/stdtypes.rst:3632 msgid "" "The bytearray version of this method does *not* operate in place - it always " "produces a new object, even if no changes were made." msgstr "" -#: ../../library/stdtypes.rst:2690 +#: ../../library/stdtypes.rst:2697 msgid "" "If the binary data ends with the *suffix* string and that *suffix* is not " "empty, return ``bytes[:-len(suffix)]``. Otherwise, return a copy of the " "original binary data::" msgstr "" -#: ../../library/stdtypes.rst:2699 +#: ../../library/stdtypes.rst:2706 msgid "The *suffix* may be any :term:`bytes-like object`." msgstr "" -#: ../../library/stdtypes.rst:2712 +#: ../../library/stdtypes.rst:2719 msgid "" "Return a string decoded from the given bytes. Default encoding is " "``'utf-8'``. *errors* may be given to set a different error handling " @@ -3453,25 +3460,25 @@ msgid "" "encodings, see section :ref:`standard-encodings`." msgstr "" -#: ../../library/stdtypes.rst:2720 +#: ../../library/stdtypes.rst:2727 msgid "" "By default, the *errors* argument is not checked for best performances, but " "only used at the first decoding error. Enable the :ref:`Python Development " "Mode `, or use a :ref:`debug build ` to check *errors*." msgstr "" -#: ../../library/stdtypes.rst:2726 +#: ../../library/stdtypes.rst:2733 msgid "" "Passing the *encoding* argument to :class:`str` allows decoding any :term:" "`bytes-like object` directly, without needing to make a temporary bytes or " "bytearray object." msgstr "" -#: ../../library/stdtypes.rst:2730 +#: ../../library/stdtypes.rst:2737 msgid "Added support for keyword arguments." msgstr "新增關鍵字引數的支援。" -#: ../../library/stdtypes.rst:2741 +#: ../../library/stdtypes.rst:2748 msgid "" "Return ``True`` if the binary data ends with the specified *suffix*, " "otherwise return ``False``. *suffix* can also be a tuple of suffixes to " @@ -3479,11 +3486,11 @@ msgid "" "optional *end*, stop comparing at that position." msgstr "" -#: ../../library/stdtypes.rst:2746 +#: ../../library/stdtypes.rst:2753 msgid "The suffix(es) to search for may be any :term:`bytes-like object`." msgstr "" -#: ../../library/stdtypes.rst:2752 +#: ../../library/stdtypes.rst:2759 msgid "" "Return the lowest index in the data where the subsequence *sub* is found, " "such that *sub* is contained in the slice ``s[start:end]``. Optional " @@ -3491,20 +3498,20 @@ msgid "" "``-1`` if *sub* is not found." msgstr "" -#: ../../library/stdtypes.rst:2762 +#: ../../library/stdtypes.rst:2769 msgid "" "The :meth:`~bytes.find` method should be used only if you need to know the " "position of *sub*. To check if *sub* is a substring or not, use the :" "keyword:`in` operator::" msgstr "" -#: ../../library/stdtypes.rst:2776 +#: ../../library/stdtypes.rst:2783 msgid "" "Like :meth:`~bytes.find`, but raise :exc:`ValueError` when the subsequence " "is not found." msgstr "" -#: ../../library/stdtypes.rst:2789 +#: ../../library/stdtypes.rst:2796 msgid "" "Return a bytes or bytearray object which is the concatenation of the binary " "data sequences in *iterable*. A :exc:`TypeError` will be raised if there " @@ -3514,7 +3521,7 @@ msgid "" "method." msgstr "" -#: ../../library/stdtypes.rst:2800 +#: ../../library/stdtypes.rst:2807 msgid "" "This static method returns a translation table usable for :meth:`bytes." "translate` that will map each character in *from* into the character at the " @@ -3522,7 +3529,7 @@ msgid "" "objects ` and have the same length." msgstr "" -#: ../../library/stdtypes.rst:2811 +#: ../../library/stdtypes.rst:2818 msgid "" "Split the sequence at the first occurrence of *sep*, and return a 3-tuple " "containing the part before the separator, the separator itself or its " @@ -3531,24 +3538,24 @@ msgid "" "by two empty bytes or bytearray objects." msgstr "" -#: ../../library/stdtypes.rst:2818 ../../library/stdtypes.rst:2875 +#: ../../library/stdtypes.rst:2825 ../../library/stdtypes.rst:2882 msgid "The separator to search for may be any :term:`bytes-like object`." msgstr "" -#: ../../library/stdtypes.rst:2824 +#: ../../library/stdtypes.rst:2831 msgid "" "Return a copy of the sequence with all occurrences of subsequence *old* " "replaced by *new*. If the optional argument *count* is given, only the " "first *count* occurrences are replaced." msgstr "" -#: ../../library/stdtypes.rst:2828 +#: ../../library/stdtypes.rst:2835 msgid "" "The subsequence to search for and its replacement may be any :term:`bytes-" "like object`." msgstr "" -#: ../../library/stdtypes.rst:2840 +#: ../../library/stdtypes.rst:2847 msgid "" "Return the highest index in the sequence where the subsequence *sub* is " "found, such that *sub* is contained within ``s[start:end]``. Optional " @@ -3556,13 +3563,13 @@ msgid "" "``-1`` on failure." msgstr "" -#: ../../library/stdtypes.rst:2855 +#: ../../library/stdtypes.rst:2862 msgid "" "Like :meth:`~bytes.rfind` but raises :exc:`ValueError` when the subsequence " "*sub* is not found." msgstr "" -#: ../../library/stdtypes.rst:2868 +#: ../../library/stdtypes.rst:2875 msgid "" "Split the sequence at the last occurrence of *sep*, and return a 3-tuple " "containing the part before the separator, the separator itself or its " @@ -3571,7 +3578,7 @@ msgid "" "followed by a copy of the original sequence." msgstr "" -#: ../../library/stdtypes.rst:2881 +#: ../../library/stdtypes.rst:2888 msgid "" "Return ``True`` if the binary data starts with the specified *prefix*, " "otherwise return ``False``. *prefix* can also be a tuple of prefixes to " @@ -3579,11 +3586,11 @@ msgid "" "optional *end*, stop comparing at that position." msgstr "" -#: ../../library/stdtypes.rst:2886 +#: ../../library/stdtypes.rst:2893 msgid "The prefix(es) to search for may be any :term:`bytes-like object`." msgstr "" -#: ../../library/stdtypes.rst:2892 +#: ../../library/stdtypes.rst:2899 msgid "" "Return a copy of the bytes or bytearray object where all bytes occurring in " "the optional argument *delete* are removed, and the remaining bytes have " @@ -3591,22 +3598,22 @@ msgid "" "object of length 256." msgstr "" -#: ../../library/stdtypes.rst:2897 +#: ../../library/stdtypes.rst:2904 msgid "" "You can use the :func:`bytes.maketrans` method to create a translation table." msgstr "" -#: ../../library/stdtypes.rst:2900 +#: ../../library/stdtypes.rst:2907 msgid "" "Set the *table* argument to ``None`` for translations that only delete " "characters::" msgstr "" -#: ../../library/stdtypes.rst:2906 +#: ../../library/stdtypes.rst:2913 msgid "*delete* is now supported as a keyword argument." msgstr "" -#: ../../library/stdtypes.rst:2910 +#: ../../library/stdtypes.rst:2917 msgid "" "The following methods on bytes and bytearray objects have default behaviours " "that assume the use of ASCII compatible binary formats, but can still be " @@ -3615,7 +3622,7 @@ msgid "" "instead produce new objects." msgstr "" -#: ../../library/stdtypes.rst:2919 +#: ../../library/stdtypes.rst:2926 msgid "" "Return a copy of the object centered in a sequence of length *width*. " "Padding is done using the specified *fillbyte* (default is an ASCII space). " @@ -3623,7 +3630,7 @@ msgid "" "less than or equal to ``len(s)``." msgstr "" -#: ../../library/stdtypes.rst:2933 +#: ../../library/stdtypes.rst:2940 msgid "" "Return a copy of the object left justified in a sequence of length *width*. " "Padding is done using the specified *fillbyte* (default is an ASCII space). " @@ -3631,7 +3638,7 @@ msgid "" "less than or equal to ``len(s)``." msgstr "" -#: ../../library/stdtypes.rst:2947 +#: ../../library/stdtypes.rst:2954 msgid "" "Return a copy of the sequence with specified leading bytes removed. The " "*chars* argument is a binary sequence specifying the set of byte values to " @@ -3641,14 +3648,14 @@ msgid "" "all combinations of its values are stripped::" msgstr "" -#: ../../library/stdtypes.rst:2959 +#: ../../library/stdtypes.rst:2966 msgid "" "The binary sequence of byte values to remove may be any :term:`bytes-like " "object`. See :meth:`~bytes.removeprefix` for a method that will remove a " "single prefix string rather than all of a set of characters. For example::" msgstr "" -#: ../../library/stdtypes.rst:2978 +#: ../../library/stdtypes.rst:2985 msgid "" "Return a copy of the object right justified in a sequence of length *width*. " "Padding is done using the specified *fillbyte* (default is an ASCII space). " @@ -3656,7 +3663,7 @@ msgid "" "less than or equal to ``len(s)``." msgstr "" -#: ../../library/stdtypes.rst:2992 +#: ../../library/stdtypes.rst:2999 msgid "" "Split the binary sequence into subsequences of the same type, using *sep* as " "the delimiter string. If *maxsplit* is given, at most *maxsplit* splits are " @@ -3666,7 +3673,7 @@ msgid "" "described in detail below." msgstr "" -#: ../../library/stdtypes.rst:3003 +#: ../../library/stdtypes.rst:3010 msgid "" "Return a copy of the sequence with specified trailing bytes removed. The " "*chars* argument is a binary sequence specifying the set of byte values to " @@ -3676,14 +3683,14 @@ msgid "" "all combinations of its values are stripped::" msgstr "" -#: ../../library/stdtypes.rst:3015 +#: ../../library/stdtypes.rst:3022 msgid "" "The binary sequence of byte values to remove may be any :term:`bytes-like " "object`. See :meth:`~bytes.removesuffix` for a method that will remove a " "single suffix string rather than all of a set of characters. For example::" msgstr "" -#: ../../library/stdtypes.rst:3034 +#: ../../library/stdtypes.rst:3041 msgid "" "Split the binary sequence into subsequences of the same type, using *sep* as " "the delimiter string. If *maxsplit* is given and non-negative, at most " @@ -3692,7 +3699,7 @@ msgid "" "limit on the number of splits (all possible splits are made)." msgstr "" -#: ../../library/stdtypes.rst:3040 +#: ../../library/stdtypes.rst:3047 msgid "" "If *sep* is given, consecutive delimiters are not grouped together and are " "deemed to delimit empty subsequences (for example, ``b'1,,2'.split(b',')`` " @@ -3703,7 +3710,7 @@ msgid "" "object being split. The *sep* argument may be any :term:`bytes-like object`." msgstr "" -#: ../../library/stdtypes.rst:3058 +#: ../../library/stdtypes.rst:3065 msgid "" "If *sep* is not specified or is ``None``, a different splitting algorithm is " "applied: runs of consecutive ASCII whitespace are regarded as a single " @@ -3713,7 +3720,7 @@ msgid "" "without a specified separator returns ``[]``." msgstr "" -#: ../../library/stdtypes.rst:3079 +#: ../../library/stdtypes.rst:3086 msgid "" "Return a copy of the sequence with specified leading and trailing bytes " "removed. The *chars* argument is a binary sequence specifying the set of " @@ -3723,13 +3730,13 @@ msgid "" "a prefix or suffix; rather, all combinations of its values are stripped::" msgstr "" -#: ../../library/stdtypes.rst:3092 +#: ../../library/stdtypes.rst:3099 msgid "" "The binary sequence of byte values to remove may be any :term:`bytes-like " "object`." msgstr "" -#: ../../library/stdtypes.rst:3101 +#: ../../library/stdtypes.rst:3108 msgid "" "The following methods on bytes and bytearray objects assume the use of ASCII " "compatible binary formats and should not be applied to arbitrary binary " @@ -3737,14 +3744,14 @@ msgid "" "operate in place, and instead produce new objects." msgstr "" -#: ../../library/stdtypes.rst:3109 +#: ../../library/stdtypes.rst:3116 msgid "" "Return a copy of the sequence with each byte interpreted as an ASCII " "character, and the first byte capitalized and the rest lowercased. Non-ASCII " "byte values are passed through unchanged." msgstr "" -#: ../../library/stdtypes.rst:3122 +#: ../../library/stdtypes.rst:3129 msgid "" "Return a copy of the sequence where all ASCII tab characters are replaced by " "one or more ASCII spaces, depending on the current column and the given tab " @@ -3760,7 +3767,7 @@ msgid "" "by one regardless of how the byte value is represented when printed::" msgstr "" -#: ../../library/stdtypes.rst:3150 +#: ../../library/stdtypes.rst:3157 msgid "" "Return ``True`` if all bytes in the sequence are alphabetical ASCII " "characters or ASCII decimal digits and the sequence is not empty, ``False`` " @@ -3769,7 +3776,7 @@ msgid "" "digits are those byte values in the sequence ``b'0123456789'``." msgstr "" -#: ../../library/stdtypes.rst:3167 +#: ../../library/stdtypes.rst:3174 msgid "" "Return ``True`` if all bytes in the sequence are alphabetic ASCII characters " "and the sequence is not empty, ``False`` otherwise. Alphabetic ASCII " @@ -3777,35 +3784,35 @@ msgid "" "``b'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'``." msgstr "" -#: ../../library/stdtypes.rst:3183 +#: ../../library/stdtypes.rst:3190 msgid "" "Return ``True`` if the sequence is empty or all bytes in the sequence are " "ASCII, ``False`` otherwise. ASCII bytes are in the range 0-0x7F." msgstr "" -#: ../../library/stdtypes.rst:3193 +#: ../../library/stdtypes.rst:3200 msgid "" "Return ``True`` if all bytes in the sequence are ASCII decimal digits and " "the sequence is not empty, ``False`` otherwise. ASCII decimal digits are " "those byte values in the sequence ``b'0123456789'``." msgstr "" -#: ../../library/stdtypes.rst:3208 +#: ../../library/stdtypes.rst:3215 msgid "" "Return ``True`` if there is at least one lowercase ASCII character in the " "sequence and no uppercase ASCII characters, ``False`` otherwise." msgstr "" -#: ../../library/stdtypes.rst:3218 ../../library/stdtypes.rst:3260 -#: ../../library/stdtypes.rst:3276 ../../library/stdtypes.rst:3326 -#: ../../library/stdtypes.rst:3395 +#: ../../library/stdtypes.rst:3225 ../../library/stdtypes.rst:3267 +#: ../../library/stdtypes.rst:3283 ../../library/stdtypes.rst:3333 +#: ../../library/stdtypes.rst:3402 msgid "" "Lowercase ASCII characters are those byte values in the sequence " "``b'abcdefghijklmnopqrstuvwxyz'``. Uppercase ASCII characters are those byte " "values in the sequence ``b'ABCDEFGHIJKLMNOPQRSTUVWXYZ'``." msgstr "" -#: ../../library/stdtypes.rst:3226 +#: ../../library/stdtypes.rst:3233 msgid "" "Return ``True`` if all bytes in the sequence are ASCII whitespace and the " "sequence is not empty, ``False`` otherwise. ASCII whitespace characters are " @@ -3813,27 +3820,27 @@ msgid "" "newline, carriage return, vertical tab, form feed)." msgstr "" -#: ../../library/stdtypes.rst:3235 +#: ../../library/stdtypes.rst:3242 msgid "" "Return ``True`` if the sequence is ASCII titlecase and the sequence is not " "empty, ``False`` otherwise. See :meth:`bytes.title` for more details on the " "definition of \"titlecase\"." msgstr "" -#: ../../library/stdtypes.rst:3250 +#: ../../library/stdtypes.rst:3257 msgid "" "Return ``True`` if there is at least one uppercase alphabetic ASCII " "character in the sequence and no lowercase ASCII characters, ``False`` " "otherwise." msgstr "" -#: ../../library/stdtypes.rst:3268 +#: ../../library/stdtypes.rst:3275 msgid "" "Return a copy of the sequence with all the uppercase ASCII characters " "converted to their corresponding lowercase counterpart." msgstr "" -#: ../../library/stdtypes.rst:3293 +#: ../../library/stdtypes.rst:3300 msgid "" "Return a list of the lines in the binary sequence, breaking at ASCII line " "boundaries. This method uses the :term:`universal newlines` approach to " @@ -3841,20 +3848,20 @@ msgid "" "*keepends* is given and true." msgstr "" -#: ../../library/stdtypes.rst:3305 +#: ../../library/stdtypes.rst:3312 msgid "" "Unlike :meth:`~bytes.split` when a delimiter string *sep* is given, this " "method returns an empty list for the empty string, and a terminal line break " "does not result in an extra line::" msgstr "" -#: ../../library/stdtypes.rst:3318 +#: ../../library/stdtypes.rst:3325 msgid "" "Return a copy of the sequence with all the lowercase ASCII characters " "converted to their corresponding uppercase counterpart and vice-versa." msgstr "" -#: ../../library/stdtypes.rst:3330 +#: ../../library/stdtypes.rst:3337 msgid "" "Unlike :func:`str.swapcase()`, it is always the case that ``bin.swapcase()." "swapcase() == bin`` for the binary versions. Case conversions are " @@ -3862,14 +3869,14 @@ msgid "" "Unicode code points." msgstr "" -#: ../../library/stdtypes.rst:3344 +#: ../../library/stdtypes.rst:3351 msgid "" "Return a titlecased version of the binary sequence where words start with an " "uppercase ASCII character and the remaining characters are lowercase. " "Uncased byte values are left unmodified." msgstr "" -#: ../../library/stdtypes.rst:3353 +#: ../../library/stdtypes.rst:3360 msgid "" "Lowercase ASCII characters are those byte values in the sequence " "``b'abcdefghijklmnopqrstuvwxyz'``. Uppercase ASCII characters are those byte " @@ -3877,18 +3884,18 @@ msgid "" "values are uncased." msgstr "" -#: ../../library/stdtypes.rst:3366 +#: ../../library/stdtypes.rst:3373 msgid "" "A workaround for apostrophes can be constructed using regular expressions::" msgstr "" -#: ../../library/stdtypes.rst:3387 +#: ../../library/stdtypes.rst:3394 msgid "" "Return a copy of the sequence with all the lowercase ASCII characters " "converted to their corresponding uppercase counterpart." msgstr "" -#: ../../library/stdtypes.rst:3408 +#: ../../library/stdtypes.rst:3415 msgid "" "Return a copy of the sequence left filled with ASCII ``b'0'`` digits to make " "a sequence of length *width*. A leading sign prefix (``b'+'``/ ``b'-'``) is " @@ -3897,11 +3904,11 @@ msgid "" "*width* is less than or equal to ``len(seq)``." msgstr "" -#: ../../library/stdtypes.rst:3430 +#: ../../library/stdtypes.rst:3437 msgid "``printf``-style Bytes Formatting" msgstr "" -#: ../../library/stdtypes.rst:3447 +#: ../../library/stdtypes.rst:3454 msgid "" "The formatting operations described here exhibit a variety of quirks that " "lead to a number of common errors (such as failing to display tuples and " @@ -3909,7 +3916,7 @@ msgid "" "dictionary, wrap it in a tuple." msgstr "" -#: ../../library/stdtypes.rst:3452 +#: ../../library/stdtypes.rst:3459 msgid "" "Bytes objects (``bytes``/``bytearray``) have one unique built-in operation: " "the ``%`` operator (modulo). This is also known as the bytes *formatting* or " @@ -3919,7 +3926,7 @@ msgid "" "func:`sprintf` in the C language." msgstr "" -#: ../../library/stdtypes.rst:3459 +#: ../../library/stdtypes.rst:3466 msgid "" "If *format* requires a single argument, *values* may be a single non-tuple " "object. [5]_ Otherwise, *values* must be a tuple with exactly the number of " @@ -3927,7 +3934,7 @@ msgid "" "example, a dictionary)." msgstr "" -#: ../../library/stdtypes.rst:3493 +#: ../../library/stdtypes.rst:3500 msgid "" "When the right argument is a dictionary (or other mapping type), then the " "formats in the bytes object *must* include a parenthesised mapping key into " @@ -3935,73 +3942,73 @@ msgid "" "mapping key selects the value to be formatted from the mapping. For example:" msgstr "" -#: ../../library/stdtypes.rst:3567 +#: ../../library/stdtypes.rst:3574 msgid "Single byte (accepts integer or single byte objects)." msgstr "" -#: ../../library/stdtypes.rst:3570 +#: ../../library/stdtypes.rst:3577 msgid "``'b'``" msgstr "``'b'``" -#: ../../library/stdtypes.rst:3570 +#: ../../library/stdtypes.rst:3577 msgid "" "Bytes (any object that follows the :ref:`buffer protocol ` or " "has :meth:`__bytes__`)." msgstr "" -#: ../../library/stdtypes.rst:3574 +#: ../../library/stdtypes.rst:3581 msgid "" "``'s'`` is an alias for ``'b'`` and should only be used for Python2/3 code " "bases." msgstr "" -#: ../../library/stdtypes.rst:3577 +#: ../../library/stdtypes.rst:3584 msgid "" "Bytes (converts any Python object using ``repr(obj).encode('ascii', " "'backslashreplace')``)." msgstr "" -#: ../../library/stdtypes.rst:3580 +#: ../../library/stdtypes.rst:3587 msgid "" "``'r'`` is an alias for ``'a'`` and should only be used for Python2/3 code " "bases." msgstr "" -#: ../../library/stdtypes.rst:3580 +#: ../../library/stdtypes.rst:3587 msgid "\\(7)" msgstr "\\(7)" -#: ../../library/stdtypes.rst:3615 +#: ../../library/stdtypes.rst:3622 msgid "``b'%s'`` is deprecated, but will not be removed during the 3.x series." msgstr "" -#: ../../library/stdtypes.rst:3618 +#: ../../library/stdtypes.rst:3625 msgid "``b'%r'`` is deprecated, but will not be removed during the 3.x series." msgstr "" -#: ../../library/stdtypes.rst:3630 +#: ../../library/stdtypes.rst:3637 msgid ":pep:`461` - Adding % formatting to bytes and bytearray" msgstr "" -#: ../../library/stdtypes.rst:3637 +#: ../../library/stdtypes.rst:3644 msgid "Memory Views" msgstr "" -#: ../../library/stdtypes.rst:3639 +#: ../../library/stdtypes.rst:3646 msgid "" ":class:`memoryview` objects allow Python code to access the internal data of " "an object that supports the :ref:`buffer protocol ` without " "copying." msgstr "" -#: ../../library/stdtypes.rst:3645 +#: ../../library/stdtypes.rst:3652 msgid "" "Create a :class:`memoryview` that references *object*. *object* must " "support the buffer protocol. Built-in objects that support the buffer " "protocol include :class:`bytes` and :class:`bytearray`." msgstr "" -#: ../../library/stdtypes.rst:3649 +#: ../../library/stdtypes.rst:3656 msgid "" "A :class:`memoryview` has the notion of an *element*, which is the atomic " "memory unit handled by the originating *object*. For many simple types such " @@ -4009,7 +4016,7 @@ msgid "" "other types such as :class:`array.array` may have bigger elements." msgstr "" -#: ../../library/stdtypes.rst:3654 +#: ../../library/stdtypes.rst:3661 msgid "" "``len(view)`` is equal to the length of :class:`~memoryview.tolist`. If " "``view.ndim = 0``, the length is 1. If ``view.ndim = 1``, the length is " @@ -4019,13 +4026,13 @@ msgid "" "bytes in a single element." msgstr "" -#: ../../library/stdtypes.rst:3661 +#: ../../library/stdtypes.rst:3668 msgid "" "A :class:`memoryview` supports slicing and indexing to expose its data. One-" "dimensional slicing will result in a subview::" msgstr "" -#: ../../library/stdtypes.rst:3674 +#: ../../library/stdtypes.rst:3681 msgid "" "If :class:`~memoryview.format` is one of the native format specifiers from " "the :mod:`struct` module, indexing with an integer or a tuple of integers is " @@ -4036,82 +4043,82 @@ msgid "" "memoryviews can be indexed with the empty tuple." msgstr "" -#: ../../library/stdtypes.rst:3683 +#: ../../library/stdtypes.rst:3690 msgid "Here is an example with a non-byte format::" msgstr "" -#: ../../library/stdtypes.rst:3695 +#: ../../library/stdtypes.rst:3702 msgid "" "If the underlying object is writable, the memoryview supports one-" "dimensional slice assignment. Resizing is not allowed::" msgstr "" -#: ../../library/stdtypes.rst:3716 +#: ../../library/stdtypes.rst:3723 msgid "" "One-dimensional memoryviews of hashable (read-only) types with formats 'B', " "'b' or 'c' are also hashable. The hash is defined as ``hash(m) == hash(m." "tobytes())``::" msgstr "" -#: ../../library/stdtypes.rst:3728 +#: ../../library/stdtypes.rst:3735 msgid "" "One-dimensional memoryviews can now be sliced. One-dimensional memoryviews " "with formats 'B', 'b' or 'c' are now hashable." msgstr "" -#: ../../library/stdtypes.rst:3732 +#: ../../library/stdtypes.rst:3739 msgid "" "memoryview is now registered automatically with :class:`collections.abc." "Sequence`" msgstr "" -#: ../../library/stdtypes.rst:3736 +#: ../../library/stdtypes.rst:3743 msgid "memoryviews can now be indexed with tuple of integers." msgstr "" -#: ../../library/stdtypes.rst:3739 +#: ../../library/stdtypes.rst:3746 msgid ":class:`memoryview` has several methods:" msgstr "" -#: ../../library/stdtypes.rst:3743 +#: ../../library/stdtypes.rst:3750 msgid "" "A memoryview and a :pep:`3118` exporter are equal if their shapes are " "equivalent and if all corresponding values are equal when the operands' " "respective format codes are interpreted using :mod:`struct` syntax." msgstr "" -#: ../../library/stdtypes.rst:3747 +#: ../../library/stdtypes.rst:3754 msgid "" "For the subset of :mod:`struct` format strings currently supported by :meth:" "`tolist`, ``v`` and ``w`` are equal if ``v.tolist() == w.tolist()``::" msgstr "" -#: ../../library/stdtypes.rst:3766 +#: ../../library/stdtypes.rst:3773 msgid "" "If either format string is not supported by the :mod:`struct` module, then " "the objects will always compare as unequal (even if the format strings and " "buffer contents are identical)::" msgstr "" -#: ../../library/stdtypes.rst:3782 +#: ../../library/stdtypes.rst:3789 msgid "" "Note that, as with floating point numbers, ``v is w`` does *not* imply ``v " "== w`` for memoryview objects." msgstr "" -#: ../../library/stdtypes.rst:3785 +#: ../../library/stdtypes.rst:3792 msgid "" "Previous versions compared the raw memory disregarding the item format and " "the logical array structure." msgstr "" -#: ../../library/stdtypes.rst:3791 +#: ../../library/stdtypes.rst:3798 msgid "" "Return the data in the buffer as a bytestring. This is equivalent to " "calling the :class:`bytes` constructor on the memoryview. ::" msgstr "" -#: ../../library/stdtypes.rst:3800 +#: ../../library/stdtypes.rst:3807 msgid "" "For non-contiguous arrays the result is equal to the flattened list " "representation with all elements converted to bytes. :meth:`tobytes` " @@ -4119,7 +4126,7 @@ msgid "" "module syntax." msgstr "" -#: ../../library/stdtypes.rst:3805 +#: ../../library/stdtypes.rst:3812 msgid "" "*order* can be {'C', 'F', 'A'}. When *order* is 'C' or 'F', the data of the " "original array is converted to C or Fortran order. For contiguous views, 'A' " @@ -4128,36 +4135,36 @@ msgid "" "to C first. *order=None* is the same as *order='C'*." msgstr "" -#: ../../library/stdtypes.rst:3814 +#: ../../library/stdtypes.rst:3821 msgid "" "Return a string object containing two hexadecimal digits for each byte in " "the buffer. ::" msgstr "" -#: ../../library/stdtypes.rst:3823 +#: ../../library/stdtypes.rst:3830 msgid "" "Similar to :meth:`bytes.hex`, :meth:`memoryview.hex` now supports optional " "*sep* and *bytes_per_sep* parameters to insert separators between bytes in " "the hex output." msgstr "" -#: ../../library/stdtypes.rst:3830 +#: ../../library/stdtypes.rst:3837 msgid "Return the data in the buffer as a list of elements. ::" msgstr "" -#: ../../library/stdtypes.rst:3840 +#: ../../library/stdtypes.rst:3847 msgid "" ":meth:`tolist` now supports all single character native formats in :mod:" "`struct` module syntax as well as multi-dimensional representations." msgstr "" -#: ../../library/stdtypes.rst:3847 +#: ../../library/stdtypes.rst:3854 msgid "" "Return a readonly version of the memoryview object. The original memoryview " "object is unchanged. ::" msgstr "" -#: ../../library/stdtypes.rst:3866 +#: ../../library/stdtypes.rst:3873 msgid "" "Release the underlying buffer exposed by the memoryview object. Many " "objects take special actions when a view is held on them (for example, a :" @@ -4166,20 +4173,20 @@ msgid "" "resources) as soon as possible." msgstr "" -#: ../../library/stdtypes.rst:3872 +#: ../../library/stdtypes.rst:3879 msgid "" "After this method has been called, any further operation on the view raises " "a :class:`ValueError` (except :meth:`release()` itself which can be called " "multiple times)::" msgstr "" -#: ../../library/stdtypes.rst:3883 +#: ../../library/stdtypes.rst:3890 msgid "" "The context management protocol can be used for a similar effect, using the " "``with`` statement::" msgstr "" -#: ../../library/stdtypes.rst:3899 +#: ../../library/stdtypes.rst:3906 msgid "" "Cast a memoryview to a new format or shape. *shape* defaults to " "``[byte_length//new_itemsize]``, which means that the result view will be " @@ -4188,57 +4195,57 @@ msgid "" "contiguous -> 1D." msgstr "" -#: ../../library/stdtypes.rst:3905 +#: ../../library/stdtypes.rst:3912 msgid "" "The destination format is restricted to a single element native format in :" "mod:`struct` syntax. One of the formats must be a byte format ('B', 'b' or " "'c'). The byte length of the result must be the same as the original length." msgstr "" -#: ../../library/stdtypes.rst:3910 +#: ../../library/stdtypes.rst:3917 msgid "Cast 1D/long to 1D/unsigned bytes::" msgstr "" -#: ../../library/stdtypes.rst:3933 +#: ../../library/stdtypes.rst:3940 msgid "Cast 1D/unsigned bytes to 1D/char::" msgstr "" -#: ../../library/stdtypes.rst:3946 +#: ../../library/stdtypes.rst:3953 msgid "Cast 1D/bytes to 3D/ints to 1D/signed char::" msgstr "" -#: ../../library/stdtypes.rst:3972 +#: ../../library/stdtypes.rst:3979 msgid "Cast 1D/unsigned long to 2D/unsigned long::" msgstr "" -#: ../../library/stdtypes.rst:3986 +#: ../../library/stdtypes.rst:3993 msgid "The source format is no longer restricted when casting to a byte view." msgstr "" -#: ../../library/stdtypes.rst:3989 +#: ../../library/stdtypes.rst:3996 msgid "There are also several readonly attributes available:" msgstr "" -#: ../../library/stdtypes.rst:3993 +#: ../../library/stdtypes.rst:4000 msgid "The underlying object of the memoryview::" msgstr "" -#: ../../library/stdtypes.rst:4004 +#: ../../library/stdtypes.rst:4011 msgid "" "``nbytes == product(shape) * itemsize == len(m.tobytes())``. This is the " "amount of space in bytes that the array would use in a contiguous " "representation. It is not necessarily equal to ``len(m)``::" msgstr "" -#: ../../library/stdtypes.rst:4023 +#: ../../library/stdtypes.rst:4030 msgid "Multi-dimensional arrays::" msgstr "" -#: ../../library/stdtypes.rst:4040 +#: ../../library/stdtypes.rst:4047 msgid "A bool indicating whether the memory is read only." msgstr "" -#: ../../library/stdtypes.rst:4044 +#: ../../library/stdtypes.rst:4051 msgid "" "A string containing the format (in :mod:`struct` module style) for each " "element in the view. A memoryview can be created from exporters with " @@ -4246,59 +4253,59 @@ msgid "" "restricted to native single element formats." msgstr "" -#: ../../library/stdtypes.rst:4049 +#: ../../library/stdtypes.rst:4056 msgid "" "format ``'B'`` is now handled according to the struct module syntax. This " "means that ``memoryview(b'abc')[0] == b'abc'[0] == 97``." msgstr "" -#: ../../library/stdtypes.rst:4055 +#: ../../library/stdtypes.rst:4062 msgid "The size in bytes of each element of the memoryview::" msgstr "" -#: ../../library/stdtypes.rst:4068 +#: ../../library/stdtypes.rst:4075 msgid "" "An integer indicating how many dimensions of a multi-dimensional array the " "memory represents." msgstr "" -#: ../../library/stdtypes.rst:4073 +#: ../../library/stdtypes.rst:4080 msgid "" "A tuple of integers the length of :attr:`ndim` giving the shape of the " "memory as an N-dimensional array." msgstr "" -#: ../../library/stdtypes.rst:4076 ../../library/stdtypes.rst:4084 +#: ../../library/stdtypes.rst:4083 ../../library/stdtypes.rst:4091 msgid "An empty tuple instead of ``None`` when ndim = 0." msgstr "" -#: ../../library/stdtypes.rst:4081 +#: ../../library/stdtypes.rst:4088 msgid "" "A tuple of integers the length of :attr:`ndim` giving the size in bytes to " "access each element for each dimension of the array." msgstr "" -#: ../../library/stdtypes.rst:4089 +#: ../../library/stdtypes.rst:4096 msgid "Used internally for PIL-style arrays. The value is informational only." msgstr "" -#: ../../library/stdtypes.rst:4093 +#: ../../library/stdtypes.rst:4100 msgid "A bool indicating whether the memory is C-:term:`contiguous`." msgstr "" -#: ../../library/stdtypes.rst:4099 +#: ../../library/stdtypes.rst:4106 msgid "A bool indicating whether the memory is Fortran :term:`contiguous`." msgstr "" -#: ../../library/stdtypes.rst:4105 +#: ../../library/stdtypes.rst:4112 msgid "A bool indicating whether the memory is :term:`contiguous`." msgstr "" -#: ../../library/stdtypes.rst:4113 +#: ../../library/stdtypes.rst:4120 msgid "Set Types --- :class:`set`, :class:`frozenset`" msgstr "" -#: ../../library/stdtypes.rst:4117 +#: ../../library/stdtypes.rst:4124 msgid "" "A :dfn:`set` object is an unordered collection of distinct :term:`hashable` " "objects. Common uses include membership testing, removing duplicates from a " @@ -4308,7 +4315,7 @@ msgid "" "`collections` module.)" msgstr "" -#: ../../library/stdtypes.rst:4124 +#: ../../library/stdtypes.rst:4131 msgid "" "Like other collections, sets support ``x in set``, ``len(set)``, and ``for x " "in set``. Being an unordered collection, sets do not record element " @@ -4316,7 +4323,7 @@ msgid "" "slicing, or other sequence-like behavior." msgstr "" -#: ../../library/stdtypes.rst:4129 +#: ../../library/stdtypes.rst:4136 msgid "" "There are currently two built-in set types, :class:`set` and :class:" "`frozenset`. The :class:`set` type is mutable --- the contents can be " @@ -4328,18 +4335,18 @@ msgid "" "of another set." msgstr "" -#: ../../library/stdtypes.rst:4137 +#: ../../library/stdtypes.rst:4144 msgid "" "Non-empty sets (not frozensets) can be created by placing a comma-separated " "list of elements within braces, for example: ``{'jack', 'sjoerd'}``, in " "addition to the :class:`set` constructor." msgstr "" -#: ../../library/stdtypes.rst:4141 +#: ../../library/stdtypes.rst:4148 msgid "The constructors for both classes work the same:" msgstr "" -#: ../../library/stdtypes.rst:4146 +#: ../../library/stdtypes.rst:4153 msgid "" "Return a new set or frozenset object whose elements are taken from " "*iterable*. The elements of a set must be :term:`hashable`. To represent " @@ -4347,92 +4354,92 @@ msgid "" "*iterable* is not specified, a new empty set is returned." msgstr "" -#: ../../library/stdtypes.rst:4152 +#: ../../library/stdtypes.rst:4159 msgid "Sets can be created by several means:" msgstr "" -#: ../../library/stdtypes.rst:4154 +#: ../../library/stdtypes.rst:4161 msgid "" "Use a comma-separated list of elements within braces: ``{'jack', 'sjoerd'}``" msgstr "" -#: ../../library/stdtypes.rst:4155 +#: ../../library/stdtypes.rst:4162 msgid "" "Use a set comprehension: ``{c for c in 'abracadabra' if c not in 'abc'}``" msgstr "" -#: ../../library/stdtypes.rst:4156 +#: ../../library/stdtypes.rst:4163 msgid "" "Use the type constructor: ``set()``, ``set('foobar')``, ``set(['a', 'b', " "'foo'])``" msgstr "" -#: ../../library/stdtypes.rst:4158 +#: ../../library/stdtypes.rst:4165 msgid "" "Instances of :class:`set` and :class:`frozenset` provide the following " "operations:" msgstr "" -#: ../../library/stdtypes.rst:4163 +#: ../../library/stdtypes.rst:4170 msgid "Return the number of elements in set *s* (cardinality of *s*)." msgstr "" -#: ../../library/stdtypes.rst:4167 +#: ../../library/stdtypes.rst:4174 msgid "Test *x* for membership in *s*." msgstr "" -#: ../../library/stdtypes.rst:4171 +#: ../../library/stdtypes.rst:4178 msgid "Test *x* for non-membership in *s*." msgstr "" -#: ../../library/stdtypes.rst:4175 +#: ../../library/stdtypes.rst:4182 msgid "" "Return ``True`` if the set has no elements in common with *other*. Sets are " "disjoint if and only if their intersection is the empty set." msgstr "" -#: ../../library/stdtypes.rst:4181 +#: ../../library/stdtypes.rst:4188 msgid "Test whether every element in the set is in *other*." msgstr "" -#: ../../library/stdtypes.rst:4185 +#: ../../library/stdtypes.rst:4192 msgid "" "Test whether the set is a proper subset of *other*, that is, ``set <= other " "and set != other``." msgstr "" -#: ../../library/stdtypes.rst:4191 +#: ../../library/stdtypes.rst:4198 msgid "Test whether every element in *other* is in the set." msgstr "" -#: ../../library/stdtypes.rst:4195 +#: ../../library/stdtypes.rst:4202 msgid "" "Test whether the set is a proper superset of *other*, that is, ``set >= " "other and set != other``." msgstr "" -#: ../../library/stdtypes.rst:4201 +#: ../../library/stdtypes.rst:4208 msgid "Return a new set with elements from the set and all others." msgstr "" -#: ../../library/stdtypes.rst:4206 +#: ../../library/stdtypes.rst:4213 msgid "Return a new set with elements common to the set and all others." msgstr "" -#: ../../library/stdtypes.rst:4211 +#: ../../library/stdtypes.rst:4218 msgid "Return a new set with elements in the set that are not in the others." msgstr "" -#: ../../library/stdtypes.rst:4216 +#: ../../library/stdtypes.rst:4223 msgid "" "Return a new set with elements in either the set or *other* but not both." msgstr "" -#: ../../library/stdtypes.rst:4220 +#: ../../library/stdtypes.rst:4227 msgid "Return a shallow copy of the set." msgstr "" -#: ../../library/stdtypes.rst:4223 +#: ../../library/stdtypes.rst:4230 msgid "" "Note, the non-operator versions of :meth:`union`, :meth:`intersection`, :" "meth:`difference`, :meth:`symmetric_difference`, :meth:`issubset`, and :meth:" @@ -4442,7 +4449,7 @@ msgid "" "the more readable ``set('abc').intersection('cbs')``." msgstr "" -#: ../../library/stdtypes.rst:4230 +#: ../../library/stdtypes.rst:4237 msgid "" "Both :class:`set` and :class:`frozenset` support set to set comparisons. Two " "sets are equal if and only if every element of each set is contained in the " @@ -4452,14 +4459,14 @@ msgid "" "set is a proper superset of the second set (is a superset, but is not equal)." msgstr "" -#: ../../library/stdtypes.rst:4237 +#: ../../library/stdtypes.rst:4244 msgid "" "Instances of :class:`set` are compared to instances of :class:`frozenset` " "based on their members. For example, ``set('abc') == frozenset('abc')`` " "returns ``True`` and so does ``set('abc') in set([frozenset('abc')])``." msgstr "" -#: ../../library/stdtypes.rst:4241 +#: ../../library/stdtypes.rst:4248 msgid "" "The subset and equality comparisons do not generalize to a total ordering " "function. For example, any two nonempty disjoint sets are not equal and are " @@ -4467,71 +4474,71 @@ msgid "" "``ab``." msgstr "" -#: ../../library/stdtypes.rst:4246 +#: ../../library/stdtypes.rst:4253 msgid "" "Since sets only define partial ordering (subset relationships), the output " "of the :meth:`list.sort` method is undefined for lists of sets." msgstr "" -#: ../../library/stdtypes.rst:4249 +#: ../../library/stdtypes.rst:4256 msgid "Set elements, like dictionary keys, must be :term:`hashable`." msgstr "" -#: ../../library/stdtypes.rst:4251 +#: ../../library/stdtypes.rst:4258 msgid "" "Binary operations that mix :class:`set` instances with :class:`frozenset` " "return the type of the first operand. For example: ``frozenset('ab') | " "set('bc')`` returns an instance of :class:`frozenset`." msgstr "" -#: ../../library/stdtypes.rst:4255 +#: ../../library/stdtypes.rst:4262 msgid "" "The following table lists operations available for :class:`set` that do not " "apply to immutable instances of :class:`frozenset`:" msgstr "" -#: ../../library/stdtypes.rst:4261 +#: ../../library/stdtypes.rst:4268 msgid "Update the set, adding elements from all others." msgstr "" -#: ../../library/stdtypes.rst:4266 +#: ../../library/stdtypes.rst:4273 msgid "Update the set, keeping only elements found in it and all others." msgstr "" -#: ../../library/stdtypes.rst:4271 +#: ../../library/stdtypes.rst:4278 msgid "Update the set, removing elements found in others." msgstr "" -#: ../../library/stdtypes.rst:4276 +#: ../../library/stdtypes.rst:4283 msgid "" "Update the set, keeping only elements found in either set, but not in both." msgstr "" -#: ../../library/stdtypes.rst:4280 +#: ../../library/stdtypes.rst:4287 msgid "Add element *elem* to the set." msgstr "" -#: ../../library/stdtypes.rst:4284 +#: ../../library/stdtypes.rst:4291 msgid "" "Remove element *elem* from the set. Raises :exc:`KeyError` if *elem* is not " "contained in the set." msgstr "" -#: ../../library/stdtypes.rst:4289 +#: ../../library/stdtypes.rst:4296 msgid "Remove element *elem* from the set if it is present." msgstr "" -#: ../../library/stdtypes.rst:4293 +#: ../../library/stdtypes.rst:4300 msgid "" "Remove and return an arbitrary element from the set. Raises :exc:`KeyError` " "if the set is empty." msgstr "" -#: ../../library/stdtypes.rst:4298 +#: ../../library/stdtypes.rst:4305 msgid "Remove all elements from the set." msgstr "" -#: ../../library/stdtypes.rst:4301 +#: ../../library/stdtypes.rst:4308 msgid "" "Note, the non-operator versions of the :meth:`update`, :meth:" "`intersection_update`, :meth:`difference_update`, and :meth:" @@ -4539,18 +4546,18 @@ msgid "" "argument." msgstr "" -#: ../../library/stdtypes.rst:4306 +#: ../../library/stdtypes.rst:4313 msgid "" "Note, the *elem* argument to the :meth:`__contains__`, :meth:`remove`, and :" "meth:`discard` methods may be a set. To support searching for an equivalent " "frozenset, a temporary one is created from *elem*." msgstr "" -#: ../../library/stdtypes.rst:4314 +#: ../../library/stdtypes.rst:4321 msgid "Mapping Types --- :class:`dict`" msgstr "" -#: ../../library/stdtypes.rst:4324 +#: ../../library/stdtypes.rst:4331 msgid "" "A :term:`mapping` object maps :term:`hashable` values to arbitrary objects. " "Mappings are mutable objects. There is currently only one standard mapping " @@ -4559,7 +4566,7 @@ msgid "" "module.)" msgstr "" -#: ../../library/stdtypes.rst:4330 +#: ../../library/stdtypes.rst:4337 msgid "" "A dictionary's keys are *almost* arbitrary values. Values that are not :" "term:`hashable`, that is, values containing lists, dictionaries or other " @@ -4571,33 +4578,33 @@ msgid "" "approximations it is usually unwise to use them as dictionary keys.)" msgstr "" -#: ../../library/stdtypes.rst:4343 +#: ../../library/stdtypes.rst:4350 msgid "" "Return a new dictionary initialized from an optional positional argument and " "a possibly empty set of keyword arguments." msgstr "" -#: ../../library/stdtypes.rst:4346 +#: ../../library/stdtypes.rst:4353 msgid "Dictionaries can be created by several means:" msgstr "" -#: ../../library/stdtypes.rst:4348 +#: ../../library/stdtypes.rst:4355 msgid "" "Use a comma-separated list of ``key: value`` pairs within braces: ``{'jack': " "4098, 'sjoerd': 4127}`` or ``{4098: 'jack', 4127: 'sjoerd'}``" msgstr "" -#: ../../library/stdtypes.rst:4350 +#: ../../library/stdtypes.rst:4357 msgid "Use a dict comprehension: ``{}``, ``{x: x ** 2 for x in range(10)}``" msgstr "" -#: ../../library/stdtypes.rst:4351 +#: ../../library/stdtypes.rst:4358 msgid "" "Use the type constructor: ``dict()``, ``dict([('foo', 100), ('bar', " "200)])``, ``dict(foo=100, bar=200)``" msgstr "" -#: ../../library/stdtypes.rst:4354 +#: ../../library/stdtypes.rst:4361 msgid "" "If no positional argument is given, an empty dictionary is created. If a " "positional argument is given and it is a mapping object, a dictionary is " @@ -4609,7 +4616,7 @@ msgid "" "value for that key becomes the corresponding value in the new dictionary." msgstr "" -#: ../../library/stdtypes.rst:4364 +#: ../../library/stdtypes.rst:4371 msgid "" "If keyword arguments are given, the keyword arguments and their values are " "added to the dictionary created from the positional argument. If a key " @@ -4617,39 +4624,39 @@ msgid "" "the value from the positional argument." msgstr "" -#: ../../library/stdtypes.rst:4369 +#: ../../library/stdtypes.rst:4376 msgid "" "To illustrate, the following examples all return a dictionary equal to " "``{\"one\": 1, \"two\": 2, \"three\": 3}``::" msgstr "" -#: ../../library/stdtypes.rst:4381 +#: ../../library/stdtypes.rst:4388 msgid "" "Providing keyword arguments as in the first example only works for keys that " "are valid Python identifiers. Otherwise, any valid keys can be used." msgstr "" -#: ../../library/stdtypes.rst:4385 +#: ../../library/stdtypes.rst:4392 msgid "" "These are the operations that dictionaries support (and therefore, custom " "mapping types should support too):" msgstr "" -#: ../../library/stdtypes.rst:4390 +#: ../../library/stdtypes.rst:4397 msgid "Return a list of all the keys used in the dictionary *d*." msgstr "" -#: ../../library/stdtypes.rst:4394 +#: ../../library/stdtypes.rst:4401 msgid "Return the number of items in the dictionary *d*." msgstr "" -#: ../../library/stdtypes.rst:4398 +#: ../../library/stdtypes.rst:4405 msgid "" "Return the item of *d* with key *key*. Raises a :exc:`KeyError` if *key* is " "not in the map." msgstr "" -#: ../../library/stdtypes.rst:4403 +#: ../../library/stdtypes.rst:4410 msgid "" "If a subclass of dict defines a method :meth:`__missing__` and *key* is not " "present, the ``d[key]`` operation calls that method with the key *key* as " @@ -4660,51 +4667,51 @@ msgid "" "an instance variable::" msgstr "" -#: ../../library/stdtypes.rst:4421 +#: ../../library/stdtypes.rst:4428 msgid "" "The example above shows part of the implementation of :class:`collections." "Counter`. A different ``__missing__`` method is used by :class:`collections." "defaultdict`." msgstr "" -#: ../../library/stdtypes.rst:4427 +#: ../../library/stdtypes.rst:4434 msgid "Set ``d[key]`` to *value*." msgstr "" -#: ../../library/stdtypes.rst:4431 +#: ../../library/stdtypes.rst:4438 msgid "" "Remove ``d[key]`` from *d*. Raises a :exc:`KeyError` if *key* is not in the " "map." msgstr "" -#: ../../library/stdtypes.rst:4436 +#: ../../library/stdtypes.rst:4443 msgid "Return ``True`` if *d* has a key *key*, else ``False``." msgstr "" -#: ../../library/stdtypes.rst:4440 +#: ../../library/stdtypes.rst:4447 msgid "Equivalent to ``not key in d``." msgstr "" -#: ../../library/stdtypes.rst:4444 +#: ../../library/stdtypes.rst:4451 msgid "" "Return an iterator over the keys of the dictionary. This is a shortcut for " "``iter(d.keys())``." msgstr "" -#: ../../library/stdtypes.rst:4449 +#: ../../library/stdtypes.rst:4456 msgid "Remove all items from the dictionary." msgstr "" -#: ../../library/stdtypes.rst:4453 +#: ../../library/stdtypes.rst:4460 msgid "Return a shallow copy of the dictionary." msgstr "" -#: ../../library/stdtypes.rst:4457 +#: ../../library/stdtypes.rst:4464 msgid "" "Create a new dictionary with keys from *iterable* and values set to *value*." msgstr "" -#: ../../library/stdtypes.rst:4459 +#: ../../library/stdtypes.rst:4466 msgid "" ":meth:`fromkeys` is a class method that returns a new dictionary. *value* " "defaults to ``None``. All of the values refer to just a single instance, so " @@ -4713,70 +4720,70 @@ msgid "" "` instead." msgstr "" -#: ../../library/stdtypes.rst:4467 +#: ../../library/stdtypes.rst:4474 msgid "" "Return the value for *key* if *key* is in the dictionary, else *default*. If " "*default* is not given, it defaults to ``None``, so that this method never " "raises a :exc:`KeyError`." msgstr "" -#: ../../library/stdtypes.rst:4473 +#: ../../library/stdtypes.rst:4480 msgid "" "Return a new view of the dictionary's items (``(key, value)`` pairs). See " "the :ref:`documentation of view objects `." msgstr "" -#: ../../library/stdtypes.rst:4478 +#: ../../library/stdtypes.rst:4485 msgid "" "Return a new view of the dictionary's keys. See the :ref:`documentation of " "view objects `." msgstr "" -#: ../../library/stdtypes.rst:4483 +#: ../../library/stdtypes.rst:4490 msgid "" "If *key* is in the dictionary, remove it and return its value, else return " "*default*. If *default* is not given and *key* is not in the dictionary, a :" "exc:`KeyError` is raised." msgstr "" -#: ../../library/stdtypes.rst:4489 +#: ../../library/stdtypes.rst:4496 msgid "" "Remove and return a ``(key, value)`` pair from the dictionary. Pairs are " "returned in :abbr:`LIFO (last-in, first-out)` order." msgstr "" -#: ../../library/stdtypes.rst:4492 +#: ../../library/stdtypes.rst:4499 msgid "" ":meth:`popitem` is useful to destructively iterate over a dictionary, as " "often used in set algorithms. If the dictionary is empty, calling :meth:" "`popitem` raises a :exc:`KeyError`." msgstr "" -#: ../../library/stdtypes.rst:4496 +#: ../../library/stdtypes.rst:4503 msgid "" "LIFO order is now guaranteed. In prior versions, :meth:`popitem` would " "return an arbitrary key/value pair." msgstr "" -#: ../../library/stdtypes.rst:4502 +#: ../../library/stdtypes.rst:4509 msgid "" "Return a reverse iterator over the keys of the dictionary. This is a " "shortcut for ``reversed(d.keys())``." msgstr "" -#: ../../library/stdtypes.rst:4509 +#: ../../library/stdtypes.rst:4516 msgid "" "If *key* is in the dictionary, return its value. If not, insert *key* with " "a value of *default* and return *default*. *default* defaults to ``None``." msgstr "" -#: ../../library/stdtypes.rst:4515 +#: ../../library/stdtypes.rst:4522 msgid "" "Update the dictionary with the key/value pairs from *other*, overwriting " "existing keys. Return ``None``." msgstr "" -#: ../../library/stdtypes.rst:4518 +#: ../../library/stdtypes.rst:4525 msgid "" ":meth:`update` accepts either another dictionary object or an iterable of " "key/value pairs (as tuples or other iterables of length two). If keyword " @@ -4784,71 +4791,71 @@ msgid "" "pairs: ``d.update(red=1, blue=2)``." msgstr "" -#: ../../library/stdtypes.rst:4525 +#: ../../library/stdtypes.rst:4532 msgid "" "Return a new view of the dictionary's values. See the :ref:`documentation " "of view objects `." msgstr "" -#: ../../library/stdtypes.rst:4528 +#: ../../library/stdtypes.rst:4535 msgid "" "An equality comparison between one ``dict.values()`` view and another will " "always return ``False``. This also applies when comparing ``dict.values()`` " "to itself::" msgstr "" -#: ../../library/stdtypes.rst:4538 +#: ../../library/stdtypes.rst:4545 msgid "" "Create a new dictionary with the merged keys and values of *d* and *other*, " "which must both be dictionaries. The values of *other* take priority when " "*d* and *other* share keys." msgstr "" -#: ../../library/stdtypes.rst:4546 +#: ../../library/stdtypes.rst:4553 msgid "" "Update the dictionary *d* with keys and values from *other*, which may be " "either a :term:`mapping` or an :term:`iterable` of key/value pairs. The " "values of *other* take priority when *d* and *other* share keys." msgstr "" -#: ../../library/stdtypes.rst:4552 +#: ../../library/stdtypes.rst:4559 msgid "" "Dictionaries compare equal if and only if they have the same ``(key, " "value)`` pairs (regardless of ordering). Order comparisons ('<', '<=', '>=', " "'>') raise :exc:`TypeError`." msgstr "" -#: ../../library/stdtypes.rst:4556 +#: ../../library/stdtypes.rst:4563 msgid "" "Dictionaries preserve insertion order. Note that updating a key does not " "affect the order. Keys added after deletion are inserted at the end. ::" msgstr "" -#: ../../library/stdtypes.rst:4574 +#: ../../library/stdtypes.rst:4581 msgid "" "Dictionary order is guaranteed to be insertion order. This behavior was an " "implementation detail of CPython from 3.6." msgstr "" -#: ../../library/stdtypes.rst:4578 +#: ../../library/stdtypes.rst:4585 msgid "Dictionaries and dictionary views are reversible. ::" msgstr "" -#: ../../library/stdtypes.rst:4590 +#: ../../library/stdtypes.rst:4597 msgid "Dictionaries are now reversible." msgstr "" -#: ../../library/stdtypes.rst:4595 +#: ../../library/stdtypes.rst:4602 msgid "" ":class:`types.MappingProxyType` can be used to create a read-only view of a :" "class:`dict`." msgstr "" -#: ../../library/stdtypes.rst:4602 +#: ../../library/stdtypes.rst:4609 msgid "Dictionary view objects" msgstr "字典視圖物件" -#: ../../library/stdtypes.rst:4604 +#: ../../library/stdtypes.rst:4611 msgid "" "The objects returned by :meth:`dict.keys`, :meth:`dict.values` and :meth:" "`dict.items` are *view objects*. They provide a dynamic view on the " @@ -4856,23 +4863,23 @@ msgid "" "reflects these changes." msgstr "" -#: ../../library/stdtypes.rst:4609 +#: ../../library/stdtypes.rst:4616 msgid "" "Dictionary views can be iterated over to yield their respective data, and " "support membership tests:" msgstr "" -#: ../../library/stdtypes.rst:4614 +#: ../../library/stdtypes.rst:4621 msgid "Return the number of entries in the dictionary." msgstr "" -#: ../../library/stdtypes.rst:4618 +#: ../../library/stdtypes.rst:4625 msgid "" "Return an iterator over the keys, values or items (represented as tuples of " "``(key, value)``) in the dictionary." msgstr "" -#: ../../library/stdtypes.rst:4621 +#: ../../library/stdtypes.rst:4628 msgid "" "Keys and values are iterated over in insertion order. This allows the " "creation of ``(value, key)`` pairs using :func:`zip`: ``pairs = zip(d." @@ -4880,39 +4887,39 @@ msgid "" "[(v, k) for (k, v) in d.items()]``." msgstr "" -#: ../../library/stdtypes.rst:4626 +#: ../../library/stdtypes.rst:4633 msgid "" "Iterating views while adding or deleting entries in the dictionary may raise " "a :exc:`RuntimeError` or fail to iterate over all entries." msgstr "" -#: ../../library/stdtypes.rst:4629 +#: ../../library/stdtypes.rst:4636 msgid "Dictionary order is guaranteed to be insertion order." msgstr "" -#: ../../library/stdtypes.rst:4634 +#: ../../library/stdtypes.rst:4641 msgid "" "Return ``True`` if *x* is in the underlying dictionary's keys, values or " "items (in the latter case, *x* should be a ``(key, value)`` tuple)." msgstr "" -#: ../../library/stdtypes.rst:4639 +#: ../../library/stdtypes.rst:4646 msgid "" "Return a reverse iterator over the keys, values or items of the dictionary. " "The view will be iterated in reverse order of the insertion." msgstr "" -#: ../../library/stdtypes.rst:4642 +#: ../../library/stdtypes.rst:4649 msgid "Dictionary views are now reversible." msgstr "" -#: ../../library/stdtypes.rst:4647 +#: ../../library/stdtypes.rst:4654 msgid "" "Return a :class:`types.MappingProxyType` that wraps the original dictionary " "to which the view refers." msgstr "" -#: ../../library/stdtypes.rst:4652 +#: ../../library/stdtypes.rst:4659 msgid "" "Keys views are set-like since their entries are unique and hashable. If all " "values are hashable, so that ``(key, value)`` pairs are unique and hashable, " @@ -4922,15 +4929,15 @@ msgid "" "abc.Set` are available (for example, ``==``, ``<``, or ``^``)." msgstr "" -#: ../../library/stdtypes.rst:4659 +#: ../../library/stdtypes.rst:4666 msgid "An example of dictionary view usage::" msgstr "" -#: ../../library/stdtypes.rst:4700 +#: ../../library/stdtypes.rst:4707 msgid "Context Manager Types" msgstr "" -#: ../../library/stdtypes.rst:4707 +#: ../../library/stdtypes.rst:4714 msgid "" "Python's :keyword:`with` statement supports the concept of a runtime context " "defined by a context manager. This is implemented using a pair of methods " @@ -4938,7 +4945,7 @@ msgid "" "before the statement body is executed and exited when the statement ends:" msgstr "" -#: ../../library/stdtypes.rst:4715 +#: ../../library/stdtypes.rst:4722 msgid "" "Enter the runtime context and return either this object or another object " "related to the runtime context. The value returned by this method is bound " @@ -4946,14 +4953,14 @@ msgid "" "using this context manager." msgstr "" -#: ../../library/stdtypes.rst:4720 +#: ../../library/stdtypes.rst:4727 msgid "" "An example of a context manager that returns itself is a :term:`file " "object`. File objects return themselves from __enter__() to allow :func:" "`open` to be used as the context expression in a :keyword:`with` statement." msgstr "" -#: ../../library/stdtypes.rst:4724 +#: ../../library/stdtypes.rst:4731 msgid "" "An example of a context manager that returns a related object is the one " "returned by :func:`decimal.localcontext`. These managers set the active " @@ -4963,7 +4970,7 @@ msgid "" "the :keyword:`!with` statement." msgstr "" -#: ../../library/stdtypes.rst:4734 +#: ../../library/stdtypes.rst:4741 msgid "" "Exit the runtime context and return a Boolean flag indicating if any " "exception that occurred should be suppressed. If an exception occurred while " @@ -4972,7 +4979,7 @@ msgid "" "arguments are ``None``." msgstr "" -#: ../../library/stdtypes.rst:4739 +#: ../../library/stdtypes.rst:4746 msgid "" "Returning a true value from this method will cause the :keyword:`with` " "statement to suppress the exception and continue execution with the " @@ -4983,7 +4990,7 @@ msgid "" "statement." msgstr "" -#: ../../library/stdtypes.rst:4746 +#: ../../library/stdtypes.rst:4753 msgid "" "The exception passed in should never be reraised explicitly - instead, this " "method should return a false value to indicate that the method completed " @@ -4992,7 +4999,7 @@ msgid "" "method has actually failed." msgstr "" -#: ../../library/stdtypes.rst:4752 +#: ../../library/stdtypes.rst:4759 msgid "" "Python defines several context managers to support easy thread " "synchronisation, prompt closure of files or other objects, and simpler " @@ -5001,7 +5008,7 @@ msgid "" "management protocol. See the :mod:`contextlib` module for some examples." msgstr "" -#: ../../library/stdtypes.rst:4758 +#: ../../library/stdtypes.rst:4765 msgid "" "Python's :term:`generator`\\s and the :class:`contextlib.contextmanager` " "decorator provide a convenient way to implement these protocols. If a " @@ -5011,7 +5018,7 @@ msgid "" "rather than the iterator produced by an undecorated generator function." msgstr "" -#: ../../library/stdtypes.rst:4765 +#: ../../library/stdtypes.rst:4772 msgid "" "Note that there is no specific slot for any of these methods in the type " "structure for Python objects in the Python/C API. Extension types wanting to " @@ -5020,23 +5027,23 @@ msgid "" "a single class dictionary lookup is negligible." msgstr "" -#: ../../library/stdtypes.rst:4773 +#: ../../library/stdtypes.rst:4780 msgid "" "Type Annotation Types --- :ref:`Generic Alias `, :ref:" "`Union `" msgstr "" -#: ../../library/stdtypes.rst:4778 +#: ../../library/stdtypes.rst:4785 msgid "" "The core built-in types for :term:`type annotations ` are :ref:" "`Generic Alias ` and :ref:`Union `." msgstr "" -#: ../../library/stdtypes.rst:4785 +#: ../../library/stdtypes.rst:4792 msgid "Generic Alias Type" msgstr "" -#: ../../library/stdtypes.rst:4791 +#: ../../library/stdtypes.rst:4798 msgid "" "``GenericAlias`` objects are generally created by :ref:`subscripting " "` a class. They are most often used with :ref:`container " @@ -5046,19 +5053,19 @@ msgid "" "are intended primarily for use with :term:`type annotations `." msgstr "" -#: ../../library/stdtypes.rst:4801 +#: ../../library/stdtypes.rst:4808 msgid "" "It is generally only possible to subscript a class if the class implements " "the special method :meth:`~object.__class_getitem__`." msgstr "" -#: ../../library/stdtypes.rst:4804 +#: ../../library/stdtypes.rst:4811 msgid "" "A ``GenericAlias`` object acts as a proxy for a :term:`generic type`, " "implementing *parameterized generics*." msgstr "" -#: ../../library/stdtypes.rst:4807 +#: ../../library/stdtypes.rst:4814 msgid "" "For a container class, the argument(s) supplied to a :ref:`subscription " "` of the class may indicate the type(s) of the elements an " @@ -5067,7 +5074,7 @@ msgid "" "`bytes`." msgstr "" -#: ../../library/stdtypes.rst:4813 +#: ../../library/stdtypes.rst:4820 msgid "" "For a class which defines :meth:`~object.__class_getitem__` but is not a " "container, the argument(s) supplied to a subscription of the class will " @@ -5076,7 +5083,7 @@ msgid "" "the :class:`str` data type and the :class:`bytes` data type:" msgstr "" -#: ../../library/stdtypes.rst:4819 +#: ../../library/stdtypes.rst:4826 msgid "" "If ``x = re.search('foo', 'foo')``, ``x`` will be a :ref:`re.Match ` object where the return values of ``x.group(0)`` and ``x[0]`` will " @@ -5084,7 +5091,7 @@ msgid "" "annotations with the ``GenericAlias`` ``re.Match[str]``." msgstr "" -#: ../../library/stdtypes.rst:4825 +#: ../../library/stdtypes.rst:4832 msgid "" "If ``y = re.search(b'bar', b'bar')``, (note the ``b`` for :class:`bytes`), " "``y`` will also be an instance of ``re.Match``, but the return values of ``y." @@ -5093,21 +5100,21 @@ msgid "" "objects>` objects with ``re.Match[bytes]``." msgstr "" -#: ../../library/stdtypes.rst:4831 +#: ../../library/stdtypes.rst:4838 msgid "" "``GenericAlias`` objects are instances of the class :class:`types." "GenericAlias`, which can also be used to create ``GenericAlias`` objects " "directly." msgstr "" -#: ../../library/stdtypes.rst:4837 +#: ../../library/stdtypes.rst:4844 msgid "" "Creates a ``GenericAlias`` representing a type ``T`` parameterized by types " "*X*, *Y*, and more depending on the ``T`` used. For example, a function " "expecting a :class:`list` containing :class:`float` elements::" msgstr "" -#: ../../library/stdtypes.rst:4845 +#: ../../library/stdtypes.rst:4852 msgid "" "Another example for :term:`mapping` objects, using a :class:`dict`, which is " "a generic type expecting two type parameters representing the key type and " @@ -5115,13 +5122,13 @@ msgid "" "of type :class:`str` and values of type :class:`int`::" msgstr "" -#: ../../library/stdtypes.rst:4853 +#: ../../library/stdtypes.rst:4860 msgid "" "The builtin functions :func:`isinstance` and :func:`issubclass` do not " "accept ``GenericAlias`` types for their second argument::" msgstr "" -#: ../../library/stdtypes.rst:4861 +#: ../../library/stdtypes.rst:4868 msgid "" "The Python runtime does not enforce :term:`type annotations `. " "This extends to generic types and their type parameters. When creating a " @@ -5130,325 +5137,325 @@ msgid "" "discouraged, but will run without errors::" msgstr "" -#: ../../library/stdtypes.rst:4871 +#: ../../library/stdtypes.rst:4878 msgid "" "Furthermore, parameterized generics erase type parameters during object " "creation::" msgstr "" -#: ../../library/stdtypes.rst:4882 +#: ../../library/stdtypes.rst:4889 msgid "" "Calling :func:`repr` or :func:`str` on a generic shows the parameterized " "type::" msgstr "" -#: ../../library/stdtypes.rst:4890 +#: ../../library/stdtypes.rst:4897 msgid "" "The :meth:`~object.__getitem__` method of generic containers will raise an " "exception to disallow mistakes like ``dict[str][str]``::" msgstr "" -#: ../../library/stdtypes.rst:4898 +#: ../../library/stdtypes.rst:4905 msgid "" "However, such expressions are valid when :ref:`type variables ` " "are used. The index must have as many elements as there are type variable " "items in the ``GenericAlias`` object's :attr:`~genericalias.__args__`. ::" msgstr "" -#: ../../library/stdtypes.rst:4909 +#: ../../library/stdtypes.rst:4916 msgid "Standard Generic Classes" msgstr "" -#: ../../library/stdtypes.rst:4911 +#: ../../library/stdtypes.rst:4918 msgid "" "The following standard library classes support parameterized generics. This " "list is non-exhaustive." msgstr "" -#: ../../library/stdtypes.rst:4914 +#: ../../library/stdtypes.rst:4921 msgid ":class:`tuple`" msgstr ":class:`tuple`" -#: ../../library/stdtypes.rst:4915 +#: ../../library/stdtypes.rst:4922 msgid ":class:`list`" msgstr ":class:`list`" -#: ../../library/stdtypes.rst:4916 +#: ../../library/stdtypes.rst:4923 msgid ":class:`dict`" msgstr ":class:`dict`" -#: ../../library/stdtypes.rst:4917 +#: ../../library/stdtypes.rst:4924 msgid ":class:`set`" msgstr ":class:`set`" -#: ../../library/stdtypes.rst:4918 +#: ../../library/stdtypes.rst:4925 msgid ":class:`frozenset`" msgstr ":class:`frozenset`" -#: ../../library/stdtypes.rst:4919 +#: ../../library/stdtypes.rst:4926 msgid ":class:`type`" msgstr ":class:`type`" -#: ../../library/stdtypes.rst:4920 +#: ../../library/stdtypes.rst:4927 msgid ":class:`collections.deque`" msgstr ":class:`collections.deque`" -#: ../../library/stdtypes.rst:4921 +#: ../../library/stdtypes.rst:4928 msgid ":class:`collections.defaultdict`" msgstr ":class:`collections.defaultdict`" -#: ../../library/stdtypes.rst:4922 +#: ../../library/stdtypes.rst:4929 msgid ":class:`collections.OrderedDict`" msgstr ":class:`collections.OrderedDict`" -#: ../../library/stdtypes.rst:4923 +#: ../../library/stdtypes.rst:4930 msgid ":class:`collections.Counter`" msgstr ":class:`collections.Counter`" -#: ../../library/stdtypes.rst:4924 +#: ../../library/stdtypes.rst:4931 msgid ":class:`collections.ChainMap`" msgstr ":class:`collections.ChainMap`" -#: ../../library/stdtypes.rst:4925 +#: ../../library/stdtypes.rst:4932 msgid ":class:`collections.abc.Awaitable`" msgstr ":class:`collections.abc.Awaitable`" -#: ../../library/stdtypes.rst:4926 +#: ../../library/stdtypes.rst:4933 msgid ":class:`collections.abc.Coroutine`" msgstr ":class:`collections.abc.Coroutine`" -#: ../../library/stdtypes.rst:4927 +#: ../../library/stdtypes.rst:4934 msgid ":class:`collections.abc.AsyncIterable`" msgstr ":class:`collections.abc.AsyncIterable`" -#: ../../library/stdtypes.rst:4928 +#: ../../library/stdtypes.rst:4935 msgid ":class:`collections.abc.AsyncIterator`" msgstr ":class:`collections.abc.AsyncIterator`" -#: ../../library/stdtypes.rst:4929 +#: ../../library/stdtypes.rst:4936 msgid ":class:`collections.abc.AsyncGenerator`" msgstr ":class:`collections.abc.AsyncGenerator`" -#: ../../library/stdtypes.rst:4930 +#: ../../library/stdtypes.rst:4937 msgid ":class:`collections.abc.Iterable`" msgstr ":class:`collections.abc.Iterable`" -#: ../../library/stdtypes.rst:4931 +#: ../../library/stdtypes.rst:4938 msgid ":class:`collections.abc.Iterator`" msgstr ":class:`collections.abc.Iterator`" -#: ../../library/stdtypes.rst:4932 +#: ../../library/stdtypes.rst:4939 msgid ":class:`collections.abc.Generator`" msgstr ":class:`collections.abc.Generator`" -#: ../../library/stdtypes.rst:4933 +#: ../../library/stdtypes.rst:4940 msgid ":class:`collections.abc.Reversible`" msgstr ":class:`collections.abc.Reversible`" -#: ../../library/stdtypes.rst:4934 +#: ../../library/stdtypes.rst:4941 msgid ":class:`collections.abc.Container`" msgstr ":class:`collections.abc.Container`" -#: ../../library/stdtypes.rst:4935 +#: ../../library/stdtypes.rst:4942 msgid ":class:`collections.abc.Collection`" msgstr ":class:`collections.abc.Collection`" -#: ../../library/stdtypes.rst:4936 +#: ../../library/stdtypes.rst:4943 msgid ":class:`collections.abc.Callable`" msgstr ":class:`collections.abc.Callable`" -#: ../../library/stdtypes.rst:4937 +#: ../../library/stdtypes.rst:4944 msgid ":class:`collections.abc.Set`" msgstr ":class:`collections.abc.Set`" -#: ../../library/stdtypes.rst:4938 +#: ../../library/stdtypes.rst:4945 msgid ":class:`collections.abc.MutableSet`" msgstr ":class:`collections.abc.MutableSet`" -#: ../../library/stdtypes.rst:4939 +#: ../../library/stdtypes.rst:4946 msgid ":class:`collections.abc.Mapping`" msgstr ":class:`collections.abc.Mapping`" -#: ../../library/stdtypes.rst:4940 +#: ../../library/stdtypes.rst:4947 msgid ":class:`collections.abc.MutableMapping`" msgstr ":class:`collections.abc.MutableMapping`" -#: ../../library/stdtypes.rst:4941 +#: ../../library/stdtypes.rst:4948 msgid ":class:`collections.abc.Sequence`" msgstr ":class:`collections.abc.Sequence`" -#: ../../library/stdtypes.rst:4942 +#: ../../library/stdtypes.rst:4949 msgid ":class:`collections.abc.MutableSequence`" msgstr ":class:`collections.abc.MutableSequence`" -#: ../../library/stdtypes.rst:4943 +#: ../../library/stdtypes.rst:4950 msgid ":class:`collections.abc.ByteString`" msgstr ":class:`collections.abc.ByteString`" -#: ../../library/stdtypes.rst:4944 +#: ../../library/stdtypes.rst:4951 msgid ":class:`collections.abc.MappingView`" msgstr ":class:`collections.abc.MappingView`" -#: ../../library/stdtypes.rst:4945 +#: ../../library/stdtypes.rst:4952 msgid ":class:`collections.abc.KeysView`" msgstr ":class:`collections.abc.KeysView`" -#: ../../library/stdtypes.rst:4946 +#: ../../library/stdtypes.rst:4953 msgid ":class:`collections.abc.ItemsView`" msgstr ":class:`collections.abc.ItemsView`" -#: ../../library/stdtypes.rst:4947 +#: ../../library/stdtypes.rst:4954 msgid ":class:`collections.abc.ValuesView`" msgstr ":class:`collections.abc.ValuesView`" -#: ../../library/stdtypes.rst:4948 +#: ../../library/stdtypes.rst:4955 msgid ":class:`contextlib.AbstractContextManager`" msgstr ":class:`contextlib.AbstractContextManager`" -#: ../../library/stdtypes.rst:4949 +#: ../../library/stdtypes.rst:4956 msgid ":class:`contextlib.AbstractAsyncContextManager`" msgstr ":class:`contextlib.AbstractAsyncContextManager`" -#: ../../library/stdtypes.rst:4950 +#: ../../library/stdtypes.rst:4957 msgid ":class:`dataclasses.Field`" msgstr ":class:`dataclasses.Field`" -#: ../../library/stdtypes.rst:4951 +#: ../../library/stdtypes.rst:4958 msgid ":class:`functools.cached_property`" msgstr ":class:`functools.cached_property`" -#: ../../library/stdtypes.rst:4952 +#: ../../library/stdtypes.rst:4959 msgid ":class:`functools.partialmethod`" msgstr ":class:`functools.partialmethod`" -#: ../../library/stdtypes.rst:4953 +#: ../../library/stdtypes.rst:4960 msgid ":class:`os.PathLike`" msgstr ":class:`os.PathLike`" -#: ../../library/stdtypes.rst:4954 +#: ../../library/stdtypes.rst:4961 msgid ":class:`queue.LifoQueue`" msgstr ":class:`queue.LifoQueue`" -#: ../../library/stdtypes.rst:4955 +#: ../../library/stdtypes.rst:4962 msgid ":class:`queue.Queue`" msgstr ":class:`queue.Queue`" -#: ../../library/stdtypes.rst:4956 +#: ../../library/stdtypes.rst:4963 msgid ":class:`queue.PriorityQueue`" msgstr ":class:`queue.PriorityQueue`" -#: ../../library/stdtypes.rst:4957 +#: ../../library/stdtypes.rst:4964 msgid ":class:`queue.SimpleQueue`" msgstr ":class:`queue.SimpleQueue`" -#: ../../library/stdtypes.rst:4958 +#: ../../library/stdtypes.rst:4965 msgid ":ref:`re.Pattern `" msgstr ":ref:`re.Pattern `" -#: ../../library/stdtypes.rst:4959 +#: ../../library/stdtypes.rst:4966 msgid ":ref:`re.Match `" msgstr ":ref:`re.Match `" -#: ../../library/stdtypes.rst:4960 +#: ../../library/stdtypes.rst:4967 msgid ":class:`shelve.BsdDbShelf`" msgstr ":class:`shelve.BsdDbShelf`" -#: ../../library/stdtypes.rst:4961 +#: ../../library/stdtypes.rst:4968 msgid ":class:`shelve.DbfilenameShelf`" msgstr ":class:`shelve.DbfilenameShelf`" -#: ../../library/stdtypes.rst:4962 +#: ../../library/stdtypes.rst:4969 msgid ":class:`shelve.Shelf`" msgstr ":class:`shelve.Shelf`" -#: ../../library/stdtypes.rst:4963 +#: ../../library/stdtypes.rst:4970 msgid ":class:`types.MappingProxyType`" msgstr ":class:`types.MappingProxyType`" -#: ../../library/stdtypes.rst:4964 +#: ../../library/stdtypes.rst:4971 msgid ":class:`weakref.WeakKeyDictionary`" msgstr ":class:`weakref.WeakKeyDictionary`" -#: ../../library/stdtypes.rst:4965 +#: ../../library/stdtypes.rst:4972 msgid ":class:`weakref.WeakMethod`" msgstr ":class:`weakref.WeakMethod`" -#: ../../library/stdtypes.rst:4966 +#: ../../library/stdtypes.rst:4973 msgid ":class:`weakref.WeakSet`" msgstr ":class:`weakref.WeakSet`" -#: ../../library/stdtypes.rst:4967 +#: ../../library/stdtypes.rst:4974 msgid ":class:`weakref.WeakValueDictionary`" msgstr ":class:`weakref.WeakValueDictionary`" -#: ../../library/stdtypes.rst:4972 +#: ../../library/stdtypes.rst:4979 msgid "Special Attributes of ``GenericAlias`` objects" msgstr "" -#: ../../library/stdtypes.rst:4974 +#: ../../library/stdtypes.rst:4981 msgid "All parameterized generics implement special read-only attributes." msgstr "" -#: ../../library/stdtypes.rst:4978 +#: ../../library/stdtypes.rst:4985 msgid "This attribute points at the non-parameterized generic class::" msgstr "" -#: ../../library/stdtypes.rst:4986 +#: ../../library/stdtypes.rst:4993 msgid "" "This attribute is a :class:`tuple` (possibly of length 1) of generic types " "passed to the original :meth:`~object.__class_getitem__` of the generic " "class::" msgstr "" -#: ../../library/stdtypes.rst:4996 +#: ../../library/stdtypes.rst:5003 msgid "" "This attribute is a lazily computed tuple (possibly empty) of unique type " "variables found in ``__args__``::" msgstr "" -#: ../../library/stdtypes.rst:5007 +#: ../../library/stdtypes.rst:5014 msgid "" "A ``GenericAlias`` object with :class:`typing.ParamSpec` parameters may not " "have correct ``__parameters__`` after substitution because :class:`typing." "ParamSpec` is intended primarily for static type checking." msgstr "" -#: ../../library/stdtypes.rst:5014 +#: ../../library/stdtypes.rst:5021 msgid ":pep:`484` - Type Hints" msgstr "" -#: ../../library/stdtypes.rst:5014 +#: ../../library/stdtypes.rst:5021 msgid "Introducing Python's framework for type annotations." msgstr "" -#: ../../library/stdtypes.rst:5019 +#: ../../library/stdtypes.rst:5026 msgid ":pep:`585` - Type Hinting Generics In Standard Collections" msgstr "" -#: ../../library/stdtypes.rst:5017 +#: ../../library/stdtypes.rst:5024 msgid "" "Introducing the ability to natively parameterize standard-library classes, " "provided they implement the special class method :meth:`~object." "__class_getitem__`." msgstr "" -#: ../../library/stdtypes.rst:5022 +#: ../../library/stdtypes.rst:5029 msgid "" ":ref:`Generics`, :ref:`user-defined generics ` and :" "class:`typing.Generic`" msgstr "" -#: ../../library/stdtypes.rst:5022 +#: ../../library/stdtypes.rst:5029 msgid "" "Documentation on how to implement generic classes that can be parameterized " "at runtime and understood by static type-checkers." msgstr "" -#: ../../library/stdtypes.rst:5031 +#: ../../library/stdtypes.rst:5038 msgid "Union Type" msgstr "" -#: ../../library/stdtypes.rst:5037 +#: ../../library/stdtypes.rst:5044 msgid "" "A union object holds the value of the ``|`` (bitwise or) operation on " "multiple :ref:`type objects `. These types are intended " @@ -5457,7 +5464,7 @@ msgid "" "Union`." msgstr "" -#: ../../library/stdtypes.rst:5044 +#: ../../library/stdtypes.rst:5051 msgid "" "Defines a union object which holds types *X*, *Y*, and so forth. ``X | Y`` " "means either X or Y. It is equivalent to ``typing.Union[X, Y]``. For " @@ -5465,76 +5472,76 @@ msgid "" "class:`float`::" msgstr "" -#: ../../library/stdtypes.rst:5054 +#: ../../library/stdtypes.rst:5061 msgid "" "Union objects can be tested for equality with other union objects. Details:" msgstr "" -#: ../../library/stdtypes.rst:5056 +#: ../../library/stdtypes.rst:5063 msgid "Unions of unions are flattened::" msgstr "" -#: ../../library/stdtypes.rst:5060 +#: ../../library/stdtypes.rst:5067 msgid "Redundant types are removed::" msgstr "" -#: ../../library/stdtypes.rst:5064 +#: ../../library/stdtypes.rst:5071 msgid "When comparing unions, the order is ignored::" msgstr "" -#: ../../library/stdtypes.rst:5068 +#: ../../library/stdtypes.rst:5075 msgid "It is compatible with :data:`typing.Union`::" msgstr "" -#: ../../library/stdtypes.rst:5072 +#: ../../library/stdtypes.rst:5079 msgid "Optional types can be spelled as a union with ``None``::" msgstr "" -#: ../../library/stdtypes.rst:5079 +#: ../../library/stdtypes.rst:5086 msgid "" "Calls to :func:`isinstance` and :func:`issubclass` are also supported with a " "union object::" msgstr "" -#: ../../library/stdtypes.rst:5085 +#: ../../library/stdtypes.rst:5092 msgid "" "However, union objects containing :ref:`parameterized generics ` cannot be used::" msgstr "" -#: ../../library/stdtypes.rst:5093 +#: ../../library/stdtypes.rst:5100 msgid "" "The user-exposed type for the union object can be accessed from :data:`types." "UnionType` and used for :func:`isinstance` checks. An object cannot be " "instantiated from the type::" msgstr "" -#: ../../library/stdtypes.rst:5106 +#: ../../library/stdtypes.rst:5113 msgid "" "The :meth:`__or__` method for type objects was added to support the syntax " "``X | Y``. If a metaclass implements :meth:`__or__`, the Union may override " "it::" msgstr "" -#: ../../library/stdtypes.rst:5124 +#: ../../library/stdtypes.rst:5131 msgid ":pep:`604` -- PEP proposing the ``X | Y`` syntax and the Union type." msgstr "" -#: ../../library/stdtypes.rst:5132 +#: ../../library/stdtypes.rst:5139 msgid "Other Built-in Types" msgstr "" -#: ../../library/stdtypes.rst:5134 +#: ../../library/stdtypes.rst:5141 msgid "" "The interpreter supports several other kinds of objects. Most of these " "support only one or two operations." msgstr "" -#: ../../library/stdtypes.rst:5141 +#: ../../library/stdtypes.rst:5148 msgid "Modules" msgstr "模組" -#: ../../library/stdtypes.rst:5143 +#: ../../library/stdtypes.rst:5150 msgid "" "The only special operation on a module is attribute access: ``m.name``, " "where *m* is a module and *name* accesses a name defined in *m*'s symbol " @@ -5545,7 +5552,7 @@ msgid "" "*foo* somewhere.)" msgstr "" -#: ../../library/stdtypes.rst:5150 +#: ../../library/stdtypes.rst:5157 msgid "" "A special attribute of every module is :attr:`~object.__dict__`. This is the " "dictionary containing the module's symbol table. Modifying this dictionary " @@ -5556,32 +5563,32 @@ msgid "" "recommended." msgstr "" -#: ../../library/stdtypes.rst:5158 +#: ../../library/stdtypes.rst:5165 msgid "" "Modules built into the interpreter are written like this: ````. If loaded from a file, they are written as ````." msgstr "" -#: ../../library/stdtypes.rst:5166 +#: ../../library/stdtypes.rst:5173 msgid "Classes and Class Instances" msgstr "" -#: ../../library/stdtypes.rst:5168 +#: ../../library/stdtypes.rst:5175 msgid "See :ref:`objects` and :ref:`class` for these." msgstr "" -#: ../../library/stdtypes.rst:5174 +#: ../../library/stdtypes.rst:5181 msgid "Functions" msgstr "函式" -#: ../../library/stdtypes.rst:5176 +#: ../../library/stdtypes.rst:5183 msgid "" "Function objects are created by function definitions. The only operation on " "a function object is to call it: ``func(argument-list)``." msgstr "" -#: ../../library/stdtypes.rst:5179 +#: ../../library/stdtypes.rst:5186 msgid "" "There are really two flavors of function objects: built-in functions and " "user-defined functions. Both support the same operation (to call the " @@ -5589,15 +5596,15 @@ msgid "" "types." msgstr "" -#: ../../library/stdtypes.rst:5183 +#: ../../library/stdtypes.rst:5190 msgid "See :ref:`function` for more information." msgstr "更多資訊請見 :ref:`function`\\ 。" -#: ../../library/stdtypes.rst:5189 +#: ../../library/stdtypes.rst:5196 msgid "Methods" msgstr "" -#: ../../library/stdtypes.rst:5193 +#: ../../library/stdtypes.rst:5200 msgid "" "Methods are functions that are called using the attribute notation. There " "are two flavors: built-in methods (such as :meth:`append` on lists) and " @@ -5605,7 +5612,7 @@ msgid "" "support them." msgstr "" -#: ../../library/stdtypes.rst:5198 +#: ../../library/stdtypes.rst:5205 msgid "" "If you access a method (a function defined in a class namespace) through an " "instance, you get a special object: a :dfn:`bound method` (also called :dfn:" @@ -5617,7 +5624,7 @@ msgid "" "arg-2, ..., arg-n)``." msgstr "" -#: ../../library/stdtypes.rst:5207 +#: ../../library/stdtypes.rst:5214 msgid "" "Like function objects, bound method objects support getting arbitrary " "attributes. However, since method attributes are actually stored on the " @@ -5627,15 +5634,15 @@ msgid "" "attribute, you need to explicitly set it on the underlying function object::" msgstr "" -#: ../../library/stdtypes.rst:5227 ../../library/stdtypes.rst:5258 +#: ../../library/stdtypes.rst:5234 ../../library/stdtypes.rst:5265 msgid "See :ref:`types` for more information." msgstr "更多資訊請見 :ref:`types`\\ 。" -#: ../../library/stdtypes.rst:5235 +#: ../../library/stdtypes.rst:5242 msgid "Code Objects" msgstr "" -#: ../../library/stdtypes.rst:5241 +#: ../../library/stdtypes.rst:5248 msgid "" "Code objects are used by the implementation to represent \"pseudo-compiled\" " "executable Python code such as a function body. They differ from function " @@ -5645,23 +5652,23 @@ msgid "" "`__code__` attribute. See also the :mod:`code` module." msgstr "" -#: ../../library/stdtypes.rst:5248 +#: ../../library/stdtypes.rst:5255 msgid "" "Accessing ``__code__`` raises an :ref:`auditing event ` ``object." "__getattr__`` with arguments ``obj`` and ``\"__code__\"``." msgstr "" -#: ../../library/stdtypes.rst:5255 +#: ../../library/stdtypes.rst:5262 msgid "" "A code object can be executed or evaluated by passing it (instead of a " "source string) to the :func:`exec` or :func:`eval` built-in functions." msgstr "" -#: ../../library/stdtypes.rst:5264 +#: ../../library/stdtypes.rst:5271 msgid "Type Objects" msgstr "" -#: ../../library/stdtypes.rst:5270 +#: ../../library/stdtypes.rst:5277 msgid "" "Type objects represent the various object types. An object's type is " "accessed by the built-in function :func:`type`. There are no special " @@ -5669,30 +5676,30 @@ msgid "" "standard built-in types." msgstr "" -#: ../../library/stdtypes.rst:5275 +#: ../../library/stdtypes.rst:5282 msgid "Types are written like this: ````." msgstr "" -#: ../../library/stdtypes.rst:5281 +#: ../../library/stdtypes.rst:5288 msgid "The Null Object" msgstr "" -#: ../../library/stdtypes.rst:5283 +#: ../../library/stdtypes.rst:5290 msgid "" "This object is returned by functions that don't explicitly return a value. " "It supports no special operations. There is exactly one null object, named " "``None`` (a built-in name). ``type(None)()`` produces the same singleton." msgstr "" -#: ../../library/stdtypes.rst:5287 +#: ../../library/stdtypes.rst:5294 msgid "It is written as ``None``." msgstr "" -#: ../../library/stdtypes.rst:5294 +#: ../../library/stdtypes.rst:5301 msgid "The Ellipsis Object" msgstr "" -#: ../../library/stdtypes.rst:5296 +#: ../../library/stdtypes.rst:5303 msgid "" "This object is commonly used by slicing (see :ref:`slicings`). It supports " "no special operations. There is exactly one ellipsis object, named :const:" @@ -5700,15 +5707,15 @@ msgid "" "`Ellipsis` singleton." msgstr "" -#: ../../library/stdtypes.rst:5301 +#: ../../library/stdtypes.rst:5308 msgid "It is written as ``Ellipsis`` or ``...``." msgstr "" -#: ../../library/stdtypes.rst:5307 +#: ../../library/stdtypes.rst:5314 msgid "The NotImplemented Object" msgstr "" -#: ../../library/stdtypes.rst:5309 +#: ../../library/stdtypes.rst:5316 msgid "" "This object is returned from comparisons and binary operations when they are " "asked to operate on types they don't support. See :ref:`comparisons` for " @@ -5716,15 +5723,15 @@ msgid "" "``type(NotImplemented)()`` produces the singleton instance." msgstr "" -#: ../../library/stdtypes.rst:5314 +#: ../../library/stdtypes.rst:5321 msgid "It is written as ``NotImplemented``." msgstr "" -#: ../../library/stdtypes.rst:5320 +#: ../../library/stdtypes.rst:5327 msgid "Boolean Values" msgstr "" -#: ../../library/stdtypes.rst:5322 +#: ../../library/stdtypes.rst:5329 msgid "" "Boolean values are the two constant objects ``False`` and ``True``. They " "are used to represent truth values (although other values can also be " @@ -5735,104 +5742,323 @@ msgid "" "(see section :ref:`truth` above)." msgstr "" -#: ../../library/stdtypes.rst:5335 +#: ../../library/stdtypes.rst:5342 msgid "They are written as ``False`` and ``True``, respectively." msgstr "" -#: ../../library/stdtypes.rst:5341 +#: ../../library/stdtypes.rst:5348 msgid "Internal Objects" msgstr "" -#: ../../library/stdtypes.rst:5343 +#: ../../library/stdtypes.rst:5350 msgid "" "See :ref:`types` for this information. It describes stack frame objects, " "traceback objects, and slice objects." msgstr "" -#: ../../library/stdtypes.rst:5350 +#: ../../library/stdtypes.rst:5357 msgid "Special Attributes" msgstr "" -#: ../../library/stdtypes.rst:5352 +#: ../../library/stdtypes.rst:5359 msgid "" "The implementation adds a few special read-only attributes to several object " "types, where they are relevant. Some of these are not reported by the :func:" "`dir` built-in function." msgstr "" -#: ../../library/stdtypes.rst:5359 +#: ../../library/stdtypes.rst:5366 msgid "" "A dictionary or other mapping object used to store an object's (writable) " "attributes." msgstr "" -#: ../../library/stdtypes.rst:5365 +#: ../../library/stdtypes.rst:5372 msgid "The class to which a class instance belongs." msgstr "" -#: ../../library/stdtypes.rst:5370 +#: ../../library/stdtypes.rst:5377 msgid "The tuple of base classes of a class object." msgstr "" -#: ../../library/stdtypes.rst:5375 +#: ../../library/stdtypes.rst:5382 msgid "" "The name of the class, function, method, descriptor, or generator instance." msgstr "" -#: ../../library/stdtypes.rst:5381 +#: ../../library/stdtypes.rst:5388 msgid "" "The :term:`qualified name` of the class, function, method, descriptor, or " "generator instance." msgstr "" -#: ../../library/stdtypes.rst:5389 +#: ../../library/stdtypes.rst:5396 msgid "" "This attribute is a tuple of classes that are considered when looking for " "base classes during method resolution." msgstr "" -#: ../../library/stdtypes.rst:5395 +#: ../../library/stdtypes.rst:5402 msgid "" "This method can be overridden by a metaclass to customize the method " "resolution order for its instances. It is called at class instantiation, " "and its result is stored in :attr:`~class.__mro__`." msgstr "" -#: ../../library/stdtypes.rst:5402 +#: ../../library/stdtypes.rst:5409 msgid "" "Each class keeps a list of weak references to its immediate subclasses. " "This method returns a list of all those references still alive. The list is " "in definition order. Example::" msgstr "" -#: ../../library/stdtypes.rst:5411 +#: ../../library/stdtypes.rst:5420 +msgid "Integer string conversion length limitation" +msgstr "" + +#: ../../library/stdtypes.rst:5422 +msgid "" +"CPython has a global limit for converting between :class:`int` and :class:" +"`str` to mitigate denial of service attacks. This limit *only* applies to " +"decimal or other non-power-of-two number bases. Hexadecimal, octal, and " +"binary conversions are unlimited. The limit can be configured." +msgstr "" + +#: ../../library/stdtypes.rst:5427 +msgid "" +"The :class:`int` type in CPython is an abitrary length number stored in " +"binary form (commonly known as a \"bignum\"). There exists no algorithm that " +"can convert a string to a binary integer or a binary integer to a string in " +"linear time, *unless* the base is a power of 2. Even the best known " +"algorithms for base 10 have sub-quadratic complexity. Converting a large " +"value such as ``int('1' * 500_000)`` can take over a second on a fast CPU." +msgstr "" + +#: ../../library/stdtypes.rst:5434 +msgid "" +"Limiting conversion size offers a practical way to avoid `CVE-2020-10735 " +"`_." +msgstr "" + +#: ../../library/stdtypes.rst:5437 +msgid "" +"The limit is applied to the number of digit characters in the input or " +"output string when a non-linear conversion algorithm would be involved. " +"Underscores and the sign are not counted towards the limit." +msgstr "" + +#: ../../library/stdtypes.rst:5441 +msgid "" +"When an operation would exceed the limit, a :exc:`ValueError` is raised:" +msgstr "" + +#: ../../library/stdtypes.rst:5463 +msgid "" +"The default limit is 4300 digits as provided in :data:`sys.int_info." +"default_max_str_digits `. The lowest limit that can be " +"configured is 640 digits as provided in :data:`sys.int_info." +"str_digits_check_threshold `." +msgstr "" + +#: ../../library/stdtypes.rst:5468 +msgid "Verification:" +msgstr "" + +#: ../../library/stdtypes.rst:5483 +msgid "Affected APIs" +msgstr "" + +#: ../../library/stdtypes.rst:5485 +msgid "" +"The limition only applies to potentially slow conversions between :class:" +"`int` and :class:`str` or :class:`bytes`:" +msgstr "" + +#: ../../library/stdtypes.rst:5488 +msgid "``int(string)`` with default base 10." +msgstr "" + +#: ../../library/stdtypes.rst:5489 +msgid "``int(string, base)`` for all bases that are not a power of 2." +msgstr "" + +#: ../../library/stdtypes.rst:5490 +msgid "``str(integer)``." +msgstr "" + +#: ../../library/stdtypes.rst:5491 +msgid "``repr(integer)``" +msgstr "" + +#: ../../library/stdtypes.rst:5492 +msgid "" +"any other string conversion to base 10, for example ``f\"{integer}\"``, ``" +"\"{}\".format(integer)``, or ``b\"%d\" % integer``." +msgstr "" + +#: ../../library/stdtypes.rst:5495 +msgid "The limitations do not apply to functions with a linear algorithm:" +msgstr "" + +#: ../../library/stdtypes.rst:5497 +msgid "``int(string, base)`` with base 2, 4, 8, 16, or 32." +msgstr "" + +#: ../../library/stdtypes.rst:5498 +msgid ":func:`int.from_bytes` and :func:`int.to_bytes`." +msgstr "" + +#: ../../library/stdtypes.rst:5499 +msgid ":func:`hex`, :func:`oct`, :func:`bin`." +msgstr "" + +#: ../../library/stdtypes.rst:5500 +msgid ":ref:`formatspec` for hex, octal, and binary numbers." +msgstr "" + +#: ../../library/stdtypes.rst:5501 +msgid ":class:`str` to :class:`float`." +msgstr "" + +#: ../../library/stdtypes.rst:5502 +msgid ":class:`str` to :class:`decimal.Decimal`." +msgstr "" + +#: ../../library/stdtypes.rst:5505 +msgid "Configuring the limit" +msgstr "" + +#: ../../library/stdtypes.rst:5507 +msgid "" +"Before Python starts up you can use an environment variable or an " +"interpreter command line flag to configure the limit:" +msgstr "" + +#: ../../library/stdtypes.rst:5510 +msgid "" +":envvar:`PYTHONINTMAXSTRDIGITS`, e.g. ``PYTHONINTMAXSTRDIGITS=640 python3`` " +"to set the limit to 640 or ``PYTHONINTMAXSTRDIGITS=0 python3`` to disable " +"the limitation." +msgstr "" + +#: ../../library/stdtypes.rst:5513 +msgid "" +":option:`-X int_max_str_digits <-X>`, e.g. ``python3 -X " +"int_max_str_digits=640``" +msgstr "" + +#: ../../library/stdtypes.rst:5515 +msgid "" +":data:`sys.flags.int_max_str_digits` contains the value of :envvar:" +"`PYTHONINTMAXSTRDIGITS` or :option:`-X int_max_str_digits <-X>`. If both the " +"env var and the ``-X`` option are set, the ``-X`` option takes precedence. A " +"value of *-1* indicates that both were unset, thus a value of :data:`sys." +"int_info.default_max_str_digits` was used during initilization." +msgstr "" + +#: ../../library/stdtypes.rst:5521 +msgid "" +"From code, you can inspect the current limit and set a new one using these :" +"mod:`sys` APIs:" +msgstr "" + +#: ../../library/stdtypes.rst:5524 +msgid "" +":func:`sys.get_int_max_str_digits` and :func:`sys.set_int_max_str_digits` " +"are a getter and setter for the interpreter-wide limit. Subinterpreters have " +"their own limit." +msgstr "" + +#: ../../library/stdtypes.rst:5528 +msgid "" +"Information about the default and minimum can be found in :attr:`sys." +"int_info`:" +msgstr "" + +#: ../../library/stdtypes.rst:5530 +msgid "" +":data:`sys.int_info.default_max_str_digits ` is the compiled-" +"in default limit." +msgstr "" + +#: ../../library/stdtypes.rst:5532 +msgid "" +":data:`sys.int_info.str_digits_check_threshold ` is the lowest " +"accepted value for the limit (other than 0 which disables it)." +msgstr "" + +#: ../../library/stdtypes.rst:5539 +msgid "" +"Setting a low limit *can* lead to problems. While rare, code exists that " +"contains integer constants in decimal in their source that exceed the " +"minimum threshold. A consequence of setting the limit is that Python source " +"code containing decimal integer literals longer than the limit will " +"encounter an error during parsing, usually at startup time or import time or " +"even at installation time - anytime an up to date ``.pyc`` does not already " +"exist for the code. A workaround for source that contains such large " +"constants is to convert them to ``0x`` hexadecimal form as it has no limit." +msgstr "" + +#: ../../library/stdtypes.rst:5548 +msgid "" +"Test your application thoroughly if you use a low limit. Ensure your tests " +"run with the limit set early via the environment or flag so that it applies " +"during startup and even during any installation step that may invoke Python " +"to precompile ``.py`` sources to ``.pyc`` files." +msgstr "" + +#: ../../library/stdtypes.rst:5554 +msgid "Recommended configuration" +msgstr "" + +#: ../../library/stdtypes.rst:5556 +msgid "" +"The default :data:`sys.int_info.default_max_str_digits` is expected to be " +"reasonable for most applications. If your application requires a different " +"limit, set it from your main entry point using Python version agnostic code " +"as these APIs were added in security patch releases in versions before 3.11." +msgstr "" + +#: ../../library/stdtypes.rst:5561 +#, fuzzy +msgid "Example::" +msgstr "" +"範例:\n" +"\n" +"::" + +#: ../../library/stdtypes.rst:5573 +msgid "If you need to disable it entirely, set it to ``0``." +msgstr "" + +#: ../../library/stdtypes.rst:5577 msgid "Footnotes" msgstr "註解" -#: ../../library/stdtypes.rst:5412 +#: ../../library/stdtypes.rst:5578 msgid "" "Additional information on these special methods may be found in the Python " "Reference Manual (:ref:`customization`)." msgstr "" -#: ../../library/stdtypes.rst:5415 +#: ../../library/stdtypes.rst:5581 msgid "" "As a consequence, the list ``[1, 2]`` is considered equal to ``[1.0, 2.0]``, " "and similarly for tuples." msgstr "" -#: ../../library/stdtypes.rst:5418 +#: ../../library/stdtypes.rst:5584 msgid "They must have since the parser can't tell the type of the operands." msgstr "" -#: ../../library/stdtypes.rst:5420 +#: ../../library/stdtypes.rst:5586 msgid "" "Cased characters are those with general category property being one of \"Lu" "\" (Letter, uppercase), \"Ll\" (Letter, lowercase), or \"Lt\" (Letter, " "titlecase)." msgstr "" -#: ../../library/stdtypes.rst:5423 +#: ../../library/stdtypes.rst:5589 msgid "" "To format only a tuple you should therefore provide a singleton tuple whose " "only element is the tuple to be formatted." diff --git a/library/sys.po b/library/sys.po index a96d9ac46e..e6e5b0066c 100644 --- a/library/sys.po +++ b/library/sys.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-08-05 00:19+0000\n" +"POT-Creation-Date: 2022-09-03 00:15+0000\n" "PO-Revision-Date: 2018-05-23 16:12+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -334,8 +334,8 @@ msgstr "" msgid "Integer specifying the handle of the Python DLL." msgstr "" -#: ../../library/sys.rst:269 ../../library/sys.rst:808 -#: ../../library/sys.rst:1487 ../../library/sys.rst:1717 +#: ../../library/sys.rst:269 ../../library/sys.rst:819 +#: ../../library/sys.rst:1518 ../../library/sys.rst:1748 msgid ":ref:`Availability `: Windows." msgstr ":ref:`適用 `:Windows。" @@ -548,8 +548,8 @@ msgid "" "The attributes are read only." msgstr "" -#: ../../library/sys.rst:464 ../../library/sys.rst:513 -#: ../../library/sys.rst:853 +#: ../../library/sys.rst:464 ../../library/sys.rst:517 +#: ../../library/sys.rst:864 msgid "attribute" msgstr "" @@ -673,30 +673,45 @@ msgstr ":const:`utf8_mode`" msgid ":option:`-X utf8 <-X>`" msgstr ":option:`-X utf8 <-X>`" -#: ../../library/sys.rst:483 +#: ../../library/sys.rst:481 +#, fuzzy +msgid ":const:`int_max_str_digits`" +msgstr ":const:`bits_per_digit`" + +#: ../../library/sys.rst:481 +msgid "" +":option:`-X int_max_str_digits <-X>` (:ref:`integer string conversion length " +"limitation `)" +msgstr "" + +#: ../../library/sys.rst:484 msgid "Added ``quiet`` attribute for the new :option:`-q` flag." msgstr "" -#: ../../library/sys.rst:486 +#: ../../library/sys.rst:487 msgid "The ``hash_randomization`` attribute." msgstr "" -#: ../../library/sys.rst:489 +#: ../../library/sys.rst:490 msgid "Removed obsolete ``division_warning`` attribute." msgstr "" -#: ../../library/sys.rst:492 +#: ../../library/sys.rst:493 msgid "Added ``isolated`` attribute for :option:`-I` ``isolated`` flag." msgstr "" -#: ../../library/sys.rst:495 +#: ../../library/sys.rst:496 msgid "" "Added the ``dev_mode`` attribute for the new :ref:`Python Development Mode " "` and the ``utf8_mode`` attribute for the new :option:`-X` " "``utf8`` flag." msgstr "" -#: ../../library/sys.rst:503 +#: ../../library/sys.rst:501 +msgid "Added the ``int_max_str_digits`` attribute." +msgstr "" + +#: ../../library/sys.rst:507 msgid "" "A :term:`named tuple` holding information about the float type. It contains " "low level information about the precision and internal representation. The " @@ -706,163 +721,163 @@ msgid "" "floating types', for details." msgstr "" -#: ../../library/sys.rst:513 +#: ../../library/sys.rst:517 msgid "float.h macro" msgstr "" -#: ../../library/sys.rst:513 ../../library/sys.rst:853 +#: ../../library/sys.rst:517 ../../library/sys.rst:864 msgid "explanation" msgstr "" -#: ../../library/sys.rst:515 +#: ../../library/sys.rst:519 msgid ":const:`epsilon`" msgstr ":const:`epsilon`" -#: ../../library/sys.rst:515 +#: ../../library/sys.rst:519 msgid "DBL_EPSILON" msgstr "DBL_EPSILON" -#: ../../library/sys.rst:515 +#: ../../library/sys.rst:519 msgid "" "difference between 1.0 and the least value greater than 1.0 that is " "representable as a float" msgstr "" -#: ../../library/sys.rst:518 +#: ../../library/sys.rst:522 msgid "See also :func:`math.ulp`." msgstr "另請參閱 :func:`math.ulp`\\ 。" -#: ../../library/sys.rst:520 +#: ../../library/sys.rst:524 msgid ":const:`dig`" msgstr ":const:`dig`" -#: ../../library/sys.rst:520 +#: ../../library/sys.rst:524 msgid "DBL_DIG" msgstr "DBL_DIG" -#: ../../library/sys.rst:520 +#: ../../library/sys.rst:524 msgid "" "maximum number of decimal digits that can be faithfully represented in a " "float; see below" msgstr "" -#: ../../library/sys.rst:523 +#: ../../library/sys.rst:527 msgid ":const:`mant_dig`" msgstr ":const:`mant_dig`" -#: ../../library/sys.rst:523 +#: ../../library/sys.rst:527 msgid "DBL_MANT_DIG" msgstr "DBL_MANT_DIG" -#: ../../library/sys.rst:523 +#: ../../library/sys.rst:527 msgid "" "float precision: the number of base-``radix`` digits in the significand of a " "float" msgstr "" -#: ../../library/sys.rst:526 +#: ../../library/sys.rst:530 msgid ":const:`max`" msgstr ":const:`max`" -#: ../../library/sys.rst:526 +#: ../../library/sys.rst:530 msgid "DBL_MAX" msgstr "DBL_MAX" -#: ../../library/sys.rst:526 +#: ../../library/sys.rst:530 msgid "maximum representable positive finite float" msgstr "" -#: ../../library/sys.rst:528 +#: ../../library/sys.rst:532 msgid ":const:`max_exp`" msgstr ":const:`max_exp`" -#: ../../library/sys.rst:528 +#: ../../library/sys.rst:532 msgid "DBL_MAX_EXP" msgstr "DBL_MAX_EXP" -#: ../../library/sys.rst:528 +#: ../../library/sys.rst:532 msgid "" "maximum integer *e* such that ``radix**(e-1)`` is a representable finite " "float" msgstr "" -#: ../../library/sys.rst:531 +#: ../../library/sys.rst:535 msgid ":const:`max_10_exp`" msgstr ":const:`max_10_exp`" -#: ../../library/sys.rst:531 +#: ../../library/sys.rst:535 msgid "DBL_MAX_10_EXP" msgstr "DBL_MAX_10_EXP" -#: ../../library/sys.rst:531 +#: ../../library/sys.rst:535 msgid "" "maximum integer *e* such that ``10**e`` is in the range of representable " "finite floats" msgstr "" -#: ../../library/sys.rst:534 +#: ../../library/sys.rst:538 msgid ":const:`min`" msgstr ":const:`min`" -#: ../../library/sys.rst:534 +#: ../../library/sys.rst:538 msgid "DBL_MIN" msgstr "DBL_MIN" -#: ../../library/sys.rst:534 +#: ../../library/sys.rst:538 msgid "minimum representable positive *normalized* float" msgstr "" -#: ../../library/sys.rst:536 +#: ../../library/sys.rst:540 msgid "" "Use :func:`math.ulp(0.0) ` to get the smallest positive " "*denormalized* representable float." msgstr "" -#: ../../library/sys.rst:540 +#: ../../library/sys.rst:544 msgid ":const:`min_exp`" msgstr ":const:`min_exp`" -#: ../../library/sys.rst:540 +#: ../../library/sys.rst:544 msgid "DBL_MIN_EXP" msgstr "DBL_MIN_EXP" -#: ../../library/sys.rst:540 +#: ../../library/sys.rst:544 msgid "minimum integer *e* such that ``radix**(e-1)`` is a normalized float" msgstr "" -#: ../../library/sys.rst:543 +#: ../../library/sys.rst:547 msgid ":const:`min_10_exp`" msgstr ":const:`min_10_exp`" -#: ../../library/sys.rst:543 +#: ../../library/sys.rst:547 msgid "DBL_MIN_10_EXP" msgstr "DBL_MIN_10_EXP" -#: ../../library/sys.rst:543 +#: ../../library/sys.rst:547 msgid "minimum integer *e* such that ``10**e`` is a normalized float" msgstr "" -#: ../../library/sys.rst:546 +#: ../../library/sys.rst:550 msgid ":const:`radix`" msgstr ":const:`radix`" -#: ../../library/sys.rst:546 +#: ../../library/sys.rst:550 msgid "FLT_RADIX" msgstr "FLT_RADIX" -#: ../../library/sys.rst:546 +#: ../../library/sys.rst:550 msgid "radix of exponent representation" msgstr "" -#: ../../library/sys.rst:548 +#: ../../library/sys.rst:552 msgid ":const:`rounds`" msgstr ":const:`rounds`" -#: ../../library/sys.rst:548 +#: ../../library/sys.rst:552 msgid "FLT_ROUNDS" msgstr "FLT_ROUNDS" -#: ../../library/sys.rst:548 +#: ../../library/sys.rst:552 msgid "" "integer constant representing the rounding mode used for arithmetic " "operations. This reflects the value of the system FLT_ROUNDS macro at " @@ -870,7 +885,7 @@ msgid "" "explanation of the possible values and their meanings." msgstr "" -#: ../../library/sys.rst:556 +#: ../../library/sys.rst:560 msgid "" "The attribute :attr:`sys.float_info.dig` needs further explanation. If " "``s`` is any string representing a decimal number with at most :attr:`sys." @@ -878,13 +893,13 @@ msgid "" "back again will recover a string representing the same decimal value::" msgstr "" -#: ../../library/sys.rst:569 +#: ../../library/sys.rst:573 msgid "" "But for strings with more than :attr:`sys.float_info.dig` significant " "digits, this isn't always true::" msgstr "" -#: ../../library/sys.rst:578 +#: ../../library/sys.rst:582 msgid "" "A string indicating how the :func:`repr` function behaves for floats. If " "the string has value ``'short'`` then for a finite float ``x``, ``repr(x)`` " @@ -894,7 +909,7 @@ msgid "" "same way as it did in versions of Python prior to 3.1." msgstr "" -#: ../../library/sys.rst:591 +#: ../../library/sys.rst:595 msgid "" "Return the number of memory blocks currently allocated by the interpreter, " "regardless of their size. This function is mainly useful for tracking and " @@ -904,38 +919,38 @@ msgid "" "results." msgstr "" -#: ../../library/sys.rst:598 +#: ../../library/sys.rst:602 msgid "" "If a Python build or implementation cannot reasonably compute this " "information, :func:`getallocatedblocks()` is allowed to return 0 instead." msgstr "" -#: ../../library/sys.rst:606 +#: ../../library/sys.rst:610 msgid "Return the build time API version of Android as an integer." msgstr "" -#: ../../library/sys.rst:609 +#: ../../library/sys.rst:613 msgid ":ref:`Availability `: Android." msgstr ":ref:`適用 `:Android。" -#: ../../library/sys.rst:615 +#: ../../library/sys.rst:619 msgid "" "Return the name of the current default string encoding used by the Unicode " "implementation." msgstr "" -#: ../../library/sys.rst:621 +#: ../../library/sys.rst:625 msgid "" "Return the current value of the flags that are used for :c:func:`dlopen` " "calls. Symbolic names for the flag values can be found in the :mod:`os` " "module (``RTLD_xxx`` constants, e.g. :data:`os.RTLD_LAZY`)." msgstr "" -#: ../../library/sys.rst:626 ../../library/sys.rst:1256 +#: ../../library/sys.rst:630 ../../library/sys.rst:1279 msgid ":ref:`Availability `: Unix." msgstr ":ref:`適用 `:Unix。" -#: ../../library/sys.rst:631 +#: ../../library/sys.rst:635 msgid "" "Get the :term:`filesystem encoding `: " "the encoding used with the :term:`filesystem error handler ` is enabled." msgstr "" -#: ../../library/sys.rst:664 +#: ../../library/sys.rst:668 msgid "" "Get the :term:`filesystem error handler `: the error handler used with the :term:`filesystem encoding " @@ -990,14 +1005,20 @@ msgid "" "func:`getfilesystemencoding`." msgstr "" -#: ../../library/sys.rst:682 +#: ../../library/sys.rst:686 +msgid "" +"Returns the current value for the :ref:`integer string conversion length " +"limitation `. See also :func:`set_int_max_str_digits`." +msgstr "" + +#: ../../library/sys.rst:693 msgid "" "Return the reference count of the *object*. The count returned is generally " "one higher than you might expect, because it includes the (temporary) " "reference as an argument to :func:`getrefcount`." msgstr "" -#: ../../library/sys.rst:689 +#: ../../library/sys.rst:700 msgid "" "Return the current value of the recursion limit, the maximum depth of the " "Python interpreter stack. This limit prevents infinite recursion from " @@ -1005,46 +1026,46 @@ msgid "" "func:`setrecursionlimit`." msgstr "" -#: ../../library/sys.rst:697 +#: ../../library/sys.rst:708 msgid "" "Return the size of an object in bytes. The object can be any type of object. " "All built-in objects will return correct results, but this does not have to " "hold true for third-party extensions as it is implementation specific." msgstr "" -#: ../../library/sys.rst:702 +#: ../../library/sys.rst:713 msgid "" "Only the memory consumption directly attributed to the object is accounted " "for, not the memory consumption of objects it refers to." msgstr "" -#: ../../library/sys.rst:705 +#: ../../library/sys.rst:716 msgid "" "If given, *default* will be returned if the object does not provide means to " "retrieve the size. Otherwise a :exc:`TypeError` will be raised." msgstr "" -#: ../../library/sys.rst:708 +#: ../../library/sys.rst:719 msgid "" ":func:`getsizeof` calls the object's ``__sizeof__`` method and adds an " "additional garbage collector overhead if the object is managed by the " "garbage collector." msgstr "" -#: ../../library/sys.rst:712 +#: ../../library/sys.rst:723 msgid "" "See `recursive sizeof recipe `_ " "for an example of using :func:`getsizeof` recursively to find the size of " "containers and all their contents." msgstr "" -#: ../../library/sys.rst:718 +#: ../../library/sys.rst:729 msgid "" "Return the interpreter's \"thread switch interval\"; see :func:" "`setswitchinterval`." msgstr "" -#: ../../library/sys.rst:726 +#: ../../library/sys.rst:737 msgid "" "Return a frame object from the call stack. If optional integer *depth* is " "given, return the frame object that many calls below the top of the stack. " @@ -1053,27 +1074,27 @@ msgid "" "stack." msgstr "" -#: ../../library/sys.rst:731 +#: ../../library/sys.rst:742 msgid "" "Raises an :ref:`auditing event ` ``sys._getframe`` with no " "arguments." msgstr "" -#: ../../library/sys.rst:735 +#: ../../library/sys.rst:746 msgid "" "This function should be used for internal and specialized purposes only. It " "is not guaranteed to exist in all implementations of Python." msgstr "" -#: ../../library/sys.rst:745 +#: ../../library/sys.rst:756 msgid "Get the profiler function as set by :func:`setprofile`." msgstr "" -#: ../../library/sys.rst:754 +#: ../../library/sys.rst:765 msgid "Get the trace function as set by :func:`settrace`." msgstr "" -#: ../../library/sys.rst:758 +#: ../../library/sys.rst:769 msgid "" "The :func:`gettrace` function is intended only for implementing debuggers, " "profilers, coverage tools and the like. Its behavior is part of the " @@ -1081,7 +1102,7 @@ msgid "" "thus may not be available in all Python implementations." msgstr "" -#: ../../library/sys.rst:766 +#: ../../library/sys.rst:777 msgid "" "Return a named tuple describing the Windows version currently running. The " "named elements are *major*, *minor*, *build*, *platform*, *service_pack*, " @@ -1093,54 +1114,54 @@ msgid "" "first 5 elements are retrievable by indexing." msgstr "" -#: ../../library/sys.rst:777 +#: ../../library/sys.rst:788 msgid "*platform* will be :const:`2 (VER_PLATFORM_WIN32_NT)`." msgstr "" -#: ../../library/sys.rst:779 +#: ../../library/sys.rst:790 msgid "*product_type* may be one of the following values:" msgstr "" -#: ../../library/sys.rst:782 +#: ../../library/sys.rst:793 msgid "Constant" msgstr "" -#: ../../library/sys.rst:782 +#: ../../library/sys.rst:793 msgid "Meaning" msgstr "" -#: ../../library/sys.rst:784 +#: ../../library/sys.rst:795 msgid ":const:`1 (VER_NT_WORKSTATION)`" msgstr ":const:`1 (VER_NT_WORKSTATION)`" -#: ../../library/sys.rst:784 +#: ../../library/sys.rst:795 msgid "The system is a workstation." msgstr "" -#: ../../library/sys.rst:786 +#: ../../library/sys.rst:797 msgid ":const:`2 (VER_NT_DOMAIN_CONTROLLER)`" msgstr ":const:`2 (VER_NT_DOMAIN_CONTROLLER)`" -#: ../../library/sys.rst:786 +#: ../../library/sys.rst:797 msgid "The system is a domain controller." msgstr "" -#: ../../library/sys.rst:789 +#: ../../library/sys.rst:800 msgid ":const:`3 (VER_NT_SERVER)`" msgstr ":const:`3 (VER_NT_SERVER)`" -#: ../../library/sys.rst:789 +#: ../../library/sys.rst:800 msgid "The system is a server, but not a domain controller." msgstr "" -#: ../../library/sys.rst:793 +#: ../../library/sys.rst:804 msgid "" "This function wraps the Win32 :c:func:`GetVersionEx` function; see the " "Microsoft documentation on :c:func:`OSVERSIONINFOEX` for more information " "about these fields." msgstr "" -#: ../../library/sys.rst:797 +#: ../../library/sys.rst:808 msgid "" "*platform_version* returns the major version, minor version and build number " "of the current operating system, rather than the version that is being " @@ -1148,24 +1169,24 @@ msgid "" "feature detection." msgstr "" -#: ../../library/sys.rst:803 +#: ../../library/sys.rst:814 msgid "" "*platform_version* derives the version from kernel32.dll which can be of a " "different version than the OS version. Please use :mod:`platform` module for " "achieving accurate OS version." msgstr "" -#: ../../library/sys.rst:809 +#: ../../library/sys.rst:820 msgid "" "Changed to a named tuple and added *service_pack_minor*, " "*service_pack_major*, *suite_mask*, and *product_type*." msgstr "" -#: ../../library/sys.rst:813 +#: ../../library/sys.rst:824 msgid "Added *platform_version*" msgstr "新增 *platform_version*" -#: ../../library/sys.rst:819 +#: ../../library/sys.rst:830 msgid "" "Returns an *asyncgen_hooks* object, which is similar to a :class:" "`~collections.namedtuple` of the form `(firstiter, finalizer)`, where " @@ -1175,103 +1196,103 @@ msgid "" "loop." msgstr "" -#: ../../library/sys.rst:826 +#: ../../library/sys.rst:837 msgid "See :pep:`525` for more details." msgstr "更多細節請見 :pep:`525`\\ 。" -#: ../../library/sys.rst:830 ../../library/sys.rst:1450 +#: ../../library/sys.rst:841 ../../library/sys.rst:1481 msgid "" "This function has been added on a provisional basis (see :pep:`411` for " "details.)" msgstr "" -#: ../../library/sys.rst:836 +#: ../../library/sys.rst:847 msgid "" "Get the current coroutine origin tracking depth, as set by :func:" "`set_coroutine_origin_tracking_depth`." msgstr "" -#: ../../library/sys.rst:842 ../../library/sys.rst:1471 +#: ../../library/sys.rst:853 ../../library/sys.rst:1502 msgid "" "This function has been added on a provisional basis (see :pep:`411` for " "details.) Use it only for debugging purposes." msgstr "" -#: ../../library/sys.rst:848 +#: ../../library/sys.rst:859 msgid "" "A :term:`named tuple` giving parameters of the numeric hash implementation. " "For more details about hashing of numeric types, see :ref:`numeric-hash`." msgstr "" -#: ../../library/sys.rst:855 +#: ../../library/sys.rst:866 msgid ":const:`width`" msgstr ":const:`width`" -#: ../../library/sys.rst:855 +#: ../../library/sys.rst:866 msgid "width in bits used for hash values" msgstr "" -#: ../../library/sys.rst:857 +#: ../../library/sys.rst:868 msgid ":const:`modulus`" msgstr ":const:`modulus`" -#: ../../library/sys.rst:857 +#: ../../library/sys.rst:868 msgid "prime modulus P used for numeric hash scheme" msgstr "" -#: ../../library/sys.rst:859 +#: ../../library/sys.rst:870 msgid ":const:`inf`" msgstr ":const:`inf`" -#: ../../library/sys.rst:859 +#: ../../library/sys.rst:870 msgid "hash value returned for a positive infinity" msgstr "" -#: ../../library/sys.rst:861 +#: ../../library/sys.rst:872 msgid ":const:`nan`" msgstr ":const:`nan`" -#: ../../library/sys.rst:861 +#: ../../library/sys.rst:872 msgid "(this attribute is no longer used)" msgstr "" -#: ../../library/sys.rst:863 +#: ../../library/sys.rst:874 msgid ":const:`imag`" msgstr ":const:`imag`" -#: ../../library/sys.rst:863 +#: ../../library/sys.rst:874 msgid "multiplier used for the imaginary part of a complex number" msgstr "" -#: ../../library/sys.rst:866 +#: ../../library/sys.rst:877 msgid ":const:`algorithm`" msgstr ":const:`algorithm`" -#: ../../library/sys.rst:866 +#: ../../library/sys.rst:877 msgid "name of the algorithm for hashing of str, bytes, and memoryview" msgstr "" -#: ../../library/sys.rst:869 +#: ../../library/sys.rst:880 msgid ":const:`hash_bits`" msgstr ":const:`hash_bits`" -#: ../../library/sys.rst:869 +#: ../../library/sys.rst:880 msgid "internal output size of the hash algorithm" msgstr "" -#: ../../library/sys.rst:871 +#: ../../library/sys.rst:882 msgid ":const:`seed_bits`" msgstr ":const:`seed_bits`" -#: ../../library/sys.rst:871 +#: ../../library/sys.rst:882 msgid "size of the seed key of the hash algorithm" msgstr "" -#: ../../library/sys.rst:877 +#: ../../library/sys.rst:888 msgid "Added *algorithm*, *hash_bits* and *seed_bits*" msgstr "新增 *algorithm*\\ 、\\ *hash_bits* 與 *seed_bits*" -#: ../../library/sys.rst:883 +#: ../../library/sys.rst:894 msgid "" "The version number encoded as a single integer. This is guaranteed to " "increase with each version, including proper support for non-production " @@ -1279,7 +1300,7 @@ msgid "" "version 1.5.2, use::" msgstr "" -#: ../../library/sys.rst:894 +#: ../../library/sys.rst:905 msgid "" "This is called ``hexversion`` since it only really looks meaningful when " "viewed as the result of passing it to the built-in :func:`hex` function. " @@ -1287,25 +1308,25 @@ msgid "" "human-friendly encoding of the same information." msgstr "" -#: ../../library/sys.rst:899 +#: ../../library/sys.rst:910 msgid "More details of ``hexversion`` can be found at :ref:`apiabiversion`." msgstr "" -#: ../../library/sys.rst:904 +#: ../../library/sys.rst:915 msgid "" "An object containing information about the implementation of the currently " "running Python interpreter. The following attributes are required to exist " "in all Python implementations." msgstr "" -#: ../../library/sys.rst:908 +#: ../../library/sys.rst:919 msgid "" "*name* is the implementation's identifier, e.g. ``'cpython'``. The actual " "string is defined by the Python implementation, but it is guaranteed to be " "lower case." msgstr "" -#: ../../library/sys.rst:912 +#: ../../library/sys.rst:923 msgid "" "*version* is a named tuple, in the same format as :data:`sys.version_info`. " "It represents the version of the Python *implementation*. This has a " @@ -1317,13 +1338,13 @@ msgid "" "the same value, since it is the reference implementation." msgstr "" -#: ../../library/sys.rst:922 +#: ../../library/sys.rst:933 msgid "" "*hexversion* is the implementation version in hexadecimal format, like :data:" "`sys.hexversion`." msgstr "" -#: ../../library/sys.rst:925 +#: ../../library/sys.rst:936 msgid "" "*cache_tag* is the tag used by the import machinery in the filenames of " "cached modules. By convention, it would be a composite of the " @@ -1332,7 +1353,7 @@ msgid "" "set to ``None``, it indicates that module caching should be disabled." msgstr "" -#: ../../library/sys.rst:932 +#: ../../library/sys.rst:943 msgid "" ":data:`sys.implementation` may contain additional attributes specific to the " "Python implementation. These non-standard attributes must start with an " @@ -1342,45 +1363,71 @@ msgid "" "versions, however.) See :pep:`421` for more information." msgstr "" -#: ../../library/sys.rst:943 +#: ../../library/sys.rst:954 msgid "" "The addition of new required attributes must go through the normal PEP " "process. See :pep:`421` for more information." msgstr "" -#: ../../library/sys.rst:948 +#: ../../library/sys.rst:959 msgid "" "A :term:`named tuple` that holds information about Python's internal " "representation of integers. The attributes are read only." msgstr "" -#: ../../library/sys.rst:954 ../../library/sys.rst:1602 +#: ../../library/sys.rst:965 ../../library/sys.rst:1633 msgid "Attribute" msgstr "屬性" -#: ../../library/sys.rst:954 ../../library/sys.rst:1602 +#: ../../library/sys.rst:965 ../../library/sys.rst:1633 msgid "Explanation" msgstr "解釋" -#: ../../library/sys.rst:956 +#: ../../library/sys.rst:967 msgid ":const:`bits_per_digit`" msgstr ":const:`bits_per_digit`" -#: ../../library/sys.rst:956 +#: ../../library/sys.rst:967 msgid "" "number of bits held in each digit. Python integers are stored internally in " "base ``2**int_info.bits_per_digit``" msgstr "" -#: ../../library/sys.rst:960 +#: ../../library/sys.rst:971 msgid ":const:`sizeof_digit`" msgstr ":const:`sizeof_digit`" -#: ../../library/sys.rst:960 +#: ../../library/sys.rst:971 msgid "size in bytes of the C type used to represent a digit" msgstr "" -#: ../../library/sys.rst:969 +#: ../../library/sys.rst:974 +#, fuzzy +msgid ":const:`default_max_str_digits`" +msgstr ":const:`bits_per_digit`" + +#: ../../library/sys.rst:974 +msgid "" +"default value for :func:`sys.get_int_max_str_digits` when it is not " +"otherwise explicitly configured." +msgstr "" + +#: ../../library/sys.rst:978 +#, fuzzy +msgid ":const:`str_digits_check_threshold`" +msgstr ":const:`dont_write_bytecode`" + +#: ../../library/sys.rst:978 +msgid "" +"minimum non-zero value for :func:`sys.set_int_max_str_digits`, :envvar:" +"`PYTHONINTMAXSTRDIGITS`, or :option:`-X int_max_str_digits <-X>`." +msgstr "" + +#: ../../library/sys.rst:986 +msgid "Added ``default_max_str_digits`` and ``str_digits_check_threshold``." +msgstr "" + +#: ../../library/sys.rst:992 msgid "" "When this attribute exists, its value is automatically called (with no " "arguments) when the interpreter is launched in :ref:`interactive mode `." msgstr "" -#: ../../library/sys.rst:975 +#: ../../library/sys.rst:998 msgid "" "Raises an :ref:`auditing event ` ``cpython.run_interactivehook`` " "with argument ``hook``." msgstr "" -#: ../../library/sys.rst:977 +#: ../../library/sys.rst:1000 msgid "" "Raises an :ref:`auditing event ` ``cpython.run_interactivehook`` " "with the hook object as the argument when the hook is called on startup." msgstr "" -#: ../../library/sys.rst:986 +#: ../../library/sys.rst:1009 msgid "" "Enter *string* in the table of \"interned\" strings and return the interned " "string -- which is *string* itself or a copy. Interning strings is useful to " @@ -1413,19 +1460,19 @@ msgid "" "attributes have interned keys." msgstr "" -#: ../../library/sys.rst:994 +#: ../../library/sys.rst:1017 msgid "" "Interned strings are not immortal; you must keep a reference to the return " "value of :func:`intern` around to benefit from it." msgstr "" -#: ../../library/sys.rst:1000 +#: ../../library/sys.rst:1023 msgid "" "Return :const:`True` if the Python interpreter is :term:`shutting down " "`, :const:`False` otherwise." msgstr "" -#: ../../library/sys.rst:1010 +#: ../../library/sys.rst:1033 msgid "" "These three variables are not always defined; they are set when an exception " "is not handled and the interpreter prints an error message and a stack " @@ -1436,33 +1483,33 @@ msgid "" "information.)" msgstr "" -#: ../../library/sys.rst:1018 +#: ../../library/sys.rst:1041 msgid "" "The meaning of the variables is the same as that of the return values from :" "func:`exc_info` above." msgstr "" -#: ../../library/sys.rst:1024 +#: ../../library/sys.rst:1047 msgid "" "An integer giving the maximum value a variable of type :c:type:`Py_ssize_t` " "can take. It's usually ``2**31 - 1`` on a 32-bit platform and ``2**63 - 1`` " "on a 64-bit platform." msgstr "" -#: ../../library/sys.rst:1031 +#: ../../library/sys.rst:1054 msgid "" "An integer giving the value of the largest Unicode code point, i.e. " "``1114111`` (``0x10FFFF`` in hexadecimal)." msgstr "" -#: ../../library/sys.rst:1034 +#: ../../library/sys.rst:1057 msgid "" "Before :pep:`393`, ``sys.maxunicode`` used to be either ``0xFFFF`` or " "``0x10FFFF``, depending on the configuration option that specified whether " "Unicode characters were stored as UCS-2 or UCS-4." msgstr "" -#: ../../library/sys.rst:1042 +#: ../../library/sys.rst:1065 msgid "" "A list of :term:`meta path finder` objects that have their :meth:`~importlib." "abc.MetaPathFinder.find_spec` methods called to see if one of the objects " @@ -1475,27 +1522,27 @@ msgid "" "if the module cannot be found." msgstr "" -#: ../../library/sys.rst:1055 +#: ../../library/sys.rst:1078 msgid ":class:`importlib.abc.MetaPathFinder`" msgstr ":class:`importlib.abc.MetaPathFinder`" -#: ../../library/sys.rst:1055 +#: ../../library/sys.rst:1078 msgid "" "The abstract base class defining the interface of finder objects on :data:" "`meta_path`." msgstr "" -#: ../../library/sys.rst:1059 +#: ../../library/sys.rst:1082 msgid ":class:`importlib.machinery.ModuleSpec`" msgstr ":class:`importlib.machinery.ModuleSpec`" -#: ../../library/sys.rst:1058 +#: ../../library/sys.rst:1081 msgid "" "The concrete class which :meth:`~importlib.abc.MetaPathFinder.find_spec` " "should return instances of." msgstr "" -#: ../../library/sys.rst:1064 +#: ../../library/sys.rst:1087 msgid "" ":term:`Module specs ` were introduced in Python 3.4, by :pep:" "`451`. Earlier versions of Python looked for a method called :meth:" @@ -1504,7 +1551,7 @@ msgid "" "MetaPathFinder.find_spec` method." msgstr "" -#: ../../library/sys.rst:1072 +#: ../../library/sys.rst:1095 msgid "" "This is a dictionary that maps module names to modules which have already " "been loaded. This can be manipulated to force reloading of modules and " @@ -1516,24 +1563,24 @@ msgid "" "other threads." msgstr "" -#: ../../library/sys.rst:1084 +#: ../../library/sys.rst:1107 msgid "" "The list of the original command line arguments passed to the Python " "executable." msgstr "" -#: ../../library/sys.rst:1087 +#: ../../library/sys.rst:1110 msgid "See also :data:`sys.argv`." msgstr "另請參閱 :data:`sys.argv`\\ 。" -#: ../../library/sys.rst:1096 +#: ../../library/sys.rst:1119 msgid "" "A list of strings that specifies the search path for modules. Initialized " "from the environment variable :envvar:`PYTHONPATH`, plus an installation-" "dependent default." msgstr "" -#: ../../library/sys.rst:1100 +#: ../../library/sys.rst:1123 msgid "" "As initialized upon program startup, the first item of this list, " "``path[0]``, is the directory containing the script that was used to invoke " @@ -1545,31 +1592,31 @@ msgid "" "`PYTHONPATH`." msgstr "" -#: ../../library/sys.rst:1108 +#: ../../library/sys.rst:1131 msgid "" "A program is free to modify this list for its own purposes. Only strings " "and bytes should be added to :data:`sys.path`; all other data types are " "ignored during import." msgstr "" -#: ../../library/sys.rst:1114 +#: ../../library/sys.rst:1137 msgid "" "Module :mod:`site` This describes how to use .pth files to extend :data:`sys." "path`." msgstr "" -#: ../../library/sys.rst:1120 +#: ../../library/sys.rst:1143 msgid "" "A list of callables that take a path argument to try to create a :term:" "`finder` for the path. If a finder can be created, it is to be returned by " "the callable, else raise :exc:`ImportError`." msgstr "" -#: ../../library/sys.rst:1124 ../../library/sys.rst:1135 +#: ../../library/sys.rst:1147 ../../library/sys.rst:1158 msgid "Originally specified in :pep:`302`." msgstr "" -#: ../../library/sys.rst:1129 +#: ../../library/sys.rst:1152 msgid "" "A dictionary acting as a cache for :term:`finder` objects. The keys are " "paths that have been passed to :data:`sys.path_hooks` and the values are the " @@ -1577,19 +1624,19 @@ msgid "" "is found on :data:`sys.path_hooks` then ``None`` is stored." msgstr "" -#: ../../library/sys.rst:1137 +#: ../../library/sys.rst:1160 msgid "" "``None`` is stored instead of :class:`imp.NullImporter` when no finder is " "found." msgstr "" -#: ../../library/sys.rst:1144 +#: ../../library/sys.rst:1167 msgid "" "This string contains a platform identifier that can be used to append " "platform-specific components to :data:`sys.path`, for instance." msgstr "" -#: ../../library/sys.rst:1147 +#: ../../library/sys.rst:1170 msgid "" "For Unix systems, except on Linux and AIX, this is the lowercased OS name as " "returned by ``uname -s`` with the first part of the version as returned by " @@ -1598,59 +1645,59 @@ msgid "" "version, it is therefore recommended to use the following idiom::" msgstr "" -#: ../../library/sys.rst:1160 +#: ../../library/sys.rst:1183 msgid "For other systems, the values are:" msgstr "" -#: ../../library/sys.rst:1163 +#: ../../library/sys.rst:1186 msgid "System" msgstr "" -#: ../../library/sys.rst:1163 +#: ../../library/sys.rst:1186 msgid "``platform`` value" msgstr "" -#: ../../library/sys.rst:1165 +#: ../../library/sys.rst:1188 msgid "AIX" msgstr "AIX" -#: ../../library/sys.rst:1165 +#: ../../library/sys.rst:1188 msgid "``'aix'``" msgstr "``'aix'``" -#: ../../library/sys.rst:1166 +#: ../../library/sys.rst:1189 msgid "Linux" msgstr "Linux" -#: ../../library/sys.rst:1166 +#: ../../library/sys.rst:1189 msgid "``'linux'``" msgstr "``'linux'``" -#: ../../library/sys.rst:1167 +#: ../../library/sys.rst:1190 msgid "Windows" msgstr "Windows" -#: ../../library/sys.rst:1167 +#: ../../library/sys.rst:1190 msgid "``'win32'``" msgstr "``'win32'``" -#: ../../library/sys.rst:1168 +#: ../../library/sys.rst:1191 msgid "Windows/Cygwin" msgstr "Windows/Cygwin" -#: ../../library/sys.rst:1168 +#: ../../library/sys.rst:1191 msgid "``'cygwin'``" msgstr "``'cygwin'``" -#: ../../library/sys.rst:1169 +#: ../../library/sys.rst:1192 msgid "macOS" msgstr "macOS" -#: ../../library/sys.rst:1169 +#: ../../library/sys.rst:1192 msgid "``'darwin'``" msgstr "``'darwin'``" -#: ../../library/sys.rst:1172 +#: ../../library/sys.rst:1195 msgid "" "On Linux, :attr:`sys.platform` doesn't contain the major version anymore. It " "is always ``'linux'``, instead of ``'linux2'`` or ``'linux3'``. Since older " @@ -1658,7 +1705,7 @@ msgid "" "the ``startswith`` idiom presented above." msgstr "" -#: ../../library/sys.rst:1178 +#: ../../library/sys.rst:1201 msgid "" "On AIX, :attr:`sys.platform` doesn't contain the major version anymore. It " "is always ``'aix'``, instead of ``'aix5'`` or ``'aix7'``. Since older " @@ -1666,57 +1713,57 @@ msgid "" "the ``startswith`` idiom presented above." msgstr "" -#: ../../library/sys.rst:1186 +#: ../../library/sys.rst:1209 msgid "" ":attr:`os.name` has a coarser granularity. :func:`os.uname` gives system-" "dependent version information." msgstr "" -#: ../../library/sys.rst:1189 +#: ../../library/sys.rst:1212 msgid "" "The :mod:`platform` module provides detailed checks for the system's " "identity." msgstr "" -#: ../../library/sys.rst:1195 +#: ../../library/sys.rst:1218 msgid "" "Name of the platform-specific library directory. It is used to build the " "path of standard library and the paths of installed extension modules." msgstr "" -#: ../../library/sys.rst:1198 +#: ../../library/sys.rst:1221 msgid "" "It is equal to ``\"lib\"`` on most platforms. On Fedora and SuSE, it is " "equal to ``\"lib64\"`` on 64-bit platforms which gives the following ``sys." "path`` paths (where ``X.Y`` is the Python ``major.minor`` version):" msgstr "" -#: ../../library/sys.rst:1202 +#: ../../library/sys.rst:1225 msgid "" "``/usr/lib64/pythonX.Y/``: Standard library (like ``os.py`` of the :mod:`os` " "module)" msgstr "" -#: ../../library/sys.rst:1204 +#: ../../library/sys.rst:1227 msgid "" "``/usr/lib64/pythonX.Y/lib-dynload/``: C extension modules of the standard " "library (like the :mod:`errno` module, the exact filename is platform " "specific)" msgstr "" -#: ../../library/sys.rst:1207 +#: ../../library/sys.rst:1230 msgid "" "``/usr/lib/pythonX.Y/site-packages/`` (always use ``lib``, not :data:`sys." "platlibdir`): Third-party modules" msgstr "" -#: ../../library/sys.rst:1209 +#: ../../library/sys.rst:1232 msgid "" "``/usr/lib64/pythonX.Y/site-packages/``: C extension modules of third-party " "packages" msgstr "" -#: ../../library/sys.rst:1217 +#: ../../library/sys.rst:1240 msgid "" "A string giving the site-specific directory prefix where the platform " "independent Python files are installed; on Unix, the default is ``'/usr/" @@ -1725,14 +1772,14 @@ msgid "" "paths." msgstr "" -#: ../../library/sys.rst:1223 +#: ../../library/sys.rst:1246 msgid "" "If a :ref:`virtual environment ` is in effect, this value will be " "changed in ``site.py`` to point to the virtual environment. The value for " "the Python installation will still be available, via :data:`base_prefix`." msgstr "" -#: ../../library/sys.rst:1238 +#: ../../library/sys.rst:1261 msgid "" "Strings specifying the primary and secondary prompt of the interpreter. " "These are only defined if the interpreter is in interactive mode. Their " @@ -1742,7 +1789,7 @@ msgid "" "used to implement a dynamic prompt." msgstr "" -#: ../../library/sys.rst:1248 +#: ../../library/sys.rst:1271 msgid "" "Set the flags used by the interpreter for :c:func:`dlopen` calls, such as " "when the interpreter loads extension modules. Among other things, this will " @@ -1753,7 +1800,14 @@ msgid "" "data:`os.RTLD_LAZY`)." msgstr "" -#: ../../library/sys.rst:1264 +#: ../../library/sys.rst:1283 +msgid "" +"Set the :ref:`integer string conversion length limitation " +"` used by this interpreter. See also :func:" +"`get_int_max_str_digits`." +msgstr "" + +#: ../../library/sys.rst:1295 msgid "" "Set the system's profile function, which allows you to implement a Python " "source code profiler in Python. See chapter :ref:`profile` for more " @@ -1768,7 +1822,7 @@ msgid "" "in the profile function will cause itself unset." msgstr "" -#: ../../library/sys.rst:1275 +#: ../../library/sys.rst:1306 msgid "" "Profile functions should have three arguments: *frame*, *event*, and *arg*. " "*frame* is the current stack frame. *event* is a string: ``'call'``, " @@ -1776,71 +1830,71 @@ msgid "" "depends on the event type." msgstr "" -#: ../../library/sys.rst:1280 +#: ../../library/sys.rst:1311 msgid "" "Raises an :ref:`auditing event ` ``sys.setprofile`` with no " "arguments." msgstr "" -#: ../../library/sys.rst:1282 ../../library/sys.rst:1363 +#: ../../library/sys.rst:1313 ../../library/sys.rst:1394 msgid "The events have the following meaning:" msgstr "" -#: ../../library/sys.rst:1286 ../../library/sys.rst:1368 +#: ../../library/sys.rst:1317 ../../library/sys.rst:1399 msgid "``'call'``" msgstr "``'call'``" -#: ../../library/sys.rst:1285 +#: ../../library/sys.rst:1316 msgid "" "A function is called (or some other code block entered). The profile " "function is called; *arg* is ``None``." msgstr "" -#: ../../library/sys.rst:1291 ../../library/sys.rst:1383 +#: ../../library/sys.rst:1322 ../../library/sys.rst:1414 msgid "``'return'``" msgstr "``'return'``" -#: ../../library/sys.rst:1289 +#: ../../library/sys.rst:1320 msgid "" "A function (or other code block) is about to return. The profile function " "is called; *arg* is the value that will be returned, or ``None`` if the " "event is caused by an exception being raised." msgstr "" -#: ../../library/sys.rst:1295 +#: ../../library/sys.rst:1326 msgid "``'c_call'``" msgstr "``'c_call'``" -#: ../../library/sys.rst:1294 +#: ../../library/sys.rst:1325 msgid "" "A C function is about to be called. This may be an extension function or a " "built-in. *arg* is the C function object." msgstr "" -#: ../../library/sys.rst:1298 +#: ../../library/sys.rst:1329 msgid "``'c_return'``" msgstr "``'c_return'``" -#: ../../library/sys.rst:1298 +#: ../../library/sys.rst:1329 msgid "A C function has returned. *arg* is the C function object." msgstr "" -#: ../../library/sys.rst:1300 +#: ../../library/sys.rst:1331 msgid "``'c_exception'``" msgstr "``'c_exception'``" -#: ../../library/sys.rst:1301 +#: ../../library/sys.rst:1332 msgid "A C function has raised an exception. *arg* is the C function object." msgstr "" -#: ../../library/sys.rst:1305 +#: ../../library/sys.rst:1336 msgid "" "Set the maximum depth of the Python interpreter stack to *limit*. This " "limit prevents infinite recursion from causing an overflow of the C stack " "and crashing Python." msgstr "" -#: ../../library/sys.rst:1309 +#: ../../library/sys.rst:1340 msgid "" "The highest possible limit is platform-dependent. A user may need to set " "the limit higher when they have a program that requires deep recursion and a " @@ -1848,19 +1902,19 @@ msgid "" "because a too-high limit can lead to a crash." msgstr "" -#: ../../library/sys.rst:1314 +#: ../../library/sys.rst:1345 msgid "" "If the new limit is too low at the current recursion depth, a :exc:" "`RecursionError` exception is raised." msgstr "" -#: ../../library/sys.rst:1317 +#: ../../library/sys.rst:1348 msgid "" "A :exc:`RecursionError` exception is now raised if the new limit is too low " "at the current recursion depth." msgstr "" -#: ../../library/sys.rst:1324 +#: ../../library/sys.rst:1355 msgid "" "Set the interpreter's thread switch interval (in seconds). This floating-" "point value determines the ideal duration of the \"timeslices\" allocated to " @@ -1871,7 +1925,7 @@ msgid "" "scheduler." msgstr "" -#: ../../library/sys.rst:1341 +#: ../../library/sys.rst:1372 msgid "" "Set the system's trace function, which allows you to implement a Python " "source code debugger in Python. The function is thread-specific; for a " @@ -1880,7 +1934,7 @@ msgid "" "`threading.settrace`." msgstr "" -#: ../../library/sys.rst:1346 +#: ../../library/sys.rst:1377 msgid "" "Trace functions should have three arguments: *frame*, *event*, and *arg*. " "*frame* is the current stack frame. *event* is a string: ``'call'``, " @@ -1888,7 +1942,7 @@ msgid "" "the event type." msgstr "" -#: ../../library/sys.rst:1351 +#: ../../library/sys.rst:1382 msgid "" "The trace function is invoked (with *event* set to ``'call'``) whenever a " "new local scope is entered; it should return a reference to a local trace " @@ -1896,31 +1950,31 @@ msgid "" "traced." msgstr "" -#: ../../library/sys.rst:1356 +#: ../../library/sys.rst:1387 msgid "" "The local trace function should return a reference to itself (or to another " "function for further tracing in that scope), or ``None`` to turn off tracing " "in that scope." msgstr "" -#: ../../library/sys.rst:1360 +#: ../../library/sys.rst:1391 msgid "" "If there is any error occurred in the trace function, it will be unset, just " "like ``settrace(None)`` is called." msgstr "" -#: ../../library/sys.rst:1366 +#: ../../library/sys.rst:1397 msgid "" "A function is called (or some other code block entered). The global trace " "function is called; *arg* is ``None``; the return value specifies the local " "trace function." msgstr "" -#: ../../library/sys.rst:1377 +#: ../../library/sys.rst:1408 msgid "``'line'``" msgstr "``'line'``" -#: ../../library/sys.rst:1371 +#: ../../library/sys.rst:1402 msgid "" "The interpreter is about to execute a new line of code or re-execute the " "condition of a loop. The local trace function is called; *arg* is ``None``; " @@ -1930,7 +1984,7 @@ msgid "" "const:`False` on that frame." msgstr "" -#: ../../library/sys.rst:1380 +#: ../../library/sys.rst:1411 msgid "" "A function (or other code block) is about to return. The local trace " "function is called; *arg* is the value that will be returned, or ``None`` if " @@ -1938,22 +1992,22 @@ msgid "" "return value is ignored." msgstr "" -#: ../../library/sys.rst:1388 +#: ../../library/sys.rst:1419 msgid "``'exception'``" msgstr "``'exception'``" -#: ../../library/sys.rst:1386 +#: ../../library/sys.rst:1417 msgid "" "An exception has occurred. The local trace function is called; *arg* is a " "tuple ``(exception, value, traceback)``; the return value specifies the new " "local trace function." msgstr "" -#: ../../library/sys.rst:1396 +#: ../../library/sys.rst:1427 msgid "``'opcode'``" msgstr "``'opcode'``" -#: ../../library/sys.rst:1391 +#: ../../library/sys.rst:1422 msgid "" "The interpreter is about to execute a new opcode (see :mod:`dis` for opcode " "details). The local trace function is called; *arg* is ``None``; the return " @@ -1962,13 +2016,13 @@ msgid "" "`f_trace_opcodes` to :const:`True` on the frame." msgstr "" -#: ../../library/sys.rst:1398 +#: ../../library/sys.rst:1429 msgid "" "Note that as an exception is propagated down the chain of callers, an " "``'exception'`` event is generated at each level." msgstr "" -#: ../../library/sys.rst:1401 +#: ../../library/sys.rst:1432 msgid "" "For more fine-grained usage, it's possible to set a trace function by " "assigning ``frame.f_trace = tracefunc`` explicitly, rather than relying on " @@ -1982,17 +2036,17 @@ msgid "" "on each frame)." msgstr "" -#: ../../library/sys.rst:1412 +#: ../../library/sys.rst:1443 msgid "For more information on code and frame objects, refer to :ref:`types`." msgstr "" -#: ../../library/sys.rst:1414 +#: ../../library/sys.rst:1445 msgid "" "Raises an :ref:`auditing event ` ``sys.settrace`` with no " "arguments." msgstr "" -#: ../../library/sys.rst:1418 +#: ../../library/sys.rst:1449 msgid "" "The :func:`settrace` function is intended only for implementing debuggers, " "profilers, coverage tools and the like. Its behavior is part of the " @@ -2000,13 +2054,13 @@ msgid "" "thus may not be available in all Python implementations." msgstr "" -#: ../../library/sys.rst:1425 +#: ../../library/sys.rst:1456 msgid "" "``'opcode'`` event type added; :attr:`f_trace_lines` and :attr:" "`f_trace_opcodes` attributes added to frames" msgstr "" -#: ../../library/sys.rst:1430 +#: ../../library/sys.rst:1461 msgid "" "Accepts two optional keyword arguments which are callables that accept an :" "term:`asynchronous generator iterator` as an argument. The *firstiter* " @@ -2015,32 +2069,32 @@ msgid "" "about to be garbage collected." msgstr "" -#: ../../library/sys.rst:1436 +#: ../../library/sys.rst:1467 msgid "" "Raises an :ref:`auditing event ` ``sys." "set_asyncgen_hooks_firstiter`` with no arguments." msgstr "" -#: ../../library/sys.rst:1438 +#: ../../library/sys.rst:1469 msgid "" "Raises an :ref:`auditing event ` ``sys." "set_asyncgen_hooks_finalizer`` with no arguments." msgstr "" -#: ../../library/sys.rst:1440 +#: ../../library/sys.rst:1471 msgid "" "Two auditing events are raised because the underlying API consists of two " "calls, each of which must raise its own event." msgstr "" -#: ../../library/sys.rst:1443 +#: ../../library/sys.rst:1474 msgid "" "See :pep:`525` for more details, and for a reference example of a " "*finalizer* method see the implementation of ``asyncio.Loop." "shutdown_asyncgens`` in :source:`Lib/asyncio/base_events.py`" msgstr "" -#: ../../library/sys.rst:1455 +#: ../../library/sys.rst:1486 msgid "" "Allows enabling or disabling coroutine origin tracking. When enabled, the " "``cr_origin`` attribute on coroutine objects will contain a tuple of " @@ -2049,74 +2103,74 @@ msgid "" "disabled, ``cr_origin`` will be None." msgstr "" -#: ../../library/sys.rst:1462 +#: ../../library/sys.rst:1493 msgid "" "To enable, pass a *depth* value greater than zero; this sets the number of " "frames whose information will be captured. To disable, pass set *depth* to " "zero." msgstr "" -#: ../../library/sys.rst:1466 +#: ../../library/sys.rst:1497 msgid "This setting is thread-specific." msgstr "" -#: ../../library/sys.rst:1476 +#: ../../library/sys.rst:1507 msgid "" "Changes the :term:`filesystem encoding and error handler` to 'mbcs' and " "'replace' respectively, for consistency with versions of Python prior to 3.6." msgstr "" -#: ../../library/sys.rst:1480 +#: ../../library/sys.rst:1511 msgid "" "This is equivalent to defining the :envvar:`PYTHONLEGACYWINDOWSFSENCODING` " "environment variable before launching Python." msgstr "" -#: ../../library/sys.rst:1483 +#: ../../library/sys.rst:1514 msgid "" "See also :func:`sys.getfilesystemencoding` and :func:`sys." "getfilesystemencodeerrors`." msgstr "" -#: ../../library/sys.rst:1488 +#: ../../library/sys.rst:1519 msgid "See :pep:`529` for more details." msgstr "更多細節請見 :pep:`529`\\ 。" -#: ../../library/sys.rst:1495 +#: ../../library/sys.rst:1526 msgid "" ":term:`File objects ` used by the interpreter for standard " "input, output and errors:" msgstr "" -#: ../../library/sys.rst:1498 +#: ../../library/sys.rst:1529 msgid "" "``stdin`` is used for all interactive input (including calls to :func:" "`input`);" msgstr "" -#: ../../library/sys.rst:1500 +#: ../../library/sys.rst:1531 msgid "" "``stdout`` is used for the output of :func:`print` and :term:`expression` " "statements and for the prompts of :func:`input`;" msgstr "" -#: ../../library/sys.rst:1502 +#: ../../library/sys.rst:1533 msgid "The interpreter's own prompts and its error messages go to ``stderr``." msgstr "" -#: ../../library/sys.rst:1504 +#: ../../library/sys.rst:1535 msgid "" "These streams are regular :term:`text files ` like those returned " "by the :func:`open` function. Their parameters are chosen as follows:" msgstr "" -#: ../../library/sys.rst:1508 +#: ../../library/sys.rst:1539 msgid "" "The encoding and error handling are is initialized from :c:member:`PyConfig." "stdio_encoding` and :c:member:`PyConfig.stdio_errors`." msgstr "" -#: ../../library/sys.rst:1511 +#: ../../library/sys.rst:1542 msgid "" "On Windows, UTF-8 is used for the console device. Non-character devices " "such as disk files and pipes use the system locale encoding (i.e. the ANSI " @@ -2127,14 +2181,14 @@ msgid "" "initially attached to a console." msgstr "" -#: ../../library/sys.rst:1520 +#: ../../library/sys.rst:1551 msgid "" "The special behaviour of the console can be overridden by setting the " "environment variable PYTHONLEGACYWINDOWSSTDIO before starting Python. In " "that case, the console codepages are used as for any other character device." msgstr "" -#: ../../library/sys.rst:1525 +#: ../../library/sys.rst:1556 msgid "" "Under all platforms, you can override the character encoding by setting the :" "envvar:`PYTHONIOENCODING` environment variable before starting Python or by " @@ -2143,7 +2197,7 @@ msgid "" "only applies when :envvar:`PYTHONLEGACYWINDOWSSTDIO` is also set." msgstr "" -#: ../../library/sys.rst:1532 +#: ../../library/sys.rst:1563 msgid "" "When interactive, the ``stdout`` stream is line-buffered. Otherwise, it is " "block-buffered like regular text files. The ``stderr`` stream is line-" @@ -2152,19 +2206,19 @@ msgid "" "`PYTHONUNBUFFERED` environment variable." msgstr "" -#: ../../library/sys.rst:1538 +#: ../../library/sys.rst:1569 msgid "" "Non-interactive ``stderr`` is now line-buffered instead of fully buffered." msgstr "" -#: ../../library/sys.rst:1544 +#: ../../library/sys.rst:1575 msgid "" "To write or read binary data from/to the standard streams, use the " "underlying binary :data:`~io.TextIOBase.buffer` object. For example, to " "write bytes to :data:`stdout`, use ``sys.stdout.buffer.write(b'abc')``." msgstr "" -#: ../../library/sys.rst:1548 +#: ../../library/sys.rst:1579 msgid "" "However, if you are writing a library (and do not control in which context " "its code will be executed), be aware that the standard streams may be " @@ -2172,7 +2226,7 @@ msgid "" "support the :attr:`~io.BufferedIOBase.buffer` attribute." msgstr "" -#: ../../library/sys.rst:1558 +#: ../../library/sys.rst:1589 msgid "" "These objects contain the original values of ``stdin``, ``stderr`` and " "``stdout`` at the start of the program. They are used during finalization, " @@ -2180,7 +2234,7 @@ msgid "" "``sys.std*`` object has been redirected." msgstr "" -#: ../../library/sys.rst:1563 +#: ../../library/sys.rst:1594 msgid "" "It can also be used to restore the actual files to known working file " "objects in case they have been overwritten with a broken object. However, " @@ -2188,7 +2242,7 @@ msgid "" "before replacing it, and restore the saved object." msgstr "" -#: ../../library/sys.rst:1569 +#: ../../library/sys.rst:1600 msgid "" "Under some conditions ``stdin``, ``stdout`` and ``stderr`` as well as the " "original values ``__stdin__``, ``__stdout__`` and ``__stderr__`` can be " @@ -2196,12 +2250,12 @@ msgid "" "to a console and Python apps started with :program:`pythonw`." msgstr "" -#: ../../library/sys.rst:1577 +#: ../../library/sys.rst:1608 msgid "" "A frozenset of strings containing the names of standard library modules." msgstr "" -#: ../../library/sys.rst:1579 +#: ../../library/sys.rst:1610 msgid "" "It is the same on all platforms. Modules which are not available on some " "platforms and modules disabled at Python build are also listed. All module " @@ -2209,7 +2263,7 @@ msgid "" "modules are excluded." msgstr "" -#: ../../library/sys.rst:1584 +#: ../../library/sys.rst:1615 msgid "" "For packages, only the main package is listed: sub-packages and sub-modules " "are not listed. For example, the ``email`` package is listed, but the " @@ -2217,66 +2271,66 @@ msgid "" "listed." msgstr "" -#: ../../library/sys.rst:1589 +#: ../../library/sys.rst:1620 msgid "See also the :attr:`sys.builtin_module_names` list." msgstr "另請參閱 :attr:`sys.builtin_module_names` 清單。" -#: ../../library/sys.rst:1596 +#: ../../library/sys.rst:1627 msgid "" "A :term:`named tuple` holding information about the thread implementation." msgstr "" -#: ../../library/sys.rst:1604 +#: ../../library/sys.rst:1635 msgid ":const:`name`" msgstr ":const:`name`" -#: ../../library/sys.rst:1604 +#: ../../library/sys.rst:1635 msgid "Name of the thread implementation:" msgstr "" -#: ../../library/sys.rst:1606 +#: ../../library/sys.rst:1637 msgid "``'nt'``: Windows threads" msgstr "" -#: ../../library/sys.rst:1607 +#: ../../library/sys.rst:1638 msgid "``'pthread'``: POSIX threads" msgstr "" -#: ../../library/sys.rst:1608 +#: ../../library/sys.rst:1639 msgid "``'solaris'``: Solaris threads" msgstr "" -#: ../../library/sys.rst:1610 +#: ../../library/sys.rst:1641 msgid ":const:`lock`" msgstr ":const:`lock`" -#: ../../library/sys.rst:1610 +#: ../../library/sys.rst:1641 msgid "Name of the lock implementation:" msgstr "" -#: ../../library/sys.rst:1612 +#: ../../library/sys.rst:1643 msgid "``'semaphore'``: a lock uses a semaphore" msgstr "" -#: ../../library/sys.rst:1613 +#: ../../library/sys.rst:1644 msgid "``'mutex+cond'``: a lock uses a mutex and a condition variable" msgstr "" -#: ../../library/sys.rst:1615 +#: ../../library/sys.rst:1646 msgid "``None`` if this information is unknown" msgstr "" -#: ../../library/sys.rst:1617 +#: ../../library/sys.rst:1648 msgid ":const:`version`" msgstr ":const:`version`" -#: ../../library/sys.rst:1617 +#: ../../library/sys.rst:1648 msgid "" "Name and version of the thread library. It is a string, or ``None`` if this " "information is unknown." msgstr "" -#: ../../library/sys.rst:1626 +#: ../../library/sys.rst:1657 msgid "" "When this variable is set to an integer value, it determines the maximum " "number of levels of traceback information printed when an unhandled " @@ -2285,78 +2339,78 @@ msgid "" "are printed." msgstr "" -#: ../../library/sys.rst:1634 +#: ../../library/sys.rst:1665 msgid "Handle an unraisable exception." msgstr "" -#: ../../library/sys.rst:1636 +#: ../../library/sys.rst:1667 msgid "" "Called when an exception has occurred but there is no way for Python to " "handle it. For example, when a destructor raises an exception or during " "garbage collection (:func:`gc.collect`)." msgstr "" -#: ../../library/sys.rst:1640 +#: ../../library/sys.rst:1671 msgid "The *unraisable* argument has the following attributes:" msgstr "" -#: ../../library/sys.rst:1642 +#: ../../library/sys.rst:1673 msgid "*exc_type*: Exception type." msgstr "" -#: ../../library/sys.rst:1643 +#: ../../library/sys.rst:1674 msgid "*exc_value*: Exception value, can be ``None``." msgstr "" -#: ../../library/sys.rst:1644 +#: ../../library/sys.rst:1675 msgid "*exc_traceback*: Exception traceback, can be ``None``." msgstr "" -#: ../../library/sys.rst:1645 +#: ../../library/sys.rst:1676 msgid "*err_msg*: Error message, can be ``None``." msgstr "" -#: ../../library/sys.rst:1646 +#: ../../library/sys.rst:1677 msgid "*object*: Object causing the exception, can be ``None``." msgstr "" -#: ../../library/sys.rst:1648 +#: ../../library/sys.rst:1679 msgid "" "The default hook formats *err_msg* and *object* as: ``f'{err_msg}: {object!" "r}'``; use \"Exception ignored in\" error message if *err_msg* is ``None``." msgstr "" -#: ../../library/sys.rst:1652 +#: ../../library/sys.rst:1683 msgid "" ":func:`sys.unraisablehook` can be overridden to control how unraisable " "exceptions are handled." msgstr "" -#: ../../library/sys.rst:1655 +#: ../../library/sys.rst:1686 msgid "" "Storing *exc_value* using a custom hook can create a reference cycle. It " "should be cleared explicitly to break the reference cycle when the exception " "is no longer needed." msgstr "" -#: ../../library/sys.rst:1659 +#: ../../library/sys.rst:1690 msgid "" "Storing *object* using a custom hook can resurrect it if it is set to an " "object which is being finalized. Avoid storing *object* after the custom " "hook completes to avoid resurrecting objects." msgstr "" -#: ../../library/sys.rst:1663 +#: ../../library/sys.rst:1694 msgid "See also :func:`excepthook` which handles uncaught exceptions." msgstr "" -#: ../../library/sys.rst:1665 +#: ../../library/sys.rst:1696 msgid "" "Raises an :ref:`auditing event ` ``sys.unraisablehook`` with " "arguments ``hook``, ``unraisable``." msgstr "" -#: ../../library/sys.rst:1667 +#: ../../library/sys.rst:1698 msgid "" "Raise an auditing event ``sys.unraisablehook`` with arguments ``hook``, " "``unraisable`` when an exception that cannot be handled occurs. The " @@ -2364,7 +2418,7 @@ msgid "" "hook has been set, ``hook`` may be ``None``." msgstr "" -#: ../../library/sys.rst:1676 +#: ../../library/sys.rst:1707 msgid "" "A string containing the version number of the Python interpreter plus " "additional information on the build number and compiler used. This string " @@ -2373,13 +2427,13 @@ msgid "" "functions provided by the :mod:`platform` module." msgstr "" -#: ../../library/sys.rst:1685 +#: ../../library/sys.rst:1716 msgid "" "The C API version for this interpreter. Programmers may find this useful " "when debugging version conflicts between Python and extension modules." msgstr "" -#: ../../library/sys.rst:1691 +#: ../../library/sys.rst:1722 msgid "" "A tuple containing the five components of the version number: *major*, " "*minor*, *micro*, *releaselevel*, and *serial*. All values except " @@ -2390,18 +2444,18 @@ msgid "" "version_info.major`` and so on." msgstr "" -#: ../../library/sys.rst:1699 +#: ../../library/sys.rst:1730 msgid "Added named component attributes." msgstr "" -#: ../../library/sys.rst:1704 +#: ../../library/sys.rst:1735 msgid "" "This is an implementation detail of the warnings framework; do not modify " "this value. Refer to the :mod:`warnings` module for more information on the " "warnings framework." msgstr "" -#: ../../library/sys.rst:1711 +#: ../../library/sys.rst:1742 msgid "" "The version number used to form registry keys on Windows platforms. This is " "stored as string resource 1000 in the Python DLL. The value is normally the " @@ -2410,25 +2464,25 @@ msgid "" "on the registry keys used by Python." msgstr "" -#: ../../library/sys.rst:1722 +#: ../../library/sys.rst:1753 msgid "" "A dictionary of the various implementation-specific flags passed through " "the :option:`-X` command-line option. Option names are either mapped to " "their values, if given explicitly, or to :const:`True`. Example:" msgstr "" -#: ../../library/sys.rst:1738 +#: ../../library/sys.rst:1769 msgid "" "This is a CPython-specific way of accessing options passed through :option:`-" "X`. Other implementations may export them through other means, or not at " "all." msgstr "" -#: ../../library/sys.rst:1746 +#: ../../library/sys.rst:1777 msgid "Citations" msgstr "" -#: ../../library/sys.rst:1747 +#: ../../library/sys.rst:1778 msgid "" "ISO/IEC 9899:1999. \"Programming languages -- C.\" A public draft of this " "standard is available at https://www.open-std.org/jtc1/sc22/wg14/www/docs/" diff --git a/library/test.po b/library/test.po index b327874f61..362f046835 100644 --- a/library/test.po +++ b/library/test.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-05-28 00:16+0000\n" +"POT-Creation-Date: 2022-09-03 00:15+0000\n" "PO-Revision-Date: 2018-05-23 16:12+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -631,7 +631,7 @@ msgid "Context manager to swap out an attribute with a new object." msgstr "" #: ../../library/test.rst:581 ../../library/test.rst:599 -#: ../../library/test.rst:819 ../../library/test.rst:1282 +#: ../../library/test.rst:819 ../../library/test.rst:1292 msgid "Usage::" msgstr "" "用法:\n" @@ -953,7 +953,7 @@ msgid "" "as part of the public API even though their names indicate otherwise." msgstr "" -#: ../../library/test.rst:908 ../../library/test.rst:1531 +#: ../../library/test.rst:908 ../../library/test.rst:1541 msgid "Example use::" msgstr "" "用法範例:\n" @@ -971,76 +971,84 @@ msgstr "" msgid "Assert that type *tp* cannot be instantiated using *args* and *kwds*." msgstr "" -#: ../../library/test.rst:945 +#: ../../library/test.rst:947 +msgid "" +"This function returns a context manager that will change the global :func:" +"`sys.set_int_max_str_digits` setting for the duration of the context to " +"allow execution of test code that needs a different limit on the number of " +"digits when converting between an integer and string." +msgstr "" + +#: ../../library/test.rst:955 msgid "The :mod:`test.support` module defines the following classes:" msgstr "" -#: ../../library/test.rst:950 +#: ../../library/test.rst:960 msgid "" "A context manager used to try to prevent crash dialog popups on tests that " "are expected to crash a subprocess." msgstr "" -#: ../../library/test.rst:953 +#: ../../library/test.rst:963 msgid "" "On Windows, it disables Windows Error Reporting dialogs using `SetErrorMode " "`_." msgstr "" -#: ../../library/test.rst:956 +#: ../../library/test.rst:966 msgid "" "On UNIX, :func:`resource.setrlimit` is used to set :attr:`resource." "RLIMIT_CORE`'s soft limit to 0 to prevent coredump file creation." msgstr "" -#: ../../library/test.rst:960 +#: ../../library/test.rst:970 msgid "On both platforms, the old value is restored by :meth:`__exit__`." msgstr "" -#: ../../library/test.rst:965 +#: ../../library/test.rst:975 msgid "" "Class to save and restore signal handlers registered by the Python signal " "handler." msgstr "" -#: ../../library/test.rst:970 +#: ../../library/test.rst:980 msgid "" "Save the signal handlers to a dictionary mapping signal numbers to the " "current signal handler." msgstr "" -#: ../../library/test.rst:975 +#: ../../library/test.rst:985 msgid "" "Set the signal numbers from the :meth:`save` dictionary to the saved handler." msgstr "" -#: ../../library/test.rst:983 +#: ../../library/test.rst:993 msgid "Try to match a single dict with the supplied arguments." msgstr "" -#: ../../library/test.rst:988 +#: ../../library/test.rst:998 msgid "Try to match a single stored value (*dv*) with a supplied value (*v*)." msgstr "" -#: ../../library/test.rst:995 +#: ../../library/test.rst:1005 msgid "Run *test* and return the result." msgstr "" -#: ../../library/test.rst:999 +#: ../../library/test.rst:1009 msgid ":mod:`test.support.socket_helper` --- Utilities for socket tests" msgstr "" -#: ../../library/test.rst:1005 +#: ../../library/test.rst:1015 msgid "" "The :mod:`test.support.socket_helper` module provides support for socket " "tests." msgstr "" -#: ../../library/test.rst:1012 +#: ../../library/test.rst:1022 msgid "Set to ``True`` if IPv6 is enabled on this host, ``False`` otherwise." msgstr "" -#: ../../library/test.rst:1017 +#: ../../library/test.rst:1027 msgid "" "Returns an unused port that should be suitable for binding. This is " "achieved by creating a temporary socket with the same family and type as the " @@ -1051,7 +1059,7 @@ msgid "" "port is returned." msgstr "" -#: ../../library/test.rst:1026 +#: ../../library/test.rst:1036 msgid "" "Either this method or :func:`bind_port` should be used for any tests where a " "server socket needs to be bound to a particular port for the duration of the " @@ -1064,7 +1072,7 @@ msgid "" "simultaneously, which is a problem for buildbots." msgstr "" -#: ../../library/test.rst:1040 +#: ../../library/test.rst:1050 msgid "" "Bind the socket to a free port and return the port number. Relies on " "ephemeral ports in order to ensure we are using an unbound port. This is " @@ -1077,7 +1085,7 @@ msgid "" "testing multicasting via multiple UDP sockets." msgstr "" -#: ../../library/test.rst:1051 +#: ../../library/test.rst:1061 msgid "" "Additionally, if the :const:`~socket.SO_EXCLUSIVEADDRUSE` socket option is " "available (i.e. on Windows), it will be set on the socket. This will " @@ -1085,58 +1093,58 @@ msgid "" "test." msgstr "" -#: ../../library/test.rst:1059 +#: ../../library/test.rst:1069 msgid "" "Bind a unix socket, raising :exc:`unittest.SkipTest` if :exc:" "`PermissionError` is raised." msgstr "" -#: ../../library/test.rst:1065 +#: ../../library/test.rst:1075 msgid "" "A decorator for running tests that require a functional ``bind()`` for Unix " "sockets." msgstr "" -#: ../../library/test.rst:1071 +#: ../../library/test.rst:1081 msgid "" "A context manager that raises :exc:`~test.support.ResourceDenied` when " "various issues with the internet connection manifest themselves as " "exceptions." msgstr "" -#: ../../library/test.rst:1077 +#: ../../library/test.rst:1087 msgid "" ":mod:`test.support.script_helper` --- Utilities for the Python execution " "tests" msgstr "" -#: ../../library/test.rst:1083 +#: ../../library/test.rst:1093 msgid "" "The :mod:`test.support.script_helper` module provides support for Python's " "script execution tests." msgstr "" -#: ../../library/test.rst:1088 +#: ../../library/test.rst:1098 msgid "" "Return ``True`` if ``sys.executable interpreter`` requires environment " "variables in order to be able to run at all." msgstr "" -#: ../../library/test.rst:1091 +#: ../../library/test.rst:1101 msgid "" "This is designed to be used with ``@unittest.skipIf()`` to annotate tests " "that need to use an ``assert_python*()`` function to launch an isolated mode " "(``-I``) or no environment mode (``-E``) sub-interpreter process." msgstr "" -#: ../../library/test.rst:1095 +#: ../../library/test.rst:1105 msgid "" "A normal build & test does not run into this situation but it can happen " "when trying to run the standard library test suite from an interpreter that " "doesn't have an obvious home with Python's current home finding logic." msgstr "" -#: ../../library/test.rst:1099 +#: ../../library/test.rst:1109 msgid "" "Setting :envvar:`PYTHONHOME` is one way to get most of the testsuite to run " "in that situation. :envvar:`PYTHONPATH` or :envvar:`PYTHONUSERSITE` are " @@ -1144,85 +1152,85 @@ msgid "" "interpreter can start." msgstr "" -#: ../../library/test.rst:1107 +#: ../../library/test.rst:1117 msgid "" "Set up the environment based on *env_vars* for running the interpreter in a " "subprocess. The values can include ``__isolated``, ``__cleanenv``, " "``__cwd``, and ``TERM``." msgstr "" -#: ../../library/test.rst:1111 ../../library/test.rst:1127 -#: ../../library/test.rst:1139 +#: ../../library/test.rst:1121 ../../library/test.rst:1137 +#: ../../library/test.rst:1149 msgid "The function no longer strips whitespaces from *stderr*." msgstr "" -#: ../../library/test.rst:1117 +#: ../../library/test.rst:1127 msgid "" "Assert that running the interpreter with *args* and optional environment " "variables *env_vars* succeeds (``rc == 0``) and return a ``(return code, " "stdout, stderr)`` tuple." msgstr "" -#: ../../library/test.rst:1121 +#: ../../library/test.rst:1131 msgid "" "If the *__cleanenv* keyword-only parameter is set, *env_vars* is used as a " "fresh environment." msgstr "" -#: ../../library/test.rst:1124 +#: ../../library/test.rst:1134 msgid "" "Python is started in isolated mode (command line option ``-I``), except if " "the *__isolated* keyword-only parameter is set to ``False``." msgstr "" -#: ../../library/test.rst:1133 +#: ../../library/test.rst:1143 msgid "" "Assert that running the interpreter with *args* and optional environment " "variables *env_vars* fails (``rc != 0``) and return a ``(return code, " "stdout, stderr)`` tuple." msgstr "" -#: ../../library/test.rst:1137 +#: ../../library/test.rst:1147 msgid "See :func:`assert_python_ok` for more options." msgstr "更多選項請見 :func:`assert_python_ok`\\ 。" -#: ../../library/test.rst:1145 +#: ../../library/test.rst:1155 msgid "Run a Python subprocess with the given arguments." msgstr "" -#: ../../library/test.rst:1147 +#: ../../library/test.rst:1157 msgid "" "*kw* is extra keyword args to pass to :func:`subprocess.Popen`. Returns a :" "class:`subprocess.Popen` object." msgstr "" -#: ../../library/test.rst:1153 +#: ../../library/test.rst:1163 msgid "" "Run the given :class:`subprocess.Popen` process until completion and return " "stdout." msgstr "" -#: ../../library/test.rst:1159 +#: ../../library/test.rst:1169 msgid "" "Create script containing *source* in path *script_dir* and " "*script_basename*. If *omit_suffix* is ``False``, append ``.py`` to the " "name. Return the full script path." msgstr "" -#: ../../library/test.rst:1166 +#: ../../library/test.rst:1176 msgid "" "Create zip file at *zip_dir* and *zip_basename* with extension ``zip`` which " "contains the files in *script_name*. *name_in_zip* is the archive name. " "Return a tuple containing ``(full path, full path of archive name)``." msgstr "" -#: ../../library/test.rst:1173 +#: ../../library/test.rst:1183 msgid "" "Create a directory named *pkg_dir* containing an ``__init__`` file with " "*init_source* as its contents." msgstr "" -#: ../../library/test.rst:1180 +#: ../../library/test.rst:1190 msgid "" "Create a zip package directory with a path of *zip_dir* and *zip_basename* " "containing an empty ``__init__`` file and a file *script_basename* " @@ -1231,60 +1239,60 @@ msgid "" "path and the archive name for the zip file." msgstr "" -#: ../../library/test.rst:1188 +#: ../../library/test.rst:1198 msgid "" ":mod:`test.support.bytecode_helper` --- Support tools for testing correct " "bytecode generation" msgstr "" -#: ../../library/test.rst:1193 +#: ../../library/test.rst:1203 msgid "" "The :mod:`test.support.bytecode_helper` module provides support for testing " "and inspecting bytecode generation." msgstr "" -#: ../../library/test.rst:1198 +#: ../../library/test.rst:1208 msgid "The module defines the following class:" msgstr "" -#: ../../library/test.rst:1202 +#: ../../library/test.rst:1212 msgid "This class has custom assertion methods for inspecting bytecode." msgstr "" -#: ../../library/test.rst:1206 +#: ../../library/test.rst:1216 msgid "Return the disassembly of *co* as string." msgstr "" -#: ../../library/test.rst:1211 +#: ../../library/test.rst:1221 msgid "" "Return instr if *opname* is found, otherwise throws :exc:`AssertionError`." msgstr "" -#: ../../library/test.rst:1216 +#: ../../library/test.rst:1226 msgid "Throws :exc:`AssertionError` if *opname* is found." msgstr "" -#: ../../library/test.rst:1220 +#: ../../library/test.rst:1230 msgid ":mod:`test.support.threading_helper` --- Utilities for threading tests" msgstr "" -#: ../../library/test.rst:1225 +#: ../../library/test.rst:1235 msgid "" "The :mod:`test.support.threading_helper` module provides support for " "threading tests." msgstr "" -#: ../../library/test.rst:1232 +#: ../../library/test.rst:1242 msgid "" "Join a *thread* within *timeout*. Raise an :exc:`AssertionError` if thread " "is still alive after *timeout* seconds." msgstr "" -#: ../../library/test.rst:1238 +#: ../../library/test.rst:1248 msgid "Decorator to ensure the threads are cleaned up even if the test fails." msgstr "" -#: ../../library/test.rst:1243 +#: ../../library/test.rst:1253 msgid "" "Context manager to start *threads*, which is a sequence of threads. *unlock* " "is a function called after the threads are started, even if an exception was " @@ -1292,79 +1300,79 @@ msgid "" "will attempt to join the started threads upon exit." msgstr "" -#: ../../library/test.rst:1251 +#: ../../library/test.rst:1261 msgid "" "Cleanup up threads not specified in *original_values*. Designed to emit a " "warning if a test leaves running threads in the background." msgstr "" -#: ../../library/test.rst:1257 +#: ../../library/test.rst:1267 msgid "Return current thread count and copy of dangling threads." msgstr "" -#: ../../library/test.rst:1262 +#: ../../library/test.rst:1272 msgid "" "Context manager to wait until all threads created in the ``with`` statement " "exit." msgstr "" -#: ../../library/test.rst:1268 +#: ../../library/test.rst:1278 msgid "" "Context manager catching :class:`threading.Thread` exception using :func:" "`threading.excepthook`." msgstr "" -#: ../../library/test.rst:1271 +#: ../../library/test.rst:1281 msgid "Attributes set when an exception is caught:" msgstr "" -#: ../../library/test.rst:1273 +#: ../../library/test.rst:1283 msgid "``exc_type``" msgstr "``exc_type``" -#: ../../library/test.rst:1274 +#: ../../library/test.rst:1284 msgid "``exc_value``" msgstr "``exc_value``" -#: ../../library/test.rst:1275 +#: ../../library/test.rst:1285 msgid "``exc_traceback``" msgstr "``exc_traceback``" -#: ../../library/test.rst:1276 +#: ../../library/test.rst:1286 msgid "``thread``" msgstr "``thread``" -#: ../../library/test.rst:1278 +#: ../../library/test.rst:1288 msgid "See :func:`threading.excepthook` documentation." msgstr "參閱 :func:`threading.excepthook` 文件。" -#: ../../library/test.rst:1280 +#: ../../library/test.rst:1290 msgid "These attributes are deleted at the context manager exit." msgstr "" -#: ../../library/test.rst:1300 +#: ../../library/test.rst:1310 msgid ":mod:`test.support.os_helper` --- Utilities for os tests" msgstr "" -#: ../../library/test.rst:1305 +#: ../../library/test.rst:1315 msgid "The :mod:`test.support.os_helper` module provides support for os tests." msgstr "" -#: ../../library/test.rst:1312 +#: ../../library/test.rst:1322 msgid "A non-ASCII character encodable by :func:`os.fsencode`." msgstr "" -#: ../../library/test.rst:1317 +#: ../../library/test.rst:1327 msgid "Set to :func:`os.getcwd`." msgstr "" -#: ../../library/test.rst:1322 +#: ../../library/test.rst:1332 msgid "" "Set to a name that is safe to use as the name of a temporary file. Any " "temporary file that is created should be closed and unlinked (removed)." msgstr "" -#: ../../library/test.rst:1328 +#: ../../library/test.rst:1338 msgid "" "Set to a filename containing the :data:`FS_NONASCII` character, if it " "exists. This guarantees that if the filename exists, it can be encoded and " @@ -1372,25 +1380,25 @@ msgid "" "a non-ASCII filename to be easily skipped on platforms where they can't work." msgstr "" -#: ../../library/test.rst:1336 +#: ../../library/test.rst:1346 msgid "" "Set to a filename (str type) that should not be able to be encoded by file " "system encoding in strict mode. It may be ``None`` if it's not possible to " "generate such a filename." msgstr "" -#: ../../library/test.rst:1343 +#: ../../library/test.rst:1353 msgid "" "Set to a filename (bytes type) that should not be able to be decoded by file " "system encoding in strict mode. It may be ``None`` if it's not possible to " "generate such a filename." msgstr "" -#: ../../library/test.rst:1350 +#: ../../library/test.rst:1360 msgid "Set to a non-ASCII name for a temporary file." msgstr "" -#: ../../library/test.rst:1355 +#: ../../library/test.rst:1365 msgid "" "Class used to temporarily set or unset environment variables. Instances can " "be used as a context manager and have a complete dictionary interface for " @@ -1399,75 +1407,75 @@ msgid "" "instance will be rolled back." msgstr "" -#: ../../library/test.rst:1361 +#: ../../library/test.rst:1371 msgid "Added dictionary interface." msgstr "" -#: ../../library/test.rst:1367 +#: ../../library/test.rst:1377 msgid "" "Simple :term:`path-like object`. It implements the :meth:`__fspath__` " "method which just returns the *path* argument. If *path* is an exception, " "it will be raised in :meth:`!__fspath__`." msgstr "" -#: ../../library/test.rst:1374 +#: ../../library/test.rst:1384 msgid "" "Temporarily set the environment variable ``envvar`` to the value of " "``value``." msgstr "" -#: ../../library/test.rst:1380 +#: ../../library/test.rst:1390 msgid "Temporarily unset the environment variable ``envvar``." msgstr "" -#: ../../library/test.rst:1385 +#: ../../library/test.rst:1395 msgid "Return ``True`` if the OS supports symbolic links, ``False`` otherwise." msgstr "" -#: ../../library/test.rst:1391 +#: ../../library/test.rst:1401 msgid "Return ``True`` if the OS supports xattr, ``False`` otherwise." msgstr "" -#: ../../library/test.rst:1397 +#: ../../library/test.rst:1407 msgid "" "A context manager that temporarily changes the current working directory to " "*path* and yields the directory." msgstr "" -#: ../../library/test.rst:1400 +#: ../../library/test.rst:1410 msgid "" "If *quiet* is ``False``, the context manager raises an exception on error. " "Otherwise, it issues only a warning and keeps the current working directory " "the same." msgstr "" -#: ../../library/test.rst:1407 +#: ../../library/test.rst:1417 msgid "" "Create an empty file with *filename*. If it already exists, truncate it." msgstr "" -#: ../../library/test.rst:1412 +#: ../../library/test.rst:1422 msgid "Count the number of open file descriptors." msgstr "" -#: ../../library/test.rst:1417 +#: ../../library/test.rst:1427 msgid "Return ``True`` if the file system for *directory* is case-insensitive." msgstr "" -#: ../../library/test.rst:1422 +#: ../../library/test.rst:1432 msgid "" "Create an invalid file descriptor by opening and closing a temporary file, " "and returning its descriptor." msgstr "" -#: ../../library/test.rst:1428 +#: ../../library/test.rst:1438 msgid "" "Call :func:`os.rmdir` on *filename*. On Windows platforms, this is wrapped " "with a wait loop that checks for the existence of the file, which is needed " "due to antivirus programs that can hold files open and prevent deletion." msgstr "" -#: ../../library/test.rst:1436 +#: ../../library/test.rst:1446 msgid "" "Call :func:`shutil.rmtree` on *path* or call :func:`os.lstat` and :func:`os." "rmdir` to remove a path and its contents. As with :func:`rmdir`, on Windows " @@ -1475,21 +1483,21 @@ msgid "" "the files." msgstr "" -#: ../../library/test.rst:1444 +#: ../../library/test.rst:1454 msgid "A decorator for running tests that require support for symbolic links." msgstr "" -#: ../../library/test.rst:1449 +#: ../../library/test.rst:1459 msgid "A decorator for running tests that require support for xattr." msgstr "" -#: ../../library/test.rst:1454 +#: ../../library/test.rst:1464 msgid "" "A context manager that temporarily creates a new directory and changes the " "current working directory (CWD)." msgstr "" -#: ../../library/test.rst:1457 +#: ../../library/test.rst:1467 msgid "" "The context manager creates a temporary directory in the current directory " "with name *name* before temporarily changing the current working directory. " @@ -1497,20 +1505,20 @@ msgid "" "`tempfile.mkdtemp`." msgstr "" -#: ../../library/test.rst:1462 +#: ../../library/test.rst:1472 msgid "" "If *quiet* is ``False`` and it is not possible to create or change the CWD, " "an error is raised. Otherwise, only a warning is raised and the original " "CWD is used." msgstr "" -#: ../../library/test.rst:1469 +#: ../../library/test.rst:1479 msgid "" "A context manager that creates a temporary directory at *path* and yields " "the directory." msgstr "" -#: ../../library/test.rst:1472 +#: ../../library/test.rst:1482 msgid "" "If *path* is ``None``, the temporary directory is created using :func:" "`tempfile.mkdtemp`. If *quiet* is ``False``, the context manager raises an " @@ -1518,34 +1526,34 @@ msgid "" "created, only a warning is issued." msgstr "" -#: ../../library/test.rst:1480 +#: ../../library/test.rst:1490 msgid "A context manager that temporarily sets the process umask." msgstr "" -#: ../../library/test.rst:1485 +#: ../../library/test.rst:1495 msgid "" "Call :func:`os.unlink` on *filename*. As with :func:`rmdir`, on Windows " "platforms, this is wrapped with a wait loop that checks for the existence of " "the file." msgstr "" -#: ../../library/test.rst:1491 +#: ../../library/test.rst:1501 msgid ":mod:`test.support.import_helper` --- Utilities for import tests" msgstr "" -#: ../../library/test.rst:1496 +#: ../../library/test.rst:1506 msgid "" "The :mod:`test.support.import_helper` module provides support for import " "tests." msgstr "" -#: ../../library/test.rst:1503 +#: ../../library/test.rst:1513 msgid "" "Remove the module named *module_name* from ``sys.modules`` and delete any " "byte-compiled files of the module." msgstr "" -#: ../../library/test.rst:1509 +#: ../../library/test.rst:1519 msgid "" "This function imports and returns a fresh copy of the named Python module by " "removing the named module from ``sys.modules`` before doing the import. Note " @@ -1553,46 +1561,46 @@ msgid "" "operation." msgstr "" -#: ../../library/test.rst:1514 +#: ../../library/test.rst:1524 msgid "" "*fresh* is an iterable of additional module names that are also removed from " "the ``sys.modules`` cache before doing the import." msgstr "" -#: ../../library/test.rst:1517 +#: ../../library/test.rst:1527 msgid "" "*blocked* is an iterable of module names that are replaced with ``None`` in " "the module cache during the import to ensure that attempts to import them " "raise :exc:`ImportError`." msgstr "" -#: ../../library/test.rst:1521 +#: ../../library/test.rst:1531 msgid "" "The named module and any modules named in the *fresh* and *blocked* " "parameters are saved before starting the import and then reinserted into " "``sys.modules`` when the fresh import is complete." msgstr "" -#: ../../library/test.rst:1525 +#: ../../library/test.rst:1535 msgid "" "Module and package deprecation messages are suppressed during this import if " "*deprecated* is ``True``." msgstr "" -#: ../../library/test.rst:1528 +#: ../../library/test.rst:1538 msgid "" "This function will raise :exc:`ImportError` if the named module cannot be " "imported." msgstr "" -#: ../../library/test.rst:1545 +#: ../../library/test.rst:1555 msgid "" "This function imports and returns the named module. Unlike a normal import, " "this function raises :exc:`unittest.SkipTest` if the module cannot be " "imported." msgstr "" -#: ../../library/test.rst:1549 +#: ../../library/test.rst:1559 msgid "" "Module and package deprecation messages are suppressed during this import if " "*deprecated* is ``True``. If a module is required on a platform but " @@ -1600,21 +1608,21 @@ msgid "" "which will be compared against :data:`sys.platform`." msgstr "" -#: ../../library/test.rst:1559 +#: ../../library/test.rst:1569 msgid "Return a copy of :data:`sys.modules`." msgstr "" -#: ../../library/test.rst:1564 +#: ../../library/test.rst:1574 msgid "" "Remove modules except for *oldmodules* and ``encodings`` in order to " "preserve internal cache." msgstr "" -#: ../../library/test.rst:1570 +#: ../../library/test.rst:1580 msgid "Delete *name* from ``sys.modules``." msgstr "" -#: ../../library/test.rst:1575 +#: ../../library/test.rst:1585 msgid "" "Move a :pep:`3147`/:pep:`488` pyc file to its legacy pyc location and return " "the file system path to the legacy pyc file. The *source* value is the file " @@ -1622,49 +1630,49 @@ msgid "" "3147/488 pyc file must exist." msgstr "" -#: ../../library/test.rst:1583 +#: ../../library/test.rst:1593 msgid "" "A context manager to force import to return a new module reference. This is " "useful for testing module-level behaviors, such as the emission of a :exc:" "`DeprecationWarning` on import. Example usage::" msgstr "" -#: ../../library/test.rst:1593 +#: ../../library/test.rst:1603 msgid "A context manager to temporarily add directories to :data:`sys.path`." msgstr "" -#: ../../library/test.rst:1595 +#: ../../library/test.rst:1605 msgid "" "This makes a copy of :data:`sys.path`, appends any directories given as " "positional arguments, then reverts :data:`sys.path` to the copied settings " "when the context ends." msgstr "" -#: ../../library/test.rst:1599 +#: ../../library/test.rst:1609 msgid "" "Note that *all* :data:`sys.path` modifications in the body of the context " "manager, including replacement of the object, will be reverted at the end of " "the block." msgstr "" -#: ../../library/test.rst:1605 +#: ../../library/test.rst:1615 msgid ":mod:`test.support.warnings_helper` --- Utilities for warnings tests" msgstr "" -#: ../../library/test.rst:1610 +#: ../../library/test.rst:1620 msgid "" "The :mod:`test.support.warnings_helper` module provides support for warnings " "tests." msgstr "" -#: ../../library/test.rst:1617 +#: ../../library/test.rst:1627 msgid "" "Context manager to check that no :exc:`ResourceWarning` was raised. You " "must remove the object which may emit :exc:`ResourceWarning` before the end " "of the context manager." msgstr "" -#: ../../library/test.rst:1624 +#: ../../library/test.rst:1634 msgid "" "Test for syntax warning in *statement* by attempting to compile *statement*. " "Test also that the :exc:`SyntaxWarning` is emitted only once, and that it " @@ -1676,7 +1684,7 @@ msgid "" "``None``, compares to the offset of the exception." msgstr "" -#: ../../library/test.rst:1638 +#: ../../library/test.rst:1648 msgid "" "A convenience wrapper for :func:`warnings.catch_warnings()` that makes it " "easier to test that a warning was correctly raised. It is approximately " @@ -1685,7 +1693,7 @@ msgid "" "automatically validate the results that are recorded." msgstr "" -#: ../../library/test.rst:1644 +#: ../../library/test.rst:1654 msgid "" "``check_warnings`` accepts 2-tuples of the form ``(\"message regexp\", " "WarningCategory)`` as positional arguments. If one or more *filters* are " @@ -1697,15 +1705,15 @@ msgid "" "*quiet* to ``True``." msgstr "" -#: ../../library/test.rst:1653 +#: ../../library/test.rst:1663 msgid "If no arguments are specified, it defaults to::" msgstr "" -#: ../../library/test.rst:1657 +#: ../../library/test.rst:1667 msgid "In this case all warnings are caught and no errors are raised." msgstr "" -#: ../../library/test.rst:1659 +#: ../../library/test.rst:1669 msgid "" "On entry to the context manager, a :class:`WarningRecorder` instance is " "returned. The underlying warnings list from :func:`~warnings.catch_warnings` " @@ -1717,39 +1725,39 @@ msgid "" "return ``None``." msgstr "" -#: ../../library/test.rst:1668 +#: ../../library/test.rst:1678 msgid "" "The recorder object also has a :meth:`reset` method, which clears the " "warnings list." msgstr "" -#: ../../library/test.rst:1671 +#: ../../library/test.rst:1681 msgid "The context manager is designed to be used like this::" msgstr "" -#: ../../library/test.rst:1678 +#: ../../library/test.rst:1688 msgid "" "In this case if either warning was not raised, or some other warning was " "raised, :func:`check_warnings` would raise an error." msgstr "" -#: ../../library/test.rst:1681 +#: ../../library/test.rst:1691 msgid "" "When a test needs to look more deeply into the warnings, rather than just " "checking whether or not they occurred, code like this can be used::" msgstr "" -#: ../../library/test.rst:1695 +#: ../../library/test.rst:1705 msgid "" "Here all warnings will be caught, and the test code tests the captured " "warnings directly." msgstr "" -#: ../../library/test.rst:1698 +#: ../../library/test.rst:1708 msgid "New optional arguments *filters* and *quiet*." msgstr "" -#: ../../library/test.rst:1704 +#: ../../library/test.rst:1714 msgid "" "Class used to record warnings for unit tests. See documentation of :func:" "`check_warnings` above for more details." diff --git a/using/cmdline.po b/using/cmdline.po index fa12c60c1d..3ef5c752f8 100644 --- a/using/cmdline.po +++ b/using/cmdline.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-07-06 00:17+0000\n" +"POT-Creation-Date: 2022-09-03 00:15+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-" @@ -442,8 +442,8 @@ msgid "" "`sys.path`." msgstr "" -#: ../../using/cmdline.rst:344 ../../using/cmdline.rst:705 -#: ../../using/cmdline.rst:717 +#: ../../using/cmdline.rst:344 ../../using/cmdline.rst:717 +#: ../../using/cmdline.rst:729 msgid ":pep:`370` -- Per user site-packages directory" msgstr "" @@ -493,7 +493,7 @@ msgid "" "messages to :data:`sys.stderr`." msgstr "" -#: ../../using/cmdline.rst:386 ../../using/cmdline.rst:733 +#: ../../using/cmdline.rst:386 ../../using/cmdline.rst:745 msgid "" "The simplest settings apply a particular action unconditionally to all " "warnings emitted by a process (even those that are otherwise ignored by " @@ -566,7 +566,7 @@ msgid "" "can be used to use a regular expression on the warning message." msgstr "" -#: ../../using/cmdline.rst:436 ../../using/cmdline.rst:744 +#: ../../using/cmdline.rst:436 ../../using/cmdline.rst:756 msgid "" "See :ref:`warning-filter` and :ref:`describing-warning-filters` for more " "details." @@ -607,6 +607,13 @@ msgstr "" #: ../../using/cmdline.rst:460 msgid "" +"``-X int_max_str_digits`` configures the :ref:`integer string conversion " +"length limitation `. See also :envvar:" +"`PYTHONINTMAXSTRDIGITS`." +msgstr "" + +#: ../../using/cmdline.rst:463 +msgid "" "``-X importtime`` to show how long each import takes. It shows module name, " "cumulative time (including nested imports) and self time (excluding nested " "imports). Note that its output may be broken in multi-threaded " @@ -614,96 +621,100 @@ msgid "" "asyncio'``. See also :envvar:`PYTHONPROFILEIMPORTTIME`." msgstr "" -#: ../../using/cmdline.rst:465 +#: ../../using/cmdline.rst:468 msgid "" "``-X dev``: enable :ref:`Python Development Mode `, introducing " "additional runtime checks that are too expensive to be enabled by default." msgstr "" -#: ../../using/cmdline.rst:468 +#: ../../using/cmdline.rst:471 msgid "" "``-X utf8`` enables the :ref:`Python UTF-8 Mode `. ``-X utf8=0`` " "explicitly disables :ref:`Python UTF-8 Mode ` (even when it would " "otherwise activate automatically)." msgstr "" -#: ../../using/cmdline.rst:471 +#: ../../using/cmdline.rst:474 msgid "" "``-X pycache_prefix=PATH`` enables writing ``.pyc`` files to a parallel tree " "rooted at the given directory instead of to the code tree. See also :envvar:" "`PYTHONPYCACHEPREFIX`." msgstr "" -#: ../../using/cmdline.rst:474 +#: ../../using/cmdline.rst:477 msgid "" "``-X warn_default_encoding`` issues a :class:`EncodingWarning` when the " "locale-specific default encoding is used for opening files. See also :envvar:" "`PYTHONWARNDEFAULTENCODING`." msgstr "" -#: ../../using/cmdline.rst:478 +#: ../../using/cmdline.rst:481 msgid "" "It also allows passing arbitrary values and retrieving them through the :" "data:`sys._xoptions` dictionary." msgstr "" -#: ../../using/cmdline.rst:481 +#: ../../using/cmdline.rst:484 msgid "The :option:`-X` option was added." msgstr "" -#: ../../using/cmdline.rst:484 +#: ../../using/cmdline.rst:487 msgid "The ``-X faulthandler`` option." msgstr "" -#: ../../using/cmdline.rst:487 +#: ../../using/cmdline.rst:490 msgid "The ``-X showrefcount`` and ``-X tracemalloc`` options." msgstr "" -#: ../../using/cmdline.rst:490 +#: ../../using/cmdline.rst:493 msgid "The ``-X showalloccount`` option." msgstr "" -#: ../../using/cmdline.rst:493 +#: ../../using/cmdline.rst:496 msgid "The ``-X importtime``, ``-X dev`` and ``-X utf8`` options." msgstr "" -#: ../../using/cmdline.rst:496 +#: ../../using/cmdline.rst:499 msgid "" "The ``-X pycache_prefix`` option. The ``-X dev`` option now logs ``close()`` " "exceptions in :class:`io.IOBase` destructor." msgstr "" -#: ../../using/cmdline.rst:500 +#: ../../using/cmdline.rst:503 msgid "" "Using ``-X dev`` option, check *encoding* and *errors* arguments on string " "encoding and decoding operations." msgstr "" -#: ../../using/cmdline.rst:504 +#: ../../using/cmdline.rst:507 msgid "The ``-X showalloccount`` option has been removed." msgstr "" -#: ../../using/cmdline.rst:506 +#: ../../using/cmdline.rst:509 msgid "The ``-X warn_default_encoding`` option." msgstr "" -#: ../../using/cmdline.rst:510 +#: ../../using/cmdline.rst:512 +msgid "The ``-X int_max_str_digits`` option." +msgstr "" + +#: ../../using/cmdline.rst:516 msgid "The ``-X oldparser`` option." msgstr "" -#: ../../using/cmdline.rst:514 +#: ../../using/cmdline.rst:520 msgid "Options you shouldn't use" msgstr "" -#: ../../using/cmdline.rst:518 +#: ../../using/cmdline.rst:524 msgid "Reserved for use by Jython_." msgstr "" -#: ../../using/cmdline.rst:526 +#: ../../using/cmdline.rst:531 msgid "Environment variables" msgstr "" -#: ../../using/cmdline.rst:528 +#: ../../using/cmdline.rst:533 msgid "" "These environment variables influence Python's behavior, they are processed " "before the command-line switches other than -E or -I. It is customary that " @@ -711,7 +722,7 @@ msgid "" "conflict." msgstr "" -#: ../../using/cmdline.rst:535 +#: ../../using/cmdline.rst:540 msgid "" "Change the location of the standard Python libraries. By default, the " "libraries are searched in :file:`{prefix}/lib/python{version}` and :file:" @@ -720,14 +731,14 @@ msgid "" "file:`/usr/local`." msgstr "" -#: ../../using/cmdline.rst:541 +#: ../../using/cmdline.rst:546 msgid "" "When :envvar:`PYTHONHOME` is set to a single directory, its value replaces " "both :file:`{prefix}` and :file:`{exec_prefix}`. To specify different " "values for these, set :envvar:`PYTHONHOME` to :file:`{prefix}:{exec_prefix}`." msgstr "" -#: ../../using/cmdline.rst:548 +#: ../../using/cmdline.rst:553 msgid "" "Augment the default search path for module files. The format is the same as " "the shell's :envvar:`PATH`: one or more directory pathnames separated by :" @@ -735,21 +746,21 @@ msgid "" "existent directories are silently ignored." msgstr "" -#: ../../using/cmdline.rst:553 +#: ../../using/cmdline.rst:558 msgid "" "In addition to normal directories, individual :envvar:`PYTHONPATH` entries " "may refer to zipfiles containing pure Python modules (in either source or " "compiled form). Extension modules cannot be imported from zipfiles." msgstr "" -#: ../../using/cmdline.rst:557 +#: ../../using/cmdline.rst:562 msgid "" "The default search path is installation dependent, but generally begins " "with :file:`{prefix}/lib/python{version}` (see :envvar:`PYTHONHOME` above). " "It is *always* appended to :envvar:`PYTHONPATH`." msgstr "" -#: ../../using/cmdline.rst:561 +#: ../../using/cmdline.rst:566 msgid "" "An additional directory will be inserted in the search path in front of :" "envvar:`PYTHONPATH` as described above under :ref:`using-on-interface-" @@ -757,13 +768,13 @@ msgid "" "the variable :data:`sys.path`." msgstr "" -#: ../../using/cmdline.rst:569 +#: ../../using/cmdline.rst:574 msgid "" "If this is set to a non-empty string, it overrides the :data:`sys." "platlibdir` value." msgstr "" -#: ../../using/cmdline.rst:577 +#: ../../using/cmdline.rst:582 msgid "" "If this is the name of a readable file, the Python commands in that file are " "executed before the first prompt is displayed in interactive mode. The file " @@ -774,26 +785,26 @@ msgid "" "file." msgstr "" -#: ../../using/cmdline.rst:584 +#: ../../using/cmdline.rst:589 msgid "" "Raises an :ref:`auditing event ` ``cpython.run_startup`` with " "argument ``filename``." msgstr "" -#: ../../using/cmdline.rst:586 +#: ../../using/cmdline.rst:591 msgid "" "Raises an :ref:`auditing event ` ``cpython.run_startup`` with the " "filename as the argument when called on startup." msgstr "" -#: ../../using/cmdline.rst:592 +#: ../../using/cmdline.rst:597 msgid "" "If this is set to a non-empty string it is equivalent to specifying the :" "option:`-O` option. If set to an integer, it is equivalent to specifying :" "option:`-O` multiple times." msgstr "" -#: ../../using/cmdline.rst:599 +#: ../../using/cmdline.rst:604 msgid "" "If this is set, it names a callable using dotted-path notation. The module " "containing the callable will be imported and then the callable will be run " @@ -804,52 +815,52 @@ msgid "" "breakpointhook` to do nothing but return immediately." msgstr "" -#: ../../using/cmdline.rst:611 +#: ../../using/cmdline.rst:616 msgid "" "If this is set to a non-empty string it is equivalent to specifying the :" "option:`-d` option. If set to an integer, it is equivalent to specifying :" "option:`-d` multiple times." msgstr "" -#: ../../using/cmdline.rst:618 +#: ../../using/cmdline.rst:623 msgid "" "If this is set to a non-empty string it is equivalent to specifying the :" "option:`-i` option." msgstr "" -#: ../../using/cmdline.rst:621 +#: ../../using/cmdline.rst:626 msgid "" "This variable can also be modified by Python code using :data:`os.environ` " "to force inspect mode on program termination." msgstr "" -#: ../../using/cmdline.rst:627 +#: ../../using/cmdline.rst:632 msgid "" "If this is set to a non-empty string it is equivalent to specifying the :" "option:`-u` option." msgstr "" -#: ../../using/cmdline.rst:633 +#: ../../using/cmdline.rst:638 msgid "" "If this is set to a non-empty string it is equivalent to specifying the :" "option:`-v` option. If set to an integer, it is equivalent to specifying :" "option:`-v` multiple times." msgstr "" -#: ../../using/cmdline.rst:640 +#: ../../using/cmdline.rst:645 msgid "" "If this is set, Python ignores case in :keyword:`import` statements. This " "only works on Windows and macOS." msgstr "" -#: ../../using/cmdline.rst:646 +#: ../../using/cmdline.rst:651 msgid "" "If this is set to a non-empty string, Python won't try to write ``.pyc`` " "files on the import of source modules. This is equivalent to specifying " "the :option:`-B` option." msgstr "" -#: ../../using/cmdline.rst:653 +#: ../../using/cmdline.rst:658 msgid "" "If this is set, Python will write ``.pyc`` files in a mirror directory tree " "at this path, instead of in ``__pycache__`` directories within the source " @@ -857,33 +868,40 @@ msgid "" "``pycache_prefix=PATH`` option." msgstr "" -#: ../../using/cmdline.rst:663 +#: ../../using/cmdline.rst:668 msgid "" "If this variable is not set or set to ``random``, a random value is used to " "seed the hashes of str and bytes objects." msgstr "" -#: ../../using/cmdline.rst:666 +#: ../../using/cmdline.rst:671 msgid "" "If :envvar:`PYTHONHASHSEED` is set to an integer value, it is used as a " "fixed seed for generating the hash() of the types covered by the hash " "randomization." msgstr "" -#: ../../using/cmdline.rst:670 +#: ../../using/cmdline.rst:675 msgid "" "Its purpose is to allow repeatable hashing, such as for selftests for the " "interpreter itself, or to allow a cluster of python processes to share hash " "values." msgstr "" -#: ../../using/cmdline.rst:674 +#: ../../using/cmdline.rst:679 msgid "" "The integer must be a decimal number in the range [0,4294967295]. " "Specifying the value 0 will disable hash randomization." msgstr "" -#: ../../using/cmdline.rst:682 +#: ../../using/cmdline.rst:686 +msgid "" +"If this variable is set to an integer, it is used to configure the " +"interpreter's global :ref:`integer string conversion length limitation " +"`." +msgstr "" + +#: ../../using/cmdline.rst:694 msgid "" "If this is set before running the interpreter, it overrides the encoding " "used for stdin/stdout/stderr, in the syntax ``encodingname:errorhandler``. " @@ -891,17 +909,17 @@ msgid "" "have the same meaning as in :func:`str.encode`." msgstr "" -#: ../../using/cmdline.rst:687 +#: ../../using/cmdline.rst:699 msgid "" "For stderr, the ``:errorhandler`` part is ignored; the handler will always " "be ``'backslashreplace'``." msgstr "" -#: ../../using/cmdline.rst:690 +#: ../../using/cmdline.rst:702 msgid "The ``encodingname`` part is now optional." msgstr "" -#: ../../using/cmdline.rst:693 +#: ../../using/cmdline.rst:705 msgid "" "On Windows, the encoding specified by this variable is ignored for " "interactive console buffers unless :envvar:`PYTHONLEGACYWINDOWSSTDIO` is " @@ -909,13 +927,13 @@ msgid "" "not affected." msgstr "" -#: ../../using/cmdline.rst:700 +#: ../../using/cmdline.rst:712 msgid "" "If this is set, Python won't add the :data:`user site-packages directory " "` to :data:`sys.path`." msgstr "" -#: ../../using/cmdline.rst:710 +#: ../../using/cmdline.rst:722 msgid "" "Defines the :data:`user base directory `, which is used to " "compute the path of the :data:`user site-packages directory ` of the :mod:`asyncio` module." msgstr "" -#: ../../using/cmdline.rst:789 +#: ../../using/cmdline.rst:801 msgid "Set the Python memory allocators and/or install debug hooks." msgstr "" -#: ../../using/cmdline.rst:791 +#: ../../using/cmdline.rst:803 msgid "Set the family of memory allocators used by Python:" msgstr "" -#: ../../using/cmdline.rst:793 +#: ../../using/cmdline.rst:805 msgid "" "``default``: use the :ref:`default memory allocators `." msgstr "" -#: ../../using/cmdline.rst:795 +#: ../../using/cmdline.rst:807 msgid "" "``malloc``: use the :c:func:`malloc` function of the C library for all " "domains (:c:data:`PYMEM_DOMAIN_RAW`, :c:data:`PYMEM_DOMAIN_MEM`, :c:data:" "`PYMEM_DOMAIN_OBJ`)." msgstr "" -#: ../../using/cmdline.rst:798 +#: ../../using/cmdline.rst:810 msgid "" "``pymalloc``: use the :ref:`pymalloc allocator ` for :c:data:" "`PYMEM_DOMAIN_MEM` and :c:data:`PYMEM_DOMAIN_OBJ` domains and use the :c:" "func:`malloc` function for the :c:data:`PYMEM_DOMAIN_RAW` domain." msgstr "" -#: ../../using/cmdline.rst:802 +#: ../../using/cmdline.rst:814 msgid "Install :ref:`debug hooks `:" msgstr "" -#: ../../using/cmdline.rst:804 +#: ../../using/cmdline.rst:816 msgid "" "``debug``: install debug hooks on top of the :ref:`default memory allocators " "`." msgstr "" -#: ../../using/cmdline.rst:806 +#: ../../using/cmdline.rst:818 msgid "``malloc_debug``: same as ``malloc`` but also install debug hooks." msgstr "" -#: ../../using/cmdline.rst:807 +#: ../../using/cmdline.rst:819 msgid "``pymalloc_debug``: same as ``pymalloc`` but also install debug hooks." msgstr "" -#: ../../using/cmdline.rst:809 +#: ../../using/cmdline.rst:821 msgid "Added the ``\"default\"`` allocator." msgstr "" -#: ../../using/cmdline.rst:817 +#: ../../using/cmdline.rst:829 msgid "" "If set to a non-empty string, Python will print statistics of the :ref:" "`pymalloc memory allocator ` every time a new pymalloc object " "arena is created, and on shutdown." msgstr "" -#: ../../using/cmdline.rst:821 +#: ../../using/cmdline.rst:833 msgid "" "This variable is ignored if the :envvar:`PYTHONMALLOC` environment variable " "is used to force the :c:func:`malloc` allocator of the C library, or if " "Python is configured without ``pymalloc`` support." msgstr "" -#: ../../using/cmdline.rst:825 +#: ../../using/cmdline.rst:837 msgid "" "This variable can now also be used on Python compiled in release mode. It " "now has no effect if set to an empty string." msgstr "" -#: ../../using/cmdline.rst:832 +#: ../../using/cmdline.rst:844 msgid "" "If set to a non-empty string, the default :term:`filesystem encoding and " "error handler` mode will revert to their pre-3.6 values of 'mbcs' and " @@ -1045,41 +1063,41 @@ msgid "" "'surrogatepass' are used." msgstr "" -#: ../../using/cmdline.rst:837 +#: ../../using/cmdline.rst:849 msgid "" "This may also be enabled at runtime with :func:`sys." "_enablelegacywindowsfsencoding()`." msgstr "" -#: ../../using/cmdline.rst:841 ../../using/cmdline.rst:855 +#: ../../using/cmdline.rst:853 ../../using/cmdline.rst:867 msgid ":ref:`Availability `: Windows." msgstr ":ref:`適用 `:Windows。" -#: ../../using/cmdline.rst:842 +#: ../../using/cmdline.rst:854 msgid "See :pep:`529` for more details." msgstr "更多細節請見 :pep:`529`\\ 。" -#: ../../using/cmdline.rst:847 +#: ../../using/cmdline.rst:859 msgid "" "If set to a non-empty string, does not use the new console reader and " "writer. This means that Unicode characters will be encoded according to the " "active console code page, rather than using utf-8." msgstr "" -#: ../../using/cmdline.rst:851 +#: ../../using/cmdline.rst:863 msgid "" "This variable is ignored if the standard streams are redirected (to files or " "pipes) rather than referring to console buffers." msgstr "" -#: ../../using/cmdline.rst:861 +#: ../../using/cmdline.rst:873 msgid "" "If set to the value ``0``, causes the main Python command line application " "to skip coercing the legacy ASCII-based C and POSIX locales to a more " "capable UTF-8 based alternative." msgstr "" -#: ../../using/cmdline.rst:865 +#: ../../using/cmdline.rst:877 msgid "" "If this variable is *not* set (or is set to a value other than ``0``), the " "``LC_ALL`` locale override environment variable is also not set, and the " @@ -1090,19 +1108,19 @@ msgid "" "runtime:" msgstr "" -#: ../../using/cmdline.rst:873 +#: ../../using/cmdline.rst:885 msgid "``C.UTF-8``" msgstr "``C.UTF-8``" -#: ../../using/cmdline.rst:874 +#: ../../using/cmdline.rst:886 msgid "``C.utf8``" msgstr "``C.utf8``" -#: ../../using/cmdline.rst:875 +#: ../../using/cmdline.rst:887 msgid "``UTF-8``" msgstr "``UTF-8``" -#: ../../using/cmdline.rst:877 +#: ../../using/cmdline.rst:889 msgid "" "If setting one of these locale categories succeeds, then the ``LC_CTYPE`` " "environment variable will also be set accordingly in the current process " @@ -1115,7 +1133,7 @@ msgid "" "(such as Python's own :func:`locale.getdefaultlocale`)." msgstr "" -#: ../../using/cmdline.rst:887 +#: ../../using/cmdline.rst:899 msgid "" "Configuring one of these locales (either explicitly or via the above " "implicit locale coercion) automatically enables the ``surrogateescape`` :ref:" @@ -1125,7 +1143,7 @@ msgid "" "envvar:`PYTHONIOENCODING` as usual." msgstr "" -#: ../../using/cmdline.rst:894 +#: ../../using/cmdline.rst:906 msgid "" "For debugging purposes, setting ``PYTHONCOERCECLOCALE=warn`` will cause " "Python to emit warning messages on ``stderr`` if either the locale coercion " @@ -1133,7 +1151,7 @@ msgid "" "active when the Python runtime is initialized." msgstr "" -#: ../../using/cmdline.rst:899 +#: ../../using/cmdline.rst:911 msgid "" "Also note that even when locale coercion is disabled, or when it fails to " "find a suitable target locale, :envvar:`PYTHONUTF8` will still activate by " @@ -1142,64 +1160,64 @@ msgid "" "system interfaces." msgstr "" -#: ../../using/cmdline.rst:906 +#: ../../using/cmdline.rst:918 msgid ":ref:`Availability `: \\*nix." msgstr ":ref:`適用 `:\\*nix。" -#: ../../using/cmdline.rst:907 +#: ../../using/cmdline.rst:919 msgid "See :pep:`538` for more details." msgstr "更多細節請見 :pep:`538`\\ 。" -#: ../../using/cmdline.rst:913 +#: ../../using/cmdline.rst:925 msgid "" "If this environment variable is set to a non-empty string, enable :ref:" "`Python Development Mode `, introducing additional runtime checks " "that are too expensive to be enabled by default." msgstr "" -#: ../../using/cmdline.rst:921 +#: ../../using/cmdline.rst:933 msgid "If set to ``1``, enable the :ref:`Python UTF-8 Mode `." msgstr "" -#: ../../using/cmdline.rst:923 +#: ../../using/cmdline.rst:935 msgid "If set to ``0``, disable the :ref:`Python UTF-8 Mode `." msgstr "" -#: ../../using/cmdline.rst:925 +#: ../../using/cmdline.rst:937 msgid "" "Setting any other non-empty string causes an error during interpreter " "initialisation." msgstr "" -#: ../../using/cmdline.rst:932 +#: ../../using/cmdline.rst:944 msgid "" "If this environment variable is set to a non-empty string, issue a :class:" "`EncodingWarning` when the locale-specific default encoding is used." msgstr "" -#: ../../using/cmdline.rst:935 +#: ../../using/cmdline.rst:947 msgid "See :ref:`io-encoding-warning` for details." msgstr "細節請見 :ref:`io-encoding-warning`\\ 。" -#: ../../using/cmdline.rst:941 +#: ../../using/cmdline.rst:953 msgid "Debug-mode variables" msgstr "" -#: ../../using/cmdline.rst:945 +#: ../../using/cmdline.rst:957 msgid "If set, Python will print threading debug info into stdout." msgstr "" -#: ../../using/cmdline.rst:947 +#: ../../using/cmdline.rst:959 msgid "Need a :ref:`debug build of Python `." msgstr "" -#: ../../using/cmdline.rst:954 +#: ../../using/cmdline.rst:966 msgid "" "If set, Python will dump objects and reference counts still alive after " "shutting down the interpreter." msgstr "" -#: ../../using/cmdline.rst:957 +#: ../../using/cmdline.rst:969 msgid "" "Need Python configured with the :option:`--with-trace-refs` build option." msgstr "" diff --git a/whatsnew/3.10.po b/whatsnew/3.10.po index c3858a0d5f..fa062a206f 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-08-05 00:19+0000\n" +"POT-Creation-Date: 2022-09-03 00:15+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-" @@ -3101,3 +3101,21 @@ msgid "" "The ``PyThreadState.use_tracing`` member has been removed to optimize " "Python. (Contributed by Mark Shannon in :issue:`43760`.)" msgstr "" + +#: ../../whatsnew/3.10.rst:2328 +msgid "Notable security feature in 3.10.7" +msgstr "" + +#: ../../whatsnew/3.10.rst:2330 +msgid "" +"Converting between :class:`int` and :class:`str` in bases other than 2 " +"(binary), 4, 8 (octal), 16 (hexadecimal), or 32 such as base 10 (decimal) " +"now raises a :exc:`ValueError` if the number of digits in string form is " +"above a limit to avoid potential denial of service attacks due to the " +"algorithmic complexity. This is a mitigation for `CVE-2020-10735 `_. This limit can be " +"configured or disabled by environment variable, command line flag, or :mod:" +"`sys` APIs. See the :ref:`integer string conversion length limitation " +"` documentation. The default limit is 4300 digits in " +"string form." +msgstr "" From 83a136a45cce0f9bf632993d2f5895cb3d5fdbfd Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 4 Sep 2022 00:20:34 +0000 Subject: [PATCH 3/6] sync with cpython c3dbbc88 --- library/logging.handlers.po | 66 +++++++++++++++++++++++-------------- 1 file changed, 41 insertions(+), 25 deletions(-) diff --git a/library/logging.handlers.po b/library/logging.handlers.po index 1107fa6006..93ff5522aa 100644 --- a/library/logging.handlers.po +++ b/library/logging.handlers.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-08-31 00:21+0000\n" +"POT-Creation-Date: 2022-09-04 00:18+0000\n" "PO-Revision-Date: 2018-05-23 16:05+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -1428,7 +1428,7 @@ msgid "" msgstr "" #: ../../library/logging.handlers.rst:1034 -#: ../../library/logging.handlers.rst:1109 +#: ../../library/logging.handlers.rst:1123 msgid "" "If you are using :mod:`multiprocessing`, you should avoid using :class:" "`~queue.SimpleQueue` and instead use :class:`multiprocessing.Queue`." @@ -1467,25 +1467,41 @@ msgid "" "the original intact." msgstr "" -#: ../../library/logging.handlers.rst:1065 +#: ../../library/logging.handlers.rst:1063 +msgid "" +"The base implementation formats the message with arguments, sets the " +"``message`` and ``msg`` attributes to the formatted message and sets the " +"``args`` and ``exc_text`` attributes to ``None`` to allow pickling and to " +"prevent further attempts at formatting. This means that a handler on the :" +"class:`QueueListener` side won't have the information to do custom " +"formatting, e.g. of exceptions. You may wish to subclass ``QueueHandler`` " +"and override this method to e.g. avoid setting ``exc_text`` to ``None``. " +"Note that the ``message`` / ``msg`` / ``args`` changes are related to " +"ensuring the record is pickleable, and you might or might not be able to " +"avoid doing that depending on whether your ``args`` are pickleable. (Note " +"that you may have to consider not only your own code but also code in any " +"libraries that you use.)" +msgstr "" + +#: ../../library/logging.handlers.rst:1079 msgid "" "Enqueues the record on the queue using ``put_nowait()``; you may want to " "override this if you want to use blocking behaviour, or a timeout, or a " "customized queue implementation." msgstr "" -#: ../../library/logging.handlers.rst:1071 +#: ../../library/logging.handlers.rst:1085 msgid "" "When created via configuration using :func:`~logging.config.dictConfig`, " "this attribute will contain a :class:`QueueListener` instance for use with " "this handler. Otherwise, it will be ``None``." msgstr "" -#: ../../library/logging.handlers.rst:1080 +#: ../../library/logging.handlers.rst:1094 msgid "QueueListener" msgstr "QueueListener" -#: ../../library/logging.handlers.rst:1084 +#: ../../library/logging.handlers.rst:1098 msgid "" "The :class:`QueueListener` class, located in the :mod:`logging.handlers` " "module, supports receiving logging messages from a queue, such as those " @@ -1496,7 +1512,7 @@ msgid "" "works hand-in-hand with :class:`QueueHandler`." msgstr "" -#: ../../library/logging.handlers.rst:1092 +#: ../../library/logging.handlers.rst:1106 msgid "" "Along with the :class:`QueueHandler` class, :class:`QueueListener` can be " "used to let handlers do their work on a separate thread from the one which " @@ -1506,7 +1522,7 @@ msgid "" "an email via :class:`SMTPHandler`) are done on a separate thread." msgstr "" -#: ../../library/logging.handlers.rst:1101 +#: ../../library/logging.handlers.rst:1115 msgid "" "Returns a new instance of the :class:`QueueListener` class. The instance is " "initialized with the queue to send messages to and a list of handlers which " @@ -1517,7 +1533,7 @@ msgid "" "class:`~queue.SimpleQueue` instances for *queue*." msgstr "" -#: ../../library/logging.handlers.rst:1112 +#: ../../library/logging.handlers.rst:1126 msgid "" "If ``respect_handler_level`` is ``True``, a handler's level is respected " "(compared with the level for the message) when deciding whether to pass " @@ -1525,82 +1541,82 @@ msgid "" "versions - to always pass each message to each handler." msgstr "" -#: ../../library/logging.handlers.rst:1117 +#: ../../library/logging.handlers.rst:1131 msgid "The ``respect_handler_level`` argument was added." msgstr "新增 ``respect_handler_level`` 引數。" -#: ../../library/logging.handlers.rst:1122 +#: ../../library/logging.handlers.rst:1136 msgid "Dequeues a record and return it, optionally blocking." msgstr "" -#: ../../library/logging.handlers.rst:1124 +#: ../../library/logging.handlers.rst:1138 msgid "" "The base implementation uses ``get()``. You may want to override this method " "if you want to use timeouts or work with custom queue implementations." msgstr "" -#: ../../library/logging.handlers.rst:1130 +#: ../../library/logging.handlers.rst:1144 msgid "Prepare a record for handling." msgstr "" -#: ../../library/logging.handlers.rst:1132 +#: ../../library/logging.handlers.rst:1146 msgid "" "This implementation just returns the passed-in record. You may want to " "override this method if you need to do any custom marshalling or " "manipulation of the record before passing it to the handlers." msgstr "" -#: ../../library/logging.handlers.rst:1138 +#: ../../library/logging.handlers.rst:1152 msgid "Handle a record." msgstr "" -#: ../../library/logging.handlers.rst:1140 +#: ../../library/logging.handlers.rst:1154 msgid "" "This just loops through the handlers offering them the record to handle. The " "actual object passed to the handlers is that which is returned from :meth:" "`prepare`." msgstr "" -#: ../../library/logging.handlers.rst:1146 +#: ../../library/logging.handlers.rst:1160 msgid "Starts the listener." msgstr "" -#: ../../library/logging.handlers.rst:1148 +#: ../../library/logging.handlers.rst:1162 msgid "" "This starts up a background thread to monitor the queue for LogRecords to " "process." msgstr "" -#: ../../library/logging.handlers.rst:1153 +#: ../../library/logging.handlers.rst:1167 msgid "Stops the listener." msgstr "" -#: ../../library/logging.handlers.rst:1155 +#: ../../library/logging.handlers.rst:1169 msgid "" "This asks the thread to terminate, and then waits for it to do so. Note that " "if you don't call this before your application exits, there may be some " "records still left on the queue, which won't be processed." msgstr "" -#: ../../library/logging.handlers.rst:1161 +#: ../../library/logging.handlers.rst:1175 msgid "" "Writes a sentinel to the queue to tell the listener to quit. This " "implementation uses ``put_nowait()``. You may want to override this method " "if you want to use timeouts or work with custom queue implementations." msgstr "" -#: ../../library/logging.handlers.rst:1172 +#: ../../library/logging.handlers.rst:1186 msgid "Module :mod:`logging`" msgstr ":mod:`logging` 模組" -#: ../../library/logging.handlers.rst:1172 +#: ../../library/logging.handlers.rst:1186 msgid "API reference for the logging module." msgstr "" -#: ../../library/logging.handlers.rst:1174 +#: ../../library/logging.handlers.rst:1188 msgid "Module :mod:`logging.config`" msgstr ":mod:`logging.config` 模組" -#: ../../library/logging.handlers.rst:1175 +#: ../../library/logging.handlers.rst:1189 msgid "Configuration API for the logging module." msgstr "" From 662fa8a8dfc65b0c5db6040116d5e8e3b956e376 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 5 Sep 2022 00:22:19 +0000 Subject: [PATCH 4/6] sync with cpython f5a78472 --- library/numbers.po | 45 +- library/sqlite3.po | 238 +++--- library/stdtypes.po | 1849 +++++++++++++++++++++---------------------- 3 files changed, 1066 insertions(+), 1066 deletions(-) diff --git a/library/numbers.po b/library/numbers.po index aaef74cb62..c86a345252 100644 --- a/library/numbers.po +++ b/library/numbers.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-09-13 00:11+0000\n" +"POT-Creation-Date: 2022-09-05 00:20+0000\n" "PO-Revision-Date: 2016-11-19 00:32+0000\n" "Last-Translator: Liang-Bo Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -89,15 +89,22 @@ msgstr "" #: ../../library/numbers.rst:61 msgid "" "Subtypes :class:`Real` and adds :attr:`~Rational.numerator` and :attr:" -"`~Rational.denominator` properties, which should be in lowest terms. With " -"these, it provides a default for :func:`float`." +"`~Rational.denominator` properties. It also provides a default for :func:" +"`float`." msgstr "" -#: ../../library/numbers.rst:68 ../../library/numbers.rst:72 +#: ../../library/numbers.rst:65 +msgid "" +"The :attr:`~Rational.numerator` and :attr:`~Rational.denominator` values " +"should be instances of :class:`Integral` and should be in lowest terms with :" +"attr:`~Rational.denominator` positive." +msgstr "" + +#: ../../library/numbers.rst:71 ../../library/numbers.rst:75 msgid "Abstract." msgstr "" -#: ../../library/numbers.rst:77 +#: ../../library/numbers.rst:80 msgid "" "Subtypes :class:`Rational` and adds a conversion to :class:`int`. Provides " "defaults for :func:`float`, :attr:`~Rational.numerator`, and :attr:" @@ -105,11 +112,11 @@ msgid "" "and bit-string operations: ``<<``, ``>>``, ``&``, ``^``, ``|``, ``~``." msgstr "" -#: ../../library/numbers.rst:85 +#: ../../library/numbers.rst:88 msgid "Notes for type implementors" msgstr "" -#: ../../library/numbers.rst:87 +#: ../../library/numbers.rst:90 msgid "" "Implementors should be careful to make equal numbers equal and hash them to " "the same values. This may be subtle if there are two different extensions of " @@ -117,22 +124,22 @@ msgid "" "`hash` as follows::" msgstr "" -#: ../../library/numbers.rst:106 +#: ../../library/numbers.rst:109 msgid "Adding More Numeric ABCs" msgstr "" -#: ../../library/numbers.rst:108 +#: ../../library/numbers.rst:111 msgid "" "There are, of course, more possible ABCs for numbers, and this would be a " "poor hierarchy if it precluded the possibility of adding those. You can add " "``MyFoo`` between :class:`Complex` and :class:`Real` with::" msgstr "" -#: ../../library/numbers.rst:120 +#: ../../library/numbers.rst:123 msgid "Implementing the arithmetic operations" msgstr "" -#: ../../library/numbers.rst:122 +#: ../../library/numbers.rst:125 msgid "" "We want to implement the arithmetic operations so that mixed-mode operations " "either call an implementation whose author knew about the types of both " @@ -141,7 +148,7 @@ msgid "" "and :meth:`__radd__` should be defined as::" msgstr "" -#: ../../library/numbers.rst:153 +#: ../../library/numbers.rst:156 msgid "" "There are 5 different cases for a mixed-type operation on subclasses of :" "class:`Complex`. I'll refer to all of the above code that doesn't refer to " @@ -150,11 +157,11 @@ msgid "" "Complex``), and ``b : B <: Complex``. I'll consider ``a + b``:" msgstr "" -#: ../../library/numbers.rst:160 +#: ../../library/numbers.rst:163 msgid "If ``A`` defines an :meth:`__add__` which accepts ``b``, all is well." msgstr "" -#: ../../library/numbers.rst:162 +#: ../../library/numbers.rst:165 msgid "" "If ``A`` falls back to the boilerplate code, and it were to return a value " "from :meth:`__add__`, we'd miss the possibility that ``B`` defines a more " @@ -163,33 +170,33 @@ msgid "" "`__add__` at all.)" msgstr "" -#: ../../library/numbers.rst:168 +#: ../../library/numbers.rst:171 msgid "" "Then ``B``'s :meth:`__radd__` gets a chance. If it accepts ``a``, all is " "well." msgstr "" -#: ../../library/numbers.rst:170 +#: ../../library/numbers.rst:173 msgid "" "If it falls back to the boilerplate, there are no more possible methods to " "try, so this is where the default implementation should live." msgstr "" -#: ../../library/numbers.rst:173 +#: ../../library/numbers.rst:176 msgid "" "If ``B <: A``, Python tries ``B.__radd__`` before ``A.__add__``. This is ok, " "because it was implemented with knowledge of ``A``, so it can handle those " "instances before delegating to :class:`Complex`." msgstr "" -#: ../../library/numbers.rst:178 +#: ../../library/numbers.rst:181 msgid "" "If ``A <: Complex`` and ``B <: Real`` without sharing any other knowledge, " "then the appropriate shared operation is the one involving the built in :" "class:`complex`, and both :meth:`__radd__` s land there, so ``a+b == b+a``." msgstr "" -#: ../../library/numbers.rst:183 +#: ../../library/numbers.rst:186 msgid "" "Because most of the operations on any given type will be very similar, it " "can be useful to define a helper function which generates the forward and " diff --git a/library/sqlite3.po b/library/sqlite3.po index 45699a7600..b23767bc97 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-09-02 00:17+0000\n" +"POT-Creation-Date: 2022-09-05 00:20+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-" @@ -575,7 +575,7 @@ msgstr "" #: ../../library/sqlite3.rst:547 ../../library/sqlite3.rst:577 #: ../../library/sqlite3.rst:686 ../../library/sqlite3.rst:724 #: ../../library/sqlite3.rst:943 ../../library/sqlite3.rst:1089 -#: ../../library/sqlite3.rst:1110 ../../library/sqlite3.rst:1246 +#: ../../library/sqlite3.rst:1110 ../../library/sqlite3.rst:1247 msgid "Example:" msgstr "範例:" @@ -1062,14 +1062,31 @@ msgstr "" #: ../../library/sqlite3.rst:1170 msgid "" -"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." +"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:1178 +#: ../../library/sqlite3.rst:1175 +msgid "" +"Read-only attribute that provides the SQLite database :class:`Connection` " +"belonging to the cursor. A :class:`Cursor` object created by calling :meth:" +"`con.cursor() ` will have a :attr:`connection` attribute " +"that refers to *con*:" +msgstr "" + +#: ../../library/sqlite3.rst:1189 +msgid "" +"Read-only attribute that 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 ``None``." +msgstr "" + +#: ../../library/sqlite3.rst:1193 +msgid "It is set for ``SELECT`` statements without any matching rows as well." +msgstr "" + +#: ../../library/sqlite3.rst:1197 msgid "" "Read-only attribute that provides the row id of the last inserted row. It is " "only updated after successful ``INSERT`` or ``REPLACE`` statements using " @@ -1079,45 +1096,28 @@ msgid "" "``None``." msgstr "" -#: ../../library/sqlite3.rst:1186 +#: ../../library/sqlite3.rst:1205 msgid "Inserts into ``WITHOUT ROWID`` tables are not recorded." msgstr "" -#: ../../library/sqlite3.rst:1188 +#: ../../library/sqlite3.rst:1207 msgid "Added support for the ``REPLACE`` statement." msgstr "新增 ``REPLACE`` 陳述式的支援。" -#: ../../library/sqlite3.rst:1193 -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:1198 -msgid "" -"Read-only attribute that 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 ``None``." -msgstr "" - -#: ../../library/sqlite3.rst:1202 -msgid "It is set for ``SELECT`` statements without any matching rows as well." -msgstr "" - -#: ../../library/sqlite3.rst:1206 +#: ../../library/sqlite3.rst:1212 msgid "" -"Read-only attribute that provides the SQLite database :class:`Connection` " -"belonging to the cursor. A :class:`Cursor` object created by calling :meth:" -"`con.cursor() ` will have a :attr:`connection` attribute " -"that refers to *con*:" +"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:1226 +#: ../../library/sqlite3.rst:1227 msgid "Row objects" msgstr "" -#: ../../library/sqlite3.rst:1230 +#: ../../library/sqlite3.rst:1231 msgid "" "A :class:`!Row` instance serves as a highly optimized :attr:`~Connection." "row_factory` for :class:`Connection` objects. It supports iteration, " @@ -1125,41 +1125,41 @@ msgid "" "index." msgstr "" -#: ../../library/sqlite3.rst:1235 +#: ../../library/sqlite3.rst:1236 msgid "Two row objects compare equal if have equal columns and equal members." msgstr "" -#: ../../library/sqlite3.rst:1239 +#: ../../library/sqlite3.rst:1240 msgid "" "Return a :class:`list` of column names as :class:`strings `. " "Immediately after a query, it is the first member of each tuple in :attr:" "`Cursor.description`." msgstr "" -#: ../../library/sqlite3.rst:1243 +#: ../../library/sqlite3.rst:1244 msgid "Added support of slicing." msgstr "" -#: ../../library/sqlite3.rst:1263 +#: ../../library/sqlite3.rst:1264 msgid "PrepareProtocol objects" msgstr "" -#: ../../library/sqlite3.rst:1267 +#: ../../library/sqlite3.rst:1268 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:1275 +#: ../../library/sqlite3.rst:1276 msgid "Exceptions" msgstr "例外" -#: ../../library/sqlite3.rst:1277 +#: ../../library/sqlite3.rst:1278 msgid "The exception hierarchy is defined by the DB-API 2.0 (:pep:`249`)." msgstr "" -#: ../../library/sqlite3.rst:1281 +#: ../../library/sqlite3.rst:1282 msgid "" "This exception is raised by :mod:`!sqlite3` if an SQL query is not a :class:" "`string `, or if multiple statements are passed to :meth:`~Cursor." @@ -1167,21 +1167,21 @@ msgid "" "`Exception`." msgstr "" -#: ../../library/sqlite3.rst:1288 +#: ../../library/sqlite3.rst:1289 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:1294 +#: ../../library/sqlite3.rst:1295 msgid "" "This exception is raised by :mod:`!sqlite3` for fetch across rollback, or " "if :mod:`!sqlite3` is unable to bind parameters. ``InterfaceError`` is a " "subclass of :exc:`Error`." msgstr "" -#: ../../library/sqlite3.rst:1300 +#: ../../library/sqlite3.rst:1301 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 " @@ -1189,14 +1189,14 @@ msgid "" "subclass of :exc:`Error`." msgstr "" -#: ../../library/sqlite3.rst:1307 +#: ../../library/sqlite3.rst:1308 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:1313 +#: ../../library/sqlite3.rst:1314 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 " @@ -1204,20 +1204,20 @@ msgid "" "``OperationalError`` is a subclass of :exc:`DatabaseError`." msgstr "" -#: ../../library/sqlite3.rst:1321 +#: ../../library/sqlite3.rst:1322 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:1326 +#: ../../library/sqlite3.rst:1327 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:1333 +#: ../../library/sqlite3.rst:1334 msgid "" "Exception raised for :mod:`!sqlite3` API programming errors, for example " "trying to operate on a closed :class:`Connection`, or trying to execute non-" @@ -1225,7 +1225,7 @@ msgid "" "subclass of :exc:`DatabaseError`." msgstr "" -#: ../../library/sqlite3.rst:1340 +#: ../../library/sqlite3.rst:1341 msgid "" "Exception raised in case a method or database API is not supported by the " "underlying SQLite library. For example, setting *deterministic* to ``True`` " @@ -1234,78 +1234,78 @@ msgid "" "subclass of :exc:`DatabaseError`." msgstr "" -#: ../../library/sqlite3.rst:1350 +#: ../../library/sqlite3.rst:1351 msgid "SQLite and Python types" msgstr "" -#: ../../library/sqlite3.rst:1352 +#: ../../library/sqlite3.rst:1353 msgid "" "SQLite natively supports the following types: ``NULL``, ``INTEGER``, " "``REAL``, ``TEXT``, ``BLOB``." msgstr "" -#: ../../library/sqlite3.rst:1355 +#: ../../library/sqlite3.rst:1356 msgid "" "The following Python types can thus be sent to SQLite without any problem:" msgstr "" -#: ../../library/sqlite3.rst:1358 ../../library/sqlite3.rst:1375 +#: ../../library/sqlite3.rst:1359 ../../library/sqlite3.rst:1376 msgid "Python type" msgstr "" -#: ../../library/sqlite3.rst:1358 ../../library/sqlite3.rst:1375 +#: ../../library/sqlite3.rst:1359 ../../library/sqlite3.rst:1376 msgid "SQLite type" msgstr "" -#: ../../library/sqlite3.rst:1360 ../../library/sqlite3.rst:1377 +#: ../../library/sqlite3.rst:1361 ../../library/sqlite3.rst:1378 msgid "``None``" msgstr "" -#: ../../library/sqlite3.rst:1360 ../../library/sqlite3.rst:1377 +#: ../../library/sqlite3.rst:1361 ../../library/sqlite3.rst:1378 msgid "``NULL``" msgstr "``NULL``" -#: ../../library/sqlite3.rst:1362 ../../library/sqlite3.rst:1379 +#: ../../library/sqlite3.rst:1363 ../../library/sqlite3.rst:1380 msgid ":class:`int`" msgstr ":class:`int`" -#: ../../library/sqlite3.rst:1362 ../../library/sqlite3.rst:1379 +#: ../../library/sqlite3.rst:1363 ../../library/sqlite3.rst:1380 msgid "``INTEGER``" msgstr "``INTEGER``" -#: ../../library/sqlite3.rst:1364 ../../library/sqlite3.rst:1381 +#: ../../library/sqlite3.rst:1365 ../../library/sqlite3.rst:1382 msgid ":class:`float`" msgstr ":class:`float`" -#: ../../library/sqlite3.rst:1364 ../../library/sqlite3.rst:1381 +#: ../../library/sqlite3.rst:1365 ../../library/sqlite3.rst:1382 msgid "``REAL``" msgstr "``REAL``" -#: ../../library/sqlite3.rst:1366 +#: ../../library/sqlite3.rst:1367 msgid ":class:`str`" msgstr ":class:`str`" -#: ../../library/sqlite3.rst:1366 ../../library/sqlite3.rst:1383 +#: ../../library/sqlite3.rst:1367 ../../library/sqlite3.rst:1384 msgid "``TEXT``" msgstr "``TEXT``" -#: ../../library/sqlite3.rst:1368 ../../library/sqlite3.rst:1386 +#: ../../library/sqlite3.rst:1369 ../../library/sqlite3.rst:1387 msgid ":class:`bytes`" msgstr ":class:`bytes`" -#: ../../library/sqlite3.rst:1368 ../../library/sqlite3.rst:1386 +#: ../../library/sqlite3.rst:1369 ../../library/sqlite3.rst:1387 msgid "``BLOB``" msgstr "``BLOB``" -#: ../../library/sqlite3.rst:1372 +#: ../../library/sqlite3.rst:1373 msgid "This is how SQLite types are converted to Python types by default:" msgstr "" -#: ../../library/sqlite3.rst:1383 +#: ../../library/sqlite3.rst:1384 msgid "depends on :attr:`~Connection.text_factory`, :class:`str` by default" msgstr "" -#: ../../library/sqlite3.rst:1389 +#: ../../library/sqlite3.rst:1390 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 :ref:`object " @@ -1314,42 +1314,42 @@ msgid "" "converters>`." msgstr "" -#: ../../library/sqlite3.rst:1399 +#: ../../library/sqlite3.rst:1400 msgid "Default adapters and converters" msgstr "" -#: ../../library/sqlite3.rst:1401 +#: ../../library/sqlite3.rst:1402 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:1404 +#: ../../library/sqlite3.rst:1405 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:1408 +#: ../../library/sqlite3.rst:1409 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:1412 +#: ../../library/sqlite3.rst:1413 msgid "The following example demonstrates this." msgstr "" -#: ../../library/sqlite3.rst:1416 +#: ../../library/sqlite3.rst:1417 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:1422 +#: ../../library/sqlite3.rst:1423 msgid "" "The default \"timestamp\" converter ignores UTC offsets in the database and " "always returns a naive :class:`datetime.datetime` object. To preserve UTC " @@ -1357,15 +1357,15 @@ msgid "" "offset-aware converter with :func:`register_converter`." msgstr "" -#: ../../library/sqlite3.rst:1431 +#: ../../library/sqlite3.rst:1432 msgid "How-to guides" msgstr "" -#: ../../library/sqlite3.rst:1436 +#: ../../library/sqlite3.rst:1437 msgid "How to use placeholders to bind values in SQL queries" msgstr "" -#: ../../library/sqlite3.rst:1438 +#: ../../library/sqlite3.rst:1439 msgid "" "SQL operations usually need to use values from Python variables. However, " "beware of using Python's string operations to assemble queries, as they are " @@ -1373,7 +1373,7 @@ msgid "" "com/327/>`_ for a humorous example of what can go wrong)::" msgstr "" -#: ../../library/sqlite3.rst:1447 +#: ../../library/sqlite3.rst:1448 msgid "" "Instead, use the DB-API's parameter substitution. To insert a variable into " "a query string, use a placeholder in the string, and substitute the actual " @@ -1389,18 +1389,18 @@ msgid "" "ignored. Here's an example of both styles:" msgstr "" -#: ../../library/sqlite3.rst:1489 +#: ../../library/sqlite3.rst:1490 msgid "How to adapt custom Python types to SQLite values" msgstr "" -#: ../../library/sqlite3.rst:1491 +#: ../../library/sqlite3.rst:1492 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:1495 +#: ../../library/sqlite3.rst:1496 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 " @@ -1410,11 +1410,11 @@ msgid "" "custom adapter functions." msgstr "" -#: ../../library/sqlite3.rst:1507 +#: ../../library/sqlite3.rst:1508 msgid "How to write adaptable objects" msgstr "" -#: ../../library/sqlite3.rst:1509 +#: ../../library/sqlite3.rst:1510 msgid "" "Suppose we have a :class:`!Point` class that represents a pair of " "coordinates, ``x`` and ``y``, in a Cartesian coordinate system. The " @@ -1424,84 +1424,84 @@ msgid "" "object passed to *protocol* will be of type :class:`PrepareProtocol`." msgstr "" -#: ../../library/sqlite3.rst:1540 +#: ../../library/sqlite3.rst:1541 msgid "How to register adapter callables" msgstr "" -#: ../../library/sqlite3.rst:1542 +#: ../../library/sqlite3.rst:1543 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:1572 +#: ../../library/sqlite3.rst:1573 msgid "How to convert SQLite values to custom Python types" msgstr "" -#: ../../library/sqlite3.rst:1574 +#: ../../library/sqlite3.rst:1575 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:1579 +#: ../../library/sqlite3.rst:1580 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:1582 +#: ../../library/sqlite3.rst:1583 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:1587 +#: ../../library/sqlite3.rst:1588 msgid "" "Converter functions are **always** passed a :class:`bytes` object, no matter " "the underlying SQLite data type." msgstr "" -#: ../../library/sqlite3.rst:1596 +#: ../../library/sqlite3.rst:1597 msgid "" "We now need to tell :mod:`!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:1600 +#: ../../library/sqlite3.rst:1601 msgid "Implicit: set *detect_types* to :const:`PARSE_DECLTYPES`" msgstr "" -#: ../../library/sqlite3.rst:1601 +#: ../../library/sqlite3.rst:1602 msgid "Explicit: set *detect_types* to :const:`PARSE_COLNAMES`" msgstr "" -#: ../../library/sqlite3.rst:1602 +#: ../../library/sqlite3.rst:1603 msgid "" "Both: set *detect_types* to ``sqlite3.PARSE_DECLTYPES | sqlite3." "PARSE_COLNAMES``. Column names take precedence over declared types." msgstr "" -#: ../../library/sqlite3.rst:1606 +#: ../../library/sqlite3.rst:1607 msgid "The following example illustrates the implicit and explicit approaches:" msgstr "" -#: ../../library/sqlite3.rst:1657 +#: ../../library/sqlite3.rst:1658 msgid "Adapter and converter recipes" msgstr "" -#: ../../library/sqlite3.rst:1659 +#: ../../library/sqlite3.rst:1660 msgid "This section shows recipes for common adapters and converters." msgstr "" -#: ../../library/sqlite3.rst:1702 +#: ../../library/sqlite3.rst:1703 msgid "How to use connection shortcut methods" msgstr "" -#: ../../library/sqlite3.rst:1704 +#: ../../library/sqlite3.rst:1705 msgid "" "Using the :meth:`~Connection.execute`, :meth:`~Connection.executemany`, and :" "meth:`~Connection.executescript` methods of the :class:`Connection` class, " @@ -1513,11 +1513,11 @@ msgid "" "object." msgstr "" -#: ../../library/sqlite3.rst:1745 +#: ../../library/sqlite3.rst:1746 msgid "How to use the connection context manager" msgstr "" -#: ../../library/sqlite3.rst:1747 +#: ../../library/sqlite3.rst:1748 msgid "" "A :class:`Connection` object can be used as a context manager that " "automatically commits or rolls back open transactions when leaving the body " @@ -1527,61 +1527,61 @@ msgid "" "exception, the transaction is rolled back." msgstr "" -#: ../../library/sqlite3.rst:1756 +#: ../../library/sqlite3.rst:1757 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:1761 +#: ../../library/sqlite3.rst:1762 msgid "" "The context manager neither implicitly opens a new transaction nor closes " "the connection." msgstr "" -#: ../../library/sqlite3.rst:1794 +#: ../../library/sqlite3.rst:1795 msgid "How to work with SQLite URIs" msgstr "" -#: ../../library/sqlite3.rst:1796 +#: ../../library/sqlite3.rst:1797 msgid "Some useful URI tricks include:" msgstr "" -#: ../../library/sqlite3.rst:1798 +#: ../../library/sqlite3.rst:1799 msgid "Open a database in read-only mode:" msgstr "" -#: ../../library/sqlite3.rst:1807 +#: ../../library/sqlite3.rst:1808 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:1817 +#: ../../library/sqlite3.rst:1818 msgid "Create a shared named in-memory database:" msgstr "" -#: ../../library/sqlite3.rst:1831 +#: ../../library/sqlite3.rst:1832 msgid "" "More information about this feature, including a list of parameters, can be " "found in the `SQLite URI documentation`_." msgstr "" -#: ../../library/sqlite3.rst:1840 +#: ../../library/sqlite3.rst:1841 msgid "Explanation" msgstr "解釋" -#: ../../library/sqlite3.rst:1845 +#: ../../library/sqlite3.rst:1846 msgid "Transaction control" msgstr "" -#: ../../library/sqlite3.rst:1847 +#: ../../library/sqlite3.rst:1848 msgid "" "The :mod:`!sqlite3` module does not adhere to the transaction handling " "recommended by :pep:`249`." msgstr "" -#: ../../library/sqlite3.rst:1850 +#: ../../library/sqlite3.rst:1851 msgid "" "If the connection attribute :attr:`~Connection.isolation_level` is not " "``None``, new transactions are implicitly opened before :meth:`~Cursor." @@ -1594,7 +1594,7 @@ msgid "" "attribute." msgstr "" -#: ../../library/sqlite3.rst:1862 +#: ../../library/sqlite3.rst:1863 msgid "" "If :attr:`~Connection.isolation_level` is set to ``None``, no transactions " "are implicitly opened at all. This leaves the underlying SQLite library in " @@ -1604,14 +1604,14 @@ msgid "" "in_transaction` attribute." msgstr "" -#: ../../library/sqlite3.rst:1870 +#: ../../library/sqlite3.rst:1871 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:1874 +#: ../../library/sqlite3.rst:1875 msgid "" ":mod:`!sqlite3` used to implicitly commit an open transaction before DDL " "statements. This is no longer the case." diff --git a/library/stdtypes.po b/library/stdtypes.po index 330d43b8aa..5d87f8f7fc 100644 --- a/library/stdtypes.po +++ b/library/stdtypes.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-09-03 00:15+0000\n" +"POT-Creation-Date: 2022-09-05 00:20+0000\n" "PO-Revision-Date: 2022-06-12 15:22+0800\n" "Last-Translator: Matt Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -122,21 +122,21 @@ msgstr "" #: ../../library/stdtypes.rst:85 ../../library/stdtypes.rst:143 #: ../../library/stdtypes.rst:275 ../../library/stdtypes.rst:364 -#: ../../library/stdtypes.rst:414 ../../library/stdtypes.rst:890 -#: ../../library/stdtypes.rst:1095 +#: ../../library/stdtypes.rst:414 ../../library/stdtypes.rst:883 +#: ../../library/stdtypes.rst:1088 msgid "Operation" msgstr "" #: ../../library/stdtypes.rst:85 ../../library/stdtypes.rst:275 #: ../../library/stdtypes.rst:364 ../../library/stdtypes.rst:414 -#: ../../library/stdtypes.rst:890 ../../library/stdtypes.rst:1095 +#: ../../library/stdtypes.rst:883 ../../library/stdtypes.rst:1088 msgid "Result" msgstr "結果" #: ../../library/stdtypes.rst:85 ../../library/stdtypes.rst:275 -#: ../../library/stdtypes.rst:414 ../../library/stdtypes.rst:890 -#: ../../library/stdtypes.rst:1095 ../../library/stdtypes.rst:2332 -#: ../../library/stdtypes.rst:3544 +#: ../../library/stdtypes.rst:414 ../../library/stdtypes.rst:883 +#: ../../library/stdtypes.rst:1088 ../../library/stdtypes.rst:2325 +#: ../../library/stdtypes.rst:3537 msgid "Notes" msgstr "註解" @@ -149,9 +149,9 @@ msgid "if *x* is false, then *y*, else *x*" msgstr "" #: ../../library/stdtypes.rst:87 ../../library/stdtypes.rst:285 -#: ../../library/stdtypes.rst:892 ../../library/stdtypes.rst:895 -#: ../../library/stdtypes.rst:1106 ../../library/stdtypes.rst:2338 -#: ../../library/stdtypes.rst:3550 +#: ../../library/stdtypes.rst:885 ../../library/stdtypes.rst:888 +#: ../../library/stdtypes.rst:1099 ../../library/stdtypes.rst:2331 +#: ../../library/stdtypes.rst:3543 msgid "\\(1)" msgstr "\\(1)" @@ -164,9 +164,9 @@ msgid "if *x* is false, then *x*, else *y*" msgstr "" #: ../../library/stdtypes.rst:90 ../../library/stdtypes.rst:288 -#: ../../library/stdtypes.rst:308 ../../library/stdtypes.rst:1134 -#: ../../library/stdtypes.rst:2342 ../../library/stdtypes.rst:2344 -#: ../../library/stdtypes.rst:3554 ../../library/stdtypes.rst:3556 +#: ../../library/stdtypes.rst:308 ../../library/stdtypes.rst:1127 +#: ../../library/stdtypes.rst:2335 ../../library/stdtypes.rst:2337 +#: ../../library/stdtypes.rst:3547 ../../library/stdtypes.rst:3549 msgid "\\(2)" msgstr "\\(2)" @@ -178,19 +178,19 @@ msgstr "``not x``" msgid "if *x* is false, then ``True``, else ``False``" msgstr "" -#: ../../library/stdtypes.rst:93 ../../library/stdtypes.rst:904 -#: ../../library/stdtypes.rst:1137 ../../library/stdtypes.rst:2346 -#: ../../library/stdtypes.rst:2348 ../../library/stdtypes.rst:2350 -#: ../../library/stdtypes.rst:2352 ../../library/stdtypes.rst:3558 -#: ../../library/stdtypes.rst:3560 ../../library/stdtypes.rst:3562 -#: ../../library/stdtypes.rst:3564 +#: ../../library/stdtypes.rst:93 ../../library/stdtypes.rst:897 +#: ../../library/stdtypes.rst:1130 ../../library/stdtypes.rst:2339 +#: ../../library/stdtypes.rst:2341 ../../library/stdtypes.rst:2343 +#: ../../library/stdtypes.rst:2345 ../../library/stdtypes.rst:3551 +#: ../../library/stdtypes.rst:3553 ../../library/stdtypes.rst:3555 +#: ../../library/stdtypes.rst:3557 msgid "\\(3)" msgstr "\\(3)" #: ../../library/stdtypes.rst:102 ../../library/stdtypes.rst:319 -#: ../../library/stdtypes.rst:432 ../../library/stdtypes.rst:941 -#: ../../library/stdtypes.rst:1145 ../../library/stdtypes.rst:2378 -#: ../../library/stdtypes.rst:3594 +#: ../../library/stdtypes.rst:432 ../../library/stdtypes.rst:934 +#: ../../library/stdtypes.rst:1138 ../../library/stdtypes.rst:2371 +#: ../../library/stdtypes.rst:3587 msgid "Notes:" msgstr "註解:" @@ -229,9 +229,9 @@ msgstr "" msgid "This table summarizes the comparison operations:" msgstr "" -#: ../../library/stdtypes.rst:143 ../../library/stdtypes.rst:2309 -#: ../../library/stdtypes.rst:2332 ../../library/stdtypes.rst:3521 -#: ../../library/stdtypes.rst:3544 +#: ../../library/stdtypes.rst:143 ../../library/stdtypes.rst:2302 +#: ../../library/stdtypes.rst:2325 ../../library/stdtypes.rst:3514 +#: ../../library/stdtypes.rst:3537 msgid "Meaning" msgstr "" @@ -513,8 +513,8 @@ msgid "" "zero." msgstr "" -#: ../../library/stdtypes.rst:301 ../../library/stdtypes.rst:1127 -#: ../../library/stdtypes.rst:2340 ../../library/stdtypes.rst:3581 +#: ../../library/stdtypes.rst:301 ../../library/stdtypes.rst:1120 +#: ../../library/stdtypes.rst:2333 ../../library/stdtypes.rst:3574 msgid "\\(6)" msgstr "\\(6)" @@ -551,10 +551,10 @@ msgid "*x* to the power *y*" msgstr "" #: ../../library/stdtypes.rst:310 ../../library/stdtypes.rst:312 -#: ../../library/stdtypes.rst:1116 ../../library/stdtypes.rst:1119 -#: ../../library/stdtypes.rst:2365 ../../library/stdtypes.rst:2368 -#: ../../library/stdtypes.rst:2371 ../../library/stdtypes.rst:3577 -#: ../../library/stdtypes.rst:3584 +#: ../../library/stdtypes.rst:1109 ../../library/stdtypes.rst:1112 +#: ../../library/stdtypes.rst:2358 ../../library/stdtypes.rst:2361 +#: ../../library/stdtypes.rst:2364 ../../library/stdtypes.rst:3570 +#: ../../library/stdtypes.rst:3577 msgid "\\(5)" msgstr "\\(5)" @@ -689,9 +689,9 @@ msgid "bitwise :dfn:`or` of *x* and *y*" msgstr "" #: ../../library/stdtypes.rst:416 ../../library/stdtypes.rst:419 -#: ../../library/stdtypes.rst:422 ../../library/stdtypes.rst:1140 -#: ../../library/stdtypes.rst:2354 ../../library/stdtypes.rst:2358 -#: ../../library/stdtypes.rst:3566 ../../library/stdtypes.rst:3570 +#: ../../library/stdtypes.rst:422 ../../library/stdtypes.rst:1133 +#: ../../library/stdtypes.rst:2347 ../../library/stdtypes.rst:2351 +#: ../../library/stdtypes.rst:3559 ../../library/stdtypes.rst:3563 msgid "\\(4)" msgstr "\\(4)" @@ -875,18 +875,11 @@ msgstr "" #: ../../library/stdtypes.rst:589 msgid "" -"The values returned by ``as_integer_ratio()`` can be huge. Attempts to " -"render such integers into decimal strings may bump into the :ref:`integer " -"string conversion length limitation `." -msgstr "" - -#: ../../library/stdtypes.rst:596 -msgid "" "Return ``True`` if the float instance is finite with integral value, and " "``False`` otherwise::" msgstr "" -#: ../../library/stdtypes.rst:604 +#: ../../library/stdtypes.rst:597 msgid "" "Two methods support conversion to and from hexadecimal strings. Since " "Python's floats are stored internally as binary numbers, converting a float " @@ -896,30 +889,30 @@ msgid "" "numerical work." msgstr "" -#: ../../library/stdtypes.rst:615 +#: ../../library/stdtypes.rst:608 msgid "" "Return a representation of a floating-point number as a hexadecimal string. " "For finite floating-point numbers, this representation will always include a " "leading ``0x`` and a trailing ``p`` and exponent." msgstr "" -#: ../../library/stdtypes.rst:623 +#: ../../library/stdtypes.rst:616 msgid "" "Class method to return the float represented by a hexadecimal string *s*. " "The string *s* may have leading and trailing whitespace." msgstr "" -#: ../../library/stdtypes.rst:628 +#: ../../library/stdtypes.rst:621 msgid "" "Note that :meth:`float.hex` is an instance method, while :meth:`float." "fromhex` is a class method." msgstr "" -#: ../../library/stdtypes.rst:631 +#: ../../library/stdtypes.rst:624 msgid "A hexadecimal string takes the form::" msgstr "" -#: ../../library/stdtypes.rst:635 +#: ../../library/stdtypes.rst:628 msgid "" "where the optional ``sign`` may by either ``+`` or ``-``, ``integer`` and " "``fraction`` are strings of hexadecimal digits, and ``exponent`` is a " @@ -933,7 +926,7 @@ msgid "" "by :meth:`float.fromhex`." msgstr "" -#: ../../library/stdtypes.rst:648 +#: ../../library/stdtypes.rst:641 msgid "" "Note that the exponent is written in decimal rather than hexadecimal, and " "that it gives the power of 2 by which to multiply the coefficient. For " @@ -941,17 +934,17 @@ msgid "" "number ``(3 + 10./16 + 7./16**2) * 2.0**10``, or ``3740.0``::" msgstr "" -#: ../../library/stdtypes.rst:658 +#: ../../library/stdtypes.rst:651 msgid "" "Applying the reverse conversion to ``3740.0`` gives a different hexadecimal " "string representing the same number::" msgstr "" -#: ../../library/stdtypes.rst:668 +#: ../../library/stdtypes.rst:661 msgid "Hashing of numeric types" msgstr "" -#: ../../library/stdtypes.rst:670 +#: ../../library/stdtypes.rst:663 msgid "" "For numbers ``x`` and ``y``, possibly of different types, it's a requirement " "that ``hash(x) == hash(y)`` whenever ``x == y`` (see the :meth:`~object." @@ -967,24 +960,24 @@ msgid "" "of :data:`sys.hash_info`." msgstr "" -#: ../../library/stdtypes.rst:685 +#: ../../library/stdtypes.rst:678 msgid "" "Currently, the prime used is ``P = 2**31 - 1`` on machines with 32-bit C " "longs and ``P = 2**61 - 1`` on machines with 64-bit C longs." msgstr "" -#: ../../library/stdtypes.rst:688 +#: ../../library/stdtypes.rst:681 msgid "Here are the rules in detail:" msgstr "" -#: ../../library/stdtypes.rst:690 +#: ../../library/stdtypes.rst:683 msgid "" "If ``x = m / n`` is a nonnegative rational number and ``n`` is not divisible " "by ``P``, define ``hash(x)`` as ``m * invmod(n, P) % P``, where ``invmod(n, " "P)`` gives the inverse of ``n`` modulo ``P``." msgstr "" -#: ../../library/stdtypes.rst:694 +#: ../../library/stdtypes.rst:687 msgid "" "If ``x = m / n`` is a nonnegative rational number and ``n`` is divisible by " "``P`` (but ``m`` is not) then ``n`` has no inverse modulo ``P`` and the rule " @@ -992,20 +985,20 @@ msgid "" "value ``sys.hash_info.inf``." msgstr "" -#: ../../library/stdtypes.rst:699 +#: ../../library/stdtypes.rst:692 msgid "" "If ``x = m / n`` is a negative rational number define ``hash(x)`` as ``-" "hash(-x)``. If the resulting hash is ``-1``, replace it with ``-2``." msgstr "" -#: ../../library/stdtypes.rst:703 +#: ../../library/stdtypes.rst:696 msgid "" "The particular values ``sys.hash_info.inf`` and ``-sys.hash_info.inf`` are " "used as hash values for positive infinity or negative infinity " "(respectively)." msgstr "" -#: ../../library/stdtypes.rst:707 +#: ../../library/stdtypes.rst:700 msgid "" "For a :class:`complex` number ``z``, the hash values of the real and " "imaginary parts are combined by computing ``hash(z.real) + sys.hash_info." @@ -1014,18 +1007,18 @@ msgid "" "1))``. Again, if the result is ``-1``, it's replaced with ``-2``." msgstr "" -#: ../../library/stdtypes.rst:715 +#: ../../library/stdtypes.rst:708 msgid "" "To clarify the above rules, here's some example Python code, equivalent to " "the built-in hash, for computing the hash of a rational number, :class:" "`float`, or :class:`complex`::" msgstr "" -#: ../../library/stdtypes.rst:770 +#: ../../library/stdtypes.rst:763 msgid "Iterator Types" msgstr "" -#: ../../library/stdtypes.rst:778 +#: ../../library/stdtypes.rst:771 msgid "" "Python supports a concept of iteration over containers. This is implemented " "using two distinct methods; these are used to allow user-defined classes to " @@ -1033,13 +1026,13 @@ msgid "" "support the iteration methods." msgstr "" -#: ../../library/stdtypes.rst:783 +#: ../../library/stdtypes.rst:776 msgid "" "One method needs to be defined for container objects to provide :term:" "`iterable` support:" msgstr "" -#: ../../library/stdtypes.rst:790 +#: ../../library/stdtypes.rst:783 msgid "" "Return an :term:`iterator` object. The object is required to support the " "iterator protocol described below. If a container supports different types " @@ -1051,13 +1044,13 @@ msgid "" "in the Python/C API." msgstr "" -#: ../../library/stdtypes.rst:799 +#: ../../library/stdtypes.rst:792 msgid "" "The iterator objects themselves are required to support the following two " "methods, which together form the :dfn:`iterator protocol`:" msgstr "" -#: ../../library/stdtypes.rst:805 +#: ../../library/stdtypes.rst:798 msgid "" "Return the :term:`iterator` object itself. This is required to allow both " "containers and iterators to be used with the :keyword:`for` and :keyword:" @@ -1065,7 +1058,7 @@ msgid "" "tp_iter` slot of the type structure for Python objects in the Python/C API." msgstr "" -#: ../../library/stdtypes.rst:814 +#: ../../library/stdtypes.rst:807 msgid "" "Return the next item from the :term:`iterator`. If there are no further " "items, raise the :exc:`StopIteration` exception. This method corresponds to " @@ -1073,7 +1066,7 @@ msgid "" "Python objects in the Python/C API." msgstr "" -#: ../../library/stdtypes.rst:819 +#: ../../library/stdtypes.rst:812 msgid "" "Python defines several iterator objects to support iteration over general " "and specific sequence types, dictionaries, and other more specialized " @@ -1081,18 +1074,18 @@ msgid "" "the iterator protocol." msgstr "" -#: ../../library/stdtypes.rst:824 +#: ../../library/stdtypes.rst:817 msgid "" "Once an iterator's :meth:`~iterator.__next__` method raises :exc:" "`StopIteration`, it must continue to do so on subsequent calls. " "Implementations that do not obey this property are deemed broken." msgstr "" -#: ../../library/stdtypes.rst:832 +#: ../../library/stdtypes.rst:825 msgid "Generator Types" msgstr "" -#: ../../library/stdtypes.rst:834 +#: ../../library/stdtypes.rst:827 msgid "" "Python's :term:`generator`\\s provide a convenient way to implement the " "iterator protocol. If a container object's :meth:`__iter__` method is " @@ -1102,11 +1095,11 @@ msgid "" "found in :ref:`the documentation for the yield expression `." msgstr "" -#: ../../library/stdtypes.rst:846 +#: ../../library/stdtypes.rst:839 msgid "Sequence Types --- :class:`list`, :class:`tuple`, :class:`range`" msgstr "" -#: ../../library/stdtypes.rst:848 +#: ../../library/stdtypes.rst:841 msgid "" "There are three basic sequence types: lists, tuples, and range objects. " "Additional sequence types tailored for processing of :ref:`binary data " @@ -1114,11 +1107,11 @@ msgid "" "sections." msgstr "" -#: ../../library/stdtypes.rst:857 +#: ../../library/stdtypes.rst:850 msgid "Common Sequence Operations" msgstr "" -#: ../../library/stdtypes.rst:861 +#: ../../library/stdtypes.rst:854 msgid "" "The operations in the following table are supported by most sequence types, " "both mutable and immutable. The :class:`collections.abc.Sequence` ABC is " @@ -1126,7 +1119,7 @@ msgid "" "sequence types." msgstr "" -#: ../../library/stdtypes.rst:866 +#: ../../library/stdtypes.rst:859 msgid "" "This table lists the sequence operations sorted in ascending priority. In " "the table, *s* and *t* are sequences of the same type, *n*, *i*, *j* and *k* " @@ -1134,7 +1127,7 @@ msgid "" "restrictions imposed by *s*." msgstr "" -#: ../../library/stdtypes.rst:871 +#: ../../library/stdtypes.rst:864 msgid "" "The ``in`` and ``not in`` operations have the same priorities as the " "comparison operations. The ``+`` (concatenation) and ``*`` (repetition) " @@ -1142,125 +1135,125 @@ msgid "" "[3]_" msgstr "" -#: ../../library/stdtypes.rst:892 +#: ../../library/stdtypes.rst:885 msgid "``x in s``" msgstr "``x in s``" -#: ../../library/stdtypes.rst:892 +#: ../../library/stdtypes.rst:885 msgid "``True`` if an item of *s* is equal to *x*, else ``False``" msgstr "" -#: ../../library/stdtypes.rst:895 +#: ../../library/stdtypes.rst:888 msgid "``x not in s``" msgstr "``x not in s``" -#: ../../library/stdtypes.rst:895 +#: ../../library/stdtypes.rst:888 msgid "``False`` if an item of *s* is equal to *x*, else ``True``" msgstr "" -#: ../../library/stdtypes.rst:898 +#: ../../library/stdtypes.rst:891 msgid "``s + t``" msgstr "``s + t``" -#: ../../library/stdtypes.rst:898 +#: ../../library/stdtypes.rst:891 msgid "the concatenation of *s* and *t*" msgstr "" -#: ../../library/stdtypes.rst:898 +#: ../../library/stdtypes.rst:891 msgid "(6)(7)" msgstr "(6)(7)" -#: ../../library/stdtypes.rst:901 +#: ../../library/stdtypes.rst:894 msgid "``s * n`` or ``n * s``" msgstr "``s * n`` 或 ``n * s``" -#: ../../library/stdtypes.rst:901 +#: ../../library/stdtypes.rst:894 msgid "equivalent to adding *s* to itself *n* times" msgstr "" -#: ../../library/stdtypes.rst:901 +#: ../../library/stdtypes.rst:894 msgid "(2)(7)" msgstr "(2)(7)" -#: ../../library/stdtypes.rst:904 +#: ../../library/stdtypes.rst:897 msgid "``s[i]``" msgstr "``s[i]``" -#: ../../library/stdtypes.rst:904 +#: ../../library/stdtypes.rst:897 msgid "*i*\\ th item of *s*, origin 0" msgstr "" -#: ../../library/stdtypes.rst:906 +#: ../../library/stdtypes.rst:899 msgid "``s[i:j]``" msgstr "``s[i:j]``" -#: ../../library/stdtypes.rst:906 +#: ../../library/stdtypes.rst:899 msgid "slice of *s* from *i* to *j*" msgstr "" -#: ../../library/stdtypes.rst:906 +#: ../../library/stdtypes.rst:899 msgid "(3)(4)" msgstr "(3)(4)" -#: ../../library/stdtypes.rst:908 +#: ../../library/stdtypes.rst:901 msgid "``s[i:j:k]``" msgstr "``s[i:j:k]``" -#: ../../library/stdtypes.rst:908 +#: ../../library/stdtypes.rst:901 msgid "slice of *s* from *i* to *j* with step *k*" msgstr "" -#: ../../library/stdtypes.rst:908 +#: ../../library/stdtypes.rst:901 msgid "(3)(5)" msgstr "(3)(5)" -#: ../../library/stdtypes.rst:911 +#: ../../library/stdtypes.rst:904 msgid "``len(s)``" msgstr "``len(s)``" -#: ../../library/stdtypes.rst:911 +#: ../../library/stdtypes.rst:904 msgid "length of *s*" msgstr "" -#: ../../library/stdtypes.rst:913 +#: ../../library/stdtypes.rst:906 msgid "``min(s)``" msgstr "``min(s)``" -#: ../../library/stdtypes.rst:913 +#: ../../library/stdtypes.rst:906 msgid "smallest item of *s*" msgstr "" -#: ../../library/stdtypes.rst:915 +#: ../../library/stdtypes.rst:908 msgid "``max(s)``" msgstr "``max(s)``" -#: ../../library/stdtypes.rst:915 +#: ../../library/stdtypes.rst:908 msgid "largest item of *s*" msgstr "" -#: ../../library/stdtypes.rst:917 +#: ../../library/stdtypes.rst:910 msgid "``s.index(x[, i[, j]])``" msgstr "``s.index(x[, i[, j]])``" -#: ../../library/stdtypes.rst:917 +#: ../../library/stdtypes.rst:910 msgid "" "index of the first occurrence of *x* in *s* (at or after index *i* and " "before index *j*)" msgstr "" -#: ../../library/stdtypes.rst:917 ../../library/stdtypes.rst:3552 +#: ../../library/stdtypes.rst:910 ../../library/stdtypes.rst:3545 msgid "\\(8)" msgstr "\\(8)" -#: ../../library/stdtypes.rst:921 +#: ../../library/stdtypes.rst:914 msgid "``s.count(x)``" msgstr "``s.count(x)``" -#: ../../library/stdtypes.rst:921 +#: ../../library/stdtypes.rst:914 msgid "total number of occurrences of *x* in *s*" msgstr "" -#: ../../library/stdtypes.rst:925 +#: ../../library/stdtypes.rst:918 msgid "" "Sequences of the same type also support comparisons. In particular, tuples " "and lists are compared lexicographically by comparing corresponding " @@ -1269,7 +1262,7 @@ msgid "" "(For full details see :ref:`comparisons` in the language reference.)" msgstr "" -#: ../../library/stdtypes.rst:935 +#: ../../library/stdtypes.rst:928 msgid "" "Forward and reversed iterators over mutable sequences access values using an " "index. That index will continue to march forward (or backward) even if the " @@ -1278,7 +1271,7 @@ msgid "" "drops below zero)." msgstr "" -#: ../../library/stdtypes.rst:944 +#: ../../library/stdtypes.rst:937 msgid "" "While the ``in`` and ``not in`` operations are used only for simple " "containment testing in the general case, some specialised sequences (such " @@ -1286,7 +1279,7 @@ msgid "" "subsequence testing::" msgstr "" -#: ../../library/stdtypes.rst:953 +#: ../../library/stdtypes.rst:946 msgid "" "Values of *n* less than ``0`` are treated as ``0`` (which yields an empty " "sequence of the same type as *s*). Note that items in the sequence *s* are " @@ -1294,7 +1287,7 @@ msgid "" "Python programmers; consider::" msgstr "" -#: ../../library/stdtypes.rst:965 +#: ../../library/stdtypes.rst:958 msgid "" "What has happened is that ``[[]]`` is a one-element list containing an empty " "list, so all three elements of ``[[]] * 3`` are references to this single " @@ -1302,20 +1295,20 @@ msgid "" "list. You can create a list of different lists this way::" msgstr "" -#: ../../library/stdtypes.rst:977 +#: ../../library/stdtypes.rst:970 msgid "" "Further explanation is available in the FAQ entry :ref:`faq-multidimensional-" "list`." msgstr "" -#: ../../library/stdtypes.rst:981 +#: ../../library/stdtypes.rst:974 msgid "" "If *i* or *j* is negative, the index is relative to the end of sequence *s*: " "``len(s) + i`` or ``len(s) + j`` is substituted. But note that ``-0`` is " "still ``0``." msgstr "" -#: ../../library/stdtypes.rst:986 +#: ../../library/stdtypes.rst:979 msgid "" "The slice of *s* from *i* to *j* is defined as the sequence of items with " "index *k* such that ``i <= k < j``. If *i* or *j* is greater than " @@ -1324,7 +1317,7 @@ msgid "" "to *j*, the slice is empty." msgstr "" -#: ../../library/stdtypes.rst:993 +#: ../../library/stdtypes.rst:986 msgid "" "The slice of *s* from *i* to *j* with step *k* is defined as the sequence of " "items with index ``x = i + n*k`` such that ``0 <= n < (j-i)/k``. In other " @@ -1337,7 +1330,7 @@ msgid "" "``None``, it is treated like ``1``." msgstr "" -#: ../../library/stdtypes.rst:1004 +#: ../../library/stdtypes.rst:997 msgid "" "Concatenating immutable sequences always results in a new object. This " "means that building up a sequence by repeated concatenation will have a " @@ -1345,14 +1338,14 @@ msgid "" "runtime cost, you must switch to one of the alternatives below:" msgstr "" -#: ../../library/stdtypes.rst:1009 +#: ../../library/stdtypes.rst:1002 msgid "" "if concatenating :class:`str` objects, you can build a list and use :meth:" "`str.join` at the end or else write to an :class:`io.StringIO` instance and " "retrieve its value when complete" msgstr "" -#: ../../library/stdtypes.rst:1013 +#: ../../library/stdtypes.rst:1006 msgid "" "if concatenating :class:`bytes` objects, you can similarly use :meth:`bytes." "join` or :class:`io.BytesIO`, or you can do in-place concatenation with a :" @@ -1360,22 +1353,22 @@ msgid "" "an efficient overallocation mechanism" msgstr "" -#: ../../library/stdtypes.rst:1018 +#: ../../library/stdtypes.rst:1011 msgid "if concatenating :class:`tuple` objects, extend a :class:`list` instead" msgstr "" -#: ../../library/stdtypes.rst:1020 +#: ../../library/stdtypes.rst:1013 msgid "for other types, investigate the relevant class documentation" msgstr "" -#: ../../library/stdtypes.rst:1024 +#: ../../library/stdtypes.rst:1017 msgid "" "Some sequence types (such as :class:`range`) only support item sequences " "that follow specific patterns, and hence don't support sequence " "concatenation or repetition." msgstr "" -#: ../../library/stdtypes.rst:1029 +#: ../../library/stdtypes.rst:1022 msgid "" "``index`` raises :exc:`ValueError` when *x* is not found in *s*. Not all " "implementations support passing the additional arguments *i* and *j*. These " @@ -1385,42 +1378,42 @@ msgid "" "start of the sequence rather than the start of the slice." msgstr "" -#: ../../library/stdtypes.rst:1040 +#: ../../library/stdtypes.rst:1033 msgid "Immutable Sequence Types" msgstr "" -#: ../../library/stdtypes.rst:1047 +#: ../../library/stdtypes.rst:1040 msgid "" "The only operation that immutable sequence types generally implement that is " "not also implemented by mutable sequence types is support for the :func:" "`hash` built-in." msgstr "" -#: ../../library/stdtypes.rst:1051 +#: ../../library/stdtypes.rst:1044 msgid "" "This support allows immutable sequences, such as :class:`tuple` instances, " "to be used as :class:`dict` keys and stored in :class:`set` and :class:" "`frozenset` instances." msgstr "" -#: ../../library/stdtypes.rst:1055 +#: ../../library/stdtypes.rst:1048 msgid "" "Attempting to hash an immutable sequence that contains unhashable values " "will result in :exc:`TypeError`." msgstr "" -#: ../../library/stdtypes.rst:1062 +#: ../../library/stdtypes.rst:1055 msgid "Mutable Sequence Types" msgstr "" -#: ../../library/stdtypes.rst:1069 +#: ../../library/stdtypes.rst:1062 msgid "" "The operations in the following table are defined on mutable sequence types. " "The :class:`collections.abc.MutableSequence` ABC is provided to make it " "easier to correctly implement these operations on custom sequence types." msgstr "" -#: ../../library/stdtypes.rst:1073 +#: ../../library/stdtypes.rst:1066 msgid "" "In the table *s* is an instance of a mutable sequence type, *t* is any " "iterable object and *x* is an arbitrary object that meets any type and value " @@ -1428,145 +1421,145 @@ msgid "" "integers that meet the value restriction ``0 <= x <= 255``)." msgstr "" -#: ../../library/stdtypes.rst:1097 +#: ../../library/stdtypes.rst:1090 msgid "``s[i] = x``" msgstr "``s[i] = x``" -#: ../../library/stdtypes.rst:1097 +#: ../../library/stdtypes.rst:1090 msgid "item *i* of *s* is replaced by *x*" msgstr "" -#: ../../library/stdtypes.rst:1100 +#: ../../library/stdtypes.rst:1093 msgid "``s[i:j] = t``" msgstr "``s[i:j] = t``" -#: ../../library/stdtypes.rst:1100 +#: ../../library/stdtypes.rst:1093 msgid "" "slice of *s* from *i* to *j* is replaced by the contents of the iterable *t*" msgstr "" -#: ../../library/stdtypes.rst:1104 +#: ../../library/stdtypes.rst:1097 msgid "``del s[i:j]``" msgstr "``del s[i:j]``" -#: ../../library/stdtypes.rst:1104 +#: ../../library/stdtypes.rst:1097 msgid "same as ``s[i:j] = []``" msgstr "" -#: ../../library/stdtypes.rst:1106 +#: ../../library/stdtypes.rst:1099 msgid "``s[i:j:k] = t``" msgstr "``s[i:j:k] = t``" -#: ../../library/stdtypes.rst:1106 +#: ../../library/stdtypes.rst:1099 msgid "the elements of ``s[i:j:k]`` are replaced by those of *t*" msgstr "" -#: ../../library/stdtypes.rst:1109 +#: ../../library/stdtypes.rst:1102 msgid "``del s[i:j:k]``" msgstr "``del s[i:j:k]``" -#: ../../library/stdtypes.rst:1109 +#: ../../library/stdtypes.rst:1102 msgid "removes the elements of ``s[i:j:k]`` from the list" msgstr "" -#: ../../library/stdtypes.rst:1112 +#: ../../library/stdtypes.rst:1105 msgid "``s.append(x)``" msgstr "``s.append(x)``" -#: ../../library/stdtypes.rst:1112 +#: ../../library/stdtypes.rst:1105 msgid "" "appends *x* to the end of the sequence (same as ``s[len(s):len(s)] = [x]``)" msgstr "" -#: ../../library/stdtypes.rst:1116 +#: ../../library/stdtypes.rst:1109 msgid "``s.clear()``" msgstr "``s.clear()``" -#: ../../library/stdtypes.rst:1116 +#: ../../library/stdtypes.rst:1109 msgid "removes all items from *s* (same as ``del s[:]``)" msgstr "" -#: ../../library/stdtypes.rst:1119 +#: ../../library/stdtypes.rst:1112 msgid "``s.copy()``" msgstr "``s.copy()``" -#: ../../library/stdtypes.rst:1119 +#: ../../library/stdtypes.rst:1112 msgid "creates a shallow copy of *s* (same as ``s[:]``)" msgstr "" -#: ../../library/stdtypes.rst:1122 +#: ../../library/stdtypes.rst:1115 msgid "``s.extend(t)`` or ``s += t``" msgstr "``s.extend(t)`` 或 ``s += t``" -#: ../../library/stdtypes.rst:1122 +#: ../../library/stdtypes.rst:1115 msgid "" "extends *s* with the contents of *t* (for the most part the same as " "``s[len(s):len(s)] = t``)" msgstr "" -#: ../../library/stdtypes.rst:1127 +#: ../../library/stdtypes.rst:1120 msgid "``s *= n``" msgstr "``s *= n``" -#: ../../library/stdtypes.rst:1127 +#: ../../library/stdtypes.rst:1120 msgid "updates *s* with its contents repeated *n* times" msgstr "" -#: ../../library/stdtypes.rst:1130 +#: ../../library/stdtypes.rst:1123 msgid "``s.insert(i, x)``" msgstr "``s.insert(i, x)``" -#: ../../library/stdtypes.rst:1130 +#: ../../library/stdtypes.rst:1123 msgid "" "inserts *x* into *s* at the index given by *i* (same as ``s[i:i] = [x]``)" msgstr "" -#: ../../library/stdtypes.rst:1134 +#: ../../library/stdtypes.rst:1127 msgid "``s.pop()`` or ``s.pop(i)``" msgstr "``s.pop()`` 或 ``s.pop(i)``" -#: ../../library/stdtypes.rst:1134 +#: ../../library/stdtypes.rst:1127 msgid "retrieves the item at *i* and also removes it from *s*" msgstr "" -#: ../../library/stdtypes.rst:1137 +#: ../../library/stdtypes.rst:1130 msgid "``s.remove(x)``" msgstr "``s.remove(x)``" -#: ../../library/stdtypes.rst:1137 +#: ../../library/stdtypes.rst:1130 msgid "remove the first item from *s* where ``s[i]`` is equal to *x*" msgstr "" -#: ../../library/stdtypes.rst:1140 +#: ../../library/stdtypes.rst:1133 msgid "``s.reverse()``" msgstr "``s.reverse()``" -#: ../../library/stdtypes.rst:1140 +#: ../../library/stdtypes.rst:1133 msgid "reverses the items of *s* in place" msgstr "" -#: ../../library/stdtypes.rst:1148 +#: ../../library/stdtypes.rst:1141 msgid "*t* must have the same length as the slice it is replacing." msgstr "" -#: ../../library/stdtypes.rst:1151 +#: ../../library/stdtypes.rst:1144 msgid "" "The optional argument *i* defaults to ``-1``, so that by default the last " "item is removed and returned." msgstr "" -#: ../../library/stdtypes.rst:1155 +#: ../../library/stdtypes.rst:1148 msgid ":meth:`remove` raises :exc:`ValueError` when *x* is not found in *s*." msgstr "" -#: ../../library/stdtypes.rst:1158 +#: ../../library/stdtypes.rst:1151 msgid "" "The :meth:`reverse` method modifies the sequence in place for economy of " "space when reversing a large sequence. To remind users that it operates by " "side effect, it does not return the reversed sequence." msgstr "" -#: ../../library/stdtypes.rst:1163 +#: ../../library/stdtypes.rst:1156 msgid "" ":meth:`clear` and :meth:`!copy` are included for consistency with the " "interfaces of mutable containers that don't support slicing operations (such " @@ -1575,11 +1568,11 @@ msgid "" "classes provide it." msgstr "" -#: ../../library/stdtypes.rst:1169 +#: ../../library/stdtypes.rst:1162 msgid ":meth:`clear` and :meth:`!copy` methods." msgstr "" -#: ../../library/stdtypes.rst:1173 +#: ../../library/stdtypes.rst:1166 msgid "" "The value *n* is an integer, or an object implementing :meth:`~object." "__index__`. Zero and negative values of *n* clear the sequence. Items in " @@ -1587,39 +1580,39 @@ msgid "" "explained for ``s * n`` under :ref:`typesseq-common`." msgstr "" -#: ../../library/stdtypes.rst:1182 +#: ../../library/stdtypes.rst:1175 msgid "Lists" msgstr "List(串列)" -#: ../../library/stdtypes.rst:1186 +#: ../../library/stdtypes.rst:1179 msgid "" "Lists are mutable sequences, typically used to store collections of " "homogeneous items (where the precise degree of similarity will vary by " "application)." msgstr "" -#: ../../library/stdtypes.rst:1192 +#: ../../library/stdtypes.rst:1185 msgid "Lists may be constructed in several ways:" msgstr "" -#: ../../library/stdtypes.rst:1194 +#: ../../library/stdtypes.rst:1187 msgid "Using a pair of square brackets to denote the empty list: ``[]``" msgstr "" -#: ../../library/stdtypes.rst:1195 +#: ../../library/stdtypes.rst:1188 msgid "" "Using square brackets, separating items with commas: ``[a]``, ``[a, b, c]``" msgstr "" -#: ../../library/stdtypes.rst:1196 +#: ../../library/stdtypes.rst:1189 msgid "Using a list comprehension: ``[x for x in iterable]``" msgstr "" -#: ../../library/stdtypes.rst:1197 +#: ../../library/stdtypes.rst:1190 msgid "Using the type constructor: ``list()`` or ``list(iterable)``" msgstr "" -#: ../../library/stdtypes.rst:1199 +#: ../../library/stdtypes.rst:1192 msgid "" "The constructor builds a list whose items are the same and in the same order " "as *iterable*'s items. *iterable* may be either a sequence, a container " @@ -1630,20 +1623,20 @@ msgid "" "new empty list, ``[]``." msgstr "" -#: ../../library/stdtypes.rst:1208 +#: ../../library/stdtypes.rst:1201 msgid "" "Many other operations also produce lists, including the :func:`sorted` built-" "in." msgstr "" -#: ../../library/stdtypes.rst:1211 +#: ../../library/stdtypes.rst:1204 msgid "" "Lists implement all of the :ref:`common ` and :ref:`mutable " "` sequence operations. Lists also provide the following " "additional method:" msgstr "" -#: ../../library/stdtypes.rst:1217 +#: ../../library/stdtypes.rst:1210 msgid "" "This method sorts the list in place, using only ``<`` comparisons between " "items. Exceptions are not suppressed - if any comparison operations fail, " @@ -1651,13 +1644,13 @@ msgid "" "partially modified state)." msgstr "" -#: ../../library/stdtypes.rst:1222 +#: ../../library/stdtypes.rst:1215 msgid "" ":meth:`sort` accepts two arguments that can only be passed by keyword (:ref:" "`keyword-only arguments `):" msgstr "" -#: ../../library/stdtypes.rst:1225 +#: ../../library/stdtypes.rst:1218 msgid "" "*key* specifies a function of one argument that is used to extract a " "comparison key from each list element (for example, ``key=str.lower``). The " @@ -1666,19 +1659,19 @@ msgid "" "list items are sorted directly without calculating a separate key value." msgstr "" -#: ../../library/stdtypes.rst:1232 +#: ../../library/stdtypes.rst:1225 msgid "" "The :func:`functools.cmp_to_key` utility is available to convert a 2.x style " "*cmp* function to a *key* function." msgstr "" -#: ../../library/stdtypes.rst:1235 +#: ../../library/stdtypes.rst:1228 msgid "" "*reverse* is a boolean value. If set to ``True``, then the list elements " "are sorted as if each comparison were reversed." msgstr "" -#: ../../library/stdtypes.rst:1238 +#: ../../library/stdtypes.rst:1231 msgid "" "This method modifies the sequence in place for economy of space when sorting " "a large sequence. To remind users that it operates by side effect, it does " @@ -1686,7 +1679,7 @@ msgid "" "new sorted list instance)." msgstr "" -#: ../../library/stdtypes.rst:1243 +#: ../../library/stdtypes.rst:1236 msgid "" "The :meth:`sort` method is guaranteed to be stable. A sort is stable if it " "guarantees not to change the relative order of elements that compare equal " @@ -1694,12 +1687,12 @@ msgid "" "department, then by salary grade)." msgstr "" -#: ../../library/stdtypes.rst:1248 +#: ../../library/stdtypes.rst:1241 msgid "" "For sorting examples and a brief sorting tutorial, see :ref:`sortinghowto`." msgstr "" -#: ../../library/stdtypes.rst:1252 +#: ../../library/stdtypes.rst:1245 msgid "" "While a list is being sorted, the effect of attempting to mutate, or even " "inspect, the list is undefined. The C implementation of Python makes the " @@ -1707,11 +1700,11 @@ msgid "" "detect that the list has been mutated during a sort." msgstr "" -#: ../../library/stdtypes.rst:1261 +#: ../../library/stdtypes.rst:1254 msgid "Tuples" msgstr "" -#: ../../library/stdtypes.rst:1265 +#: ../../library/stdtypes.rst:1258 msgid "" "Tuples are immutable sequences, typically used to store collections of " "heterogeneous data (such as the 2-tuples produced by the :func:`enumerate` " @@ -1720,27 +1713,27 @@ msgid "" "class:`dict` instance)." msgstr "" -#: ../../library/stdtypes.rst:1273 +#: ../../library/stdtypes.rst:1266 msgid "Tuples may be constructed in a number of ways:" msgstr "" -#: ../../library/stdtypes.rst:1275 +#: ../../library/stdtypes.rst:1268 msgid "Using a pair of parentheses to denote the empty tuple: ``()``" msgstr "" -#: ../../library/stdtypes.rst:1276 +#: ../../library/stdtypes.rst:1269 msgid "Using a trailing comma for a singleton tuple: ``a,`` or ``(a,)``" msgstr "" -#: ../../library/stdtypes.rst:1277 +#: ../../library/stdtypes.rst:1270 msgid "Separating items with commas: ``a, b, c`` or ``(a, b, c)``" msgstr "" -#: ../../library/stdtypes.rst:1278 +#: ../../library/stdtypes.rst:1271 msgid "Using the :func:`tuple` built-in: ``tuple()`` or ``tuple(iterable)``" msgstr "" -#: ../../library/stdtypes.rst:1280 +#: ../../library/stdtypes.rst:1273 msgid "" "The constructor builds a tuple whose items are the same and in the same " "order as *iterable*'s items. *iterable* may be either a sequence, a " @@ -1751,7 +1744,7 @@ msgid "" "``()``." msgstr "" -#: ../../library/stdtypes.rst:1288 +#: ../../library/stdtypes.rst:1281 msgid "" "Note that it is actually the comma which makes a tuple, not the parentheses. " "The parentheses are optional, except in the empty tuple case, or when they " @@ -1760,30 +1753,30 @@ msgid "" "call with a 3-tuple as the sole argument." msgstr "" -#: ../../library/stdtypes.rst:1294 +#: ../../library/stdtypes.rst:1287 msgid "" "Tuples implement all of the :ref:`common ` sequence " "operations." msgstr "" -#: ../../library/stdtypes.rst:1297 +#: ../../library/stdtypes.rst:1290 msgid "" "For heterogeneous collections of data where access by name is clearer than " "access by index, :func:`collections.namedtuple` may be a more appropriate " "choice than a simple tuple object." msgstr "" -#: ../../library/stdtypes.rst:1305 +#: ../../library/stdtypes.rst:1298 msgid "Ranges" msgstr "" -#: ../../library/stdtypes.rst:1309 +#: ../../library/stdtypes.rst:1302 msgid "" "The :class:`range` type represents an immutable sequence of numbers and is " "commonly used for looping a specific number of times in :keyword:`for` loops." msgstr "" -#: ../../library/stdtypes.rst:1316 +#: ../../library/stdtypes.rst:1309 msgid "" "The arguments to the range constructor must be integers (either built-in :" "class:`int` or any object that implements the :meth:`~object.__index__` " @@ -1792,38 +1785,38 @@ msgid "" "zero, :exc:`ValueError` is raised." msgstr "" -#: ../../library/stdtypes.rst:1322 +#: ../../library/stdtypes.rst:1315 msgid "" "For a positive *step*, the contents of a range ``r`` are determined by the " "formula ``r[i] = start + step*i`` where ``i >= 0`` and ``r[i] < stop``." msgstr "" -#: ../../library/stdtypes.rst:1326 +#: ../../library/stdtypes.rst:1319 msgid "" "For a negative *step*, the contents of the range are still determined by the " "formula ``r[i] = start + step*i``, but the constraints are ``i >= 0`` and " "``r[i] > stop``." msgstr "" -#: ../../library/stdtypes.rst:1330 +#: ../../library/stdtypes.rst:1323 msgid "" "A range object will be empty if ``r[0]`` does not meet the value constraint. " "Ranges do support negative indices, but these are interpreted as indexing " "from the end of the sequence determined by the positive indices." msgstr "" -#: ../../library/stdtypes.rst:1335 +#: ../../library/stdtypes.rst:1328 msgid "" "Ranges containing absolute values larger than :data:`sys.maxsize` are " "permitted but some features (such as :func:`len`) may raise :exc:" "`OverflowError`." msgstr "" -#: ../../library/stdtypes.rst:1339 +#: ../../library/stdtypes.rst:1332 msgid "Range examples::" msgstr "" -#: ../../library/stdtypes.rst:1356 +#: ../../library/stdtypes.rst:1349 msgid "" "Ranges implement all of the :ref:`common ` sequence " "operations except concatenation and repetition (due to the fact that range " @@ -1831,23 +1824,23 @@ msgid "" "repetition and concatenation will usually violate that pattern)." msgstr "" -#: ../../library/stdtypes.rst:1363 +#: ../../library/stdtypes.rst:1356 msgid "" "The value of the *start* parameter (or ``0`` if the parameter was not " "supplied)" msgstr "" -#: ../../library/stdtypes.rst:1368 +#: ../../library/stdtypes.rst:1361 msgid "The value of the *stop* parameter" msgstr "" -#: ../../library/stdtypes.rst:1372 +#: ../../library/stdtypes.rst:1365 msgid "" "The value of the *step* parameter (or ``1`` if the parameter was not " "supplied)" msgstr "" -#: ../../library/stdtypes.rst:1375 +#: ../../library/stdtypes.rst:1368 msgid "" "The advantage of the :class:`range` type over a regular :class:`list` or :" "class:`tuple` is that a :class:`range` object will always take the same " @@ -1856,14 +1849,14 @@ msgid "" "individual items and subranges as needed)." msgstr "" -#: ../../library/stdtypes.rst:1381 +#: ../../library/stdtypes.rst:1374 msgid "" "Range objects implement the :class:`collections.abc.Sequence` ABC, and " "provide features such as containment tests, element index lookup, slicing " "and support for negative indices (see :ref:`typesseq`):" msgstr "" -#: ../../library/stdtypes.rst:1401 +#: ../../library/stdtypes.rst:1394 msgid "" "Testing range objects for equality with ``==`` and ``!=`` compares them as " "sequences. That is, two range objects are considered equal if they " @@ -1873,111 +1866,111 @@ msgid "" "3)`` or ``range(0, 3, 2) == range(0, 4, 2)``.)" msgstr "" -#: ../../library/stdtypes.rst:1408 +#: ../../library/stdtypes.rst:1401 msgid "" "Implement the Sequence ABC. Support slicing and negative indices. Test :" "class:`int` objects for membership in constant time instead of iterating " "through all items." msgstr "" -#: ../../library/stdtypes.rst:1414 +#: ../../library/stdtypes.rst:1407 msgid "" "Define '==' and '!=' to compare range objects based on the sequence of " "values they define (instead of comparing based on object identity)." msgstr "" -#: ../../library/stdtypes.rst:1419 +#: ../../library/stdtypes.rst:1412 msgid "" "The :attr:`~range.start`, :attr:`~range.stop` and :attr:`~range.step` " "attributes." msgstr "" -#: ../../library/stdtypes.rst:1425 +#: ../../library/stdtypes.rst:1418 msgid "" "The `linspace recipe `_ shows " "how to implement a lazy version of range suitable for floating point " "applications." msgstr "" -#: ../../library/stdtypes.rst:1437 +#: ../../library/stdtypes.rst:1430 msgid "Text Sequence Type --- :class:`str`" msgstr "" -#: ../../library/stdtypes.rst:1439 +#: ../../library/stdtypes.rst:1432 msgid "" "Textual data in Python is handled with :class:`str` objects, or :dfn:" "`strings`. Strings are immutable :ref:`sequences ` of Unicode code " "points. String literals are written in a variety of ways:" msgstr "" -#: ../../library/stdtypes.rst:1444 +#: ../../library/stdtypes.rst:1437 msgid "Single quotes: ``'allows embedded \"double\" quotes'``" msgstr "" -#: ../../library/stdtypes.rst:1445 +#: ../../library/stdtypes.rst:1438 msgid "Double quotes: ``\"allows embedded 'single' quotes\"``" msgstr "" -#: ../../library/stdtypes.rst:1446 +#: ../../library/stdtypes.rst:1439 msgid "" "Triple quoted: ``'''Three single quotes'''``, ``\"\"\"Three double quotes" "\"\"\"``" msgstr "" -#: ../../library/stdtypes.rst:1448 +#: ../../library/stdtypes.rst:1441 msgid "" "Triple quoted strings may span multiple lines - all associated whitespace " "will be included in the string literal." msgstr "" -#: ../../library/stdtypes.rst:1451 +#: ../../library/stdtypes.rst:1444 msgid "" "String literals that are part of a single expression and have only " "whitespace between them will be implicitly converted to a single string " "literal. That is, ``(\"spam \" \"eggs\") == \"spam eggs\"``." msgstr "" -#: ../../library/stdtypes.rst:1455 +#: ../../library/stdtypes.rst:1448 msgid "" "See :ref:`strings` for more about the various forms of string literal, " "including supported escape sequences, and the ``r`` (\"raw\") prefix that " "disables most escape sequence processing." msgstr "" -#: ../../library/stdtypes.rst:1459 +#: ../../library/stdtypes.rst:1452 msgid "" "Strings may also be created from other objects using the :class:`str` " "constructor." msgstr "" -#: ../../library/stdtypes.rst:1462 +#: ../../library/stdtypes.rst:1455 msgid "" "Since there is no separate \"character\" type, indexing a string produces " "strings of length 1. That is, for a non-empty string *s*, ``s[0] == s[0:1]``." msgstr "" -#: ../../library/stdtypes.rst:1468 +#: ../../library/stdtypes.rst:1461 msgid "" "There is also no mutable string type, but :meth:`str.join` or :class:`io." "StringIO` can be used to efficiently construct strings from multiple " "fragments." msgstr "" -#: ../../library/stdtypes.rst:1472 +#: ../../library/stdtypes.rst:1465 msgid "" "For backwards compatibility with the Python 2 series, the ``u`` prefix is " "once again permitted on string literals. It has no effect on the meaning of " "string literals and cannot be combined with the ``r`` prefix." msgstr "" -#: ../../library/stdtypes.rst:1484 +#: ../../library/stdtypes.rst:1477 msgid "" "Return a :ref:`string ` version of *object*. If *object* is not " "provided, returns the empty string. Otherwise, the behavior of ``str()`` " "depends on whether *encoding* or *errors* is given, as follows." msgstr "" -#: ../../library/stdtypes.rst:1488 +#: ../../library/stdtypes.rst:1481 msgid "" "If neither *encoding* nor *errors* is given, ``str(object)`` returns :meth:" "`type(object).__str__(object) `, which is the \"informal\" " @@ -1987,7 +1980,7 @@ msgid "" "`repr(object) `." msgstr "" -#: ../../library/stdtypes.rst:1500 +#: ../../library/stdtypes.rst:1493 msgid "" "If at least one of *encoding* or *errors* is given, *object* should be a :" "term:`bytes-like object` (e.g. :class:`bytes` or :class:`bytearray`). In " @@ -1999,7 +1992,7 @@ msgid "" "buffer objects." msgstr "" -#: ../../library/stdtypes.rst:1509 +#: ../../library/stdtypes.rst:1502 msgid "" "Passing a :class:`bytes` object to :func:`str` without the *encoding* or " "*errors* arguments falls under the first case of returning the informal " @@ -2007,7 +2000,7 @@ msgid "" "Python). For example::" msgstr "" -#: ../../library/stdtypes.rst:1517 +#: ../../library/stdtypes.rst:1510 msgid "" "For more information on the ``str`` class and its methods, see :ref:" "`textseq` and the :ref:`string-methods` section below. To output formatted " @@ -2015,17 +2008,17 @@ msgid "" "addition, see the :ref:`stringservices` section." msgstr "" -#: ../../library/stdtypes.rst:1529 +#: ../../library/stdtypes.rst:1522 msgid "String Methods" msgstr "" -#: ../../library/stdtypes.rst:1534 +#: ../../library/stdtypes.rst:1527 msgid "" "Strings implement all of the :ref:`common ` sequence " "operations, along with the additional methods described below." msgstr "" -#: ../../library/stdtypes.rst:1537 +#: ../../library/stdtypes.rst:1530 msgid "" "Strings also support two styles of string formatting, one providing a large " "degree of flexibility and customization (see :meth:`str.format`, :ref:" @@ -2035,33 +2028,33 @@ msgid "" "handle (:ref:`old-string-formatting`)." msgstr "" -#: ../../library/stdtypes.rst:1544 +#: ../../library/stdtypes.rst:1537 msgid "" "The :ref:`textservices` section of the standard library covers a number of " "other modules that provide various text related utilities (including regular " "expression support in the :mod:`re` module)." msgstr "" -#: ../../library/stdtypes.rst:1550 +#: ../../library/stdtypes.rst:1543 msgid "" "Return a copy of the string with its first character capitalized and the " "rest lowercased." msgstr "" -#: ../../library/stdtypes.rst:1553 +#: ../../library/stdtypes.rst:1546 msgid "" "The first character is now put into titlecase rather than uppercase. This " "means that characters like digraphs will only have their first letter " "capitalized, instead of the full character." msgstr "" -#: ../../library/stdtypes.rst:1560 +#: ../../library/stdtypes.rst:1553 msgid "" "Return a casefolded copy of the string. Casefolded strings may be used for " "caseless matching." msgstr "" -#: ../../library/stdtypes.rst:1563 +#: ../../library/stdtypes.rst:1556 msgid "" "Casefolding is similar to lowercasing but more aggressive because it is " "intended to remove all case distinctions in a string. For example, the " @@ -2070,27 +2063,27 @@ msgid "" "`casefold` converts it to ``\"ss\"``." msgstr "" -#: ../../library/stdtypes.rst:1569 +#: ../../library/stdtypes.rst:1562 msgid "" "The casefolding algorithm is described in section 3.13 of the Unicode " "Standard." msgstr "" -#: ../../library/stdtypes.rst:1577 +#: ../../library/stdtypes.rst:1570 msgid "" "Return centered in a string of length *width*. Padding is done using the " "specified *fillchar* (default is an ASCII space). The original string is " "returned if *width* is less than or equal to ``len(s)``." msgstr "" -#: ../../library/stdtypes.rst:1585 +#: ../../library/stdtypes.rst:1578 msgid "" "Return the number of non-overlapping occurrences of substring *sub* in the " "range [*start*, *end*]. Optional arguments *start* and *end* are " "interpreted as in slice notation." msgstr "" -#: ../../library/stdtypes.rst:1592 +#: ../../library/stdtypes.rst:1585 msgid "" "Return an encoded version of the string as a bytes object. Default encoding " "is ``'utf-8'``. *errors* may be given to set a different error handling " @@ -2102,24 +2095,24 @@ msgid "" "encodings`." msgstr "" -#: ../../library/stdtypes.rst:1601 +#: ../../library/stdtypes.rst:1594 msgid "" "By default, the *errors* argument is not checked for best performances, but " "only used at the first encoding error. Enable the :ref:`Python Development " "Mode `, or use a :ref:`debug build ` to check *errors*." msgstr "" -#: ../../library/stdtypes.rst:1606 +#: ../../library/stdtypes.rst:1599 msgid "Support for keyword arguments added." msgstr "" -#: ../../library/stdtypes.rst:1609 ../../library/stdtypes.rst:2740 +#: ../../library/stdtypes.rst:1602 ../../library/stdtypes.rst:2733 msgid "" "The *errors* is now checked in development mode and in :ref:`debug mode " "`." msgstr "" -#: ../../library/stdtypes.rst:1616 +#: ../../library/stdtypes.rst:1609 msgid "" "Return ``True`` if the string ends with the specified *suffix*, otherwise " "return ``False``. *suffix* can also be a tuple of suffixes to look for. " @@ -2127,7 +2120,7 @@ msgid "" "*end*, stop comparing at that position." msgstr "" -#: ../../library/stdtypes.rst:1624 +#: ../../library/stdtypes.rst:1617 msgid "" "Return a copy of the string where all tab characters are replaced by one or " "more spaces, depending on the current column and the given tab size. Tab " @@ -2143,21 +2136,21 @@ msgid "" "printed." msgstr "" -#: ../../library/stdtypes.rst:1645 +#: ../../library/stdtypes.rst:1638 msgid "" "Return the lowest index in the string where substring *sub* is found within " "the slice ``s[start:end]``. Optional arguments *start* and *end* are " "interpreted as in slice notation. Return ``-1`` if *sub* is not found." msgstr "" -#: ../../library/stdtypes.rst:1651 +#: ../../library/stdtypes.rst:1644 msgid "" "The :meth:`~str.find` method should be used only if you need to know the " "position of *sub*. To check if *sub* is a substring or not, use the :" "keyword:`in` operator::" msgstr "" -#: ../../library/stdtypes.rst:1661 +#: ../../library/stdtypes.rst:1654 msgid "" "Perform a string formatting operation. The string on which this method is " "called can contain literal text or replacement fields delimited by braces " @@ -2167,13 +2160,13 @@ msgid "" "the corresponding argument." msgstr "" -#: ../../library/stdtypes.rst:1671 +#: ../../library/stdtypes.rst:1664 msgid "" "See :ref:`formatstrings` for a description of the various formatting options " "that can be specified in format strings." msgstr "" -#: ../../library/stdtypes.rst:1675 +#: ../../library/stdtypes.rst:1668 msgid "" "When formatting a number (:class:`int`, :class:`float`, :class:`complex`, :" "class:`decimal.Decimal` and subclasses) with the ``n`` type (ex: ``'{:n}'." @@ -2184,26 +2177,26 @@ msgid "" "This temporary change affects other threads." msgstr "" -#: ../../library/stdtypes.rst:1684 +#: ../../library/stdtypes.rst:1677 msgid "" "When formatting a number with the ``n`` type, the function sets temporarily " "the ``LC_CTYPE`` locale to the ``LC_NUMERIC`` locale in some cases." msgstr "" -#: ../../library/stdtypes.rst:1692 +#: ../../library/stdtypes.rst:1685 msgid "" "Similar to ``str.format(**mapping)``, except that ``mapping`` is used " "directly and not copied to a :class:`dict`. This is useful if for example " "``mapping`` is a dict subclass:" msgstr "" -#: ../../library/stdtypes.rst:1708 +#: ../../library/stdtypes.rst:1701 msgid "" "Like :meth:`~str.find`, but raise :exc:`ValueError` when the substring is " "not found." msgstr "" -#: ../../library/stdtypes.rst:1714 +#: ../../library/stdtypes.rst:1707 msgid "" "Return ``True`` if all characters in the string are alphanumeric and there " "is at least one character, ``False`` otherwise. A character ``c`` is " @@ -2211,7 +2204,7 @@ msgid "" "isdecimal()``, ``c.isdigit()``, or ``c.isnumeric()``." msgstr "" -#: ../../library/stdtypes.rst:1722 +#: ../../library/stdtypes.rst:1715 msgid "" "Return ``True`` if all characters in the string are alphabetic and there is " "at least one character, ``False`` otherwise. Alphabetic characters are " @@ -2221,14 +2214,14 @@ msgid "" "property defined in the Unicode Standard." msgstr "" -#: ../../library/stdtypes.rst:1731 +#: ../../library/stdtypes.rst:1724 msgid "" "Return ``True`` if the string is empty or all characters in the string are " "ASCII, ``False`` otherwise. ASCII characters have code points in the range U" "+0000-U+007F." msgstr "" -#: ../../library/stdtypes.rst:1740 +#: ../../library/stdtypes.rst:1733 msgid "" "Return ``True`` if all characters in the string are decimal characters and " "there is at least one character, ``False`` otherwise. Decimal characters are " @@ -2237,7 +2230,7 @@ msgid "" "General Category \"Nd\"." msgstr "" -#: ../../library/stdtypes.rst:1750 +#: ../../library/stdtypes.rst:1743 msgid "" "Return ``True`` if all characters in the string are digits and there is at " "least one character, ``False`` otherwise. Digits include decimal characters " @@ -2247,32 +2240,32 @@ msgid "" "property value Numeric_Type=Digit or Numeric_Type=Decimal." msgstr "" -#: ../../library/stdtypes.rst:1760 +#: ../../library/stdtypes.rst:1753 msgid "" "Return ``True`` if the string is a valid identifier according to the " "language definition, section :ref:`identifiers`." msgstr "" -#: ../../library/stdtypes.rst:1763 +#: ../../library/stdtypes.rst:1756 msgid "" "Call :func:`keyword.iskeyword` to test whether string ``s`` is a reserved " "identifier, such as :keyword:`def` and :keyword:`class`." msgstr "" -#: ../../library/stdtypes.rst:1766 +#: ../../library/stdtypes.rst:1759 msgid "Example: ::" msgstr "" "範例:\n" "\n" "::" -#: ../../library/stdtypes.rst:1779 +#: ../../library/stdtypes.rst:1772 msgid "" "Return ``True`` if all cased characters [4]_ in the string are lowercase and " "there is at least one cased character, ``False`` otherwise." msgstr "" -#: ../../library/stdtypes.rst:1785 +#: ../../library/stdtypes.rst:1778 msgid "" "Return ``True`` if all characters in the string are numeric characters, and " "there is at least one character, ``False`` otherwise. Numeric characters " @@ -2282,7 +2275,7 @@ msgid "" "Numeric_Type=Decimal or Numeric_Type=Numeric." msgstr "" -#: ../../library/stdtypes.rst:1795 +#: ../../library/stdtypes.rst:1788 msgid "" "Return ``True`` if all characters in the string are printable or the string " "is empty, ``False`` otherwise. Nonprintable characters are those characters " @@ -2293,20 +2286,20 @@ msgid "" "of strings written to :data:`sys.stdout` or :data:`sys.stderr`.)" msgstr "" -#: ../../library/stdtypes.rst:1806 +#: ../../library/stdtypes.rst:1799 msgid "" "Return ``True`` if there are only whitespace characters in the string and " "there is at least one character, ``False`` otherwise." msgstr "" -#: ../../library/stdtypes.rst:1809 +#: ../../library/stdtypes.rst:1802 msgid "" "A character is *whitespace* if in the Unicode character database (see :mod:" "`unicodedata`), either its general category is ``Zs`` (\"Separator, space" "\"), or its bidirectional class is one of ``WS``, ``B``, or ``S``." msgstr "" -#: ../../library/stdtypes.rst:1817 +#: ../../library/stdtypes.rst:1810 msgid "" "Return ``True`` if the string is a titlecased string and there is at least " "one character, for example uppercase characters may only follow uncased " @@ -2314,13 +2307,13 @@ msgid "" "otherwise." msgstr "" -#: ../../library/stdtypes.rst:1824 +#: ../../library/stdtypes.rst:1817 msgid "" "Return ``True`` if all cased characters [4]_ in the string are uppercase and " "there is at least one cased character, ``False`` otherwise." msgstr "" -#: ../../library/stdtypes.rst:1840 +#: ../../library/stdtypes.rst:1833 msgid "" "Return a string which is the concatenation of the strings in *iterable*. A :" "exc:`TypeError` will be raised if there are any non-string values in " @@ -2328,26 +2321,26 @@ msgid "" "elements is the string providing this method." msgstr "" -#: ../../library/stdtypes.rst:1848 +#: ../../library/stdtypes.rst:1841 msgid "" "Return the string left justified in a string of length *width*. Padding is " "done using the specified *fillchar* (default is an ASCII space). The " "original string is returned if *width* is less than or equal to ``len(s)``." msgstr "" -#: ../../library/stdtypes.rst:1855 +#: ../../library/stdtypes.rst:1848 msgid "" "Return a copy of the string with all the cased characters [4]_ converted to " "lowercase." msgstr "" -#: ../../library/stdtypes.rst:1858 +#: ../../library/stdtypes.rst:1851 msgid "" "The lowercasing algorithm used is described in section 3.13 of the Unicode " "Standard." msgstr "" -#: ../../library/stdtypes.rst:1864 +#: ../../library/stdtypes.rst:1857 msgid "" "Return a copy of the string with leading characters removed. The *chars* " "argument is a string specifying the set of characters to be removed. If " @@ -2356,19 +2349,19 @@ msgid "" "are stripped::" msgstr "" -#: ../../library/stdtypes.rst:1874 +#: ../../library/stdtypes.rst:1867 msgid "" "See :meth:`str.removeprefix` for a method that will remove a single prefix " "string rather than all of a set of characters. For example::" msgstr "" -#: ../../library/stdtypes.rst:1885 +#: ../../library/stdtypes.rst:1878 msgid "" "This static method returns a translation table usable for :meth:`str." "translate`." msgstr "" -#: ../../library/stdtypes.rst:1887 +#: ../../library/stdtypes.rst:1880 msgid "" "If there is only one argument, it must be a dictionary mapping Unicode " "ordinals (integers) or characters (strings of length 1) to Unicode ordinals, " @@ -2376,7 +2369,7 @@ msgid "" "converted to ordinals." msgstr "" -#: ../../library/stdtypes.rst:1892 +#: ../../library/stdtypes.rst:1885 msgid "" "If there are two arguments, they must be strings of equal length, and in the " "resulting dictionary, each character in x will be mapped to the character at " @@ -2384,7 +2377,7 @@ msgid "" "whose characters will be mapped to ``None`` in the result." msgstr "" -#: ../../library/stdtypes.rst:1900 +#: ../../library/stdtypes.rst:1893 msgid "" "Split the string at the first occurrence of *sep*, and return a 3-tuple " "containing the part before the separator, the separator itself, and the part " @@ -2392,47 +2385,47 @@ msgid "" "containing the string itself, followed by two empty strings." msgstr "" -#: ../../library/stdtypes.rst:1908 +#: ../../library/stdtypes.rst:1901 msgid "" "If the string starts with the *prefix* string, return " "``string[len(prefix):]``. Otherwise, return a copy of the original string::" msgstr "" -#: ../../library/stdtypes.rst:1922 +#: ../../library/stdtypes.rst:1915 msgid "" "If the string ends with the *suffix* string and that *suffix* is not empty, " "return ``string[:-len(suffix)]``. Otherwise, return a copy of the original " "string::" msgstr "" -#: ../../library/stdtypes.rst:1936 +#: ../../library/stdtypes.rst:1929 msgid "" "Return a copy of the string with all occurrences of substring *old* replaced " "by *new*. If the optional argument *count* is given, only the first *count* " "occurrences are replaced." msgstr "" -#: ../../library/stdtypes.rst:1943 +#: ../../library/stdtypes.rst:1936 msgid "" "Return the highest index in the string where substring *sub* is found, such " "that *sub* is contained within ``s[start:end]``. Optional arguments *start* " "and *end* are interpreted as in slice notation. Return ``-1`` on failure." msgstr "" -#: ../../library/stdtypes.rst:1950 +#: ../../library/stdtypes.rst:1943 msgid "" "Like :meth:`rfind` but raises :exc:`ValueError` when the substring *sub* is " "not found." msgstr "" -#: ../../library/stdtypes.rst:1956 +#: ../../library/stdtypes.rst:1949 msgid "" "Return the string right justified in a string of length *width*. Padding is " "done using the specified *fillchar* (default is an ASCII space). The " "original string is returned if *width* is less than or equal to ``len(s)``." msgstr "" -#: ../../library/stdtypes.rst:1963 +#: ../../library/stdtypes.rst:1956 msgid "" "Split the string at the last occurrence of *sep*, and return a 3-tuple " "containing the part before the separator, the separator itself, and the part " @@ -2440,7 +2433,7 @@ msgid "" "containing two empty strings, followed by the string itself." msgstr "" -#: ../../library/stdtypes.rst:1971 +#: ../../library/stdtypes.rst:1964 msgid "" "Return a list of the words in the string, using *sep* as the delimiter " "string. If *maxsplit* is given, at most *maxsplit* splits are done, the " @@ -2449,7 +2442,7 @@ msgid "" "behaves like :meth:`split` which is described in detail below." msgstr "" -#: ../../library/stdtypes.rst:1980 +#: ../../library/stdtypes.rst:1973 msgid "" "Return a copy of the string with trailing characters removed. The *chars* " "argument is a string specifying the set of characters to be removed. If " @@ -2458,13 +2451,13 @@ msgid "" "are stripped::" msgstr "" -#: ../../library/stdtypes.rst:1990 +#: ../../library/stdtypes.rst:1983 msgid "" "See :meth:`str.removesuffix` for a method that will remove a single suffix " "string rather than all of a set of characters. For example::" msgstr "" -#: ../../library/stdtypes.rst:2000 +#: ../../library/stdtypes.rst:1993 msgid "" "Return a list of the words in the string, using *sep* as the delimiter " "string. If *maxsplit* is given, at most *maxsplit* splits are done (thus, " @@ -2473,7 +2466,7 @@ msgid "" "possible splits are made)." msgstr "" -#: ../../library/stdtypes.rst:2006 +#: ../../library/stdtypes.rst:1999 msgid "" "If *sep* is given, consecutive delimiters are not grouped together and are " "deemed to delimit empty strings (for example, ``'1,,2'.split(',')`` returns " @@ -2482,23 +2475,23 @@ msgid "" "Splitting an empty string with a specified separator returns ``['']``." msgstr "" -#: ../../library/stdtypes.rst:2012 ../../library/stdtypes.rst:2028 -#: ../../library/stdtypes.rst:2080 ../../library/stdtypes.rst:2148 -#: ../../library/stdtypes.rst:2215 ../../library/stdtypes.rst:3056 -#: ../../library/stdtypes.rst:3072 ../../library/stdtypes.rst:3163 -#: ../../library/stdtypes.rst:3179 ../../library/stdtypes.rst:3204 -#: ../../library/stdtypes.rst:3218 ../../library/stdtypes.rst:3246 -#: ../../library/stdtypes.rst:3260 ../../library/stdtypes.rst:3278 -#: ../../library/stdtypes.rst:3305 ../../library/stdtypes.rst:3328 -#: ../../library/stdtypes.rst:3355 ../../library/stdtypes.rst:3397 -#: ../../library/stdtypes.rst:3421 +#: ../../library/stdtypes.rst:2005 ../../library/stdtypes.rst:2021 +#: ../../library/stdtypes.rst:2073 ../../library/stdtypes.rst:2141 +#: ../../library/stdtypes.rst:2208 ../../library/stdtypes.rst:3049 +#: ../../library/stdtypes.rst:3065 ../../library/stdtypes.rst:3156 +#: ../../library/stdtypes.rst:3172 ../../library/stdtypes.rst:3197 +#: ../../library/stdtypes.rst:3211 ../../library/stdtypes.rst:3239 +#: ../../library/stdtypes.rst:3253 ../../library/stdtypes.rst:3271 +#: ../../library/stdtypes.rst:3298 ../../library/stdtypes.rst:3321 +#: ../../library/stdtypes.rst:3348 ../../library/stdtypes.rst:3390 +#: ../../library/stdtypes.rst:3414 msgid "For example::" msgstr "" "舉例來說:\n" "\n" "::" -#: ../../library/stdtypes.rst:2021 +#: ../../library/stdtypes.rst:2014 msgid "" "If *sep* is not specified or is ``None``, a different splitting algorithm is " "applied: runs of consecutive whitespace are regarded as a single separator, " @@ -2508,131 +2501,131 @@ msgid "" "returns ``[]``." msgstr "" -#: ../../library/stdtypes.rst:2043 +#: ../../library/stdtypes.rst:2036 msgid "" "Return a list of the lines in the string, breaking at line boundaries. Line " "breaks are not included in the resulting list unless *keepends* is given and " "true." msgstr "" -#: ../../library/stdtypes.rst:2047 +#: ../../library/stdtypes.rst:2040 msgid "" "This method splits on the following line boundaries. In particular, the " "boundaries are a superset of :term:`universal newlines`." msgstr "" -#: ../../library/stdtypes.rst:2051 +#: ../../library/stdtypes.rst:2044 msgid "Representation" msgstr "" -#: ../../library/stdtypes.rst:2051 +#: ../../library/stdtypes.rst:2044 msgid "Description" msgstr "描述" -#: ../../library/stdtypes.rst:2053 +#: ../../library/stdtypes.rst:2046 msgid "``\\n``" msgstr "``\\n``" -#: ../../library/stdtypes.rst:2053 +#: ../../library/stdtypes.rst:2046 msgid "Line Feed" msgstr "" -#: ../../library/stdtypes.rst:2055 +#: ../../library/stdtypes.rst:2048 msgid "``\\r``" msgstr "``\\r``" -#: ../../library/stdtypes.rst:2055 +#: ../../library/stdtypes.rst:2048 msgid "Carriage Return" msgstr "" -#: ../../library/stdtypes.rst:2057 +#: ../../library/stdtypes.rst:2050 msgid "``\\r\\n``" msgstr "``\\r\\n``" -#: ../../library/stdtypes.rst:2057 +#: ../../library/stdtypes.rst:2050 msgid "Carriage Return + Line Feed" msgstr "" -#: ../../library/stdtypes.rst:2059 +#: ../../library/stdtypes.rst:2052 msgid "``\\v`` or ``\\x0b``" msgstr "``\\v`` 或 ``\\x0b``" -#: ../../library/stdtypes.rst:2059 +#: ../../library/stdtypes.rst:2052 msgid "Line Tabulation" msgstr "" -#: ../../library/stdtypes.rst:2061 +#: ../../library/stdtypes.rst:2054 msgid "``\\f`` or ``\\x0c``" msgstr "``\\f`` 或 ``\\x0c``" -#: ../../library/stdtypes.rst:2061 +#: ../../library/stdtypes.rst:2054 msgid "Form Feed" msgstr "" -#: ../../library/stdtypes.rst:2063 +#: ../../library/stdtypes.rst:2056 msgid "``\\x1c``" msgstr "``\\x1c``" -#: ../../library/stdtypes.rst:2063 +#: ../../library/stdtypes.rst:2056 msgid "File Separator" msgstr "" -#: ../../library/stdtypes.rst:2065 +#: ../../library/stdtypes.rst:2058 msgid "``\\x1d``" msgstr "``\\x1d``" -#: ../../library/stdtypes.rst:2065 +#: ../../library/stdtypes.rst:2058 msgid "Group Separator" msgstr "" -#: ../../library/stdtypes.rst:2067 +#: ../../library/stdtypes.rst:2060 msgid "``\\x1e``" msgstr "``\\x1e``" -#: ../../library/stdtypes.rst:2067 +#: ../../library/stdtypes.rst:2060 msgid "Record Separator" msgstr "" -#: ../../library/stdtypes.rst:2069 +#: ../../library/stdtypes.rst:2062 msgid "``\\x85``" msgstr "``\\x85``" -#: ../../library/stdtypes.rst:2069 +#: ../../library/stdtypes.rst:2062 msgid "Next Line (C1 Control Code)" msgstr "" -#: ../../library/stdtypes.rst:2071 +#: ../../library/stdtypes.rst:2064 msgid "``\\u2028``" msgstr "``\\u2028``" -#: ../../library/stdtypes.rst:2071 +#: ../../library/stdtypes.rst:2064 msgid "Line Separator" msgstr "" -#: ../../library/stdtypes.rst:2073 +#: ../../library/stdtypes.rst:2066 msgid "``\\u2029``" msgstr "``\\u2029``" -#: ../../library/stdtypes.rst:2073 +#: ../../library/stdtypes.rst:2066 msgid "Paragraph Separator" msgstr "" -#: ../../library/stdtypes.rst:2078 +#: ../../library/stdtypes.rst:2071 msgid "``\\v`` and ``\\f`` added to list of line boundaries." msgstr "" -#: ../../library/stdtypes.rst:2087 +#: ../../library/stdtypes.rst:2080 msgid "" "Unlike :meth:`~str.split` when a delimiter string *sep* is given, this " "method returns an empty list for the empty string, and a terminal line break " "does not result in an extra line::" msgstr "" -#: ../../library/stdtypes.rst:2096 +#: ../../library/stdtypes.rst:2089 msgid "For comparison, ``split('\\n')`` gives::" msgstr "" -#: ../../library/stdtypes.rst:2106 +#: ../../library/stdtypes.rst:2099 msgid "" "Return ``True`` if string starts with the *prefix*, otherwise return " "``False``. *prefix* can also be a tuple of prefixes to look for. With " @@ -2640,7 +2633,7 @@ msgid "" "*end*, stop comparing string at that position." msgstr "" -#: ../../library/stdtypes.rst:2114 +#: ../../library/stdtypes.rst:2107 msgid "" "Return a copy of the string with the leading and trailing characters " "removed. The *chars* argument is a string specifying the set of characters " @@ -2649,7 +2642,7 @@ msgid "" "all combinations of its values are stripped::" msgstr "" -#: ../../library/stdtypes.rst:2125 +#: ../../library/stdtypes.rst:2118 msgid "" "The outermost leading and trailing *chars* argument values are stripped from " "the string. Characters are removed from the leading end until reaching a " @@ -2657,20 +2650,20 @@ msgid "" "A similar action takes place on the trailing end. For example::" msgstr "" -#: ../../library/stdtypes.rst:2138 +#: ../../library/stdtypes.rst:2131 msgid "" "Return a copy of the string with uppercase characters converted to lowercase " "and vice versa. Note that it is not necessarily true that ``s.swapcase()." "swapcase() == s``." msgstr "" -#: ../../library/stdtypes.rst:2145 +#: ../../library/stdtypes.rst:2138 msgid "" "Return a titlecased version of the string where words start with an " "uppercase character and the remaining characters are lowercase." msgstr "" -#: ../../library/stdtypes.rst:2153 ../../library/stdtypes.rst:3365 +#: ../../library/stdtypes.rst:2146 ../../library/stdtypes.rst:3358 msgid "" "The algorithm uses a simple language-independent definition of a word as " "groups of consecutive letters. The definition works in many contexts but it " @@ -2678,19 +2671,19 @@ msgid "" "which may not be the desired result::" msgstr "" -#: ../../library/stdtypes.rst:2161 +#: ../../library/stdtypes.rst:2154 msgid "" "The :func:`string.capwords` function does not have this problem, as it " "splits words on spaces only." msgstr "" -#: ../../library/stdtypes.rst:2164 +#: ../../library/stdtypes.rst:2157 msgid "" "Alternatively, a workaround for apostrophes can be constructed using regular " "expressions::" msgstr "" -#: ../../library/stdtypes.rst:2179 +#: ../../library/stdtypes.rst:2172 msgid "" "Return a copy of the string in which each character has been mapped through " "the given translation table. The table must be an object that implements " @@ -2702,19 +2695,19 @@ msgid "" "exception, to map the character to itself." msgstr "" -#: ../../library/stdtypes.rst:2188 +#: ../../library/stdtypes.rst:2181 msgid "" "You can use :meth:`str.maketrans` to create a translation map from character-" "to-character mappings in different formats." msgstr "" -#: ../../library/stdtypes.rst:2191 +#: ../../library/stdtypes.rst:2184 msgid "" "See also the :mod:`codecs` module for a more flexible approach to custom " "character mappings." msgstr "" -#: ../../library/stdtypes.rst:2197 +#: ../../library/stdtypes.rst:2190 msgid "" "Return a copy of the string with all the cased characters [4]_ converted to " "uppercase. Note that ``s.upper().isupper()`` might be ``False`` if ``s`` " @@ -2723,13 +2716,13 @@ msgid "" "titlecase)." msgstr "" -#: ../../library/stdtypes.rst:2203 +#: ../../library/stdtypes.rst:2196 msgid "" "The uppercasing algorithm used is described in section 3.13 of the Unicode " "Standard." msgstr "" -#: ../../library/stdtypes.rst:2209 +#: ../../library/stdtypes.rst:2202 msgid "" "Return a copy of the string left filled with ASCII ``'0'`` digits to make a " "string of length *width*. A leading sign prefix (``'+'``/``'-'``) is handled " @@ -2737,11 +2730,11 @@ msgid "" "original string is returned if *width* is less than or equal to ``len(s)``." msgstr "" -#: ../../library/stdtypes.rst:2227 +#: ../../library/stdtypes.rst:2220 msgid "``printf``-style String Formatting" msgstr "" -#: ../../library/stdtypes.rst:2240 +#: ../../library/stdtypes.rst:2233 msgid "" "The formatting operations described here exhibit a variety of quirks that " "lead to a number of common errors (such as failing to display tuples and " @@ -2752,7 +2745,7 @@ msgid "" "or extensibility." msgstr "" -#: ../../library/stdtypes.rst:2248 +#: ../../library/stdtypes.rst:2241 msgid "" "String objects have one unique built-in operation: the ``%`` operator " "(modulo). This is also known as the string *formatting* or *interpolation* " @@ -2762,7 +2755,7 @@ msgid "" "in the C language." msgstr "" -#: ../../library/stdtypes.rst:2254 +#: ../../library/stdtypes.rst:2247 msgid "" "If *format* requires a single argument, *values* may be a single non-tuple " "object. [5]_ Otherwise, *values* must be a tuple with exactly the number of " @@ -2770,36 +2763,36 @@ msgid "" "example, a dictionary)." msgstr "" -#: ../../library/stdtypes.rst:2264 ../../library/stdtypes.rst:3476 +#: ../../library/stdtypes.rst:2257 ../../library/stdtypes.rst:3469 msgid "" "A conversion specifier contains two or more characters and has the following " "components, which must occur in this order:" msgstr "" -#: ../../library/stdtypes.rst:2267 ../../library/stdtypes.rst:3479 +#: ../../library/stdtypes.rst:2260 ../../library/stdtypes.rst:3472 msgid "The ``'%'`` character, which marks the start of the specifier." msgstr "" -#: ../../library/stdtypes.rst:2269 ../../library/stdtypes.rst:3481 +#: ../../library/stdtypes.rst:2262 ../../library/stdtypes.rst:3474 msgid "" "Mapping key (optional), consisting of a parenthesised sequence of characters " "(for example, ``(somename)``)." msgstr "" -#: ../../library/stdtypes.rst:2272 ../../library/stdtypes.rst:3484 +#: ../../library/stdtypes.rst:2265 ../../library/stdtypes.rst:3477 msgid "" "Conversion flags (optional), which affect the result of some conversion " "types." msgstr "" -#: ../../library/stdtypes.rst:2275 ../../library/stdtypes.rst:3487 +#: ../../library/stdtypes.rst:2268 ../../library/stdtypes.rst:3480 msgid "" "Minimum field width (optional). If specified as an ``'*'`` (asterisk), the " "actual width is read from the next element of the tuple in *values*, and the " "object to convert comes after the minimum field width and optional precision." msgstr "" -#: ../../library/stdtypes.rst:2279 ../../library/stdtypes.rst:3491 +#: ../../library/stdtypes.rst:2272 ../../library/stdtypes.rst:3484 msgid "" "Precision (optional), given as a ``'.'`` (dot) followed by the precision. " "If specified as ``'*'`` (an asterisk), the actual precision is read from the " @@ -2807,15 +2800,15 @@ msgid "" "the precision." msgstr "" -#: ../../library/stdtypes.rst:2284 ../../library/stdtypes.rst:3496 +#: ../../library/stdtypes.rst:2277 ../../library/stdtypes.rst:3489 msgid "Length modifier (optional)." msgstr "" -#: ../../library/stdtypes.rst:2286 ../../library/stdtypes.rst:3498 +#: ../../library/stdtypes.rst:2279 ../../library/stdtypes.rst:3491 msgid "Conversion type." msgstr "" -#: ../../library/stdtypes.rst:2288 +#: ../../library/stdtypes.rst:2281 msgid "" "When the right argument is a dictionary (or other mapping type), then the " "formats in the string *must* include a parenthesised mapping key into that " @@ -2823,279 +2816,279 @@ msgid "" "selects the value to be formatted from the mapping. For example:" msgstr "" -#: ../../library/stdtypes.rst:2297 ../../library/stdtypes.rst:3509 +#: ../../library/stdtypes.rst:2290 ../../library/stdtypes.rst:3502 msgid "" "In this case no ``*`` specifiers may occur in a format (since they require a " "sequential parameter list)." msgstr "" -#: ../../library/stdtypes.rst:2300 ../../library/stdtypes.rst:3512 +#: ../../library/stdtypes.rst:2293 ../../library/stdtypes.rst:3505 msgid "The conversion flag characters are:" msgstr "" -#: ../../library/stdtypes.rst:2309 ../../library/stdtypes.rst:3521 +#: ../../library/stdtypes.rst:2302 ../../library/stdtypes.rst:3514 msgid "Flag" msgstr "" -#: ../../library/stdtypes.rst:2311 ../../library/stdtypes.rst:3523 +#: ../../library/stdtypes.rst:2304 ../../library/stdtypes.rst:3516 msgid "``'#'``" msgstr "``'#'``" -#: ../../library/stdtypes.rst:2311 ../../library/stdtypes.rst:3523 +#: ../../library/stdtypes.rst:2304 ../../library/stdtypes.rst:3516 msgid "" "The value conversion will use the \"alternate form\" (where defined below)." msgstr "" -#: ../../library/stdtypes.rst:2314 ../../library/stdtypes.rst:3526 +#: ../../library/stdtypes.rst:2307 ../../library/stdtypes.rst:3519 msgid "``'0'``" msgstr "``'0'``" -#: ../../library/stdtypes.rst:2314 ../../library/stdtypes.rst:3526 +#: ../../library/stdtypes.rst:2307 ../../library/stdtypes.rst:3519 msgid "The conversion will be zero padded for numeric values." msgstr "" -#: ../../library/stdtypes.rst:2316 ../../library/stdtypes.rst:3528 +#: ../../library/stdtypes.rst:2309 ../../library/stdtypes.rst:3521 msgid "``'-'``" msgstr "``'-'``" -#: ../../library/stdtypes.rst:2316 ../../library/stdtypes.rst:3528 +#: ../../library/stdtypes.rst:2309 ../../library/stdtypes.rst:3521 msgid "" "The converted value is left adjusted (overrides the ``'0'`` conversion if " "both are given)." msgstr "" -#: ../../library/stdtypes.rst:2319 ../../library/stdtypes.rst:3531 +#: ../../library/stdtypes.rst:2312 ../../library/stdtypes.rst:3524 msgid "``' '``" msgstr "``' '``" -#: ../../library/stdtypes.rst:2319 ../../library/stdtypes.rst:3531 +#: ../../library/stdtypes.rst:2312 ../../library/stdtypes.rst:3524 msgid "" "(a space) A blank should be left before a positive number (or empty string) " "produced by a signed conversion." msgstr "" -#: ../../library/stdtypes.rst:2322 ../../library/stdtypes.rst:3534 +#: ../../library/stdtypes.rst:2315 ../../library/stdtypes.rst:3527 msgid "``'+'``" msgstr "``'+'``" -#: ../../library/stdtypes.rst:2322 ../../library/stdtypes.rst:3534 +#: ../../library/stdtypes.rst:2315 ../../library/stdtypes.rst:3527 msgid "" "A sign character (``'+'`` or ``'-'``) will precede the conversion (overrides " "a \"space\" flag)." msgstr "" -#: ../../library/stdtypes.rst:2326 ../../library/stdtypes.rst:3538 +#: ../../library/stdtypes.rst:2319 ../../library/stdtypes.rst:3531 msgid "" "A length modifier (``h``, ``l``, or ``L``) may be present, but is ignored as " "it is not necessary for Python -- so e.g. ``%ld`` is identical to ``%d``." msgstr "" -#: ../../library/stdtypes.rst:2329 ../../library/stdtypes.rst:3541 +#: ../../library/stdtypes.rst:2322 ../../library/stdtypes.rst:3534 msgid "The conversion types are:" msgstr "" -#: ../../library/stdtypes.rst:2332 ../../library/stdtypes.rst:3544 +#: ../../library/stdtypes.rst:2325 ../../library/stdtypes.rst:3537 msgid "Conversion" msgstr "" -#: ../../library/stdtypes.rst:2334 ../../library/stdtypes.rst:3546 +#: ../../library/stdtypes.rst:2327 ../../library/stdtypes.rst:3539 msgid "``'d'``" msgstr "``'d'``" -#: ../../library/stdtypes.rst:2334 ../../library/stdtypes.rst:2336 -#: ../../library/stdtypes.rst:3546 ../../library/stdtypes.rst:3548 +#: ../../library/stdtypes.rst:2327 ../../library/stdtypes.rst:2329 +#: ../../library/stdtypes.rst:3539 ../../library/stdtypes.rst:3541 msgid "Signed integer decimal." msgstr "" -#: ../../library/stdtypes.rst:2336 ../../library/stdtypes.rst:3548 +#: ../../library/stdtypes.rst:2329 ../../library/stdtypes.rst:3541 msgid "``'i'``" msgstr "``'i'``" -#: ../../library/stdtypes.rst:2338 ../../library/stdtypes.rst:3550 +#: ../../library/stdtypes.rst:2331 ../../library/stdtypes.rst:3543 msgid "``'o'``" msgstr "``'o'``" -#: ../../library/stdtypes.rst:2338 ../../library/stdtypes.rst:3550 +#: ../../library/stdtypes.rst:2331 ../../library/stdtypes.rst:3543 msgid "Signed octal value." msgstr "" -#: ../../library/stdtypes.rst:2340 ../../library/stdtypes.rst:3552 +#: ../../library/stdtypes.rst:2333 ../../library/stdtypes.rst:3545 msgid "``'u'``" msgstr "``'u'``" -#: ../../library/stdtypes.rst:2340 ../../library/stdtypes.rst:3552 +#: ../../library/stdtypes.rst:2333 ../../library/stdtypes.rst:3545 msgid "Obsolete type -- it is identical to ``'d'``." msgstr "" -#: ../../library/stdtypes.rst:2342 ../../library/stdtypes.rst:3554 +#: ../../library/stdtypes.rst:2335 ../../library/stdtypes.rst:3547 msgid "``'x'``" msgstr "``'x'``" -#: ../../library/stdtypes.rst:2342 ../../library/stdtypes.rst:3554 +#: ../../library/stdtypes.rst:2335 ../../library/stdtypes.rst:3547 msgid "Signed hexadecimal (lowercase)." msgstr "" -#: ../../library/stdtypes.rst:2344 ../../library/stdtypes.rst:3556 +#: ../../library/stdtypes.rst:2337 ../../library/stdtypes.rst:3549 msgid "``'X'``" msgstr "``'X'``" -#: ../../library/stdtypes.rst:2344 ../../library/stdtypes.rst:3556 +#: ../../library/stdtypes.rst:2337 ../../library/stdtypes.rst:3549 msgid "Signed hexadecimal (uppercase)." msgstr "" -#: ../../library/stdtypes.rst:2346 ../../library/stdtypes.rst:3558 +#: ../../library/stdtypes.rst:2339 ../../library/stdtypes.rst:3551 msgid "``'e'``" msgstr "``'e'``" -#: ../../library/stdtypes.rst:2346 ../../library/stdtypes.rst:3558 +#: ../../library/stdtypes.rst:2339 ../../library/stdtypes.rst:3551 msgid "Floating point exponential format (lowercase)." msgstr "" -#: ../../library/stdtypes.rst:2348 ../../library/stdtypes.rst:3560 +#: ../../library/stdtypes.rst:2341 ../../library/stdtypes.rst:3553 msgid "``'E'``" msgstr "``'E'``" -#: ../../library/stdtypes.rst:2348 ../../library/stdtypes.rst:3560 +#: ../../library/stdtypes.rst:2341 ../../library/stdtypes.rst:3553 msgid "Floating point exponential format (uppercase)." msgstr "" -#: ../../library/stdtypes.rst:2350 ../../library/stdtypes.rst:3562 +#: ../../library/stdtypes.rst:2343 ../../library/stdtypes.rst:3555 msgid "``'f'``" msgstr "``'f'``" -#: ../../library/stdtypes.rst:2350 ../../library/stdtypes.rst:2352 -#: ../../library/stdtypes.rst:3562 ../../library/stdtypes.rst:3564 +#: ../../library/stdtypes.rst:2343 ../../library/stdtypes.rst:2345 +#: ../../library/stdtypes.rst:3555 ../../library/stdtypes.rst:3557 msgid "Floating point decimal format." msgstr "" -#: ../../library/stdtypes.rst:2352 ../../library/stdtypes.rst:3564 +#: ../../library/stdtypes.rst:2345 ../../library/stdtypes.rst:3557 msgid "``'F'``" msgstr "``'F'``" -#: ../../library/stdtypes.rst:2354 ../../library/stdtypes.rst:3566 +#: ../../library/stdtypes.rst:2347 ../../library/stdtypes.rst:3559 msgid "``'g'``" msgstr "``'g'``" -#: ../../library/stdtypes.rst:2354 ../../library/stdtypes.rst:3566 +#: ../../library/stdtypes.rst:2347 ../../library/stdtypes.rst:3559 msgid "" "Floating point format. Uses lowercase exponential format if exponent is less " "than -4 or not less than precision, decimal format otherwise." msgstr "" -#: ../../library/stdtypes.rst:2358 ../../library/stdtypes.rst:3570 +#: ../../library/stdtypes.rst:2351 ../../library/stdtypes.rst:3563 msgid "``'G'``" msgstr "``'G'``" -#: ../../library/stdtypes.rst:2358 ../../library/stdtypes.rst:3570 +#: ../../library/stdtypes.rst:2351 ../../library/stdtypes.rst:3563 msgid "" "Floating point format. Uses uppercase exponential format if exponent is less " "than -4 or not less than precision, decimal format otherwise." msgstr "" -#: ../../library/stdtypes.rst:2362 ../../library/stdtypes.rst:3574 +#: ../../library/stdtypes.rst:2355 ../../library/stdtypes.rst:3567 msgid "``'c'``" msgstr "``'c'``" -#: ../../library/stdtypes.rst:2362 +#: ../../library/stdtypes.rst:2355 msgid "Single character (accepts integer or single character string)." msgstr "" -#: ../../library/stdtypes.rst:2365 ../../library/stdtypes.rst:3587 +#: ../../library/stdtypes.rst:2358 ../../library/stdtypes.rst:3580 msgid "``'r'``" msgstr "``'r'``" -#: ../../library/stdtypes.rst:2365 +#: ../../library/stdtypes.rst:2358 msgid "String (converts any Python object using :func:`repr`)." msgstr "" -#: ../../library/stdtypes.rst:2368 ../../library/stdtypes.rst:3581 +#: ../../library/stdtypes.rst:2361 ../../library/stdtypes.rst:3574 msgid "``'s'``" msgstr "``'s'``" -#: ../../library/stdtypes.rst:2368 +#: ../../library/stdtypes.rst:2361 msgid "String (converts any Python object using :func:`str`)." msgstr "" -#: ../../library/stdtypes.rst:2371 ../../library/stdtypes.rst:3584 +#: ../../library/stdtypes.rst:2364 ../../library/stdtypes.rst:3577 msgid "``'a'``" msgstr "``'a'``" -#: ../../library/stdtypes.rst:2371 +#: ../../library/stdtypes.rst:2364 msgid "String (converts any Python object using :func:`ascii`)." msgstr "" -#: ../../library/stdtypes.rst:2374 ../../library/stdtypes.rst:3590 +#: ../../library/stdtypes.rst:2367 ../../library/stdtypes.rst:3583 msgid "``'%'``" msgstr "``'%'``" -#: ../../library/stdtypes.rst:2374 ../../library/stdtypes.rst:3590 +#: ../../library/stdtypes.rst:2367 ../../library/stdtypes.rst:3583 msgid "No argument is converted, results in a ``'%'`` character in the result." msgstr "" -#: ../../library/stdtypes.rst:2381 ../../library/stdtypes.rst:3597 +#: ../../library/stdtypes.rst:2374 ../../library/stdtypes.rst:3590 msgid "" "The alternate form causes a leading octal specifier (``'0o'``) to be " "inserted before the first digit." msgstr "" -#: ../../library/stdtypes.rst:2385 ../../library/stdtypes.rst:3601 +#: ../../library/stdtypes.rst:2378 ../../library/stdtypes.rst:3594 msgid "" "The alternate form causes a leading ``'0x'`` or ``'0X'`` (depending on " "whether the ``'x'`` or ``'X'`` format was used) to be inserted before the " "first digit." msgstr "" -#: ../../library/stdtypes.rst:2389 ../../library/stdtypes.rst:3605 +#: ../../library/stdtypes.rst:2382 ../../library/stdtypes.rst:3598 msgid "" "The alternate form causes the result to always contain a decimal point, even " "if no digits follow it." msgstr "" -#: ../../library/stdtypes.rst:2392 ../../library/stdtypes.rst:3608 +#: ../../library/stdtypes.rst:2385 ../../library/stdtypes.rst:3601 msgid "" "The precision determines the number of digits after the decimal point and " "defaults to 6." msgstr "" -#: ../../library/stdtypes.rst:2396 ../../library/stdtypes.rst:3612 +#: ../../library/stdtypes.rst:2389 ../../library/stdtypes.rst:3605 msgid "" "The alternate form causes the result to always contain a decimal point, and " "trailing zeroes are not removed as they would otherwise be." msgstr "" -#: ../../library/stdtypes.rst:2399 ../../library/stdtypes.rst:3615 +#: ../../library/stdtypes.rst:2392 ../../library/stdtypes.rst:3608 msgid "" "The precision determines the number of significant digits before and after " "the decimal point and defaults to 6." msgstr "" -#: ../../library/stdtypes.rst:2403 ../../library/stdtypes.rst:3619 +#: ../../library/stdtypes.rst:2396 ../../library/stdtypes.rst:3612 msgid "If precision is ``N``, the output is truncated to ``N`` characters." msgstr "" -#: ../../library/stdtypes.rst:2406 ../../library/stdtypes.rst:3628 +#: ../../library/stdtypes.rst:2399 ../../library/stdtypes.rst:3621 msgid "See :pep:`237`." msgstr "參閱 :pep:`237`\\ 。" -#: ../../library/stdtypes.rst:2408 +#: ../../library/stdtypes.rst:2401 msgid "" "Since Python strings have an explicit length, ``%s`` conversions do not " "assume that ``'\\0'`` is the end of the string." msgstr "" -#: ../../library/stdtypes.rst:2413 +#: ../../library/stdtypes.rst:2406 msgid "" "``%f`` conversions for numbers whose absolute value is over 1e50 are no " "longer replaced by ``%g`` conversions." msgstr "" -#: ../../library/stdtypes.rst:2424 +#: ../../library/stdtypes.rst:2417 msgid "" "Binary Sequence Types --- :class:`bytes`, :class:`bytearray`, :class:" "`memoryview`" msgstr "" -#: ../../library/stdtypes.rst:2432 +#: ../../library/stdtypes.rst:2425 msgid "" "The core built-in types for manipulating binary data are :class:`bytes` and :" "class:`bytearray`. They are supported by :class:`memoryview` which uses the :" @@ -3103,17 +3096,17 @@ msgid "" "objects without needing to make a copy." msgstr "" -#: ../../library/stdtypes.rst:2437 +#: ../../library/stdtypes.rst:2430 msgid "" "The :mod:`array` module supports efficient storage of basic data types like " "32-bit integers and IEEE754 double-precision floating values." msgstr "" -#: ../../library/stdtypes.rst:2443 +#: ../../library/stdtypes.rst:2436 msgid "Bytes Objects" msgstr "" -#: ../../library/stdtypes.rst:2447 +#: ../../library/stdtypes.rst:2440 msgid "" "Bytes objects are immutable sequences of single bytes. Since many major " "binary protocols are based on the ASCII text encoding, bytes objects offer " @@ -3121,40 +3114,40 @@ msgid "" "and are closely related to string objects in a variety of other ways." msgstr "" -#: ../../library/stdtypes.rst:2454 +#: ../../library/stdtypes.rst:2447 msgid "" "Firstly, the syntax for bytes literals is largely the same as that for " "string literals, except that a ``b`` prefix is added:" msgstr "" -#: ../../library/stdtypes.rst:2457 +#: ../../library/stdtypes.rst:2450 msgid "Single quotes: ``b'still allows embedded \"double\" quotes'``" msgstr "" -#: ../../library/stdtypes.rst:2458 +#: ../../library/stdtypes.rst:2451 msgid "Double quotes: ``b\"still allows embedded 'single' quotes\"``" msgstr "" -#: ../../library/stdtypes.rst:2459 +#: ../../library/stdtypes.rst:2452 msgid "" "Triple quoted: ``b'''3 single quotes'''``, ``b\"\"\"3 double quotes\"\"\"``" msgstr "" -#: ../../library/stdtypes.rst:2461 +#: ../../library/stdtypes.rst:2454 msgid "" "Only ASCII characters are permitted in bytes literals (regardless of the " "declared source code encoding). Any binary values over 127 must be entered " "into bytes literals using the appropriate escape sequence." msgstr "" -#: ../../library/stdtypes.rst:2465 +#: ../../library/stdtypes.rst:2458 msgid "" "As with string literals, bytes literals may also use a ``r`` prefix to " "disable processing of escape sequences. See :ref:`strings` for more about " "the various forms of bytes literal, including supported escape sequences." msgstr "" -#: ../../library/stdtypes.rst:2469 +#: ../../library/stdtypes.rst:2462 msgid "" "While bytes literals and representations are based on ASCII text, bytes " "objects actually behave like immutable sequences of integers, with each " @@ -3167,29 +3160,29 @@ msgid "" "compatible will usually lead to data corruption)." msgstr "" -#: ../../library/stdtypes.rst:2479 +#: ../../library/stdtypes.rst:2472 msgid "" "In addition to the literal forms, bytes objects can be created in a number " "of other ways:" msgstr "" -#: ../../library/stdtypes.rst:2482 +#: ../../library/stdtypes.rst:2475 msgid "A zero-filled bytes object of a specified length: ``bytes(10)``" msgstr "" -#: ../../library/stdtypes.rst:2483 +#: ../../library/stdtypes.rst:2476 msgid "From an iterable of integers: ``bytes(range(20))``" msgstr "" -#: ../../library/stdtypes.rst:2484 +#: ../../library/stdtypes.rst:2477 msgid "Copying existing binary data via the buffer protocol: ``bytes(obj)``" msgstr "" -#: ../../library/stdtypes.rst:2486 +#: ../../library/stdtypes.rst:2479 msgid "Also see the :ref:`bytes ` built-in." msgstr "" -#: ../../library/stdtypes.rst:2488 +#: ../../library/stdtypes.rst:2481 msgid "" "Since 2 hexadecimal digits correspond precisely to a single byte, " "hexadecimal numbers are a commonly used format for describing binary data. " @@ -3197,32 +3190,32 @@ msgid "" "that format:" msgstr "" -#: ../../library/stdtypes.rst:2494 +#: ../../library/stdtypes.rst:2487 msgid "" "This :class:`bytes` class method returns a bytes object, decoding the given " "string object. The string must contain two hexadecimal digits per byte, " "with ASCII whitespace being ignored." msgstr "" -#: ../../library/stdtypes.rst:2501 +#: ../../library/stdtypes.rst:2494 msgid "" ":meth:`bytes.fromhex` now skips all ASCII whitespace in the string, not just " "spaces." msgstr "" -#: ../../library/stdtypes.rst:2505 +#: ../../library/stdtypes.rst:2498 msgid "" "A reverse conversion function exists to transform a bytes object into its " "hexadecimal representation." msgstr "" -#: ../../library/stdtypes.rst:2510 ../../library/stdtypes.rst:2595 +#: ../../library/stdtypes.rst:2503 ../../library/stdtypes.rst:2588 msgid "" "Return a string object containing two hexadecimal digits for each byte in " "the instance." msgstr "" -#: ../../library/stdtypes.rst:2516 +#: ../../library/stdtypes.rst:2509 msgid "" "If you want to make the hex string easier to read, you can specify a single " "character separator *sep* parameter to include in the output. By default, " @@ -3231,13 +3224,13 @@ msgid "" "the separator position from the right, negative values from the left." msgstr "" -#: ../../library/stdtypes.rst:2533 +#: ../../library/stdtypes.rst:2526 msgid "" ":meth:`bytes.hex` now supports optional *sep* and *bytes_per_sep* parameters " "to insert separators between bytes in the hex output." msgstr "" -#: ../../library/stdtypes.rst:2537 +#: ../../library/stdtypes.rst:2530 msgid "" "Since bytes objects are sequences of integers (akin to a tuple), for a bytes " "object *b*, ``b[0]`` will be an integer, while ``b[0:1]`` will be a bytes " @@ -3245,58 +3238,58 @@ msgid "" "and slicing will produce a string of length 1)" msgstr "" -#: ../../library/stdtypes.rst:2542 +#: ../../library/stdtypes.rst:2535 msgid "" "The representation of bytes objects uses the literal format (``b'...'``) " "since it is often more useful than e.g. ``bytes([46, 46, 46])``. You can " "always convert a bytes object into a list of integers using ``list(b)``." msgstr "" -#: ../../library/stdtypes.rst:2550 +#: ../../library/stdtypes.rst:2543 msgid "Bytearray Objects" msgstr "" -#: ../../library/stdtypes.rst:2554 +#: ../../library/stdtypes.rst:2547 msgid "" ":class:`bytearray` objects are a mutable counterpart to :class:`bytes` " "objects." msgstr "" -#: ../../library/stdtypes.rst:2559 +#: ../../library/stdtypes.rst:2552 msgid "" "There is no dedicated literal syntax for bytearray objects, instead they are " "always created by calling the constructor:" msgstr "" -#: ../../library/stdtypes.rst:2562 +#: ../../library/stdtypes.rst:2555 msgid "Creating an empty instance: ``bytearray()``" msgstr "" -#: ../../library/stdtypes.rst:2563 +#: ../../library/stdtypes.rst:2556 msgid "Creating a zero-filled instance with a given length: ``bytearray(10)``" msgstr "" -#: ../../library/stdtypes.rst:2564 +#: ../../library/stdtypes.rst:2557 msgid "From an iterable of integers: ``bytearray(range(20))``" msgstr "" -#: ../../library/stdtypes.rst:2565 +#: ../../library/stdtypes.rst:2558 msgid "" "Copying existing binary data via the buffer protocol: ``bytearray(b'Hi!')``" msgstr "" -#: ../../library/stdtypes.rst:2567 +#: ../../library/stdtypes.rst:2560 msgid "" "As bytearray objects are mutable, they support the :ref:`mutable ` sequence operations in addition to the common bytes and bytearray " "operations described in :ref:`bytes-methods`." msgstr "" -#: ../../library/stdtypes.rst:2571 +#: ../../library/stdtypes.rst:2564 msgid "Also see the :ref:`bytearray ` built-in." msgstr "" -#: ../../library/stdtypes.rst:2573 +#: ../../library/stdtypes.rst:2566 msgid "" "Since 2 hexadecimal digits correspond precisely to a single byte, " "hexadecimal numbers are a commonly used format for describing binary data. " @@ -3304,33 +3297,33 @@ msgid "" "in that format:" msgstr "" -#: ../../library/stdtypes.rst:2579 +#: ../../library/stdtypes.rst:2572 msgid "" "This :class:`bytearray` class method returns bytearray object, decoding the " "given string object. The string must contain two hexadecimal digits per " "byte, with ASCII whitespace being ignored." msgstr "" -#: ../../library/stdtypes.rst:2586 +#: ../../library/stdtypes.rst:2579 msgid "" ":meth:`bytearray.fromhex` now skips all ASCII whitespace in the string, not " "just spaces." msgstr "" -#: ../../library/stdtypes.rst:2590 +#: ../../library/stdtypes.rst:2583 msgid "" "A reverse conversion function exists to transform a bytearray object into " "its hexadecimal representation." msgstr "" -#: ../../library/stdtypes.rst:2603 +#: ../../library/stdtypes.rst:2596 msgid "" "Similar to :meth:`bytes.hex`, :meth:`bytearray.hex` now supports optional " "*sep* and *bytes_per_sep* parameters to insert separators between bytes in " "the hex output." msgstr "" -#: ../../library/stdtypes.rst:2608 +#: ../../library/stdtypes.rst:2601 msgid "" "Since bytearray objects are sequences of integers (akin to a list), for a " "bytearray object *b*, ``b[0]`` will be an integer, while ``b[0:1]`` will be " @@ -3338,7 +3331,7 @@ msgid "" "both indexing and slicing will produce a string of length 1)" msgstr "" -#: ../../library/stdtypes.rst:2613 +#: ../../library/stdtypes.rst:2606 msgid "" "The representation of bytearray objects uses the bytes literal format " "(``bytearray(b'...')``) since it is often more useful than e.g. " @@ -3346,11 +3339,11 @@ msgid "" "a list of integers using ``list(b)``." msgstr "" -#: ../../library/stdtypes.rst:2622 +#: ../../library/stdtypes.rst:2615 msgid "Bytes and Bytearray Operations" msgstr "" -#: ../../library/stdtypes.rst:2627 +#: ../../library/stdtypes.rst:2620 msgid "" "Both bytes and bytearray objects support the :ref:`common ` " "sequence operations. They interoperate not just with operands of the same " @@ -3359,97 +3352,97 @@ msgid "" "return type of the result may depend on the order of operands." msgstr "" -#: ../../library/stdtypes.rst:2635 +#: ../../library/stdtypes.rst:2628 msgid "" "The methods on bytes and bytearray objects don't accept strings as their " "arguments, just as the methods on strings don't accept bytes as their " "arguments. For example, you have to write::" msgstr "" -#: ../../library/stdtypes.rst:2642 +#: ../../library/stdtypes.rst:2635 msgid "and::" msgstr "" "和:\n" "\n" "::" -#: ../../library/stdtypes.rst:2647 +#: ../../library/stdtypes.rst:2640 msgid "" "Some bytes and bytearray operations assume the use of ASCII compatible " "binary formats, and hence should be avoided when working with arbitrary " "binary data. These restrictions are covered below." msgstr "" -#: ../../library/stdtypes.rst:2652 +#: ../../library/stdtypes.rst:2645 msgid "" "Using these ASCII based operations to manipulate binary data that is not " "stored in an ASCII based format may lead to data corruption." msgstr "" -#: ../../library/stdtypes.rst:2655 +#: ../../library/stdtypes.rst:2648 msgid "" "The following methods on bytes and bytearray objects can be used with " "arbitrary binary data." msgstr "" -#: ../../library/stdtypes.rst:2661 +#: ../../library/stdtypes.rst:2654 msgid "" "Return the number of non-overlapping occurrences of subsequence *sub* in the " "range [*start*, *end*]. Optional arguments *start* and *end* are " "interpreted as in slice notation." msgstr "" -#: ../../library/stdtypes.rst:2665 ../../library/stdtypes.rst:2764 -#: ../../library/stdtypes.rst:2786 ../../library/stdtypes.rst:2852 -#: ../../library/stdtypes.rst:2865 +#: ../../library/stdtypes.rst:2658 ../../library/stdtypes.rst:2757 +#: ../../library/stdtypes.rst:2779 ../../library/stdtypes.rst:2845 +#: ../../library/stdtypes.rst:2858 msgid "" "The subsequence to search for may be any :term:`bytes-like object` or an " "integer in the range 0 to 255." msgstr "" -#: ../../library/stdtypes.rst:2668 ../../library/stdtypes.rst:2776 -#: ../../library/stdtypes.rst:2789 ../../library/stdtypes.rst:2855 -#: ../../library/stdtypes.rst:2868 +#: ../../library/stdtypes.rst:2661 ../../library/stdtypes.rst:2769 +#: ../../library/stdtypes.rst:2782 ../../library/stdtypes.rst:2848 +#: ../../library/stdtypes.rst:2861 msgid "Also accept an integer in the range 0 to 255 as the subsequence." msgstr "" -#: ../../library/stdtypes.rst:2675 +#: ../../library/stdtypes.rst:2668 msgid "" "If the binary data starts with the *prefix* string, return " "``bytes[len(prefix):]``. Otherwise, return a copy of the original binary " "data::" msgstr "" -#: ../../library/stdtypes.rst:2684 +#: ../../library/stdtypes.rst:2677 msgid "The *prefix* may be any :term:`bytes-like object`." msgstr "" -#: ../../library/stdtypes.rst:2688 ../../library/stdtypes.rst:2710 -#: ../../library/stdtypes.rst:2840 ../../library/stdtypes.rst:2933 -#: ../../library/stdtypes.rst:2947 ../../library/stdtypes.rst:2978 -#: ../../library/stdtypes.rst:2992 ../../library/stdtypes.rst:3034 -#: ../../library/stdtypes.rst:3104 ../../library/stdtypes.rst:3122 -#: ../../library/stdtypes.rst:3150 ../../library/stdtypes.rst:3289 -#: ../../library/stdtypes.rst:3344 ../../library/stdtypes.rst:3387 -#: ../../library/stdtypes.rst:3408 ../../library/stdtypes.rst:3430 -#: ../../library/stdtypes.rst:3632 +#: ../../library/stdtypes.rst:2681 ../../library/stdtypes.rst:2703 +#: ../../library/stdtypes.rst:2833 ../../library/stdtypes.rst:2926 +#: ../../library/stdtypes.rst:2940 ../../library/stdtypes.rst:2971 +#: ../../library/stdtypes.rst:2985 ../../library/stdtypes.rst:3027 +#: ../../library/stdtypes.rst:3097 ../../library/stdtypes.rst:3115 +#: ../../library/stdtypes.rst:3143 ../../library/stdtypes.rst:3282 +#: ../../library/stdtypes.rst:3337 ../../library/stdtypes.rst:3380 +#: ../../library/stdtypes.rst:3401 ../../library/stdtypes.rst:3423 +#: ../../library/stdtypes.rst:3625 msgid "" "The bytearray version of this method does *not* operate in place - it always " "produces a new object, even if no changes were made." msgstr "" -#: ../../library/stdtypes.rst:2697 +#: ../../library/stdtypes.rst:2690 msgid "" "If the binary data ends with the *suffix* string and that *suffix* is not " "empty, return ``bytes[:-len(suffix)]``. Otherwise, return a copy of the " "original binary data::" msgstr "" -#: ../../library/stdtypes.rst:2706 +#: ../../library/stdtypes.rst:2699 msgid "The *suffix* may be any :term:`bytes-like object`." msgstr "" -#: ../../library/stdtypes.rst:2719 +#: ../../library/stdtypes.rst:2712 msgid "" "Return a string decoded from the given bytes. Default encoding is " "``'utf-8'``. *errors* may be given to set a different error handling " @@ -3460,25 +3453,25 @@ msgid "" "encodings, see section :ref:`standard-encodings`." msgstr "" -#: ../../library/stdtypes.rst:2727 +#: ../../library/stdtypes.rst:2720 msgid "" "By default, the *errors* argument is not checked for best performances, but " "only used at the first decoding error. Enable the :ref:`Python Development " "Mode `, or use a :ref:`debug build ` to check *errors*." msgstr "" -#: ../../library/stdtypes.rst:2733 +#: ../../library/stdtypes.rst:2726 msgid "" "Passing the *encoding* argument to :class:`str` allows decoding any :term:" "`bytes-like object` directly, without needing to make a temporary bytes or " "bytearray object." msgstr "" -#: ../../library/stdtypes.rst:2737 +#: ../../library/stdtypes.rst:2730 msgid "Added support for keyword arguments." msgstr "新增關鍵字引數的支援。" -#: ../../library/stdtypes.rst:2748 +#: ../../library/stdtypes.rst:2741 msgid "" "Return ``True`` if the binary data ends with the specified *suffix*, " "otherwise return ``False``. *suffix* can also be a tuple of suffixes to " @@ -3486,11 +3479,11 @@ msgid "" "optional *end*, stop comparing at that position." msgstr "" -#: ../../library/stdtypes.rst:2753 +#: ../../library/stdtypes.rst:2746 msgid "The suffix(es) to search for may be any :term:`bytes-like object`." msgstr "" -#: ../../library/stdtypes.rst:2759 +#: ../../library/stdtypes.rst:2752 msgid "" "Return the lowest index in the data where the subsequence *sub* is found, " "such that *sub* is contained in the slice ``s[start:end]``. Optional " @@ -3498,20 +3491,20 @@ msgid "" "``-1`` if *sub* is not found." msgstr "" -#: ../../library/stdtypes.rst:2769 +#: ../../library/stdtypes.rst:2762 msgid "" "The :meth:`~bytes.find` method should be used only if you need to know the " "position of *sub*. To check if *sub* is a substring or not, use the :" "keyword:`in` operator::" msgstr "" -#: ../../library/stdtypes.rst:2783 +#: ../../library/stdtypes.rst:2776 msgid "" "Like :meth:`~bytes.find`, but raise :exc:`ValueError` when the subsequence " "is not found." msgstr "" -#: ../../library/stdtypes.rst:2796 +#: ../../library/stdtypes.rst:2789 msgid "" "Return a bytes or bytearray object which is the concatenation of the binary " "data sequences in *iterable*. A :exc:`TypeError` will be raised if there " @@ -3521,7 +3514,7 @@ msgid "" "method." msgstr "" -#: ../../library/stdtypes.rst:2807 +#: ../../library/stdtypes.rst:2800 msgid "" "This static method returns a translation table usable for :meth:`bytes." "translate` that will map each character in *from* into the character at the " @@ -3529,7 +3522,7 @@ msgid "" "objects ` and have the same length." msgstr "" -#: ../../library/stdtypes.rst:2818 +#: ../../library/stdtypes.rst:2811 msgid "" "Split the sequence at the first occurrence of *sep*, and return a 3-tuple " "containing the part before the separator, the separator itself or its " @@ -3538,24 +3531,24 @@ msgid "" "by two empty bytes or bytearray objects." msgstr "" -#: ../../library/stdtypes.rst:2825 ../../library/stdtypes.rst:2882 +#: ../../library/stdtypes.rst:2818 ../../library/stdtypes.rst:2875 msgid "The separator to search for may be any :term:`bytes-like object`." msgstr "" -#: ../../library/stdtypes.rst:2831 +#: ../../library/stdtypes.rst:2824 msgid "" "Return a copy of the sequence with all occurrences of subsequence *old* " "replaced by *new*. If the optional argument *count* is given, only the " "first *count* occurrences are replaced." msgstr "" -#: ../../library/stdtypes.rst:2835 +#: ../../library/stdtypes.rst:2828 msgid "" "The subsequence to search for and its replacement may be any :term:`bytes-" "like object`." msgstr "" -#: ../../library/stdtypes.rst:2847 +#: ../../library/stdtypes.rst:2840 msgid "" "Return the highest index in the sequence where the subsequence *sub* is " "found, such that *sub* is contained within ``s[start:end]``. Optional " @@ -3563,13 +3556,13 @@ msgid "" "``-1`` on failure." msgstr "" -#: ../../library/stdtypes.rst:2862 +#: ../../library/stdtypes.rst:2855 msgid "" "Like :meth:`~bytes.rfind` but raises :exc:`ValueError` when the subsequence " "*sub* is not found." msgstr "" -#: ../../library/stdtypes.rst:2875 +#: ../../library/stdtypes.rst:2868 msgid "" "Split the sequence at the last occurrence of *sep*, and return a 3-tuple " "containing the part before the separator, the separator itself or its " @@ -3578,7 +3571,7 @@ msgid "" "followed by a copy of the original sequence." msgstr "" -#: ../../library/stdtypes.rst:2888 +#: ../../library/stdtypes.rst:2881 msgid "" "Return ``True`` if the binary data starts with the specified *prefix*, " "otherwise return ``False``. *prefix* can also be a tuple of prefixes to " @@ -3586,11 +3579,11 @@ msgid "" "optional *end*, stop comparing at that position." msgstr "" -#: ../../library/stdtypes.rst:2893 +#: ../../library/stdtypes.rst:2886 msgid "The prefix(es) to search for may be any :term:`bytes-like object`." msgstr "" -#: ../../library/stdtypes.rst:2899 +#: ../../library/stdtypes.rst:2892 msgid "" "Return a copy of the bytes or bytearray object where all bytes occurring in " "the optional argument *delete* are removed, and the remaining bytes have " @@ -3598,22 +3591,22 @@ msgid "" "object of length 256." msgstr "" -#: ../../library/stdtypes.rst:2904 +#: ../../library/stdtypes.rst:2897 msgid "" "You can use the :func:`bytes.maketrans` method to create a translation table." msgstr "" -#: ../../library/stdtypes.rst:2907 +#: ../../library/stdtypes.rst:2900 msgid "" "Set the *table* argument to ``None`` for translations that only delete " "characters::" msgstr "" -#: ../../library/stdtypes.rst:2913 +#: ../../library/stdtypes.rst:2906 msgid "*delete* is now supported as a keyword argument." msgstr "" -#: ../../library/stdtypes.rst:2917 +#: ../../library/stdtypes.rst:2910 msgid "" "The following methods on bytes and bytearray objects have default behaviours " "that assume the use of ASCII compatible binary formats, but can still be " @@ -3622,7 +3615,7 @@ msgid "" "instead produce new objects." msgstr "" -#: ../../library/stdtypes.rst:2926 +#: ../../library/stdtypes.rst:2919 msgid "" "Return a copy of the object centered in a sequence of length *width*. " "Padding is done using the specified *fillbyte* (default is an ASCII space). " @@ -3630,7 +3623,7 @@ msgid "" "less than or equal to ``len(s)``." msgstr "" -#: ../../library/stdtypes.rst:2940 +#: ../../library/stdtypes.rst:2933 msgid "" "Return a copy of the object left justified in a sequence of length *width*. " "Padding is done using the specified *fillbyte* (default is an ASCII space). " @@ -3638,7 +3631,7 @@ msgid "" "less than or equal to ``len(s)``." msgstr "" -#: ../../library/stdtypes.rst:2954 +#: ../../library/stdtypes.rst:2947 msgid "" "Return a copy of the sequence with specified leading bytes removed. The " "*chars* argument is a binary sequence specifying the set of byte values to " @@ -3648,14 +3641,14 @@ msgid "" "all combinations of its values are stripped::" msgstr "" -#: ../../library/stdtypes.rst:2966 +#: ../../library/stdtypes.rst:2959 msgid "" "The binary sequence of byte values to remove may be any :term:`bytes-like " "object`. See :meth:`~bytes.removeprefix` for a method that will remove a " "single prefix string rather than all of a set of characters. For example::" msgstr "" -#: ../../library/stdtypes.rst:2985 +#: ../../library/stdtypes.rst:2978 msgid "" "Return a copy of the object right justified in a sequence of length *width*. " "Padding is done using the specified *fillbyte* (default is an ASCII space). " @@ -3663,7 +3656,7 @@ msgid "" "less than or equal to ``len(s)``." msgstr "" -#: ../../library/stdtypes.rst:2999 +#: ../../library/stdtypes.rst:2992 msgid "" "Split the binary sequence into subsequences of the same type, using *sep* as " "the delimiter string. If *maxsplit* is given, at most *maxsplit* splits are " @@ -3673,7 +3666,7 @@ msgid "" "described in detail below." msgstr "" -#: ../../library/stdtypes.rst:3010 +#: ../../library/stdtypes.rst:3003 msgid "" "Return a copy of the sequence with specified trailing bytes removed. The " "*chars* argument is a binary sequence specifying the set of byte values to " @@ -3683,14 +3676,14 @@ msgid "" "all combinations of its values are stripped::" msgstr "" -#: ../../library/stdtypes.rst:3022 +#: ../../library/stdtypes.rst:3015 msgid "" "The binary sequence of byte values to remove may be any :term:`bytes-like " "object`. See :meth:`~bytes.removesuffix` for a method that will remove a " "single suffix string rather than all of a set of characters. For example::" msgstr "" -#: ../../library/stdtypes.rst:3041 +#: ../../library/stdtypes.rst:3034 msgid "" "Split the binary sequence into subsequences of the same type, using *sep* as " "the delimiter string. If *maxsplit* is given and non-negative, at most " @@ -3699,7 +3692,7 @@ msgid "" "limit on the number of splits (all possible splits are made)." msgstr "" -#: ../../library/stdtypes.rst:3047 +#: ../../library/stdtypes.rst:3040 msgid "" "If *sep* is given, consecutive delimiters are not grouped together and are " "deemed to delimit empty subsequences (for example, ``b'1,,2'.split(b',')`` " @@ -3710,7 +3703,7 @@ msgid "" "object being split. The *sep* argument may be any :term:`bytes-like object`." msgstr "" -#: ../../library/stdtypes.rst:3065 +#: ../../library/stdtypes.rst:3058 msgid "" "If *sep* is not specified or is ``None``, a different splitting algorithm is " "applied: runs of consecutive ASCII whitespace are regarded as a single " @@ -3720,7 +3713,7 @@ msgid "" "without a specified separator returns ``[]``." msgstr "" -#: ../../library/stdtypes.rst:3086 +#: ../../library/stdtypes.rst:3079 msgid "" "Return a copy of the sequence with specified leading and trailing bytes " "removed. The *chars* argument is a binary sequence specifying the set of " @@ -3730,13 +3723,13 @@ msgid "" "a prefix or suffix; rather, all combinations of its values are stripped::" msgstr "" -#: ../../library/stdtypes.rst:3099 +#: ../../library/stdtypes.rst:3092 msgid "" "The binary sequence of byte values to remove may be any :term:`bytes-like " "object`." msgstr "" -#: ../../library/stdtypes.rst:3108 +#: ../../library/stdtypes.rst:3101 msgid "" "The following methods on bytes and bytearray objects assume the use of ASCII " "compatible binary formats and should not be applied to arbitrary binary " @@ -3744,14 +3737,14 @@ msgid "" "operate in place, and instead produce new objects." msgstr "" -#: ../../library/stdtypes.rst:3116 +#: ../../library/stdtypes.rst:3109 msgid "" "Return a copy of the sequence with each byte interpreted as an ASCII " "character, and the first byte capitalized and the rest lowercased. Non-ASCII " "byte values are passed through unchanged." msgstr "" -#: ../../library/stdtypes.rst:3129 +#: ../../library/stdtypes.rst:3122 msgid "" "Return a copy of the sequence where all ASCII tab characters are replaced by " "one or more ASCII spaces, depending on the current column and the given tab " @@ -3767,7 +3760,7 @@ msgid "" "by one regardless of how the byte value is represented when printed::" msgstr "" -#: ../../library/stdtypes.rst:3157 +#: ../../library/stdtypes.rst:3150 msgid "" "Return ``True`` if all bytes in the sequence are alphabetical ASCII " "characters or ASCII decimal digits and the sequence is not empty, ``False`` " @@ -3776,7 +3769,7 @@ msgid "" "digits are those byte values in the sequence ``b'0123456789'``." msgstr "" -#: ../../library/stdtypes.rst:3174 +#: ../../library/stdtypes.rst:3167 msgid "" "Return ``True`` if all bytes in the sequence are alphabetic ASCII characters " "and the sequence is not empty, ``False`` otherwise. Alphabetic ASCII " @@ -3784,35 +3777,35 @@ msgid "" "``b'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'``." msgstr "" -#: ../../library/stdtypes.rst:3190 +#: ../../library/stdtypes.rst:3183 msgid "" "Return ``True`` if the sequence is empty or all bytes in the sequence are " "ASCII, ``False`` otherwise. ASCII bytes are in the range 0-0x7F." msgstr "" -#: ../../library/stdtypes.rst:3200 +#: ../../library/stdtypes.rst:3193 msgid "" "Return ``True`` if all bytes in the sequence are ASCII decimal digits and " "the sequence is not empty, ``False`` otherwise. ASCII decimal digits are " "those byte values in the sequence ``b'0123456789'``." msgstr "" -#: ../../library/stdtypes.rst:3215 +#: ../../library/stdtypes.rst:3208 msgid "" "Return ``True`` if there is at least one lowercase ASCII character in the " "sequence and no uppercase ASCII characters, ``False`` otherwise." msgstr "" -#: ../../library/stdtypes.rst:3225 ../../library/stdtypes.rst:3267 -#: ../../library/stdtypes.rst:3283 ../../library/stdtypes.rst:3333 -#: ../../library/stdtypes.rst:3402 +#: ../../library/stdtypes.rst:3218 ../../library/stdtypes.rst:3260 +#: ../../library/stdtypes.rst:3276 ../../library/stdtypes.rst:3326 +#: ../../library/stdtypes.rst:3395 msgid "" "Lowercase ASCII characters are those byte values in the sequence " "``b'abcdefghijklmnopqrstuvwxyz'``. Uppercase ASCII characters are those byte " "values in the sequence ``b'ABCDEFGHIJKLMNOPQRSTUVWXYZ'``." msgstr "" -#: ../../library/stdtypes.rst:3233 +#: ../../library/stdtypes.rst:3226 msgid "" "Return ``True`` if all bytes in the sequence are ASCII whitespace and the " "sequence is not empty, ``False`` otherwise. ASCII whitespace characters are " @@ -3820,27 +3813,27 @@ msgid "" "newline, carriage return, vertical tab, form feed)." msgstr "" -#: ../../library/stdtypes.rst:3242 +#: ../../library/stdtypes.rst:3235 msgid "" "Return ``True`` if the sequence is ASCII titlecase and the sequence is not " "empty, ``False`` otherwise. See :meth:`bytes.title` for more details on the " "definition of \"titlecase\"." msgstr "" -#: ../../library/stdtypes.rst:3257 +#: ../../library/stdtypes.rst:3250 msgid "" "Return ``True`` if there is at least one uppercase alphabetic ASCII " "character in the sequence and no lowercase ASCII characters, ``False`` " "otherwise." msgstr "" -#: ../../library/stdtypes.rst:3275 +#: ../../library/stdtypes.rst:3268 msgid "" "Return a copy of the sequence with all the uppercase ASCII characters " "converted to their corresponding lowercase counterpart." msgstr "" -#: ../../library/stdtypes.rst:3300 +#: ../../library/stdtypes.rst:3293 msgid "" "Return a list of the lines in the binary sequence, breaking at ASCII line " "boundaries. This method uses the :term:`universal newlines` approach to " @@ -3848,20 +3841,20 @@ msgid "" "*keepends* is given and true." msgstr "" -#: ../../library/stdtypes.rst:3312 +#: ../../library/stdtypes.rst:3305 msgid "" "Unlike :meth:`~bytes.split` when a delimiter string *sep* is given, this " "method returns an empty list for the empty string, and a terminal line break " "does not result in an extra line::" msgstr "" -#: ../../library/stdtypes.rst:3325 +#: ../../library/stdtypes.rst:3318 msgid "" "Return a copy of the sequence with all the lowercase ASCII characters " "converted to their corresponding uppercase counterpart and vice-versa." msgstr "" -#: ../../library/stdtypes.rst:3337 +#: ../../library/stdtypes.rst:3330 msgid "" "Unlike :func:`str.swapcase()`, it is always the case that ``bin.swapcase()." "swapcase() == bin`` for the binary versions. Case conversions are " @@ -3869,14 +3862,14 @@ msgid "" "Unicode code points." msgstr "" -#: ../../library/stdtypes.rst:3351 +#: ../../library/stdtypes.rst:3344 msgid "" "Return a titlecased version of the binary sequence where words start with an " "uppercase ASCII character and the remaining characters are lowercase. " "Uncased byte values are left unmodified." msgstr "" -#: ../../library/stdtypes.rst:3360 +#: ../../library/stdtypes.rst:3353 msgid "" "Lowercase ASCII characters are those byte values in the sequence " "``b'abcdefghijklmnopqrstuvwxyz'``. Uppercase ASCII characters are those byte " @@ -3884,18 +3877,18 @@ msgid "" "values are uncased." msgstr "" -#: ../../library/stdtypes.rst:3373 +#: ../../library/stdtypes.rst:3366 msgid "" "A workaround for apostrophes can be constructed using regular expressions::" msgstr "" -#: ../../library/stdtypes.rst:3394 +#: ../../library/stdtypes.rst:3387 msgid "" "Return a copy of the sequence with all the lowercase ASCII characters " "converted to their corresponding uppercase counterpart." msgstr "" -#: ../../library/stdtypes.rst:3415 +#: ../../library/stdtypes.rst:3408 msgid "" "Return a copy of the sequence left filled with ASCII ``b'0'`` digits to make " "a sequence of length *width*. A leading sign prefix (``b'+'``/ ``b'-'``) is " @@ -3904,11 +3897,11 @@ msgid "" "*width* is less than or equal to ``len(seq)``." msgstr "" -#: ../../library/stdtypes.rst:3437 +#: ../../library/stdtypes.rst:3430 msgid "``printf``-style Bytes Formatting" msgstr "" -#: ../../library/stdtypes.rst:3454 +#: ../../library/stdtypes.rst:3447 msgid "" "The formatting operations described here exhibit a variety of quirks that " "lead to a number of common errors (such as failing to display tuples and " @@ -3916,7 +3909,7 @@ msgid "" "dictionary, wrap it in a tuple." msgstr "" -#: ../../library/stdtypes.rst:3459 +#: ../../library/stdtypes.rst:3452 msgid "" "Bytes objects (``bytes``/``bytearray``) have one unique built-in operation: " "the ``%`` operator (modulo). This is also known as the bytes *formatting* or " @@ -3926,7 +3919,7 @@ msgid "" "func:`sprintf` in the C language." msgstr "" -#: ../../library/stdtypes.rst:3466 +#: ../../library/stdtypes.rst:3459 msgid "" "If *format* requires a single argument, *values* may be a single non-tuple " "object. [5]_ Otherwise, *values* must be a tuple with exactly the number of " @@ -3934,7 +3927,7 @@ msgid "" "example, a dictionary)." msgstr "" -#: ../../library/stdtypes.rst:3500 +#: ../../library/stdtypes.rst:3493 msgid "" "When the right argument is a dictionary (or other mapping type), then the " "formats in the bytes object *must* include a parenthesised mapping key into " @@ -3942,73 +3935,73 @@ msgid "" "mapping key selects the value to be formatted from the mapping. For example:" msgstr "" -#: ../../library/stdtypes.rst:3574 +#: ../../library/stdtypes.rst:3567 msgid "Single byte (accepts integer or single byte objects)." msgstr "" -#: ../../library/stdtypes.rst:3577 +#: ../../library/stdtypes.rst:3570 msgid "``'b'``" msgstr "``'b'``" -#: ../../library/stdtypes.rst:3577 +#: ../../library/stdtypes.rst:3570 msgid "" "Bytes (any object that follows the :ref:`buffer protocol ` or " "has :meth:`__bytes__`)." msgstr "" -#: ../../library/stdtypes.rst:3581 +#: ../../library/stdtypes.rst:3574 msgid "" "``'s'`` is an alias for ``'b'`` and should only be used for Python2/3 code " "bases." msgstr "" -#: ../../library/stdtypes.rst:3584 +#: ../../library/stdtypes.rst:3577 msgid "" "Bytes (converts any Python object using ``repr(obj).encode('ascii', " "'backslashreplace')``)." msgstr "" -#: ../../library/stdtypes.rst:3587 +#: ../../library/stdtypes.rst:3580 msgid "" "``'r'`` is an alias for ``'a'`` and should only be used for Python2/3 code " "bases." msgstr "" -#: ../../library/stdtypes.rst:3587 +#: ../../library/stdtypes.rst:3580 msgid "\\(7)" msgstr "\\(7)" -#: ../../library/stdtypes.rst:3622 +#: ../../library/stdtypes.rst:3615 msgid "``b'%s'`` is deprecated, but will not be removed during the 3.x series." msgstr "" -#: ../../library/stdtypes.rst:3625 +#: ../../library/stdtypes.rst:3618 msgid "``b'%r'`` is deprecated, but will not be removed during the 3.x series." msgstr "" -#: ../../library/stdtypes.rst:3637 +#: ../../library/stdtypes.rst:3630 msgid ":pep:`461` - Adding % formatting to bytes and bytearray" msgstr "" -#: ../../library/stdtypes.rst:3644 +#: ../../library/stdtypes.rst:3637 msgid "Memory Views" msgstr "" -#: ../../library/stdtypes.rst:3646 +#: ../../library/stdtypes.rst:3639 msgid "" ":class:`memoryview` objects allow Python code to access the internal data of " "an object that supports the :ref:`buffer protocol ` without " "copying." msgstr "" -#: ../../library/stdtypes.rst:3652 +#: ../../library/stdtypes.rst:3645 msgid "" "Create a :class:`memoryview` that references *object*. *object* must " "support the buffer protocol. Built-in objects that support the buffer " "protocol include :class:`bytes` and :class:`bytearray`." msgstr "" -#: ../../library/stdtypes.rst:3656 +#: ../../library/stdtypes.rst:3649 msgid "" "A :class:`memoryview` has the notion of an *element*, which is the atomic " "memory unit handled by the originating *object*. For many simple types such " @@ -4016,7 +4009,7 @@ msgid "" "other types such as :class:`array.array` may have bigger elements." msgstr "" -#: ../../library/stdtypes.rst:3661 +#: ../../library/stdtypes.rst:3654 msgid "" "``len(view)`` is equal to the length of :class:`~memoryview.tolist`. If " "``view.ndim = 0``, the length is 1. If ``view.ndim = 1``, the length is " @@ -4026,13 +4019,13 @@ msgid "" "bytes in a single element." msgstr "" -#: ../../library/stdtypes.rst:3668 +#: ../../library/stdtypes.rst:3661 msgid "" "A :class:`memoryview` supports slicing and indexing to expose its data. One-" "dimensional slicing will result in a subview::" msgstr "" -#: ../../library/stdtypes.rst:3681 +#: ../../library/stdtypes.rst:3674 msgid "" "If :class:`~memoryview.format` is one of the native format specifiers from " "the :mod:`struct` module, indexing with an integer or a tuple of integers is " @@ -4043,82 +4036,82 @@ msgid "" "memoryviews can be indexed with the empty tuple." msgstr "" -#: ../../library/stdtypes.rst:3690 +#: ../../library/stdtypes.rst:3683 msgid "Here is an example with a non-byte format::" msgstr "" -#: ../../library/stdtypes.rst:3702 +#: ../../library/stdtypes.rst:3695 msgid "" "If the underlying object is writable, the memoryview supports one-" "dimensional slice assignment. Resizing is not allowed::" msgstr "" -#: ../../library/stdtypes.rst:3723 +#: ../../library/stdtypes.rst:3716 msgid "" "One-dimensional memoryviews of hashable (read-only) types with formats 'B', " "'b' or 'c' are also hashable. The hash is defined as ``hash(m) == hash(m." "tobytes())``::" msgstr "" -#: ../../library/stdtypes.rst:3735 +#: ../../library/stdtypes.rst:3728 msgid "" "One-dimensional memoryviews can now be sliced. One-dimensional memoryviews " "with formats 'B', 'b' or 'c' are now hashable." msgstr "" -#: ../../library/stdtypes.rst:3739 +#: ../../library/stdtypes.rst:3732 msgid "" "memoryview is now registered automatically with :class:`collections.abc." "Sequence`" msgstr "" -#: ../../library/stdtypes.rst:3743 +#: ../../library/stdtypes.rst:3736 msgid "memoryviews can now be indexed with tuple of integers." msgstr "" -#: ../../library/stdtypes.rst:3746 +#: ../../library/stdtypes.rst:3739 msgid ":class:`memoryview` has several methods:" msgstr "" -#: ../../library/stdtypes.rst:3750 +#: ../../library/stdtypes.rst:3743 msgid "" "A memoryview and a :pep:`3118` exporter are equal if their shapes are " "equivalent and if all corresponding values are equal when the operands' " "respective format codes are interpreted using :mod:`struct` syntax." msgstr "" -#: ../../library/stdtypes.rst:3754 +#: ../../library/stdtypes.rst:3747 msgid "" "For the subset of :mod:`struct` format strings currently supported by :meth:" "`tolist`, ``v`` and ``w`` are equal if ``v.tolist() == w.tolist()``::" msgstr "" -#: ../../library/stdtypes.rst:3773 +#: ../../library/stdtypes.rst:3766 msgid "" "If either format string is not supported by the :mod:`struct` module, then " "the objects will always compare as unequal (even if the format strings and " "buffer contents are identical)::" msgstr "" -#: ../../library/stdtypes.rst:3789 +#: ../../library/stdtypes.rst:3782 msgid "" "Note that, as with floating point numbers, ``v is w`` does *not* imply ``v " "== w`` for memoryview objects." msgstr "" -#: ../../library/stdtypes.rst:3792 +#: ../../library/stdtypes.rst:3785 msgid "" "Previous versions compared the raw memory disregarding the item format and " "the logical array structure." msgstr "" -#: ../../library/stdtypes.rst:3798 +#: ../../library/stdtypes.rst:3791 msgid "" "Return the data in the buffer as a bytestring. This is equivalent to " "calling the :class:`bytes` constructor on the memoryview. ::" msgstr "" -#: ../../library/stdtypes.rst:3807 +#: ../../library/stdtypes.rst:3800 msgid "" "For non-contiguous arrays the result is equal to the flattened list " "representation with all elements converted to bytes. :meth:`tobytes` " @@ -4126,7 +4119,7 @@ msgid "" "module syntax." msgstr "" -#: ../../library/stdtypes.rst:3812 +#: ../../library/stdtypes.rst:3805 msgid "" "*order* can be {'C', 'F', 'A'}. When *order* is 'C' or 'F', the data of the " "original array is converted to C or Fortran order. For contiguous views, 'A' " @@ -4135,36 +4128,36 @@ msgid "" "to C first. *order=None* is the same as *order='C'*." msgstr "" -#: ../../library/stdtypes.rst:3821 +#: ../../library/stdtypes.rst:3814 msgid "" "Return a string object containing two hexadecimal digits for each byte in " "the buffer. ::" msgstr "" -#: ../../library/stdtypes.rst:3830 +#: ../../library/stdtypes.rst:3823 msgid "" "Similar to :meth:`bytes.hex`, :meth:`memoryview.hex` now supports optional " "*sep* and *bytes_per_sep* parameters to insert separators between bytes in " "the hex output." msgstr "" -#: ../../library/stdtypes.rst:3837 +#: ../../library/stdtypes.rst:3830 msgid "Return the data in the buffer as a list of elements. ::" msgstr "" -#: ../../library/stdtypes.rst:3847 +#: ../../library/stdtypes.rst:3840 msgid "" ":meth:`tolist` now supports all single character native formats in :mod:" "`struct` module syntax as well as multi-dimensional representations." msgstr "" -#: ../../library/stdtypes.rst:3854 +#: ../../library/stdtypes.rst:3847 msgid "" "Return a readonly version of the memoryview object. The original memoryview " "object is unchanged. ::" msgstr "" -#: ../../library/stdtypes.rst:3873 +#: ../../library/stdtypes.rst:3866 msgid "" "Release the underlying buffer exposed by the memoryview object. Many " "objects take special actions when a view is held on them (for example, a :" @@ -4173,20 +4166,20 @@ msgid "" "resources) as soon as possible." msgstr "" -#: ../../library/stdtypes.rst:3879 +#: ../../library/stdtypes.rst:3872 msgid "" "After this method has been called, any further operation on the view raises " "a :class:`ValueError` (except :meth:`release()` itself which can be called " "multiple times)::" msgstr "" -#: ../../library/stdtypes.rst:3890 +#: ../../library/stdtypes.rst:3883 msgid "" "The context management protocol can be used for a similar effect, using the " "``with`` statement::" msgstr "" -#: ../../library/stdtypes.rst:3906 +#: ../../library/stdtypes.rst:3899 msgid "" "Cast a memoryview to a new format or shape. *shape* defaults to " "``[byte_length//new_itemsize]``, which means that the result view will be " @@ -4195,57 +4188,57 @@ msgid "" "contiguous -> 1D." msgstr "" -#: ../../library/stdtypes.rst:3912 +#: ../../library/stdtypes.rst:3905 msgid "" "The destination format is restricted to a single element native format in :" "mod:`struct` syntax. One of the formats must be a byte format ('B', 'b' or " "'c'). The byte length of the result must be the same as the original length." msgstr "" -#: ../../library/stdtypes.rst:3917 +#: ../../library/stdtypes.rst:3910 msgid "Cast 1D/long to 1D/unsigned bytes::" msgstr "" -#: ../../library/stdtypes.rst:3940 +#: ../../library/stdtypes.rst:3933 msgid "Cast 1D/unsigned bytes to 1D/char::" msgstr "" -#: ../../library/stdtypes.rst:3953 +#: ../../library/stdtypes.rst:3946 msgid "Cast 1D/bytes to 3D/ints to 1D/signed char::" msgstr "" -#: ../../library/stdtypes.rst:3979 +#: ../../library/stdtypes.rst:3972 msgid "Cast 1D/unsigned long to 2D/unsigned long::" msgstr "" -#: ../../library/stdtypes.rst:3993 +#: ../../library/stdtypes.rst:3986 msgid "The source format is no longer restricted when casting to a byte view." msgstr "" -#: ../../library/stdtypes.rst:3996 +#: ../../library/stdtypes.rst:3989 msgid "There are also several readonly attributes available:" msgstr "" -#: ../../library/stdtypes.rst:4000 +#: ../../library/stdtypes.rst:3993 msgid "The underlying object of the memoryview::" msgstr "" -#: ../../library/stdtypes.rst:4011 +#: ../../library/stdtypes.rst:4004 msgid "" "``nbytes == product(shape) * itemsize == len(m.tobytes())``. This is the " "amount of space in bytes that the array would use in a contiguous " "representation. It is not necessarily equal to ``len(m)``::" msgstr "" -#: ../../library/stdtypes.rst:4030 +#: ../../library/stdtypes.rst:4023 msgid "Multi-dimensional arrays::" msgstr "" -#: ../../library/stdtypes.rst:4047 +#: ../../library/stdtypes.rst:4040 msgid "A bool indicating whether the memory is read only." msgstr "" -#: ../../library/stdtypes.rst:4051 +#: ../../library/stdtypes.rst:4044 msgid "" "A string containing the format (in :mod:`struct` module style) for each " "element in the view. A memoryview can be created from exporters with " @@ -4253,59 +4246,59 @@ msgid "" "restricted to native single element formats." msgstr "" -#: ../../library/stdtypes.rst:4056 +#: ../../library/stdtypes.rst:4049 msgid "" "format ``'B'`` is now handled according to the struct module syntax. This " "means that ``memoryview(b'abc')[0] == b'abc'[0] == 97``." msgstr "" -#: ../../library/stdtypes.rst:4062 +#: ../../library/stdtypes.rst:4055 msgid "The size in bytes of each element of the memoryview::" msgstr "" -#: ../../library/stdtypes.rst:4075 +#: ../../library/stdtypes.rst:4068 msgid "" "An integer indicating how many dimensions of a multi-dimensional array the " "memory represents." msgstr "" -#: ../../library/stdtypes.rst:4080 +#: ../../library/stdtypes.rst:4073 msgid "" "A tuple of integers the length of :attr:`ndim` giving the shape of the " "memory as an N-dimensional array." msgstr "" -#: ../../library/stdtypes.rst:4083 ../../library/stdtypes.rst:4091 +#: ../../library/stdtypes.rst:4076 ../../library/stdtypes.rst:4084 msgid "An empty tuple instead of ``None`` when ndim = 0." msgstr "" -#: ../../library/stdtypes.rst:4088 +#: ../../library/stdtypes.rst:4081 msgid "" "A tuple of integers the length of :attr:`ndim` giving the size in bytes to " "access each element for each dimension of the array." msgstr "" -#: ../../library/stdtypes.rst:4096 +#: ../../library/stdtypes.rst:4089 msgid "Used internally for PIL-style arrays. The value is informational only." msgstr "" -#: ../../library/stdtypes.rst:4100 +#: ../../library/stdtypes.rst:4093 msgid "A bool indicating whether the memory is C-:term:`contiguous`." msgstr "" -#: ../../library/stdtypes.rst:4106 +#: ../../library/stdtypes.rst:4099 msgid "A bool indicating whether the memory is Fortran :term:`contiguous`." msgstr "" -#: ../../library/stdtypes.rst:4112 +#: ../../library/stdtypes.rst:4105 msgid "A bool indicating whether the memory is :term:`contiguous`." msgstr "" -#: ../../library/stdtypes.rst:4120 +#: ../../library/stdtypes.rst:4113 msgid "Set Types --- :class:`set`, :class:`frozenset`" msgstr "" -#: ../../library/stdtypes.rst:4124 +#: ../../library/stdtypes.rst:4117 msgid "" "A :dfn:`set` object is an unordered collection of distinct :term:`hashable` " "objects. Common uses include membership testing, removing duplicates from a " @@ -4315,7 +4308,7 @@ msgid "" "`collections` module.)" msgstr "" -#: ../../library/stdtypes.rst:4131 +#: ../../library/stdtypes.rst:4124 msgid "" "Like other collections, sets support ``x in set``, ``len(set)``, and ``for x " "in set``. Being an unordered collection, sets do not record element " @@ -4323,7 +4316,7 @@ msgid "" "slicing, or other sequence-like behavior." msgstr "" -#: ../../library/stdtypes.rst:4136 +#: ../../library/stdtypes.rst:4129 msgid "" "There are currently two built-in set types, :class:`set` and :class:" "`frozenset`. The :class:`set` type is mutable --- the contents can be " @@ -4335,18 +4328,18 @@ msgid "" "of another set." msgstr "" -#: ../../library/stdtypes.rst:4144 +#: ../../library/stdtypes.rst:4137 msgid "" "Non-empty sets (not frozensets) can be created by placing a comma-separated " "list of elements within braces, for example: ``{'jack', 'sjoerd'}``, in " "addition to the :class:`set` constructor." msgstr "" -#: ../../library/stdtypes.rst:4148 +#: ../../library/stdtypes.rst:4141 msgid "The constructors for both classes work the same:" msgstr "" -#: ../../library/stdtypes.rst:4153 +#: ../../library/stdtypes.rst:4146 msgid "" "Return a new set or frozenset object whose elements are taken from " "*iterable*. The elements of a set must be :term:`hashable`. To represent " @@ -4354,92 +4347,92 @@ msgid "" "*iterable* is not specified, a new empty set is returned." msgstr "" -#: ../../library/stdtypes.rst:4159 +#: ../../library/stdtypes.rst:4152 msgid "Sets can be created by several means:" msgstr "" -#: ../../library/stdtypes.rst:4161 +#: ../../library/stdtypes.rst:4154 msgid "" "Use a comma-separated list of elements within braces: ``{'jack', 'sjoerd'}``" msgstr "" -#: ../../library/stdtypes.rst:4162 +#: ../../library/stdtypes.rst:4155 msgid "" "Use a set comprehension: ``{c for c in 'abracadabra' if c not in 'abc'}``" msgstr "" -#: ../../library/stdtypes.rst:4163 +#: ../../library/stdtypes.rst:4156 msgid "" "Use the type constructor: ``set()``, ``set('foobar')``, ``set(['a', 'b', " "'foo'])``" msgstr "" -#: ../../library/stdtypes.rst:4165 +#: ../../library/stdtypes.rst:4158 msgid "" "Instances of :class:`set` and :class:`frozenset` provide the following " "operations:" msgstr "" -#: ../../library/stdtypes.rst:4170 +#: ../../library/stdtypes.rst:4163 msgid "Return the number of elements in set *s* (cardinality of *s*)." msgstr "" -#: ../../library/stdtypes.rst:4174 +#: ../../library/stdtypes.rst:4167 msgid "Test *x* for membership in *s*." msgstr "" -#: ../../library/stdtypes.rst:4178 +#: ../../library/stdtypes.rst:4171 msgid "Test *x* for non-membership in *s*." msgstr "" -#: ../../library/stdtypes.rst:4182 +#: ../../library/stdtypes.rst:4175 msgid "" "Return ``True`` if the set has no elements in common with *other*. Sets are " "disjoint if and only if their intersection is the empty set." msgstr "" -#: ../../library/stdtypes.rst:4188 +#: ../../library/stdtypes.rst:4181 msgid "Test whether every element in the set is in *other*." msgstr "" -#: ../../library/stdtypes.rst:4192 +#: ../../library/stdtypes.rst:4185 msgid "" "Test whether the set is a proper subset of *other*, that is, ``set <= other " "and set != other``." msgstr "" -#: ../../library/stdtypes.rst:4198 +#: ../../library/stdtypes.rst:4191 msgid "Test whether every element in *other* is in the set." msgstr "" -#: ../../library/stdtypes.rst:4202 +#: ../../library/stdtypes.rst:4195 msgid "" "Test whether the set is a proper superset of *other*, that is, ``set >= " "other and set != other``." msgstr "" -#: ../../library/stdtypes.rst:4208 +#: ../../library/stdtypes.rst:4201 msgid "Return a new set with elements from the set and all others." msgstr "" -#: ../../library/stdtypes.rst:4213 +#: ../../library/stdtypes.rst:4206 msgid "Return a new set with elements common to the set and all others." msgstr "" -#: ../../library/stdtypes.rst:4218 +#: ../../library/stdtypes.rst:4211 msgid "Return a new set with elements in the set that are not in the others." msgstr "" -#: ../../library/stdtypes.rst:4223 +#: ../../library/stdtypes.rst:4216 msgid "" "Return a new set with elements in either the set or *other* but not both." msgstr "" -#: ../../library/stdtypes.rst:4227 +#: ../../library/stdtypes.rst:4220 msgid "Return a shallow copy of the set." msgstr "" -#: ../../library/stdtypes.rst:4230 +#: ../../library/stdtypes.rst:4223 msgid "" "Note, the non-operator versions of :meth:`union`, :meth:`intersection`, :" "meth:`difference`, :meth:`symmetric_difference`, :meth:`issubset`, and :meth:" @@ -4449,7 +4442,7 @@ msgid "" "the more readable ``set('abc').intersection('cbs')``." msgstr "" -#: ../../library/stdtypes.rst:4237 +#: ../../library/stdtypes.rst:4230 msgid "" "Both :class:`set` and :class:`frozenset` support set to set comparisons. Two " "sets are equal if and only if every element of each set is contained in the " @@ -4459,14 +4452,14 @@ msgid "" "set is a proper superset of the second set (is a superset, but is not equal)." msgstr "" -#: ../../library/stdtypes.rst:4244 +#: ../../library/stdtypes.rst:4237 msgid "" "Instances of :class:`set` are compared to instances of :class:`frozenset` " "based on their members. For example, ``set('abc') == frozenset('abc')`` " "returns ``True`` and so does ``set('abc') in set([frozenset('abc')])``." msgstr "" -#: ../../library/stdtypes.rst:4248 +#: ../../library/stdtypes.rst:4241 msgid "" "The subset and equality comparisons do not generalize to a total ordering " "function. For example, any two nonempty disjoint sets are not equal and are " @@ -4474,71 +4467,71 @@ msgid "" "``ab``." msgstr "" -#: ../../library/stdtypes.rst:4253 +#: ../../library/stdtypes.rst:4246 msgid "" "Since sets only define partial ordering (subset relationships), the output " "of the :meth:`list.sort` method is undefined for lists of sets." msgstr "" -#: ../../library/stdtypes.rst:4256 +#: ../../library/stdtypes.rst:4249 msgid "Set elements, like dictionary keys, must be :term:`hashable`." msgstr "" -#: ../../library/stdtypes.rst:4258 +#: ../../library/stdtypes.rst:4251 msgid "" "Binary operations that mix :class:`set` instances with :class:`frozenset` " "return the type of the first operand. For example: ``frozenset('ab') | " "set('bc')`` returns an instance of :class:`frozenset`." msgstr "" -#: ../../library/stdtypes.rst:4262 +#: ../../library/stdtypes.rst:4255 msgid "" "The following table lists operations available for :class:`set` that do not " "apply to immutable instances of :class:`frozenset`:" msgstr "" -#: ../../library/stdtypes.rst:4268 +#: ../../library/stdtypes.rst:4261 msgid "Update the set, adding elements from all others." msgstr "" -#: ../../library/stdtypes.rst:4273 +#: ../../library/stdtypes.rst:4266 msgid "Update the set, keeping only elements found in it and all others." msgstr "" -#: ../../library/stdtypes.rst:4278 +#: ../../library/stdtypes.rst:4271 msgid "Update the set, removing elements found in others." msgstr "" -#: ../../library/stdtypes.rst:4283 +#: ../../library/stdtypes.rst:4276 msgid "" "Update the set, keeping only elements found in either set, but not in both." msgstr "" -#: ../../library/stdtypes.rst:4287 +#: ../../library/stdtypes.rst:4280 msgid "Add element *elem* to the set." msgstr "" -#: ../../library/stdtypes.rst:4291 +#: ../../library/stdtypes.rst:4284 msgid "" "Remove element *elem* from the set. Raises :exc:`KeyError` if *elem* is not " "contained in the set." msgstr "" -#: ../../library/stdtypes.rst:4296 +#: ../../library/stdtypes.rst:4289 msgid "Remove element *elem* from the set if it is present." msgstr "" -#: ../../library/stdtypes.rst:4300 +#: ../../library/stdtypes.rst:4293 msgid "" "Remove and return an arbitrary element from the set. Raises :exc:`KeyError` " "if the set is empty." msgstr "" -#: ../../library/stdtypes.rst:4305 +#: ../../library/stdtypes.rst:4298 msgid "Remove all elements from the set." msgstr "" -#: ../../library/stdtypes.rst:4308 +#: ../../library/stdtypes.rst:4301 msgid "" "Note, the non-operator versions of the :meth:`update`, :meth:" "`intersection_update`, :meth:`difference_update`, and :meth:" @@ -4546,18 +4539,18 @@ msgid "" "argument." msgstr "" -#: ../../library/stdtypes.rst:4313 +#: ../../library/stdtypes.rst:4306 msgid "" "Note, the *elem* argument to the :meth:`__contains__`, :meth:`remove`, and :" "meth:`discard` methods may be a set. To support searching for an equivalent " "frozenset, a temporary one is created from *elem*." msgstr "" -#: ../../library/stdtypes.rst:4321 +#: ../../library/stdtypes.rst:4314 msgid "Mapping Types --- :class:`dict`" msgstr "" -#: ../../library/stdtypes.rst:4331 +#: ../../library/stdtypes.rst:4324 msgid "" "A :term:`mapping` object maps :term:`hashable` values to arbitrary objects. " "Mappings are mutable objects. There is currently only one standard mapping " @@ -4566,7 +4559,7 @@ msgid "" "module.)" msgstr "" -#: ../../library/stdtypes.rst:4337 +#: ../../library/stdtypes.rst:4330 msgid "" "A dictionary's keys are *almost* arbitrary values. Values that are not :" "term:`hashable`, that is, values containing lists, dictionaries or other " @@ -4578,33 +4571,33 @@ msgid "" "approximations it is usually unwise to use them as dictionary keys.)" msgstr "" -#: ../../library/stdtypes.rst:4350 +#: ../../library/stdtypes.rst:4343 msgid "" "Return a new dictionary initialized from an optional positional argument and " "a possibly empty set of keyword arguments." msgstr "" -#: ../../library/stdtypes.rst:4353 +#: ../../library/stdtypes.rst:4346 msgid "Dictionaries can be created by several means:" msgstr "" -#: ../../library/stdtypes.rst:4355 +#: ../../library/stdtypes.rst:4348 msgid "" "Use a comma-separated list of ``key: value`` pairs within braces: ``{'jack': " "4098, 'sjoerd': 4127}`` or ``{4098: 'jack', 4127: 'sjoerd'}``" msgstr "" -#: ../../library/stdtypes.rst:4357 +#: ../../library/stdtypes.rst:4350 msgid "Use a dict comprehension: ``{}``, ``{x: x ** 2 for x in range(10)}``" msgstr "" -#: ../../library/stdtypes.rst:4358 +#: ../../library/stdtypes.rst:4351 msgid "" "Use the type constructor: ``dict()``, ``dict([('foo', 100), ('bar', " "200)])``, ``dict(foo=100, bar=200)``" msgstr "" -#: ../../library/stdtypes.rst:4361 +#: ../../library/stdtypes.rst:4354 msgid "" "If no positional argument is given, an empty dictionary is created. If a " "positional argument is given and it is a mapping object, a dictionary is " @@ -4616,7 +4609,7 @@ msgid "" "value for that key becomes the corresponding value in the new dictionary." msgstr "" -#: ../../library/stdtypes.rst:4371 +#: ../../library/stdtypes.rst:4364 msgid "" "If keyword arguments are given, the keyword arguments and their values are " "added to the dictionary created from the positional argument. If a key " @@ -4624,39 +4617,39 @@ msgid "" "the value from the positional argument." msgstr "" -#: ../../library/stdtypes.rst:4376 +#: ../../library/stdtypes.rst:4369 msgid "" "To illustrate, the following examples all return a dictionary equal to " "``{\"one\": 1, \"two\": 2, \"three\": 3}``::" msgstr "" -#: ../../library/stdtypes.rst:4388 +#: ../../library/stdtypes.rst:4381 msgid "" "Providing keyword arguments as in the first example only works for keys that " "are valid Python identifiers. Otherwise, any valid keys can be used." msgstr "" -#: ../../library/stdtypes.rst:4392 +#: ../../library/stdtypes.rst:4385 msgid "" "These are the operations that dictionaries support (and therefore, custom " "mapping types should support too):" msgstr "" -#: ../../library/stdtypes.rst:4397 +#: ../../library/stdtypes.rst:4390 msgid "Return a list of all the keys used in the dictionary *d*." msgstr "" -#: ../../library/stdtypes.rst:4401 +#: ../../library/stdtypes.rst:4394 msgid "Return the number of items in the dictionary *d*." msgstr "" -#: ../../library/stdtypes.rst:4405 +#: ../../library/stdtypes.rst:4398 msgid "" "Return the item of *d* with key *key*. Raises a :exc:`KeyError` if *key* is " "not in the map." msgstr "" -#: ../../library/stdtypes.rst:4410 +#: ../../library/stdtypes.rst:4403 msgid "" "If a subclass of dict defines a method :meth:`__missing__` and *key* is not " "present, the ``d[key]`` operation calls that method with the key *key* as " @@ -4667,51 +4660,51 @@ msgid "" "an instance variable::" msgstr "" -#: ../../library/stdtypes.rst:4428 +#: ../../library/stdtypes.rst:4421 msgid "" "The example above shows part of the implementation of :class:`collections." "Counter`. A different ``__missing__`` method is used by :class:`collections." "defaultdict`." msgstr "" -#: ../../library/stdtypes.rst:4434 +#: ../../library/stdtypes.rst:4427 msgid "Set ``d[key]`` to *value*." msgstr "" -#: ../../library/stdtypes.rst:4438 +#: ../../library/stdtypes.rst:4431 msgid "" "Remove ``d[key]`` from *d*. Raises a :exc:`KeyError` if *key* is not in the " "map." msgstr "" -#: ../../library/stdtypes.rst:4443 +#: ../../library/stdtypes.rst:4436 msgid "Return ``True`` if *d* has a key *key*, else ``False``." msgstr "" -#: ../../library/stdtypes.rst:4447 +#: ../../library/stdtypes.rst:4440 msgid "Equivalent to ``not key in d``." msgstr "" -#: ../../library/stdtypes.rst:4451 +#: ../../library/stdtypes.rst:4444 msgid "" "Return an iterator over the keys of the dictionary. This is a shortcut for " "``iter(d.keys())``." msgstr "" -#: ../../library/stdtypes.rst:4456 +#: ../../library/stdtypes.rst:4449 msgid "Remove all items from the dictionary." msgstr "" -#: ../../library/stdtypes.rst:4460 +#: ../../library/stdtypes.rst:4453 msgid "Return a shallow copy of the dictionary." msgstr "" -#: ../../library/stdtypes.rst:4464 +#: ../../library/stdtypes.rst:4457 msgid "" "Create a new dictionary with keys from *iterable* and values set to *value*." msgstr "" -#: ../../library/stdtypes.rst:4466 +#: ../../library/stdtypes.rst:4459 msgid "" ":meth:`fromkeys` is a class method that returns a new dictionary. *value* " "defaults to ``None``. All of the values refer to just a single instance, so " @@ -4720,70 +4713,70 @@ msgid "" "` instead." msgstr "" -#: ../../library/stdtypes.rst:4474 +#: ../../library/stdtypes.rst:4467 msgid "" "Return the value for *key* if *key* is in the dictionary, else *default*. If " "*default* is not given, it defaults to ``None``, so that this method never " "raises a :exc:`KeyError`." msgstr "" -#: ../../library/stdtypes.rst:4480 +#: ../../library/stdtypes.rst:4473 msgid "" "Return a new view of the dictionary's items (``(key, value)`` pairs). See " "the :ref:`documentation of view objects `." msgstr "" -#: ../../library/stdtypes.rst:4485 +#: ../../library/stdtypes.rst:4478 msgid "" "Return a new view of the dictionary's keys. See the :ref:`documentation of " "view objects `." msgstr "" -#: ../../library/stdtypes.rst:4490 +#: ../../library/stdtypes.rst:4483 msgid "" "If *key* is in the dictionary, remove it and return its value, else return " "*default*. If *default* is not given and *key* is not in the dictionary, a :" "exc:`KeyError` is raised." msgstr "" -#: ../../library/stdtypes.rst:4496 +#: ../../library/stdtypes.rst:4489 msgid "" "Remove and return a ``(key, value)`` pair from the dictionary. Pairs are " "returned in :abbr:`LIFO (last-in, first-out)` order." msgstr "" -#: ../../library/stdtypes.rst:4499 +#: ../../library/stdtypes.rst:4492 msgid "" ":meth:`popitem` is useful to destructively iterate over a dictionary, as " "often used in set algorithms. If the dictionary is empty, calling :meth:" "`popitem` raises a :exc:`KeyError`." msgstr "" -#: ../../library/stdtypes.rst:4503 +#: ../../library/stdtypes.rst:4496 msgid "" "LIFO order is now guaranteed. In prior versions, :meth:`popitem` would " "return an arbitrary key/value pair." msgstr "" -#: ../../library/stdtypes.rst:4509 +#: ../../library/stdtypes.rst:4502 msgid "" "Return a reverse iterator over the keys of the dictionary. This is a " "shortcut for ``reversed(d.keys())``." msgstr "" -#: ../../library/stdtypes.rst:4516 +#: ../../library/stdtypes.rst:4509 msgid "" "If *key* is in the dictionary, return its value. If not, insert *key* with " "a value of *default* and return *default*. *default* defaults to ``None``." msgstr "" -#: ../../library/stdtypes.rst:4522 +#: ../../library/stdtypes.rst:4515 msgid "" "Update the dictionary with the key/value pairs from *other*, overwriting " "existing keys. Return ``None``." msgstr "" -#: ../../library/stdtypes.rst:4525 +#: ../../library/stdtypes.rst:4518 msgid "" ":meth:`update` accepts either another dictionary object or an iterable of " "key/value pairs (as tuples or other iterables of length two). If keyword " @@ -4791,71 +4784,71 @@ msgid "" "pairs: ``d.update(red=1, blue=2)``." msgstr "" -#: ../../library/stdtypes.rst:4532 +#: ../../library/stdtypes.rst:4525 msgid "" "Return a new view of the dictionary's values. See the :ref:`documentation " "of view objects `." msgstr "" -#: ../../library/stdtypes.rst:4535 +#: ../../library/stdtypes.rst:4528 msgid "" "An equality comparison between one ``dict.values()`` view and another will " "always return ``False``. This also applies when comparing ``dict.values()`` " "to itself::" msgstr "" -#: ../../library/stdtypes.rst:4545 +#: ../../library/stdtypes.rst:4538 msgid "" "Create a new dictionary with the merged keys and values of *d* and *other*, " "which must both be dictionaries. The values of *other* take priority when " "*d* and *other* share keys." msgstr "" -#: ../../library/stdtypes.rst:4553 +#: ../../library/stdtypes.rst:4546 msgid "" "Update the dictionary *d* with keys and values from *other*, which may be " "either a :term:`mapping` or an :term:`iterable` of key/value pairs. The " "values of *other* take priority when *d* and *other* share keys." msgstr "" -#: ../../library/stdtypes.rst:4559 +#: ../../library/stdtypes.rst:4552 msgid "" "Dictionaries compare equal if and only if they have the same ``(key, " "value)`` pairs (regardless of ordering). Order comparisons ('<', '<=', '>=', " "'>') raise :exc:`TypeError`." msgstr "" -#: ../../library/stdtypes.rst:4563 +#: ../../library/stdtypes.rst:4556 msgid "" "Dictionaries preserve insertion order. Note that updating a key does not " "affect the order. Keys added after deletion are inserted at the end. ::" msgstr "" -#: ../../library/stdtypes.rst:4581 +#: ../../library/stdtypes.rst:4574 msgid "" "Dictionary order is guaranteed to be insertion order. This behavior was an " "implementation detail of CPython from 3.6." msgstr "" -#: ../../library/stdtypes.rst:4585 +#: ../../library/stdtypes.rst:4578 msgid "Dictionaries and dictionary views are reversible. ::" msgstr "" -#: ../../library/stdtypes.rst:4597 +#: ../../library/stdtypes.rst:4590 msgid "Dictionaries are now reversible." msgstr "" -#: ../../library/stdtypes.rst:4602 +#: ../../library/stdtypes.rst:4595 msgid "" ":class:`types.MappingProxyType` can be used to create a read-only view of a :" "class:`dict`." msgstr "" -#: ../../library/stdtypes.rst:4609 +#: ../../library/stdtypes.rst:4602 msgid "Dictionary view objects" msgstr "字典視圖物件" -#: ../../library/stdtypes.rst:4611 +#: ../../library/stdtypes.rst:4604 msgid "" "The objects returned by :meth:`dict.keys`, :meth:`dict.values` and :meth:" "`dict.items` are *view objects*. They provide a dynamic view on the " @@ -4863,23 +4856,23 @@ msgid "" "reflects these changes." msgstr "" -#: ../../library/stdtypes.rst:4616 +#: ../../library/stdtypes.rst:4609 msgid "" "Dictionary views can be iterated over to yield their respective data, and " "support membership tests:" msgstr "" -#: ../../library/stdtypes.rst:4621 +#: ../../library/stdtypes.rst:4614 msgid "Return the number of entries in the dictionary." msgstr "" -#: ../../library/stdtypes.rst:4625 +#: ../../library/stdtypes.rst:4618 msgid "" "Return an iterator over the keys, values or items (represented as tuples of " "``(key, value)``) in the dictionary." msgstr "" -#: ../../library/stdtypes.rst:4628 +#: ../../library/stdtypes.rst:4621 msgid "" "Keys and values are iterated over in insertion order. This allows the " "creation of ``(value, key)`` pairs using :func:`zip`: ``pairs = zip(d." @@ -4887,39 +4880,39 @@ msgid "" "[(v, k) for (k, v) in d.items()]``." msgstr "" -#: ../../library/stdtypes.rst:4633 +#: ../../library/stdtypes.rst:4626 msgid "" "Iterating views while adding or deleting entries in the dictionary may raise " "a :exc:`RuntimeError` or fail to iterate over all entries." msgstr "" -#: ../../library/stdtypes.rst:4636 +#: ../../library/stdtypes.rst:4629 msgid "Dictionary order is guaranteed to be insertion order." msgstr "" -#: ../../library/stdtypes.rst:4641 +#: ../../library/stdtypes.rst:4634 msgid "" "Return ``True`` if *x* is in the underlying dictionary's keys, values or " "items (in the latter case, *x* should be a ``(key, value)`` tuple)." msgstr "" -#: ../../library/stdtypes.rst:4646 +#: ../../library/stdtypes.rst:4639 msgid "" "Return a reverse iterator over the keys, values or items of the dictionary. " "The view will be iterated in reverse order of the insertion." msgstr "" -#: ../../library/stdtypes.rst:4649 +#: ../../library/stdtypes.rst:4642 msgid "Dictionary views are now reversible." msgstr "" -#: ../../library/stdtypes.rst:4654 +#: ../../library/stdtypes.rst:4647 msgid "" "Return a :class:`types.MappingProxyType` that wraps the original dictionary " "to which the view refers." msgstr "" -#: ../../library/stdtypes.rst:4659 +#: ../../library/stdtypes.rst:4652 msgid "" "Keys views are set-like since their entries are unique and hashable. If all " "values are hashable, so that ``(key, value)`` pairs are unique and hashable, " @@ -4929,15 +4922,15 @@ msgid "" "abc.Set` are available (for example, ``==``, ``<``, or ``^``)." msgstr "" -#: ../../library/stdtypes.rst:4666 +#: ../../library/stdtypes.rst:4659 msgid "An example of dictionary view usage::" msgstr "" -#: ../../library/stdtypes.rst:4707 +#: ../../library/stdtypes.rst:4700 msgid "Context Manager Types" msgstr "" -#: ../../library/stdtypes.rst:4714 +#: ../../library/stdtypes.rst:4707 msgid "" "Python's :keyword:`with` statement supports the concept of a runtime context " "defined by a context manager. This is implemented using a pair of methods " @@ -4945,7 +4938,7 @@ msgid "" "before the statement body is executed and exited when the statement ends:" msgstr "" -#: ../../library/stdtypes.rst:4722 +#: ../../library/stdtypes.rst:4715 msgid "" "Enter the runtime context and return either this object or another object " "related to the runtime context. The value returned by this method is bound " @@ -4953,14 +4946,14 @@ msgid "" "using this context manager." msgstr "" -#: ../../library/stdtypes.rst:4727 +#: ../../library/stdtypes.rst:4720 msgid "" "An example of a context manager that returns itself is a :term:`file " "object`. File objects return themselves from __enter__() to allow :func:" "`open` to be used as the context expression in a :keyword:`with` statement." msgstr "" -#: ../../library/stdtypes.rst:4731 +#: ../../library/stdtypes.rst:4724 msgid "" "An example of a context manager that returns a related object is the one " "returned by :func:`decimal.localcontext`. These managers set the active " @@ -4970,7 +4963,7 @@ msgid "" "the :keyword:`!with` statement." msgstr "" -#: ../../library/stdtypes.rst:4741 +#: ../../library/stdtypes.rst:4734 msgid "" "Exit the runtime context and return a Boolean flag indicating if any " "exception that occurred should be suppressed. If an exception occurred while " @@ -4979,7 +4972,7 @@ msgid "" "arguments are ``None``." msgstr "" -#: ../../library/stdtypes.rst:4746 +#: ../../library/stdtypes.rst:4739 msgid "" "Returning a true value from this method will cause the :keyword:`with` " "statement to suppress the exception and continue execution with the " @@ -4990,7 +4983,7 @@ msgid "" "statement." msgstr "" -#: ../../library/stdtypes.rst:4753 +#: ../../library/stdtypes.rst:4746 msgid "" "The exception passed in should never be reraised explicitly - instead, this " "method should return a false value to indicate that the method completed " @@ -4999,7 +4992,7 @@ msgid "" "method has actually failed." msgstr "" -#: ../../library/stdtypes.rst:4759 +#: ../../library/stdtypes.rst:4752 msgid "" "Python defines several context managers to support easy thread " "synchronisation, prompt closure of files or other objects, and simpler " @@ -5008,7 +5001,7 @@ msgid "" "management protocol. See the :mod:`contextlib` module for some examples." msgstr "" -#: ../../library/stdtypes.rst:4765 +#: ../../library/stdtypes.rst:4758 msgid "" "Python's :term:`generator`\\s and the :class:`contextlib.contextmanager` " "decorator provide a convenient way to implement these protocols. If a " @@ -5018,7 +5011,7 @@ msgid "" "rather than the iterator produced by an undecorated generator function." msgstr "" -#: ../../library/stdtypes.rst:4772 +#: ../../library/stdtypes.rst:4765 msgid "" "Note that there is no specific slot for any of these methods in the type " "structure for Python objects in the Python/C API. Extension types wanting to " @@ -5027,23 +5020,23 @@ msgid "" "a single class dictionary lookup is negligible." msgstr "" -#: ../../library/stdtypes.rst:4780 +#: ../../library/stdtypes.rst:4773 msgid "" "Type Annotation Types --- :ref:`Generic Alias `, :ref:" "`Union `" msgstr "" -#: ../../library/stdtypes.rst:4785 +#: ../../library/stdtypes.rst:4778 msgid "" "The core built-in types for :term:`type annotations ` are :ref:" "`Generic Alias ` and :ref:`Union `." msgstr "" -#: ../../library/stdtypes.rst:4792 +#: ../../library/stdtypes.rst:4785 msgid "Generic Alias Type" msgstr "" -#: ../../library/stdtypes.rst:4798 +#: ../../library/stdtypes.rst:4791 msgid "" "``GenericAlias`` objects are generally created by :ref:`subscripting " "` a class. They are most often used with :ref:`container " @@ -5053,19 +5046,19 @@ msgid "" "are intended primarily for use with :term:`type annotations `." msgstr "" -#: ../../library/stdtypes.rst:4808 +#: ../../library/stdtypes.rst:4801 msgid "" "It is generally only possible to subscript a class if the class implements " "the special method :meth:`~object.__class_getitem__`." msgstr "" -#: ../../library/stdtypes.rst:4811 +#: ../../library/stdtypes.rst:4804 msgid "" "A ``GenericAlias`` object acts as a proxy for a :term:`generic type`, " "implementing *parameterized generics*." msgstr "" -#: ../../library/stdtypes.rst:4814 +#: ../../library/stdtypes.rst:4807 msgid "" "For a container class, the argument(s) supplied to a :ref:`subscription " "` of the class may indicate the type(s) of the elements an " @@ -5074,7 +5067,7 @@ msgid "" "`bytes`." msgstr "" -#: ../../library/stdtypes.rst:4820 +#: ../../library/stdtypes.rst:4813 msgid "" "For a class which defines :meth:`~object.__class_getitem__` but is not a " "container, the argument(s) supplied to a subscription of the class will " @@ -5083,7 +5076,7 @@ msgid "" "the :class:`str` data type and the :class:`bytes` data type:" msgstr "" -#: ../../library/stdtypes.rst:4826 +#: ../../library/stdtypes.rst:4819 msgid "" "If ``x = re.search('foo', 'foo')``, ``x`` will be a :ref:`re.Match ` object where the return values of ``x.group(0)`` and ``x[0]`` will " @@ -5091,7 +5084,7 @@ msgid "" "annotations with the ``GenericAlias`` ``re.Match[str]``." msgstr "" -#: ../../library/stdtypes.rst:4832 +#: ../../library/stdtypes.rst:4825 msgid "" "If ``y = re.search(b'bar', b'bar')``, (note the ``b`` for :class:`bytes`), " "``y`` will also be an instance of ``re.Match``, but the return values of ``y." @@ -5100,21 +5093,21 @@ msgid "" "objects>` objects with ``re.Match[bytes]``." msgstr "" -#: ../../library/stdtypes.rst:4838 +#: ../../library/stdtypes.rst:4831 msgid "" "``GenericAlias`` objects are instances of the class :class:`types." "GenericAlias`, which can also be used to create ``GenericAlias`` objects " "directly." msgstr "" -#: ../../library/stdtypes.rst:4844 +#: ../../library/stdtypes.rst:4837 msgid "" "Creates a ``GenericAlias`` representing a type ``T`` parameterized by types " "*X*, *Y*, and more depending on the ``T`` used. For example, a function " "expecting a :class:`list` containing :class:`float` elements::" msgstr "" -#: ../../library/stdtypes.rst:4852 +#: ../../library/stdtypes.rst:4845 msgid "" "Another example for :term:`mapping` objects, using a :class:`dict`, which is " "a generic type expecting two type parameters representing the key type and " @@ -5122,13 +5115,13 @@ msgid "" "of type :class:`str` and values of type :class:`int`::" msgstr "" -#: ../../library/stdtypes.rst:4860 +#: ../../library/stdtypes.rst:4853 msgid "" "The builtin functions :func:`isinstance` and :func:`issubclass` do not " "accept ``GenericAlias`` types for their second argument::" msgstr "" -#: ../../library/stdtypes.rst:4868 +#: ../../library/stdtypes.rst:4861 msgid "" "The Python runtime does not enforce :term:`type annotations `. " "This extends to generic types and their type parameters. When creating a " @@ -5137,325 +5130,325 @@ msgid "" "discouraged, but will run without errors::" msgstr "" -#: ../../library/stdtypes.rst:4878 +#: ../../library/stdtypes.rst:4871 msgid "" "Furthermore, parameterized generics erase type parameters during object " "creation::" msgstr "" -#: ../../library/stdtypes.rst:4889 +#: ../../library/stdtypes.rst:4882 msgid "" "Calling :func:`repr` or :func:`str` on a generic shows the parameterized " "type::" msgstr "" -#: ../../library/stdtypes.rst:4897 +#: ../../library/stdtypes.rst:4890 msgid "" "The :meth:`~object.__getitem__` method of generic containers will raise an " "exception to disallow mistakes like ``dict[str][str]``::" msgstr "" -#: ../../library/stdtypes.rst:4905 +#: ../../library/stdtypes.rst:4898 msgid "" "However, such expressions are valid when :ref:`type variables ` " "are used. The index must have as many elements as there are type variable " "items in the ``GenericAlias`` object's :attr:`~genericalias.__args__`. ::" msgstr "" -#: ../../library/stdtypes.rst:4916 +#: ../../library/stdtypes.rst:4909 msgid "Standard Generic Classes" msgstr "" -#: ../../library/stdtypes.rst:4918 +#: ../../library/stdtypes.rst:4911 msgid "" "The following standard library classes support parameterized generics. This " "list is non-exhaustive." msgstr "" -#: ../../library/stdtypes.rst:4921 +#: ../../library/stdtypes.rst:4914 msgid ":class:`tuple`" msgstr ":class:`tuple`" -#: ../../library/stdtypes.rst:4922 +#: ../../library/stdtypes.rst:4915 msgid ":class:`list`" msgstr ":class:`list`" -#: ../../library/stdtypes.rst:4923 +#: ../../library/stdtypes.rst:4916 msgid ":class:`dict`" msgstr ":class:`dict`" -#: ../../library/stdtypes.rst:4924 +#: ../../library/stdtypes.rst:4917 msgid ":class:`set`" msgstr ":class:`set`" -#: ../../library/stdtypes.rst:4925 +#: ../../library/stdtypes.rst:4918 msgid ":class:`frozenset`" msgstr ":class:`frozenset`" -#: ../../library/stdtypes.rst:4926 +#: ../../library/stdtypes.rst:4919 msgid ":class:`type`" msgstr ":class:`type`" -#: ../../library/stdtypes.rst:4927 +#: ../../library/stdtypes.rst:4920 msgid ":class:`collections.deque`" msgstr ":class:`collections.deque`" -#: ../../library/stdtypes.rst:4928 +#: ../../library/stdtypes.rst:4921 msgid ":class:`collections.defaultdict`" msgstr ":class:`collections.defaultdict`" -#: ../../library/stdtypes.rst:4929 +#: ../../library/stdtypes.rst:4922 msgid ":class:`collections.OrderedDict`" msgstr ":class:`collections.OrderedDict`" -#: ../../library/stdtypes.rst:4930 +#: ../../library/stdtypes.rst:4923 msgid ":class:`collections.Counter`" msgstr ":class:`collections.Counter`" -#: ../../library/stdtypes.rst:4931 +#: ../../library/stdtypes.rst:4924 msgid ":class:`collections.ChainMap`" msgstr ":class:`collections.ChainMap`" -#: ../../library/stdtypes.rst:4932 +#: ../../library/stdtypes.rst:4925 msgid ":class:`collections.abc.Awaitable`" msgstr ":class:`collections.abc.Awaitable`" -#: ../../library/stdtypes.rst:4933 +#: ../../library/stdtypes.rst:4926 msgid ":class:`collections.abc.Coroutine`" msgstr ":class:`collections.abc.Coroutine`" -#: ../../library/stdtypes.rst:4934 +#: ../../library/stdtypes.rst:4927 msgid ":class:`collections.abc.AsyncIterable`" msgstr ":class:`collections.abc.AsyncIterable`" -#: ../../library/stdtypes.rst:4935 +#: ../../library/stdtypes.rst:4928 msgid ":class:`collections.abc.AsyncIterator`" msgstr ":class:`collections.abc.AsyncIterator`" -#: ../../library/stdtypes.rst:4936 +#: ../../library/stdtypes.rst:4929 msgid ":class:`collections.abc.AsyncGenerator`" msgstr ":class:`collections.abc.AsyncGenerator`" -#: ../../library/stdtypes.rst:4937 +#: ../../library/stdtypes.rst:4930 msgid ":class:`collections.abc.Iterable`" msgstr ":class:`collections.abc.Iterable`" -#: ../../library/stdtypes.rst:4938 +#: ../../library/stdtypes.rst:4931 msgid ":class:`collections.abc.Iterator`" msgstr ":class:`collections.abc.Iterator`" -#: ../../library/stdtypes.rst:4939 +#: ../../library/stdtypes.rst:4932 msgid ":class:`collections.abc.Generator`" msgstr ":class:`collections.abc.Generator`" -#: ../../library/stdtypes.rst:4940 +#: ../../library/stdtypes.rst:4933 msgid ":class:`collections.abc.Reversible`" msgstr ":class:`collections.abc.Reversible`" -#: ../../library/stdtypes.rst:4941 +#: ../../library/stdtypes.rst:4934 msgid ":class:`collections.abc.Container`" msgstr ":class:`collections.abc.Container`" -#: ../../library/stdtypes.rst:4942 +#: ../../library/stdtypes.rst:4935 msgid ":class:`collections.abc.Collection`" msgstr ":class:`collections.abc.Collection`" -#: ../../library/stdtypes.rst:4943 +#: ../../library/stdtypes.rst:4936 msgid ":class:`collections.abc.Callable`" msgstr ":class:`collections.abc.Callable`" -#: ../../library/stdtypes.rst:4944 +#: ../../library/stdtypes.rst:4937 msgid ":class:`collections.abc.Set`" msgstr ":class:`collections.abc.Set`" -#: ../../library/stdtypes.rst:4945 +#: ../../library/stdtypes.rst:4938 msgid ":class:`collections.abc.MutableSet`" msgstr ":class:`collections.abc.MutableSet`" -#: ../../library/stdtypes.rst:4946 +#: ../../library/stdtypes.rst:4939 msgid ":class:`collections.abc.Mapping`" msgstr ":class:`collections.abc.Mapping`" -#: ../../library/stdtypes.rst:4947 +#: ../../library/stdtypes.rst:4940 msgid ":class:`collections.abc.MutableMapping`" msgstr ":class:`collections.abc.MutableMapping`" -#: ../../library/stdtypes.rst:4948 +#: ../../library/stdtypes.rst:4941 msgid ":class:`collections.abc.Sequence`" msgstr ":class:`collections.abc.Sequence`" -#: ../../library/stdtypes.rst:4949 +#: ../../library/stdtypes.rst:4942 msgid ":class:`collections.abc.MutableSequence`" msgstr ":class:`collections.abc.MutableSequence`" -#: ../../library/stdtypes.rst:4950 +#: ../../library/stdtypes.rst:4943 msgid ":class:`collections.abc.ByteString`" msgstr ":class:`collections.abc.ByteString`" -#: ../../library/stdtypes.rst:4951 +#: ../../library/stdtypes.rst:4944 msgid ":class:`collections.abc.MappingView`" msgstr ":class:`collections.abc.MappingView`" -#: ../../library/stdtypes.rst:4952 +#: ../../library/stdtypes.rst:4945 msgid ":class:`collections.abc.KeysView`" msgstr ":class:`collections.abc.KeysView`" -#: ../../library/stdtypes.rst:4953 +#: ../../library/stdtypes.rst:4946 msgid ":class:`collections.abc.ItemsView`" msgstr ":class:`collections.abc.ItemsView`" -#: ../../library/stdtypes.rst:4954 +#: ../../library/stdtypes.rst:4947 msgid ":class:`collections.abc.ValuesView`" msgstr ":class:`collections.abc.ValuesView`" -#: ../../library/stdtypes.rst:4955 +#: ../../library/stdtypes.rst:4948 msgid ":class:`contextlib.AbstractContextManager`" msgstr ":class:`contextlib.AbstractContextManager`" -#: ../../library/stdtypes.rst:4956 +#: ../../library/stdtypes.rst:4949 msgid ":class:`contextlib.AbstractAsyncContextManager`" msgstr ":class:`contextlib.AbstractAsyncContextManager`" -#: ../../library/stdtypes.rst:4957 +#: ../../library/stdtypes.rst:4950 msgid ":class:`dataclasses.Field`" msgstr ":class:`dataclasses.Field`" -#: ../../library/stdtypes.rst:4958 +#: ../../library/stdtypes.rst:4951 msgid ":class:`functools.cached_property`" msgstr ":class:`functools.cached_property`" -#: ../../library/stdtypes.rst:4959 +#: ../../library/stdtypes.rst:4952 msgid ":class:`functools.partialmethod`" msgstr ":class:`functools.partialmethod`" -#: ../../library/stdtypes.rst:4960 +#: ../../library/stdtypes.rst:4953 msgid ":class:`os.PathLike`" msgstr ":class:`os.PathLike`" -#: ../../library/stdtypes.rst:4961 +#: ../../library/stdtypes.rst:4954 msgid ":class:`queue.LifoQueue`" msgstr ":class:`queue.LifoQueue`" -#: ../../library/stdtypes.rst:4962 +#: ../../library/stdtypes.rst:4955 msgid ":class:`queue.Queue`" msgstr ":class:`queue.Queue`" -#: ../../library/stdtypes.rst:4963 +#: ../../library/stdtypes.rst:4956 msgid ":class:`queue.PriorityQueue`" msgstr ":class:`queue.PriorityQueue`" -#: ../../library/stdtypes.rst:4964 +#: ../../library/stdtypes.rst:4957 msgid ":class:`queue.SimpleQueue`" msgstr ":class:`queue.SimpleQueue`" -#: ../../library/stdtypes.rst:4965 +#: ../../library/stdtypes.rst:4958 msgid ":ref:`re.Pattern `" msgstr ":ref:`re.Pattern `" -#: ../../library/stdtypes.rst:4966 +#: ../../library/stdtypes.rst:4959 msgid ":ref:`re.Match `" msgstr ":ref:`re.Match `" -#: ../../library/stdtypes.rst:4967 +#: ../../library/stdtypes.rst:4960 msgid ":class:`shelve.BsdDbShelf`" msgstr ":class:`shelve.BsdDbShelf`" -#: ../../library/stdtypes.rst:4968 +#: ../../library/stdtypes.rst:4961 msgid ":class:`shelve.DbfilenameShelf`" msgstr ":class:`shelve.DbfilenameShelf`" -#: ../../library/stdtypes.rst:4969 +#: ../../library/stdtypes.rst:4962 msgid ":class:`shelve.Shelf`" msgstr ":class:`shelve.Shelf`" -#: ../../library/stdtypes.rst:4970 +#: ../../library/stdtypes.rst:4963 msgid ":class:`types.MappingProxyType`" msgstr ":class:`types.MappingProxyType`" -#: ../../library/stdtypes.rst:4971 +#: ../../library/stdtypes.rst:4964 msgid ":class:`weakref.WeakKeyDictionary`" msgstr ":class:`weakref.WeakKeyDictionary`" -#: ../../library/stdtypes.rst:4972 +#: ../../library/stdtypes.rst:4965 msgid ":class:`weakref.WeakMethod`" msgstr ":class:`weakref.WeakMethod`" -#: ../../library/stdtypes.rst:4973 +#: ../../library/stdtypes.rst:4966 msgid ":class:`weakref.WeakSet`" msgstr ":class:`weakref.WeakSet`" -#: ../../library/stdtypes.rst:4974 +#: ../../library/stdtypes.rst:4967 msgid ":class:`weakref.WeakValueDictionary`" msgstr ":class:`weakref.WeakValueDictionary`" -#: ../../library/stdtypes.rst:4979 +#: ../../library/stdtypes.rst:4972 msgid "Special Attributes of ``GenericAlias`` objects" msgstr "" -#: ../../library/stdtypes.rst:4981 +#: ../../library/stdtypes.rst:4974 msgid "All parameterized generics implement special read-only attributes." msgstr "" -#: ../../library/stdtypes.rst:4985 +#: ../../library/stdtypes.rst:4978 msgid "This attribute points at the non-parameterized generic class::" msgstr "" -#: ../../library/stdtypes.rst:4993 +#: ../../library/stdtypes.rst:4986 msgid "" "This attribute is a :class:`tuple` (possibly of length 1) of generic types " "passed to the original :meth:`~object.__class_getitem__` of the generic " "class::" msgstr "" -#: ../../library/stdtypes.rst:5003 +#: ../../library/stdtypes.rst:4996 msgid "" "This attribute is a lazily computed tuple (possibly empty) of unique type " "variables found in ``__args__``::" msgstr "" -#: ../../library/stdtypes.rst:5014 +#: ../../library/stdtypes.rst:5007 msgid "" "A ``GenericAlias`` object with :class:`typing.ParamSpec` parameters may not " "have correct ``__parameters__`` after substitution because :class:`typing." "ParamSpec` is intended primarily for static type checking." msgstr "" -#: ../../library/stdtypes.rst:5021 +#: ../../library/stdtypes.rst:5014 msgid ":pep:`484` - Type Hints" msgstr "" -#: ../../library/stdtypes.rst:5021 +#: ../../library/stdtypes.rst:5014 msgid "Introducing Python's framework for type annotations." msgstr "" -#: ../../library/stdtypes.rst:5026 +#: ../../library/stdtypes.rst:5019 msgid ":pep:`585` - Type Hinting Generics In Standard Collections" msgstr "" -#: ../../library/stdtypes.rst:5024 +#: ../../library/stdtypes.rst:5017 msgid "" "Introducing the ability to natively parameterize standard-library classes, " "provided they implement the special class method :meth:`~object." "__class_getitem__`." msgstr "" -#: ../../library/stdtypes.rst:5029 +#: ../../library/stdtypes.rst:5022 msgid "" ":ref:`Generics`, :ref:`user-defined generics ` and :" "class:`typing.Generic`" msgstr "" -#: ../../library/stdtypes.rst:5029 +#: ../../library/stdtypes.rst:5022 msgid "" "Documentation on how to implement generic classes that can be parameterized " "at runtime and understood by static type-checkers." msgstr "" -#: ../../library/stdtypes.rst:5038 +#: ../../library/stdtypes.rst:5031 msgid "Union Type" msgstr "" -#: ../../library/stdtypes.rst:5044 +#: ../../library/stdtypes.rst:5037 msgid "" "A union object holds the value of the ``|`` (bitwise or) operation on " "multiple :ref:`type objects `. These types are intended " @@ -5464,7 +5457,7 @@ msgid "" "Union`." msgstr "" -#: ../../library/stdtypes.rst:5051 +#: ../../library/stdtypes.rst:5044 msgid "" "Defines a union object which holds types *X*, *Y*, and so forth. ``X | Y`` " "means either X or Y. It is equivalent to ``typing.Union[X, Y]``. For " @@ -5472,76 +5465,76 @@ msgid "" "class:`float`::" msgstr "" -#: ../../library/stdtypes.rst:5061 +#: ../../library/stdtypes.rst:5054 msgid "" "Union objects can be tested for equality with other union objects. Details:" msgstr "" -#: ../../library/stdtypes.rst:5063 +#: ../../library/stdtypes.rst:5056 msgid "Unions of unions are flattened::" msgstr "" -#: ../../library/stdtypes.rst:5067 +#: ../../library/stdtypes.rst:5060 msgid "Redundant types are removed::" msgstr "" -#: ../../library/stdtypes.rst:5071 +#: ../../library/stdtypes.rst:5064 msgid "When comparing unions, the order is ignored::" msgstr "" -#: ../../library/stdtypes.rst:5075 +#: ../../library/stdtypes.rst:5068 msgid "It is compatible with :data:`typing.Union`::" msgstr "" -#: ../../library/stdtypes.rst:5079 +#: ../../library/stdtypes.rst:5072 msgid "Optional types can be spelled as a union with ``None``::" msgstr "" -#: ../../library/stdtypes.rst:5086 +#: ../../library/stdtypes.rst:5079 msgid "" "Calls to :func:`isinstance` and :func:`issubclass` are also supported with a " "union object::" msgstr "" -#: ../../library/stdtypes.rst:5092 +#: ../../library/stdtypes.rst:5085 msgid "" "However, union objects containing :ref:`parameterized generics ` cannot be used::" msgstr "" -#: ../../library/stdtypes.rst:5100 +#: ../../library/stdtypes.rst:5093 msgid "" "The user-exposed type for the union object can be accessed from :data:`types." "UnionType` and used for :func:`isinstance` checks. An object cannot be " "instantiated from the type::" msgstr "" -#: ../../library/stdtypes.rst:5113 +#: ../../library/stdtypes.rst:5106 msgid "" "The :meth:`__or__` method for type objects was added to support the syntax " "``X | Y``. If a metaclass implements :meth:`__or__`, the Union may override " "it::" msgstr "" -#: ../../library/stdtypes.rst:5131 +#: ../../library/stdtypes.rst:5124 msgid ":pep:`604` -- PEP proposing the ``X | Y`` syntax and the Union type." msgstr "" -#: ../../library/stdtypes.rst:5139 +#: ../../library/stdtypes.rst:5132 msgid "Other Built-in Types" msgstr "" -#: ../../library/stdtypes.rst:5141 +#: ../../library/stdtypes.rst:5134 msgid "" "The interpreter supports several other kinds of objects. Most of these " "support only one or two operations." msgstr "" -#: ../../library/stdtypes.rst:5148 +#: ../../library/stdtypes.rst:5141 msgid "Modules" msgstr "模組" -#: ../../library/stdtypes.rst:5150 +#: ../../library/stdtypes.rst:5143 msgid "" "The only special operation on a module is attribute access: ``m.name``, " "where *m* is a module and *name* accesses a name defined in *m*'s symbol " @@ -5552,7 +5545,7 @@ msgid "" "*foo* somewhere.)" msgstr "" -#: ../../library/stdtypes.rst:5157 +#: ../../library/stdtypes.rst:5150 msgid "" "A special attribute of every module is :attr:`~object.__dict__`. This is the " "dictionary containing the module's symbol table. Modifying this dictionary " @@ -5563,32 +5556,32 @@ msgid "" "recommended." msgstr "" -#: ../../library/stdtypes.rst:5165 +#: ../../library/stdtypes.rst:5158 msgid "" "Modules built into the interpreter are written like this: ````. If loaded from a file, they are written as ````." msgstr "" -#: ../../library/stdtypes.rst:5173 +#: ../../library/stdtypes.rst:5166 msgid "Classes and Class Instances" msgstr "" -#: ../../library/stdtypes.rst:5175 +#: ../../library/stdtypes.rst:5168 msgid "See :ref:`objects` and :ref:`class` for these." msgstr "" -#: ../../library/stdtypes.rst:5181 +#: ../../library/stdtypes.rst:5174 msgid "Functions" msgstr "函式" -#: ../../library/stdtypes.rst:5183 +#: ../../library/stdtypes.rst:5176 msgid "" "Function objects are created by function definitions. The only operation on " "a function object is to call it: ``func(argument-list)``." msgstr "" -#: ../../library/stdtypes.rst:5186 +#: ../../library/stdtypes.rst:5179 msgid "" "There are really two flavors of function objects: built-in functions and " "user-defined functions. Both support the same operation (to call the " @@ -5596,15 +5589,15 @@ msgid "" "types." msgstr "" -#: ../../library/stdtypes.rst:5190 +#: ../../library/stdtypes.rst:5183 msgid "See :ref:`function` for more information." msgstr "更多資訊請見 :ref:`function`\\ 。" -#: ../../library/stdtypes.rst:5196 +#: ../../library/stdtypes.rst:5189 msgid "Methods" msgstr "" -#: ../../library/stdtypes.rst:5200 +#: ../../library/stdtypes.rst:5193 msgid "" "Methods are functions that are called using the attribute notation. There " "are two flavors: built-in methods (such as :meth:`append` on lists) and " @@ -5612,7 +5605,7 @@ msgid "" "support them." msgstr "" -#: ../../library/stdtypes.rst:5205 +#: ../../library/stdtypes.rst:5198 msgid "" "If you access a method (a function defined in a class namespace) through an " "instance, you get a special object: a :dfn:`bound method` (also called :dfn:" @@ -5624,7 +5617,7 @@ msgid "" "arg-2, ..., arg-n)``." msgstr "" -#: ../../library/stdtypes.rst:5214 +#: ../../library/stdtypes.rst:5207 msgid "" "Like function objects, bound method objects support getting arbitrary " "attributes. However, since method attributes are actually stored on the " @@ -5634,15 +5627,15 @@ msgid "" "attribute, you need to explicitly set it on the underlying function object::" msgstr "" -#: ../../library/stdtypes.rst:5234 ../../library/stdtypes.rst:5265 +#: ../../library/stdtypes.rst:5227 ../../library/stdtypes.rst:5258 msgid "See :ref:`types` for more information." msgstr "更多資訊請見 :ref:`types`\\ 。" -#: ../../library/stdtypes.rst:5242 +#: ../../library/stdtypes.rst:5235 msgid "Code Objects" msgstr "" -#: ../../library/stdtypes.rst:5248 +#: ../../library/stdtypes.rst:5241 msgid "" "Code objects are used by the implementation to represent \"pseudo-compiled\" " "executable Python code such as a function body. They differ from function " @@ -5652,23 +5645,23 @@ msgid "" "`__code__` attribute. See also the :mod:`code` module." msgstr "" -#: ../../library/stdtypes.rst:5255 +#: ../../library/stdtypes.rst:5248 msgid "" "Accessing ``__code__`` raises an :ref:`auditing event ` ``object." "__getattr__`` with arguments ``obj`` and ``\"__code__\"``." msgstr "" -#: ../../library/stdtypes.rst:5262 +#: ../../library/stdtypes.rst:5255 msgid "" "A code object can be executed or evaluated by passing it (instead of a " "source string) to the :func:`exec` or :func:`eval` built-in functions." msgstr "" -#: ../../library/stdtypes.rst:5271 +#: ../../library/stdtypes.rst:5264 msgid "Type Objects" msgstr "" -#: ../../library/stdtypes.rst:5277 +#: ../../library/stdtypes.rst:5270 msgid "" "Type objects represent the various object types. An object's type is " "accessed by the built-in function :func:`type`. There are no special " @@ -5676,30 +5669,30 @@ msgid "" "standard built-in types." msgstr "" -#: ../../library/stdtypes.rst:5282 +#: ../../library/stdtypes.rst:5275 msgid "Types are written like this: ````." msgstr "" -#: ../../library/stdtypes.rst:5288 +#: ../../library/stdtypes.rst:5281 msgid "The Null Object" msgstr "" -#: ../../library/stdtypes.rst:5290 +#: ../../library/stdtypes.rst:5283 msgid "" "This object is returned by functions that don't explicitly return a value. " "It supports no special operations. There is exactly one null object, named " "``None`` (a built-in name). ``type(None)()`` produces the same singleton." msgstr "" -#: ../../library/stdtypes.rst:5294 +#: ../../library/stdtypes.rst:5287 msgid "It is written as ``None``." msgstr "" -#: ../../library/stdtypes.rst:5301 +#: ../../library/stdtypes.rst:5294 msgid "The Ellipsis Object" msgstr "" -#: ../../library/stdtypes.rst:5303 +#: ../../library/stdtypes.rst:5296 msgid "" "This object is commonly used by slicing (see :ref:`slicings`). It supports " "no special operations. There is exactly one ellipsis object, named :const:" @@ -5707,15 +5700,15 @@ msgid "" "`Ellipsis` singleton." msgstr "" -#: ../../library/stdtypes.rst:5308 +#: ../../library/stdtypes.rst:5301 msgid "It is written as ``Ellipsis`` or ``...``." msgstr "" -#: ../../library/stdtypes.rst:5314 +#: ../../library/stdtypes.rst:5307 msgid "The NotImplemented Object" msgstr "" -#: ../../library/stdtypes.rst:5316 +#: ../../library/stdtypes.rst:5309 msgid "" "This object is returned from comparisons and binary operations when they are " "asked to operate on types they don't support. See :ref:`comparisons` for " @@ -5723,15 +5716,15 @@ msgid "" "``type(NotImplemented)()`` produces the singleton instance." msgstr "" -#: ../../library/stdtypes.rst:5321 +#: ../../library/stdtypes.rst:5314 msgid "It is written as ``NotImplemented``." msgstr "" -#: ../../library/stdtypes.rst:5327 +#: ../../library/stdtypes.rst:5320 msgid "Boolean Values" msgstr "" -#: ../../library/stdtypes.rst:5329 +#: ../../library/stdtypes.rst:5322 msgid "" "Boolean values are the two constant objects ``False`` and ``True``. They " "are used to represent truth values (although other values can also be " @@ -5742,81 +5735,81 @@ msgid "" "(see section :ref:`truth` above)." msgstr "" -#: ../../library/stdtypes.rst:5342 +#: ../../library/stdtypes.rst:5335 msgid "They are written as ``False`` and ``True``, respectively." msgstr "" -#: ../../library/stdtypes.rst:5348 +#: ../../library/stdtypes.rst:5341 msgid "Internal Objects" msgstr "" -#: ../../library/stdtypes.rst:5350 +#: ../../library/stdtypes.rst:5343 msgid "" "See :ref:`types` for this information. It describes stack frame objects, " "traceback objects, and slice objects." msgstr "" -#: ../../library/stdtypes.rst:5357 +#: ../../library/stdtypes.rst:5350 msgid "Special Attributes" msgstr "" -#: ../../library/stdtypes.rst:5359 +#: ../../library/stdtypes.rst:5352 msgid "" "The implementation adds a few special read-only attributes to several object " "types, where they are relevant. Some of these are not reported by the :func:" "`dir` built-in function." msgstr "" -#: ../../library/stdtypes.rst:5366 +#: ../../library/stdtypes.rst:5359 msgid "" "A dictionary or other mapping object used to store an object's (writable) " "attributes." msgstr "" -#: ../../library/stdtypes.rst:5372 +#: ../../library/stdtypes.rst:5365 msgid "The class to which a class instance belongs." msgstr "" -#: ../../library/stdtypes.rst:5377 +#: ../../library/stdtypes.rst:5370 msgid "The tuple of base classes of a class object." msgstr "" -#: ../../library/stdtypes.rst:5382 +#: ../../library/stdtypes.rst:5375 msgid "" "The name of the class, function, method, descriptor, or generator instance." msgstr "" -#: ../../library/stdtypes.rst:5388 +#: ../../library/stdtypes.rst:5381 msgid "" "The :term:`qualified name` of the class, function, method, descriptor, or " "generator instance." msgstr "" -#: ../../library/stdtypes.rst:5396 +#: ../../library/stdtypes.rst:5389 msgid "" "This attribute is a tuple of classes that are considered when looking for " "base classes during method resolution." msgstr "" -#: ../../library/stdtypes.rst:5402 +#: ../../library/stdtypes.rst:5395 msgid "" "This method can be overridden by a metaclass to customize the method " "resolution order for its instances. It is called at class instantiation, " "and its result is stored in :attr:`~class.__mro__`." msgstr "" -#: ../../library/stdtypes.rst:5409 +#: ../../library/stdtypes.rst:5402 msgid "" "Each class keeps a list of weak references to its immediate subclasses. " "This method returns a list of all those references still alive. The list is " "in definition order. Example::" msgstr "" -#: ../../library/stdtypes.rst:5420 +#: ../../library/stdtypes.rst:5413 msgid "Integer string conversion length limitation" msgstr "" -#: ../../library/stdtypes.rst:5422 +#: ../../library/stdtypes.rst:5415 msgid "" "CPython has a global limit for converting between :class:`int` and :class:" "`str` to mitigate denial of service attacks. This limit *only* applies to " @@ -5824,7 +5817,7 @@ msgid "" "binary conversions are unlimited. The limit can be configured." msgstr "" -#: ../../library/stdtypes.rst:5427 +#: ../../library/stdtypes.rst:5420 msgid "" "The :class:`int` type in CPython is an abitrary length number stored in " "binary form (commonly known as a \"bignum\"). There exists no algorithm that " @@ -5834,25 +5827,25 @@ msgid "" "value such as ``int('1' * 500_000)`` can take over a second on a fast CPU." msgstr "" -#: ../../library/stdtypes.rst:5434 +#: ../../library/stdtypes.rst:5427 msgid "" "Limiting conversion size offers a practical way to avoid `CVE-2020-10735 " "`_." msgstr "" -#: ../../library/stdtypes.rst:5437 +#: ../../library/stdtypes.rst:5430 msgid "" "The limit is applied to the number of digit characters in the input or " "output string when a non-linear conversion algorithm would be involved. " "Underscores and the sign are not counted towards the limit." msgstr "" -#: ../../library/stdtypes.rst:5441 +#: ../../library/stdtypes.rst:5434 msgid "" "When an operation would exceed the limit, a :exc:`ValueError` is raised:" msgstr "" -#: ../../library/stdtypes.rst:5463 +#: ../../library/stdtypes.rst:5456 msgid "" "The default limit is 4300 digits as provided in :data:`sys.int_info." "default_max_str_digits `. The lowest limit that can be " @@ -5860,94 +5853,94 @@ msgid "" "str_digits_check_threshold `." msgstr "" -#: ../../library/stdtypes.rst:5468 +#: ../../library/stdtypes.rst:5461 msgid "Verification:" msgstr "" -#: ../../library/stdtypes.rst:5483 +#: ../../library/stdtypes.rst:5476 msgid "Affected APIs" msgstr "" -#: ../../library/stdtypes.rst:5485 +#: ../../library/stdtypes.rst:5478 msgid "" -"The limition only applies to potentially slow conversions between :class:" +"The limitation only applies to potentially slow conversions between :class:" "`int` and :class:`str` or :class:`bytes`:" msgstr "" -#: ../../library/stdtypes.rst:5488 +#: ../../library/stdtypes.rst:5481 msgid "``int(string)`` with default base 10." msgstr "" -#: ../../library/stdtypes.rst:5489 +#: ../../library/stdtypes.rst:5482 msgid "``int(string, base)`` for all bases that are not a power of 2." msgstr "" -#: ../../library/stdtypes.rst:5490 +#: ../../library/stdtypes.rst:5483 msgid "``str(integer)``." msgstr "" -#: ../../library/stdtypes.rst:5491 +#: ../../library/stdtypes.rst:5484 msgid "``repr(integer)``" msgstr "" -#: ../../library/stdtypes.rst:5492 +#: ../../library/stdtypes.rst:5485 msgid "" "any other string conversion to base 10, for example ``f\"{integer}\"``, ``" "\"{}\".format(integer)``, or ``b\"%d\" % integer``." msgstr "" -#: ../../library/stdtypes.rst:5495 +#: ../../library/stdtypes.rst:5488 msgid "The limitations do not apply to functions with a linear algorithm:" msgstr "" -#: ../../library/stdtypes.rst:5497 +#: ../../library/stdtypes.rst:5490 msgid "``int(string, base)`` with base 2, 4, 8, 16, or 32." msgstr "" -#: ../../library/stdtypes.rst:5498 +#: ../../library/stdtypes.rst:5491 msgid ":func:`int.from_bytes` and :func:`int.to_bytes`." msgstr "" -#: ../../library/stdtypes.rst:5499 +#: ../../library/stdtypes.rst:5492 msgid ":func:`hex`, :func:`oct`, :func:`bin`." msgstr "" -#: ../../library/stdtypes.rst:5500 +#: ../../library/stdtypes.rst:5493 msgid ":ref:`formatspec` for hex, octal, and binary numbers." msgstr "" -#: ../../library/stdtypes.rst:5501 +#: ../../library/stdtypes.rst:5494 msgid ":class:`str` to :class:`float`." msgstr "" -#: ../../library/stdtypes.rst:5502 +#: ../../library/stdtypes.rst:5495 msgid ":class:`str` to :class:`decimal.Decimal`." msgstr "" -#: ../../library/stdtypes.rst:5505 +#: ../../library/stdtypes.rst:5498 msgid "Configuring the limit" msgstr "" -#: ../../library/stdtypes.rst:5507 +#: ../../library/stdtypes.rst:5500 msgid "" "Before Python starts up you can use an environment variable or an " "interpreter command line flag to configure the limit:" msgstr "" -#: ../../library/stdtypes.rst:5510 +#: ../../library/stdtypes.rst:5503 msgid "" ":envvar:`PYTHONINTMAXSTRDIGITS`, e.g. ``PYTHONINTMAXSTRDIGITS=640 python3`` " "to set the limit to 640 or ``PYTHONINTMAXSTRDIGITS=0 python3`` to disable " "the limitation." msgstr "" -#: ../../library/stdtypes.rst:5513 +#: ../../library/stdtypes.rst:5506 msgid "" ":option:`-X int_max_str_digits <-X>`, e.g. ``python3 -X " "int_max_str_digits=640``" msgstr "" -#: ../../library/stdtypes.rst:5515 +#: ../../library/stdtypes.rst:5508 msgid "" ":data:`sys.flags.int_max_str_digits` contains the value of :envvar:" "`PYTHONINTMAXSTRDIGITS` or :option:`-X int_max_str_digits <-X>`. If both the " @@ -5956,38 +5949,38 @@ msgid "" "int_info.default_max_str_digits` was used during initilization." msgstr "" -#: ../../library/stdtypes.rst:5521 +#: ../../library/stdtypes.rst:5514 msgid "" "From code, you can inspect the current limit and set a new one using these :" "mod:`sys` APIs:" msgstr "" -#: ../../library/stdtypes.rst:5524 +#: ../../library/stdtypes.rst:5517 msgid "" ":func:`sys.get_int_max_str_digits` and :func:`sys.set_int_max_str_digits` " "are a getter and setter for the interpreter-wide limit. Subinterpreters have " "their own limit." msgstr "" -#: ../../library/stdtypes.rst:5528 +#: ../../library/stdtypes.rst:5521 msgid "" "Information about the default and minimum can be found in :attr:`sys." "int_info`:" msgstr "" -#: ../../library/stdtypes.rst:5530 +#: ../../library/stdtypes.rst:5523 msgid "" ":data:`sys.int_info.default_max_str_digits ` is the compiled-" "in default limit." msgstr "" -#: ../../library/stdtypes.rst:5532 +#: ../../library/stdtypes.rst:5525 msgid "" ":data:`sys.int_info.str_digits_check_threshold ` is the lowest " "accepted value for the limit (other than 0 which disables it)." msgstr "" -#: ../../library/stdtypes.rst:5539 +#: ../../library/stdtypes.rst:5532 msgid "" "Setting a low limit *can* lead to problems. While rare, code exists that " "contains integer constants in decimal in their source that exceed the " @@ -5999,7 +5992,7 @@ msgid "" "constants is to convert them to ``0x`` hexadecimal form as it has no limit." msgstr "" -#: ../../library/stdtypes.rst:5548 +#: ../../library/stdtypes.rst:5541 msgid "" "Test your application thoroughly if you use a low limit. Ensure your tests " "run with the limit set early via the environment or flag so that it applies " @@ -6007,11 +6000,11 @@ msgid "" "to precompile ``.py`` sources to ``.pyc`` files." msgstr "" -#: ../../library/stdtypes.rst:5554 +#: ../../library/stdtypes.rst:5547 msgid "Recommended configuration" msgstr "" -#: ../../library/stdtypes.rst:5556 +#: ../../library/stdtypes.rst:5549 msgid "" "The default :data:`sys.int_info.default_max_str_digits` is expected to be " "reasonable for most applications. If your application requires a different " @@ -6019,7 +6012,7 @@ msgid "" "as these APIs were added in security patch releases in versions before 3.11." msgstr "" -#: ../../library/stdtypes.rst:5561 +#: ../../library/stdtypes.rst:5554 #, fuzzy msgid "Example::" msgstr "" @@ -6027,38 +6020,38 @@ msgstr "" "\n" "::" -#: ../../library/stdtypes.rst:5573 +#: ../../library/stdtypes.rst:5566 msgid "If you need to disable it entirely, set it to ``0``." msgstr "" -#: ../../library/stdtypes.rst:5577 +#: ../../library/stdtypes.rst:5570 msgid "Footnotes" msgstr "註解" -#: ../../library/stdtypes.rst:5578 +#: ../../library/stdtypes.rst:5571 msgid "" "Additional information on these special methods may be found in the Python " "Reference Manual (:ref:`customization`)." msgstr "" -#: ../../library/stdtypes.rst:5581 +#: ../../library/stdtypes.rst:5574 msgid "" "As a consequence, the list ``[1, 2]`` is considered equal to ``[1.0, 2.0]``, " "and similarly for tuples." msgstr "" -#: ../../library/stdtypes.rst:5584 +#: ../../library/stdtypes.rst:5577 msgid "They must have since the parser can't tell the type of the operands." msgstr "" -#: ../../library/stdtypes.rst:5586 +#: ../../library/stdtypes.rst:5579 msgid "" "Cased characters are those with general category property being one of \"Lu" "\" (Letter, uppercase), \"Ll\" (Letter, lowercase), or \"Lt\" (Letter, " "titlecase)." msgstr "" -#: ../../library/stdtypes.rst:5589 +#: ../../library/stdtypes.rst:5582 msgid "" "To format only a tuple you should therefore provide a singleton tuple whose " "only element is the tuple to be formatted." From 74185001857b1be05a5da295df8f2548b7e92e93 Mon Sep 17 00:00:00 2001 From: "Wei-Hsiang (Matt) Wang" Date: Mon, 5 Sep 2022 16:41:54 +0800 Subject: [PATCH 5/6] fix(library/sys): resolve fuzzy entries --- library/sys.po | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/library/sys.po b/library/sys.po index e6e5b0066c..9d7a1d4fc1 100644 --- a/library/sys.po +++ b/library/sys.po @@ -674,9 +674,8 @@ msgid ":option:`-X utf8 <-X>`" msgstr ":option:`-X utf8 <-X>`" #: ../../library/sys.rst:481 -#, fuzzy msgid ":const:`int_max_str_digits`" -msgstr ":const:`bits_per_digit`" +msgstr ":const:`int_max_str_digits`" #: ../../library/sys.rst:481 msgid "" @@ -1402,9 +1401,8 @@ msgid "size in bytes of the C type used to represent a digit" msgstr "" #: ../../library/sys.rst:974 -#, fuzzy msgid ":const:`default_max_str_digits`" -msgstr ":const:`bits_per_digit`" +msgstr ":const:`default_max_str_digits`" #: ../../library/sys.rst:974 msgid "" @@ -1413,9 +1411,8 @@ msgid "" msgstr "" #: ../../library/sys.rst:978 -#, fuzzy msgid ":const:`str_digits_check_threshold`" -msgstr ":const:`dont_write_bytecode`" +msgstr ":const:`str_digits_check_threshold`" #: ../../library/sys.rst:978 msgid "" @@ -1425,7 +1422,7 @@ msgstr "" #: ../../library/sys.rst:986 msgid "Added ``default_max_str_digits`` and ``str_digits_check_threshold``." -msgstr "" +msgstr "新增 ``default_max_str_digits`` 和 ``str_digits_check_threshold``。" #: ../../library/sys.rst:992 msgid "" From 603aa935b1f12efefa42d2c2e968606110d1c6ad Mon Sep 17 00:00:00 2001 From: "Wei-Hsiang (Matt) Wang" Date: Mon, 5 Sep 2022 16:44:31 +0800 Subject: [PATCH 6/6] fix(library/stdtypes): resolve fuzzy entry --- library/stdtypes.po | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/library/stdtypes.po b/library/stdtypes.po index 5d87f8f7fc..43d2f02bb2 100644 --- a/library/stdtypes.po +++ b/library/stdtypes.po @@ -5877,11 +5877,11 @@ msgstr "" #: ../../library/stdtypes.rst:5483 msgid "``str(integer)``." -msgstr "" +msgstr "``str(integer)``。" #: ../../library/stdtypes.rst:5484 msgid "``repr(integer)``" -msgstr "" +msgstr "``repr(integer)``" #: ../../library/stdtypes.rst:5485 msgid "" @@ -6013,7 +6013,6 @@ msgid "" msgstr "" #: ../../library/stdtypes.rst:5554 -#, fuzzy msgid "Example::" msgstr "" "範例:\n" @@ -6056,15 +6055,3 @@ msgid "" "To format only a tuple you should therefore provide a singleton tuple whose " "only element is the tuple to be formatted." msgstr "" - -#~ msgid ":class:`pathlib.Path`" -#~ msgstr ":class:`pathlib.Path`" - -#~ msgid ":class:`pathlib.PurePath`" -#~ msgstr ":class:`pathlib.PurePath`" - -#~ msgid ":class:`pathlib.PurePosixPath`" -#~ msgstr ":class:`pathlib.PurePosixPath`" - -#~ msgid ":class:`pathlib.PureWindowsPath`" -#~ msgstr ":class:`pathlib.PureWindowsPath`" 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