From b19da11b39d5db9d513e93cf42c4d5e75d9dec27 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 19 Jul 2023 00:06:39 +0000 Subject: [PATCH 01/10] sync with cpython 0c106a91 --- howto/clinic.po | 378 ++++++++++++++++++++++++------------------------ 1 file changed, 189 insertions(+), 189 deletions(-) diff --git a/howto/clinic.po b/howto/clinic.po index c7bf25756a..b9ab5a6f98 100644 --- a/howto/clinic.po +++ b/howto/clinic.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-18 19:04+0000\n" +"POT-Creation-Date: 2023-07-19 00:03+0000\n" "PO-Revision-Date: 2018-05-23 14:36+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -594,44 +594,10 @@ msgid "How-to guides" msgstr "" #: ../../howto/clinic.rst:568 -msgid "How to use symbolic default values" -msgstr "" - -#: ../../howto/clinic.rst:570 -msgid "" -"The default value you provide for a parameter can't be any arbitrary " -"expression. Currently the following are explicitly supported:" -msgstr "" - -#: ../../howto/clinic.rst:573 -msgid "Numeric constants (integer and float)" -msgstr "" - -#: ../../howto/clinic.rst:574 -msgid "String constants" -msgstr "" - -#: ../../howto/clinic.rst:575 -msgid "``True``, ``False``, and ``None``" -msgstr "" - -#: ../../howto/clinic.rst:576 -msgid "" -"Simple symbolic constants like ``sys.maxsize``, which must start with the " -"name of the module" -msgstr "" - -#: ../../howto/clinic.rst:579 -msgid "" -"(In the future, this may need to get even more elaborate, to allow full " -"expressions like ``CONSTANT - 1``.)" -msgstr "" - -#: ../../howto/clinic.rst:584 msgid "How to to rename C functions and variables generated by Argument Clinic" msgstr "" -#: ../../howto/clinic.rst:586 +#: ../../howto/clinic.rst:570 msgid "" "Argument Clinic automatically names the functions it generates for you. " "Occasionally this may cause a problem, if the generated name collides with " @@ -643,19 +609,19 @@ msgid "" "impl function." msgstr "" -#: ../../howto/clinic.rst:594 +#: ../../howto/clinic.rst:578 msgid "" "For example, if we wanted to rename the C function names generated for " "``pickle.Pickler.dump``, it'd look like this::" msgstr "" -#: ../../howto/clinic.rst:602 +#: ../../howto/clinic.rst:586 msgid "" "The base function would now be named ``pickler_dumper()``, and the impl " "function would now be named ``pickler_dumper_impl()``." msgstr "" -#: ../../howto/clinic.rst:606 +#: ../../howto/clinic.rst:590 msgid "" "Similarly, you may have a problem where you want to give a parameter a " "specific Python name, but that name may be inconvenient in C. Argument " @@ -663,21 +629,21 @@ msgid "" "using the same ``\"as\"`` syntax::" msgstr "" -#: ../../howto/clinic.rst:620 +#: ../../howto/clinic.rst:604 msgid "" "Here, the name used in Python (in the signature and the ``keywords`` array) " "would be ``file``, but the C variable would be named ``file_obj``." msgstr "" -#: ../../howto/clinic.rst:623 +#: ../../howto/clinic.rst:607 msgid "You can use this to rename the ``self`` parameter too!" msgstr "" -#: ../../howto/clinic.rst:627 +#: ../../howto/clinic.rst:611 msgid "How to convert functions using ``PyArg_UnpackTuple``" msgstr "" -#: ../../howto/clinic.rst:629 +#: ../../howto/clinic.rst:613 msgid "" "To convert a function parsing its arguments with :c:func:" "`PyArg_UnpackTuple`, simply write out all the arguments, specifying each as " @@ -686,17 +652,17 @@ msgid "" "a line by itself after the last argument)." msgstr "" -#: ../../howto/clinic.rst:635 +#: ../../howto/clinic.rst:619 msgid "" "Currently the generated code will use :c:func:`PyArg_ParseTuple`, but this " "will change soon." msgstr "" -#: ../../howto/clinic.rst:640 +#: ../../howto/clinic.rst:624 msgid "How to use optional groups" msgstr "" -#: ../../howto/clinic.rst:642 +#: ../../howto/clinic.rst:626 msgid "" "Some legacy functions have a tricky approach to parsing their arguments: " "they count the number of positional arguments, then use a ``switch`` " @@ -707,7 +673,7 @@ msgid "" "created." msgstr "" -#: ../../howto/clinic.rst:649 +#: ../../howto/clinic.rst:633 msgid "" "While functions using this approach can often be converted to use :c:func:" "`PyArg_ParseTupleAndKeywords`, optional arguments, and default values, it's " @@ -721,7 +687,7 @@ msgid "" "pass in ``x`` you may not pass in ``y`` either.)" msgstr "" -#: ../../howto/clinic.rst:661 +#: ../../howto/clinic.rst:645 msgid "" "In any case, the goal of Argument Clinic is to support argument parsing for " "all existing CPython builtins without changing their semantics. Therefore " @@ -731,7 +697,7 @@ msgid "" "required arguments. They can *only* be used with positional-only parameters." msgstr "" -#: ../../howto/clinic.rst:669 +#: ../../howto/clinic.rst:653 msgid "" "Optional groups are *only* intended for use when converting functions that " "make multiple calls to :c:func:`PyArg_ParseTuple`! Functions that use *any* " @@ -742,7 +708,7 @@ msgid "" "possible." msgstr "" -#: ../../howto/clinic.rst:678 +#: ../../howto/clinic.rst:662 msgid "" "To specify an optional group, add a ``[`` on a line by itself before the " "parameters you wish to group together, and a ``]`` on a line by itself after " @@ -751,11 +717,11 @@ msgid "" "optional::" msgstr "" -#: ../../howto/clinic.rst:707 +#: ../../howto/clinic.rst:691 msgid "Notes:" msgstr "註解:" -#: ../../howto/clinic.rst:709 +#: ../../howto/clinic.rst:693 msgid "" "For every optional group, one additional parameter will be passed into the " "impl function representing the group. The parameter will be an int named " @@ -768,34 +734,34 @@ msgid "" "I mean whether or not the parameters received arguments in this invocation.)" msgstr "" -#: ../../howto/clinic.rst:720 +#: ../../howto/clinic.rst:704 msgid "" "If there are no required arguments, the optional groups will behave as if " "they're to the right of the required arguments." msgstr "" -#: ../../howto/clinic.rst:723 +#: ../../howto/clinic.rst:707 msgid "" "In the case of ambiguity, the argument parsing code favors parameters on the " "left (before the required parameters)." msgstr "" -#: ../../howto/clinic.rst:726 +#: ../../howto/clinic.rst:710 msgid "Optional groups can only contain positional-only parameters." msgstr "" -#: ../../howto/clinic.rst:728 +#: ../../howto/clinic.rst:712 msgid "" "Optional groups are *only* intended for legacy code. Please do not use " "optional groups for new code." msgstr "" -#: ../../howto/clinic.rst:733 +#: ../../howto/clinic.rst:717 msgid "" "How to use real Argument Clinic converters, instead of \"legacy converters\"" msgstr "" -#: ../../howto/clinic.rst:735 +#: ../../howto/clinic.rst:719 msgid "" "To save time, and to minimize how much you need to learn to achieve your " "first port to Argument Clinic, the walkthrough above tells you to use " @@ -804,38 +770,38 @@ msgid "" "be clear, their use is acceptable when porting code for Python 3.4." msgstr "" -#: ../../howto/clinic.rst:742 +#: ../../howto/clinic.rst:726 msgid "" "However, in the long term we probably want all our blocks to use Argument " "Clinic's real syntax for converters. Why? A couple reasons:" msgstr "" -#: ../../howto/clinic.rst:746 +#: ../../howto/clinic.rst:730 msgid "" "The proper converters are far easier to read and clearer in their intent." msgstr "" -#: ../../howto/clinic.rst:747 +#: ../../howto/clinic.rst:731 msgid "" "There are some format units that are unsupported as \"legacy converters\", " "because they require arguments, and the legacy converter syntax doesn't " "support specifying arguments." msgstr "" -#: ../../howto/clinic.rst:750 +#: ../../howto/clinic.rst:734 msgid "" "In the future we may have a new argument parsing library that isn't " "restricted to what :c:func:`PyArg_ParseTuple` supports; this flexibility " "won't be available to parameters using legacy converters." msgstr "" -#: ../../howto/clinic.rst:754 +#: ../../howto/clinic.rst:738 msgid "" "Therefore, if you don't mind a little extra effort, please use the normal " "converters instead of legacy converters." msgstr "" -#: ../../howto/clinic.rst:757 +#: ../../howto/clinic.rst:741 msgid "" "In a nutshell, the syntax for Argument Clinic (non-legacy) converters looks " "like a Python function call. However, if there are no explicit arguments to " @@ -843,17 +809,17 @@ msgid "" "parentheses. Thus ``bool`` and ``bool()`` are exactly the same converters." msgstr "" -#: ../../howto/clinic.rst:763 +#: ../../howto/clinic.rst:747 msgid "" "All arguments to Argument Clinic converters are keyword-only. All Argument " "Clinic converters accept the following arguments:" msgstr "" -#: ../../howto/clinic.rst:771 ../../howto/clinic.rst:1335 +#: ../../howto/clinic.rst:755 ../../howto/clinic.rst:1335 msgid "``c_default``" msgstr "``c_default``" -#: ../../howto/clinic.rst:767 +#: ../../howto/clinic.rst:751 msgid "" "The default value for this parameter when defined in C. Specifically, this " "will be the initializer for the variable declared in the \"parse " @@ -861,36 +827,36 @@ msgid "" "how to use this. Specified as a string." msgstr "" -#: ../../howto/clinic.rst:776 +#: ../../howto/clinic.rst:760 msgid "``annotation``" msgstr "``annotation``" -#: ../../howto/clinic.rst:774 +#: ../../howto/clinic.rst:758 msgid "" "The annotation value for this parameter. Not currently supported, because :" "pep:`8` mandates that the Python library may not use annotations." msgstr "" -#: ../../howto/clinic.rst:779 +#: ../../howto/clinic.rst:763 msgid "``unused``" msgstr "``unused``" -#: ../../howto/clinic.rst:779 +#: ../../howto/clinic.rst:763 msgid "" "Wrap the argument with :c:macro:`Py_UNUSED` in the impl function signature." msgstr "" -#: ../../howto/clinic.rst:781 +#: ../../howto/clinic.rst:765 msgid "" "In addition, some converters accept additional arguments. Here is a list of " "these arguments, along with their meanings:" msgstr "" -#: ../../howto/clinic.rst:790 +#: ../../howto/clinic.rst:774 msgid "``accept``" msgstr "``accept``" -#: ../../howto/clinic.rst:785 +#: ../../howto/clinic.rst:769 msgid "" "A set of Python types (and possibly pseudo-types); this restricts the " "allowable Python argument to values of these types. (This is not a general-" @@ -898,68 +864,68 @@ msgid "" "shown in the legacy converter table.)" msgstr "" -#: ../../howto/clinic.rst:790 +#: ../../howto/clinic.rst:774 msgid "To accept ``None``, add ``NoneType`` to this set." msgstr "" -#: ../../howto/clinic.rst:795 +#: ../../howto/clinic.rst:779 msgid "``bitwise``" msgstr "``bitwise``" -#: ../../howto/clinic.rst:793 +#: ../../howto/clinic.rst:777 msgid "" "Only supported for unsigned integers. The native integer value of this " "Python argument will be written to the parameter without any range checking, " "even for negative values." msgstr "" -#: ../../howto/clinic.rst:800 ../../howto/clinic.rst:1349 +#: ../../howto/clinic.rst:784 ../../howto/clinic.rst:1349 msgid "``converter``" msgstr "``converter``" -#: ../../howto/clinic.rst:798 +#: ../../howto/clinic.rst:782 msgid "" "Only supported by the ``object`` converter. Specifies the name of a :ref:`C " "\"converter function\" ` to use to convert this object to a " "native type." msgstr "" -#: ../../howto/clinic.rst:805 +#: ../../howto/clinic.rst:789 msgid "``encoding``" msgstr "``encoding``" -#: ../../howto/clinic.rst:803 +#: ../../howto/clinic.rst:787 msgid "" "Only supported for strings. Specifies the encoding to use when converting " "this string from a Python str (Unicode) value into a C ``char *`` value." msgstr "" -#: ../../howto/clinic.rst:809 +#: ../../howto/clinic.rst:793 msgid "``subclass_of``" msgstr "``subclass_of``" -#: ../../howto/clinic.rst:808 +#: ../../howto/clinic.rst:792 msgid "" "Only supported for the ``object`` converter. Requires that the Python value " "be a subclass of a Python type, as expressed in C." msgstr "" -#: ../../howto/clinic.rst:814 ../../howto/clinic.rst:1321 +#: ../../howto/clinic.rst:798 ../../howto/clinic.rst:1321 msgid "``type``" msgstr "``type``" -#: ../../howto/clinic.rst:812 +#: ../../howto/clinic.rst:796 msgid "" "Only supported for the ``object`` and ``self`` converters. Specifies the C " "type that will be used to declare the variable. Default value is " "``\"PyObject *\"``." msgstr "" -#: ../../howto/clinic.rst:820 +#: ../../howto/clinic.rst:804 msgid "``zeroes``" msgstr "``zeroes``" -#: ../../howto/clinic.rst:817 +#: ../../howto/clinic.rst:801 msgid "" "Only supported for strings. If true, embedded NUL bytes (``'\\\\0'``) are " "permitted inside the value. The length of the string will be passed in to " @@ -967,7 +933,7 @@ msgid "" "``_length``." msgstr "" -#: ../../howto/clinic.rst:822 +#: ../../howto/clinic.rst:806 msgid "" "Please note, not every possible combination of arguments will work. Usually " "these arguments are implemented by specific ``PyArg_ParseTuple`` *format " @@ -978,350 +944,350 @@ msgid "" "least, not yet.)" msgstr "" -#: ../../howto/clinic.rst:830 +#: ../../howto/clinic.rst:814 msgid "" "Below is a table showing the mapping of legacy converters into real Argument " "Clinic converters. On the left is the legacy converter, on the right is the " "text you'd replace it with." msgstr "" -#: ../../howto/clinic.rst:835 +#: ../../howto/clinic.rst:819 msgid "``'B'``" msgstr "``'B'``" -#: ../../howto/clinic.rst:835 +#: ../../howto/clinic.rst:819 msgid "``unsigned_char(bitwise=True)``" msgstr "``unsigned_char(bitwise=True)``" -#: ../../howto/clinic.rst:836 +#: ../../howto/clinic.rst:820 msgid "``'b'``" msgstr "``'b'``" -#: ../../howto/clinic.rst:836 +#: ../../howto/clinic.rst:820 msgid "``unsigned_char``" msgstr "``unsigned_char``" -#: ../../howto/clinic.rst:837 +#: ../../howto/clinic.rst:821 msgid "``'c'``" msgstr "``'c'``" -#: ../../howto/clinic.rst:837 +#: ../../howto/clinic.rst:821 msgid "``char``" msgstr "``char``" -#: ../../howto/clinic.rst:838 +#: ../../howto/clinic.rst:822 msgid "``'C'``" msgstr "``'C'``" -#: ../../howto/clinic.rst:838 +#: ../../howto/clinic.rst:822 msgid "``int(accept={str})``" msgstr "``int(accept={str})``" -#: ../../howto/clinic.rst:839 +#: ../../howto/clinic.rst:823 msgid "``'d'``" msgstr "``'d'``" -#: ../../howto/clinic.rst:839 +#: ../../howto/clinic.rst:823 msgid "``double``" msgstr "``double``" -#: ../../howto/clinic.rst:840 +#: ../../howto/clinic.rst:824 msgid "``'D'``" msgstr "``'D'``" -#: ../../howto/clinic.rst:840 +#: ../../howto/clinic.rst:824 msgid "``Py_complex``" msgstr "``Py_complex``" -#: ../../howto/clinic.rst:841 +#: ../../howto/clinic.rst:825 msgid "``'es'``" msgstr "``'es'``" -#: ../../howto/clinic.rst:841 +#: ../../howto/clinic.rst:825 msgid "``str(encoding='name_of_encoding')``" msgstr "``str(encoding='name_of_encoding')``" -#: ../../howto/clinic.rst:842 +#: ../../howto/clinic.rst:826 msgid "``'es#'``" msgstr "``'es#'``" -#: ../../howto/clinic.rst:842 +#: ../../howto/clinic.rst:826 msgid "``str(encoding='name_of_encoding', zeroes=True)``" msgstr "``str(encoding='name_of_encoding', zeroes=True)``" -#: ../../howto/clinic.rst:843 +#: ../../howto/clinic.rst:827 msgid "``'et'``" msgstr "``'et'``" -#: ../../howto/clinic.rst:843 +#: ../../howto/clinic.rst:827 msgid "``str(encoding='name_of_encoding', accept={bytes, bytearray, str})``" msgstr "``str(encoding='name_of_encoding', accept={bytes, bytearray, str})``" -#: ../../howto/clinic.rst:844 +#: ../../howto/clinic.rst:828 msgid "``'et#'``" msgstr "``'et#'``" -#: ../../howto/clinic.rst:844 +#: ../../howto/clinic.rst:828 msgid "" "``str(encoding='name_of_encoding', accept={bytes, bytearray, str}, " "zeroes=True)``" msgstr "" -#: ../../howto/clinic.rst:845 +#: ../../howto/clinic.rst:829 msgid "``'f'``" msgstr "``'f'``" -#: ../../howto/clinic.rst:845 +#: ../../howto/clinic.rst:829 msgid "``float``" msgstr "``float``" -#: ../../howto/clinic.rst:846 +#: ../../howto/clinic.rst:830 msgid "``'h'``" msgstr "``'h'``" -#: ../../howto/clinic.rst:846 +#: ../../howto/clinic.rst:830 msgid "``short``" msgstr "``short``" -#: ../../howto/clinic.rst:847 +#: ../../howto/clinic.rst:831 msgid "``'H'``" msgstr "``'H'``" -#: ../../howto/clinic.rst:847 +#: ../../howto/clinic.rst:831 msgid "``unsigned_short(bitwise=True)``" msgstr "``unsigned_short(bitwise=True)``" -#: ../../howto/clinic.rst:848 +#: ../../howto/clinic.rst:832 msgid "``'i'``" msgstr "``'i'``" -#: ../../howto/clinic.rst:848 +#: ../../howto/clinic.rst:832 msgid "``int``" msgstr "``int``" -#: ../../howto/clinic.rst:849 +#: ../../howto/clinic.rst:833 msgid "``'I'``" msgstr "``'I'``" -#: ../../howto/clinic.rst:849 +#: ../../howto/clinic.rst:833 msgid "``unsigned_int(bitwise=True)``" msgstr "``unsigned_int(bitwise=True)``" -#: ../../howto/clinic.rst:850 +#: ../../howto/clinic.rst:834 msgid "``'k'``" msgstr "``'k'``" -#: ../../howto/clinic.rst:850 +#: ../../howto/clinic.rst:834 msgid "``unsigned_long(bitwise=True)``" msgstr "``unsigned_long(bitwise=True)``" -#: ../../howto/clinic.rst:851 +#: ../../howto/clinic.rst:835 msgid "``'K'``" msgstr "``'K'``" -#: ../../howto/clinic.rst:851 +#: ../../howto/clinic.rst:835 msgid "``unsigned_long_long(bitwise=True)``" msgstr "``unsigned_long_long(bitwise=True)``" -#: ../../howto/clinic.rst:852 +#: ../../howto/clinic.rst:836 msgid "``'l'``" msgstr "``'l'``" -#: ../../howto/clinic.rst:852 +#: ../../howto/clinic.rst:836 msgid "``long``" msgstr "``long``" -#: ../../howto/clinic.rst:853 +#: ../../howto/clinic.rst:837 msgid "``'L'``" msgstr "``'L'``" -#: ../../howto/clinic.rst:853 +#: ../../howto/clinic.rst:837 msgid "``long long``" msgstr "``long long``" -#: ../../howto/clinic.rst:854 +#: ../../howto/clinic.rst:838 msgid "``'n'``" msgstr "``'n'``" -#: ../../howto/clinic.rst:854 +#: ../../howto/clinic.rst:838 msgid "``Py_ssize_t``" msgstr "``Py_ssize_t``" -#: ../../howto/clinic.rst:855 +#: ../../howto/clinic.rst:839 msgid "``'O'``" msgstr "``'O'``" -#: ../../howto/clinic.rst:855 +#: ../../howto/clinic.rst:839 msgid "``object``" msgstr "``object``" -#: ../../howto/clinic.rst:856 +#: ../../howto/clinic.rst:840 msgid "``'O!'``" msgstr "``'O!'``" -#: ../../howto/clinic.rst:856 +#: ../../howto/clinic.rst:840 msgid "``object(subclass_of='&PySomething_Type')``" msgstr "``object(subclass_of='&PySomething_Type')``" -#: ../../howto/clinic.rst:857 +#: ../../howto/clinic.rst:841 msgid "``'O&'``" msgstr "``'O&'``" -#: ../../howto/clinic.rst:857 +#: ../../howto/clinic.rst:841 msgid "``object(converter='name_of_c_function')``" msgstr "``object(converter='name_of_c_function')``" -#: ../../howto/clinic.rst:858 +#: ../../howto/clinic.rst:842 msgid "``'p'``" msgstr "``'p'``" -#: ../../howto/clinic.rst:858 +#: ../../howto/clinic.rst:842 msgid "``bool``" msgstr "``bool``" -#: ../../howto/clinic.rst:859 +#: ../../howto/clinic.rst:843 msgid "``'S'``" msgstr "``'S'``" -#: ../../howto/clinic.rst:859 +#: ../../howto/clinic.rst:843 msgid "``PyBytesObject``" msgstr "``PyBytesObject``" -#: ../../howto/clinic.rst:860 +#: ../../howto/clinic.rst:844 msgid "``'s'``" msgstr "``'s'``" -#: ../../howto/clinic.rst:860 +#: ../../howto/clinic.rst:844 msgid "``str``" msgstr "``str``" -#: ../../howto/clinic.rst:861 +#: ../../howto/clinic.rst:845 msgid "``'s#'``" msgstr "``'s#'``" -#: ../../howto/clinic.rst:861 +#: ../../howto/clinic.rst:845 msgid "``str(zeroes=True)``" msgstr "``str(zeroes=True)``" -#: ../../howto/clinic.rst:862 +#: ../../howto/clinic.rst:846 msgid "``'s*'``" msgstr "``'s*'``" -#: ../../howto/clinic.rst:862 +#: ../../howto/clinic.rst:846 msgid "``Py_buffer(accept={buffer, str})``" msgstr "``Py_buffer(accept={buffer, str})``" -#: ../../howto/clinic.rst:863 +#: ../../howto/clinic.rst:847 msgid "``'U'``" msgstr "``'U'``" -#: ../../howto/clinic.rst:863 +#: ../../howto/clinic.rst:847 msgid "``unicode``" msgstr "``unicode``" -#: ../../howto/clinic.rst:864 +#: ../../howto/clinic.rst:848 msgid "``'u'``" msgstr "``'u'``" -#: ../../howto/clinic.rst:864 +#: ../../howto/clinic.rst:848 msgid "``wchar_t``" msgstr "``wchar_t``" -#: ../../howto/clinic.rst:865 +#: ../../howto/clinic.rst:849 msgid "``'u#'``" msgstr "``'u#'``" -#: ../../howto/clinic.rst:865 +#: ../../howto/clinic.rst:849 msgid "``wchar_t(zeroes=True)``" msgstr "``wchar_t(zeroes=True)``" -#: ../../howto/clinic.rst:866 +#: ../../howto/clinic.rst:850 msgid "``'w*'``" msgstr "``'w*'``" -#: ../../howto/clinic.rst:866 +#: ../../howto/clinic.rst:850 msgid "``Py_buffer(accept={rwbuffer})``" msgstr "``Py_buffer(accept={rwbuffer})``" -#: ../../howto/clinic.rst:867 +#: ../../howto/clinic.rst:851 msgid "``'Y'``" msgstr "``'Y'``" -#: ../../howto/clinic.rst:867 +#: ../../howto/clinic.rst:851 msgid "``PyByteArrayObject``" msgstr "``PyByteArrayObject``" -#: ../../howto/clinic.rst:868 +#: ../../howto/clinic.rst:852 msgid "``'y'``" msgstr "``'y'``" -#: ../../howto/clinic.rst:868 +#: ../../howto/clinic.rst:852 msgid "``str(accept={bytes})``" msgstr "``str(accept={bytes})``" -#: ../../howto/clinic.rst:869 +#: ../../howto/clinic.rst:853 msgid "``'y#'``" msgstr "``'y#'``" -#: ../../howto/clinic.rst:869 +#: ../../howto/clinic.rst:853 msgid "``str(accept={robuffer}, zeroes=True)``" msgstr "``str(accept={robuffer}, zeroes=True)``" -#: ../../howto/clinic.rst:870 +#: ../../howto/clinic.rst:854 msgid "``'y*'``" msgstr "``'y*'``" -#: ../../howto/clinic.rst:870 +#: ../../howto/clinic.rst:854 msgid "``Py_buffer``" msgstr "``Py_buffer``" -#: ../../howto/clinic.rst:871 +#: ../../howto/clinic.rst:855 msgid "``'Z'``" msgstr "``'Z'``" -#: ../../howto/clinic.rst:871 +#: ../../howto/clinic.rst:855 msgid "``wchar_t(accept={str, NoneType})``" msgstr "``wchar_t(accept={str, NoneType})``" -#: ../../howto/clinic.rst:872 +#: ../../howto/clinic.rst:856 msgid "``'Z#'``" msgstr "``'Z#'``" -#: ../../howto/clinic.rst:872 +#: ../../howto/clinic.rst:856 msgid "``wchar_t(accept={str, NoneType}, zeroes=True)``" msgstr "``wchar_t(accept={str, NoneType}, zeroes=True)``" -#: ../../howto/clinic.rst:873 +#: ../../howto/clinic.rst:857 msgid "``'z'``" msgstr "``'z'``" -#: ../../howto/clinic.rst:873 +#: ../../howto/clinic.rst:857 msgid "``str(accept={str, NoneType})``" msgstr "``str(accept={str, NoneType})``" -#: ../../howto/clinic.rst:874 +#: ../../howto/clinic.rst:858 msgid "``'z#'``" msgstr "``'z#'``" -#: ../../howto/clinic.rst:874 +#: ../../howto/clinic.rst:858 msgid "``str(accept={str, NoneType}, zeroes=True)``" msgstr "``str(accept={str, NoneType}, zeroes=True)``" -#: ../../howto/clinic.rst:875 +#: ../../howto/clinic.rst:859 msgid "``'z*'``" msgstr "``'z*'``" -#: ../../howto/clinic.rst:875 +#: ../../howto/clinic.rst:859 msgid "``Py_buffer(accept={buffer, str, NoneType})``" msgstr "``Py_buffer(accept={buffer, str, NoneType})``" -#: ../../howto/clinic.rst:878 +#: ../../howto/clinic.rst:862 msgid "" "As an example, here's our sample ``pickle.Pickler.dump`` using the proper " "converter::" msgstr "" -#: ../../howto/clinic.rst:891 +#: ../../howto/clinic.rst:875 msgid "" "One advantage of real converters is that they're more flexible than legacy " "converters. For example, the ``unsigned_int`` converter (and all the " @@ -1330,7 +1296,7 @@ msgid "" "negative numbers. You just can't do that with a legacy converter!" msgstr "" -#: ../../howto/clinic.rst:897 +#: ../../howto/clinic.rst:881 msgid "" "Argument Clinic will show you all the converters it has available. For each " "converter it'll show you all the parameters it accepts, along with the " @@ -1338,11 +1304,11 @@ msgid "" "converters`` to see the full list." msgstr "" -#: ../../howto/clinic.rst:904 +#: ../../howto/clinic.rst:888 msgid "How to use the ``Py_buffer`` converter" msgstr "" -#: ../../howto/clinic.rst:906 +#: ../../howto/clinic.rst:890 msgid "" "When using the ``Py_buffer`` converter (or the ``'s*'``, ``'w*'``, ``'*y'``, " "or ``'z*'`` legacy converters), you *must* not call :c:func:" @@ -1350,17 +1316,17 @@ msgid "" "that does it for you (in the parsing function)." msgstr "" -#: ../../howto/clinic.rst:913 +#: ../../howto/clinic.rst:897 msgid "How to use advanced converters" msgstr "" -#: ../../howto/clinic.rst:915 +#: ../../howto/clinic.rst:899 msgid "" "Remember those format units you skipped for your first time because they " "were advanced? Here's how to handle those too." msgstr "" -#: ../../howto/clinic.rst:918 +#: ../../howto/clinic.rst:902 msgid "" "The trick is, all those format units take arguments—either conversion " "functions, or types, or strings specifying an encoding. (But \"legacy " @@ -1371,7 +1337,7 @@ msgid "" "units that start with ``e``)." msgstr "" -#: ../../howto/clinic.rst:926 +#: ../../howto/clinic.rst:910 msgid "" "When using ``subclass_of``, you may also want to use the other custom " "argument for ``object()``: ``type``, which lets you set the type actually " @@ -1380,7 +1346,7 @@ msgid "" "``object(type='PyUnicodeObject *', subclass_of='&PyUnicode_Type')``." msgstr "" -#: ../../howto/clinic.rst:932 +#: ../../howto/clinic.rst:916 msgid "" "One possible problem with using Argument Clinic: it takes away some possible " "flexibility for the format units starting with ``e``. When writing a " @@ -1393,31 +1359,31 @@ msgid "" "strings for parameters whose format units start with ``e``." msgstr "" -#: ../../howto/clinic.rst:945 +#: ../../howto/clinic.rst:929 msgid "How to assign default values to parameter" msgstr "" -#: ../../howto/clinic.rst:947 +#: ../../howto/clinic.rst:931 msgid "" "Default values for parameters can be any of a number of values. At their " "simplest, they can be string, int, or float literals:" msgstr "" -#: ../../howto/clinic.rst:956 +#: ../../howto/clinic.rst:940 msgid "They can also use any of Python's built-in constants:" msgstr "" -#: ../../howto/clinic.rst:964 +#: ../../howto/clinic.rst:948 msgid "" "There's also special support for a default value of ``NULL``, and for simple " "expressions, documented in the following sections." msgstr "" -#: ../../howto/clinic.rst:969 -msgid "How to use the ``NULL`` default value" +#: ../../howto/clinic.rst:953 +msgid "The ``NULL`` default value" msgstr "" -#: ../../howto/clinic.rst:971 +#: ../../howto/clinic.rst:955 msgid "" "For string and object parameters, you can set them to ``None`` to indicate " "that there's no default. However, that means the C variable will be " @@ -1427,8 +1393,42 @@ msgid "" "with ``NULL``." msgstr "" +#: ../../howto/clinic.rst:964 +msgid "Symbolic default values" +msgstr "" + +#: ../../howto/clinic.rst:966 +msgid "" +"The default value you provide for a parameter can't be any arbitrary " +"expression. Currently the following are explicitly supported:" +msgstr "" + +#: ../../howto/clinic.rst:969 +msgid "Numeric constants (integer and float)" +msgstr "" + +#: ../../howto/clinic.rst:970 +msgid "String constants" +msgstr "" + +#: ../../howto/clinic.rst:971 +msgid "``True``, ``False``, and ``None``" +msgstr "" + +#: ../../howto/clinic.rst:972 +msgid "" +"Simple symbolic constants like ``sys.maxsize``, which must start with the " +"name of the module" +msgstr "" + +#: ../../howto/clinic.rst:975 +msgid "" +"(In the future, this may need to get even more elaborate, to allow full " +"expressions like ``CONSTANT - 1``.)" +msgstr "" + #: ../../howto/clinic.rst:980 -msgid "How to use expressions as default values" +msgid "Expressions as default values" msgstr "" #: ../../howto/clinic.rst:982 From 462e13dca799ea3bac865449c49d43c0b3941e5a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 20 Jul 2023 00:06:14 +0000 Subject: [PATCH 02/10] sync with cpython c16cf9b6 --- library/asyncio-eventloop.po | 88 +++++++++++++++++++----------------- 1 file changed, 47 insertions(+), 41 deletions(-) diff --git a/library/asyncio-eventloop.po b/library/asyncio-eventloop.po index c704ceed7b..e8f2803f41 100644 --- a/library/asyncio-eventloop.po +++ b/library/asyncio-eventloop.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-17 17:39+0800\n" +"POT-Creation-Date: 2023-07-20 00:03+0000\n" "PO-Revision-Date: 2022-02-20 12:36+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -259,7 +259,7 @@ msgstr "" #: ../../library/asyncio-eventloop.rst:176 #: ../../library/asyncio-eventloop.rst:1236 -#: ../../library/asyncio-eventloop.rst:1639 +#: ../../library/asyncio-eventloop.rst:1642 msgid "Example::" msgstr "" "範例:\n" @@ -1976,39 +1976,45 @@ msgstr "" msgid "Server object is an asynchronous context manager since Python 3.7." msgstr "" -#: ../../library/asyncio-eventloop.rst:1598 +#: ../../library/asyncio-eventloop.rst:1596 +msgid "" +"This class was exposed publicly as ``asyncio.Server`` in Python 3.9.11, " +"3.10.3 and 3.11." +msgstr "" + +#: ../../library/asyncio-eventloop.rst:1601 msgid "" "Stop serving: close listening sockets and set the :attr:`sockets` attribute " "to ``None``." msgstr "" -#: ../../library/asyncio-eventloop.rst:1601 +#: ../../library/asyncio-eventloop.rst:1604 msgid "" "The sockets that represent existing incoming client connections are left " "open." msgstr "" -#: ../../library/asyncio-eventloop.rst:1604 +#: ../../library/asyncio-eventloop.rst:1607 msgid "" "The server is closed asynchronously, use the :meth:`wait_closed` coroutine " "to wait until the server is closed." msgstr "" -#: ../../library/asyncio-eventloop.rst:1609 +#: ../../library/asyncio-eventloop.rst:1612 msgid "Return the event loop associated with the server object." msgstr "" -#: ../../library/asyncio-eventloop.rst:1615 +#: ../../library/asyncio-eventloop.rst:1618 msgid "Start accepting connections." msgstr "" -#: ../../library/asyncio-eventloop.rst:1617 +#: ../../library/asyncio-eventloop.rst:1620 msgid "" "This method is idempotent, so it can be called when the server is already " "serving." msgstr "" -#: ../../library/asyncio-eventloop.rst:1620 +#: ../../library/asyncio-eventloop.rst:1623 msgid "" "The *start_serving* keyword-only parameter to :meth:`loop.create_server` " "and :meth:`asyncio.start_server` allows creating a Server object that is not " @@ -2017,98 +2023,98 @@ msgid "" "accepting connections." msgstr "" -#: ../../library/asyncio-eventloop.rst:1631 +#: ../../library/asyncio-eventloop.rst:1634 msgid "" "Start accepting connections until the coroutine is cancelled. Cancellation " "of ``serve_forever`` task causes the server to be closed." msgstr "" -#: ../../library/asyncio-eventloop.rst:1635 +#: ../../library/asyncio-eventloop.rst:1638 msgid "" "This method can be called if the server is already accepting connections. " "Only one ``serve_forever`` task can exist per one *Server* object." msgstr "" -#: ../../library/asyncio-eventloop.rst:1657 +#: ../../library/asyncio-eventloop.rst:1660 msgid "Return ``True`` if the server is accepting new connections." msgstr "" -#: ../../library/asyncio-eventloop.rst:1663 +#: ../../library/asyncio-eventloop.rst:1666 msgid "Wait until the :meth:`close` method completes." msgstr "" -#: ../../library/asyncio-eventloop.rst:1667 +#: ../../library/asyncio-eventloop.rst:1670 msgid "" "List of socket-like objects, ``asyncio.trsock.TransportSocket``, which the " "server is listening on." msgstr "" -#: ../../library/asyncio-eventloop.rst:1670 +#: ../../library/asyncio-eventloop.rst:1673 msgid "" "Prior to Python 3.7 ``Server.sockets`` used to return an internal list of " "server sockets directly. In 3.7 a copy of that list is returned." msgstr "" -#: ../../library/asyncio-eventloop.rst:1680 +#: ../../library/asyncio-eventloop.rst:1683 msgid "Event Loop Implementations" msgstr "" -#: ../../library/asyncio-eventloop.rst:1682 +#: ../../library/asyncio-eventloop.rst:1685 msgid "" "asyncio ships with two different event loop implementations: :class:" "`SelectorEventLoop` and :class:`ProactorEventLoop`." msgstr "" -#: ../../library/asyncio-eventloop.rst:1685 +#: ../../library/asyncio-eventloop.rst:1688 msgid "" "By default asyncio is configured to use :class:`SelectorEventLoop` on Unix " "and :class:`ProactorEventLoop` on Windows." msgstr "" -#: ../../library/asyncio-eventloop.rst:1691 +#: ../../library/asyncio-eventloop.rst:1694 msgid "An event loop based on the :mod:`selectors` module." msgstr "" -#: ../../library/asyncio-eventloop.rst:1693 +#: ../../library/asyncio-eventloop.rst:1696 msgid "" "Uses the most efficient *selector* available for the given platform. It is " "also possible to manually configure the exact selector implementation to be " "used::" msgstr "" -#: ../../library/asyncio-eventloop.rst:1708 +#: ../../library/asyncio-eventloop.rst:1711 msgid ":ref:`Availability `: Unix, Windows." msgstr ":ref:`適用 `:Unix、Windows。" -#: ../../library/asyncio-eventloop.rst:1713 +#: ../../library/asyncio-eventloop.rst:1716 msgid "An event loop for Windows that uses \"I/O Completion Ports\" (IOCP)." msgstr "" -#: ../../library/asyncio-eventloop.rst:1715 +#: ../../library/asyncio-eventloop.rst:1718 msgid ":ref:`Availability `: Windows." msgstr ":ref:`適用 `:Windows。" -#: ../../library/asyncio-eventloop.rst:1719 +#: ../../library/asyncio-eventloop.rst:1722 msgid "" "`MSDN documentation on I/O Completion Ports `_." msgstr "" -#: ../../library/asyncio-eventloop.rst:1725 +#: ../../library/asyncio-eventloop.rst:1728 msgid "Abstract base class for asyncio-compliant event loops." msgstr "" -#: ../../library/asyncio-eventloop.rst:1727 +#: ../../library/asyncio-eventloop.rst:1730 msgid "" "The :ref:`asyncio-event-loop-methods` section lists all methods that an " "alternative implementation of ``AbstractEventLoop`` should have defined." msgstr "" -#: ../../library/asyncio-eventloop.rst:1733 +#: ../../library/asyncio-eventloop.rst:1736 msgid "Examples" msgstr "範例" -#: ../../library/asyncio-eventloop.rst:1735 +#: ../../library/asyncio-eventloop.rst:1738 msgid "" "Note that all examples in this section **purposefully** show how to use the " "low-level event loop APIs, such as :meth:`loop.run_forever` and :meth:`loop." @@ -2116,70 +2122,70 @@ msgid "" "consider using the high-level functions like :func:`asyncio.run`." msgstr "" -#: ../../library/asyncio-eventloop.rst:1745 +#: ../../library/asyncio-eventloop.rst:1748 msgid "Hello World with call_soon()" msgstr "" -#: ../../library/asyncio-eventloop.rst:1747 +#: ../../library/asyncio-eventloop.rst:1750 msgid "" "An example using the :meth:`loop.call_soon` method to schedule a callback. " "The callback displays ``\"Hello World\"`` and then stops the event loop::" msgstr "" -#: ../../library/asyncio-eventloop.rst:1771 +#: ../../library/asyncio-eventloop.rst:1774 msgid "" "A similar :ref:`Hello World ` example created with a coroutine " "and the :func:`run` function." msgstr "" -#: ../../library/asyncio-eventloop.rst:1778 +#: ../../library/asyncio-eventloop.rst:1781 msgid "Display the current date with call_later()" msgstr "" -#: ../../library/asyncio-eventloop.rst:1780 +#: ../../library/asyncio-eventloop.rst:1783 msgid "" "An example of a callback displaying the current date every second. The " "callback uses the :meth:`loop.call_later` method to reschedule itself after " "5 seconds, and then stops the event loop::" msgstr "" -#: ../../library/asyncio-eventloop.rst:1808 +#: ../../library/asyncio-eventloop.rst:1811 msgid "" "A similar :ref:`current date ` example created with a " "coroutine and the :func:`run` function." msgstr "" -#: ../../library/asyncio-eventloop.rst:1815 +#: ../../library/asyncio-eventloop.rst:1818 msgid "Watch a file descriptor for read events" msgstr "" -#: ../../library/asyncio-eventloop.rst:1817 +#: ../../library/asyncio-eventloop.rst:1820 msgid "" "Wait until a file descriptor received some data using the :meth:`loop." "add_reader` method and then close the event loop::" msgstr "" -#: ../../library/asyncio-eventloop.rst:1855 +#: ../../library/asyncio-eventloop.rst:1858 msgid "" "A similar :ref:`example ` using " "transports, protocols, and the :meth:`loop.create_connection` method." msgstr "" -#: ../../library/asyncio-eventloop.rst:1859 +#: ../../library/asyncio-eventloop.rst:1862 msgid "" "Another similar :ref:`example ` " "using the high-level :func:`asyncio.open_connection` function and streams." msgstr "" -#: ../../library/asyncio-eventloop.rst:1867 +#: ../../library/asyncio-eventloop.rst:1870 msgid "Set signal handlers for SIGINT and SIGTERM" msgstr "" -#: ../../library/asyncio-eventloop.rst:1869 +#: ../../library/asyncio-eventloop.rst:1872 msgid "(This ``signals`` example only works on Unix.)" msgstr "" -#: ../../library/asyncio-eventloop.rst:1871 +#: ../../library/asyncio-eventloop.rst:1874 msgid "" "Register handlers for signals :py:data:`SIGINT` and :py:data:`SIGTERM` using " "the :meth:`loop.add_signal_handler` method::" From d1c9706ad455a51ad9bd2dc76ae5487df1fdcdb4 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 21 Jul 2023 00:05:53 +0000 Subject: [PATCH 03/10] sync with cpython c1fd76e1 --- library/tkinter.ttk.po | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/tkinter.ttk.po b/library/tkinter.ttk.po index 0a9f25275f..2e0a1f367a 100644 --- a/library/tkinter.ttk.po +++ b/library/tkinter.ttk.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-05-09 00:15+0000\n" +"POT-Creation-Date: 2023-07-21 00:03+0000\n" "PO-Revision-Date: 2018-05-23 16:13+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -144,7 +144,7 @@ msgid "Standard Options" msgstr "" #: ../../library/tkinter.ttk.rst:105 -msgid "All the :mod:`ttk` Widgets accepts the following options:" +msgid "All the :mod:`ttk` Widgets accept the following options:" msgstr "" #: ../../library/tkinter.ttk.rst:110 ../../library/tkinter.ttk.rst:145 From ee9b73adc5514f76e648cf483ba0973319c779d4 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 21 Jul 2023 09:34:22 +0000 Subject: [PATCH 04/10] sync with cpython 807afdac --- howto/clinic.po | 903 ++++++++++++++++++++-------------------- library/email.utils.po | 81 +--- whatsnew/3.12.po | 915 ++++++++++++++++++++--------------------- 3 files changed, 936 insertions(+), 963 deletions(-) diff --git a/howto/clinic.po b/howto/clinic.po index b9ab5a6f98..bd5548c581 100644 --- a/howto/clinic.po +++ b/howto/clinic.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-19 00:03+0000\n" +"POT-Creation-Date: 2023-07-21 09:32+0000\n" "PO-Revision-Date: 2018-05-23 14:36+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -30,7 +30,7 @@ msgstr "作者" msgid "Larry Hastings" msgstr "Larry Hastings" -#: ../../howto/clinic.rst:-1 +#: ../../howto/clinic.rst:7 msgid "Abstract" msgstr "摘要" @@ -38,27 +38,46 @@ msgstr "摘要" msgid "" "Argument Clinic is a preprocessor for CPython C files. Its purpose is to " "automate all the boilerplate involved with writing argument parsing code for " -"\"builtins\". This document shows you how to convert your first C function " -"to work with Argument Clinic, and then introduces some advanced topics on " -"Argument Clinic usage." +"\"builtins\", module level functions, and class methods. This document is " +"divided in three major sections:" +msgstr "" + +#: ../../howto/clinic.rst:20 +msgid "" +":ref:`clinic-background` talks about the basic concepts and goals of " +"Argument Clinic." +msgstr "" + +#: ../../howto/clinic.rst:22 +msgid "" +":ref:`clinic-tutorial` guides you through all the steps required to adapt an " +"existing C function to Argument Clinic." +msgstr "" + +#: ../../howto/clinic.rst:24 +msgid ":ref:`clinic-howtos` details how to handle specific tasks." msgstr "" -#: ../../howto/clinic.rst:21 +#: ../../howto/clinic.rst:29 msgid "" -"Currently Argument Clinic is considered internal-only for CPython. Its use " -"is not supported for files outside CPython, and no guarantees are made " -"regarding backwards compatibility for future versions. In other words: if " -"you maintain an external C extension for CPython, you're welcome to " -"experiment with Argument Clinic in your own code. But the version of " -"Argument Clinic that ships with the next version of CPython *could* be " -"totally incompatible and break all your code." +"Argument Clinic is considered internal-only for CPython. Its use is not " +"supported for files outside CPython, and no guarantees are made regarding " +"backwards compatibility for future versions. In other words: if you " +"maintain an external C extension for CPython, you're welcome to experiment " +"with Argument Clinic in your own code. But the version of Argument Clinic " +"that ships with the next version of CPython *could* be totally incompatible " +"and break all your code." msgstr "" -#: ../../howto/clinic.rst:32 +#: ../../howto/clinic.rst:42 +msgid "Background" +msgstr "" + +#: ../../howto/clinic.rst:46 msgid "The goals of Argument Clinic" msgstr "" -#: ../../howto/clinic.rst:34 +#: ../../howto/clinic.rst:48 msgid "" "Argument Clinic's primary goal is to take over responsibility for all " "argument parsing code inside CPython. This means that, when you convert a " @@ -69,7 +88,7 @@ msgid "" "*kwargs``) magically converted into the C variables and types you need." msgstr "" -#: ../../howto/clinic.rst:44 +#: ../../howto/clinic.rst:58 msgid "" "In order for Argument Clinic to accomplish its primary goal, it must be easy " "to use. Currently, working with CPython's argument parsing library is a " @@ -77,7 +96,7 @@ msgid "" "places. When you use Argument Clinic, you don't have to repeat yourself." msgstr "" -#: ../../howto/clinic.rst:50 +#: ../../howto/clinic.rst:64 msgid "" "Obviously, no one would want to use Argument Clinic unless it's solving " "their problem—and without creating new problems of its own. So it's " @@ -89,14 +108,14 @@ msgid "" "parsing library. That would make for the fastest argument parsing possible!)" msgstr "" -#: ../../howto/clinic.rst:62 +#: ../../howto/clinic.rst:76 msgid "" "Additionally, Argument Clinic must be flexible enough to work with any " "approach to argument parsing. Python has some functions with some very " "strange parsing behaviors; Argument Clinic's goal is to support all of them." msgstr "" -#: ../../howto/clinic.rst:67 +#: ../../howto/clinic.rst:81 msgid "" "Finally, the original motivation for Argument Clinic was to provide " "introspection \"signatures\" for CPython builtins. It used to be, the " @@ -104,7 +123,7 @@ msgid "" "builtin. With Argument Clinic, that's a thing of the past!" msgstr "" -#: ../../howto/clinic.rst:73 +#: ../../howto/clinic.rst:87 msgid "" "One idea you should keep in mind, as you work with Argument Clinic: the more " "information you give it, the better job it'll be able to do. Argument Clinic " @@ -113,36 +132,36 @@ msgid "" "things with all the information you give it." msgstr "" -#: ../../howto/clinic.rst:83 +#: ../../howto/clinic.rst:97 msgid "Basic concepts and usage" msgstr "" -#: ../../howto/clinic.rst:85 +#: ../../howto/clinic.rst:99 msgid "" "Argument Clinic ships with CPython; you'll find it in ``Tools/clinic/clinic." "py``. If you run that script, specifying a C file as an argument:" msgstr "" -#: ../../howto/clinic.rst:92 +#: ../../howto/clinic.rst:106 msgid "" "Argument Clinic will scan over the file looking for lines that look exactly " "like this:" msgstr "" -#: ../../howto/clinic.rst:99 +#: ../../howto/clinic.rst:113 msgid "" "When it finds one, it reads everything up to a line that looks exactly like " "this:" msgstr "" -#: ../../howto/clinic.rst:106 +#: ../../howto/clinic.rst:120 msgid "" "Everything in between these two lines is input for Argument Clinic. All of " "these lines, including the beginning and ending comment lines, are " "collectively called an Argument Clinic \"block\"." msgstr "" -#: ../../howto/clinic.rst:110 +#: ../../howto/clinic.rst:124 msgid "" "When Argument Clinic parses one of these blocks, it generates output. This " "output is rewritten into the C file immediately after the block, followed by " @@ -150,7 +169,7 @@ msgid "" "this:" msgstr "" -#: ../../howto/clinic.rst:123 +#: ../../howto/clinic.rst:137 msgid "" "If you run Argument Clinic on the same file a second time, Argument Clinic " "will discard the old output and write out the new output with a fresh " @@ -158,7 +177,7 @@ msgid "" "change either." msgstr "" -#: ../../howto/clinic.rst:127 +#: ../../howto/clinic.rst:141 msgid "" "You should never modify the output portion of an Argument Clinic block. " "Instead, change the input until it produces the output you want. (That's " @@ -167,38 +186,38 @@ msgid "" "output.)" msgstr "" -#: ../../howto/clinic.rst:132 +#: ../../howto/clinic.rst:146 msgid "" "For the sake of clarity, here's the terminology we'll use with Argument " "Clinic:" msgstr "" -#: ../../howto/clinic.rst:134 +#: ../../howto/clinic.rst:148 msgid "" "The first line of the comment (``/*[clinic input]``) is the *start line*." msgstr "" -#: ../../howto/clinic.rst:135 +#: ../../howto/clinic.rst:149 msgid "" "The last line of the initial comment (``[clinic start generated code]*/``) " "is the *end line*." msgstr "" -#: ../../howto/clinic.rst:136 +#: ../../howto/clinic.rst:150 msgid "" "The last line (``/*[clinic end generated code: checksum=...]*/``) is the " "*checksum line*." msgstr "" -#: ../../howto/clinic.rst:137 +#: ../../howto/clinic.rst:151 msgid "In between the start line and the end line is the *input*." msgstr "" -#: ../../howto/clinic.rst:138 +#: ../../howto/clinic.rst:152 msgid "In between the end line and the checksum line is the *output*." msgstr "" -#: ../../howto/clinic.rst:139 +#: ../../howto/clinic.rst:153 msgid "" "All the text collectively, from the start line to the checksum line " "inclusively, is the *block*. (A block that hasn't been successfully " @@ -206,11 +225,11 @@ msgid "" "it's still considered a block.)" msgstr "" -#: ../../howto/clinic.rst:146 -msgid "Converting your first function" +#: ../../howto/clinic.rst:162 +msgid "Tutorial" msgstr "" -#: ../../howto/clinic.rst:148 +#: ../../howto/clinic.rst:164 msgid "" "The best way to get a sense of how Argument Clinic works is to convert a " "function to work with it. Here, then, are the bare minimum steps you'd need " @@ -221,30 +240,30 @@ msgid "" "keep it simple for this walkthrough so you can learn." msgstr "" -#: ../../howto/clinic.rst:157 +#: ../../howto/clinic.rst:173 msgid "Let's dive in!" msgstr "" -#: ../../howto/clinic.rst:159 +#: ../../howto/clinic.rst:175 msgid "" "Make sure you're working with a freshly updated checkout of the CPython " "trunk." msgstr "" -#: ../../howto/clinic.rst:162 +#: ../../howto/clinic.rst:178 msgid "" "Find a Python builtin that calls either :c:func:`PyArg_ParseTuple` or :c:" "func:`PyArg_ParseTupleAndKeywords`, and hasn't been converted to work with " "Argument Clinic yet. For my example I'm using ``_pickle.Pickler.dump()``." msgstr "" -#: ../../howto/clinic.rst:167 +#: ../../howto/clinic.rst:183 msgid "" "If the call to the ``PyArg_Parse`` function uses any of the following format " "units:" msgstr "" -#: ../../howto/clinic.rst:179 +#: ../../howto/clinic.rst:195 msgid "" "or if it has multiple calls to :c:func:`PyArg_ParseTuple`, you should choose " "a different function. Argument Clinic *does* support all of these " @@ -252,7 +271,7 @@ msgid "" "your first function." msgstr "" -#: ../../howto/clinic.rst:184 +#: ../../howto/clinic.rst:200 msgid "" "Also, if the function has multiple calls to :c:func:`PyArg_ParseTuple` or :c:" "func:`PyArg_ParseTupleAndKeywords` where it supports different types for the " @@ -262,11 +281,11 @@ msgid "" "polymorphic parameters." msgstr "" -#: ../../howto/clinic.rst:191 +#: ../../howto/clinic.rst:207 msgid "Add the following boilerplate above the function, creating our block::" msgstr "" -#: ../../howto/clinic.rst:196 +#: ../../howto/clinic.rst:212 msgid "" "Cut the docstring and paste it in between the ``[clinic]`` lines, removing " "all the junk that makes it a properly quoted C string. When you're done you " @@ -274,7 +293,7 @@ msgid "" "80 characters. (Argument Clinic will preserve indents inside the docstring.)" msgstr "" -#: ../../howto/clinic.rst:202 +#: ../../howto/clinic.rst:218 msgid "" "If the old docstring had a first line that looked like a function signature, " "throw that line away. (The docstring doesn't need it anymore—when you use " @@ -282,14 +301,14 @@ msgid "" "automatically based on the function's signature.)" msgstr "" -#: ../../howto/clinic.rst:208 ../../howto/clinic.rst:229 -#: ../../howto/clinic.rst:253 ../../howto/clinic.rst:311 -#: ../../howto/clinic.rst:351 ../../howto/clinic.rst:378 -#: ../../howto/clinic.rst:484 ../../howto/clinic.rst:536 +#: ../../howto/clinic.rst:224 ../../howto/clinic.rst:245 +#: ../../howto/clinic.rst:269 ../../howto/clinic.rst:327 +#: ../../howto/clinic.rst:367 ../../howto/clinic.rst:394 +#: ../../howto/clinic.rst:500 ../../howto/clinic.rst:552 msgid "Sample::" msgstr "" -#: ../../howto/clinic.rst:214 +#: ../../howto/clinic.rst:230 msgid "" "If your docstring doesn't have a \"summary\" line, Argument Clinic will " "complain. So let's make sure it has one. The \"summary\" line should be a " @@ -297,13 +316,13 @@ msgid "" "docstring." msgstr "" -#: ../../howto/clinic.rst:219 +#: ../../howto/clinic.rst:235 msgid "" "(Our example docstring consists solely of a summary line, so the sample code " "doesn't have to change for this step.)" msgstr "" -#: ../../howto/clinic.rst:222 +#: ../../howto/clinic.rst:238 msgid "" "Above the docstring, enter the name of the function, followed by a blank " "line. This should be the Python name of the function, and should be the " @@ -312,7 +331,7 @@ msgid "" "it should include the class name too." msgstr "" -#: ../../howto/clinic.rst:237 +#: ../../howto/clinic.rst:253 msgid "" "If this is the first time that module or class has been used with Argument " "Clinic in this C file, you must declare the module and/or class. Proper " @@ -322,47 +341,47 @@ msgid "" "next to each other.)" msgstr "" -#: ../../howto/clinic.rst:245 +#: ../../howto/clinic.rst:261 msgid "" "The name of the class and module should be the same as the one seen by " "Python. Check the name defined in the :c:type:`PyModuleDef` or :c:type:" "`PyTypeObject` as appropriate." msgstr "" -#: ../../howto/clinic.rst:249 +#: ../../howto/clinic.rst:265 msgid "" "When you declare a class, you must also specify two aspects of its type in " "C: the type declaration you'd use for a pointer to an instance of this " "class, and a pointer to the :c:type:`PyTypeObject` for this class." msgstr "" -#: ../../howto/clinic.rst:269 +#: ../../howto/clinic.rst:285 msgid "" "Declare each of the parameters to the function. Each parameter should get " "its own line. All the parameter lines should be indented from the function " "name and the docstring." msgstr "" -#: ../../howto/clinic.rst:273 +#: ../../howto/clinic.rst:289 msgid "The general form of these parameter lines is as follows:" msgstr "" -#: ../../howto/clinic.rst:279 +#: ../../howto/clinic.rst:295 msgid "If the parameter has a default value, add that after the converter:" msgstr "" -#: ../../howto/clinic.rst:286 +#: ../../howto/clinic.rst:302 msgid "" "Argument Clinic's support for \"default values\" is quite sophisticated; " "please see :ref:`the section below on default values ` for " "more information." msgstr "" -#: ../../howto/clinic.rst:290 +#: ../../howto/clinic.rst:306 msgid "Add a blank line below the parameters." msgstr "" -#: ../../howto/clinic.rst:292 +#: ../../howto/clinic.rst:308 msgid "" "What's a \"converter\"? It establishes both the type of the variable used " "in C, and the method to convert the Python value into a C value at runtime. " @@ -371,7 +390,7 @@ msgid "" "easier." msgstr "" -#: ../../howto/clinic.rst:299 +#: ../../howto/clinic.rst:315 msgid "" "For each parameter, copy the \"format unit\" for that parameter from the " "``PyArg_Parse()`` format argument and specify *that* as its converter, as a " @@ -381,58 +400,58 @@ msgid "" "For more on format units please see :ref:`arg-parsing`.)" msgstr "" -#: ../../howto/clinic.rst:308 +#: ../../howto/clinic.rst:324 msgid "" "For multicharacter format units like ``z#``, use the entire two-or-three " "character string." msgstr "" -#: ../../howto/clinic.rst:326 +#: ../../howto/clinic.rst:342 msgid "" "If your function has ``|`` in the format string, meaning some parameters " "have default values, you can ignore it. Argument Clinic infers which " "parameters are optional based on whether or not they have default values." msgstr "" -#: ../../howto/clinic.rst:331 +#: ../../howto/clinic.rst:347 msgid "" "If your function has ``$`` in the format string, meaning it takes keyword-" "only arguments, specify ``*`` on a line by itself before the first keyword-" "only argument, indented the same as the parameter lines." msgstr "" -#: ../../howto/clinic.rst:336 +#: ../../howto/clinic.rst:352 msgid "(``_pickle.Pickler.dump`` has neither, so our sample is unchanged.)" msgstr "" -#: ../../howto/clinic.rst:339 +#: ../../howto/clinic.rst:355 msgid "" "If the existing C function calls :c:func:`PyArg_ParseTuple` (as opposed to :" "c:func:`PyArg_ParseTupleAndKeywords`), then all its arguments are positional-" "only." msgstr "" -#: ../../howto/clinic.rst:343 +#: ../../howto/clinic.rst:359 msgid "" "To mark all parameters as positional-only in Argument Clinic, add a ``/`` on " "a line by itself after the last parameter, indented the same as the " "parameter lines." msgstr "" -#: ../../howto/clinic.rst:347 +#: ../../howto/clinic.rst:363 msgid "" "Currently this is all-or-nothing; either all parameters are positional-only, " "or none of them are. (In the future Argument Clinic may relax this " "restriction.)" msgstr "" -#: ../../howto/clinic.rst:367 +#: ../../howto/clinic.rst:383 msgid "" "It's helpful to write a per-parameter docstring for each parameter. But per-" "parameter docstrings are optional; you can skip this step if you prefer." msgstr "" -#: ../../howto/clinic.rst:371 +#: ../../howto/clinic.rst:387 msgid "" "Here's how to add a per-parameter docstring. The first line of the per-" "parameter docstring must be indented further than the parameter definition. " @@ -442,34 +461,34 @@ msgid "" "you wish." msgstr "" -#: ../../howto/clinic.rst:395 +#: ../../howto/clinic.rst:411 msgid "" "Save and close the file, then run ``Tools/clinic/clinic.py`` on it. With " "luck everything worked---your block now has output, and a ``.c.h`` file has " "been generated! Reopen the file in your text editor to see::" msgstr "" -#: ../../howto/clinic.rst:414 +#: ../../howto/clinic.rst:430 msgid "" "Obviously, if Argument Clinic didn't produce any output, it's because it " "found an error in your input. Keep fixing your errors and retrying until " "Argument Clinic processes your file without complaint." msgstr "" -#: ../../howto/clinic.rst:418 +#: ../../howto/clinic.rst:434 msgid "" "For readability, most of the glue code has been generated to a ``.c.h`` " "file. You'll need to include that in your original ``.c`` file, typically " "right after the clinic module block::" msgstr "" -#: ../../howto/clinic.rst:424 +#: ../../howto/clinic.rst:440 msgid "" "Double-check that the argument-parsing code Argument Clinic generated looks " "basically the same as the existing code." msgstr "" -#: ../../howto/clinic.rst:427 +#: ../../howto/clinic.rst:443 msgid "" "First, ensure both places use the same argument-parsing function. The " "existing code must call either :c:func:`PyArg_ParseTuple` or :c:func:" @@ -477,21 +496,21 @@ msgid "" "Clinic calls the *exact* same function." msgstr "" -#: ../../howto/clinic.rst:433 +#: ../../howto/clinic.rst:449 msgid "" "Second, the format string passed in to :c:func:`PyArg_ParseTuple` or :c:func:" "`PyArg_ParseTupleAndKeywords` should be *exactly* the same as the hand-" "written one in the existing function, up to the colon or semi-colon." msgstr "" -#: ../../howto/clinic.rst:438 +#: ../../howto/clinic.rst:454 msgid "" "(Argument Clinic always generates its format strings with a ``:`` followed " "by the name of the function. If the existing code's format string ends with " "``;``, to provide usage help, this change is harmless—don't worry about it.)" msgstr "" -#: ../../howto/clinic.rst:443 +#: ../../howto/clinic.rst:459 msgid "" "Third, for parameters whose format units require two arguments (like a " "length variable, or an encoding string, or a pointer to a conversion " @@ -499,27 +518,27 @@ msgid "" "two invocations." msgstr "" -#: ../../howto/clinic.rst:448 +#: ../../howto/clinic.rst:464 msgid "" "Fourth, inside the output portion of the block you'll find a preprocessor " "macro defining the appropriate static :c:type:`PyMethodDef` structure for " "this builtin::" msgstr "" -#: ../../howto/clinic.rst:455 +#: ../../howto/clinic.rst:471 msgid "" "This static structure should be *exactly* the same as the existing static :c:" "type:`PyMethodDef` structure for this builtin." msgstr "" -#: ../../howto/clinic.rst:458 +#: ../../howto/clinic.rst:474 msgid "" "If any of these items differ in *any way*, adjust your Argument Clinic " "function specification and rerun ``Tools/clinic/clinic.py`` until they *are* " "the same." msgstr "" -#: ../../howto/clinic.rst:463 +#: ../../howto/clinic.rst:479 msgid "" "Notice that the last line of its output is the declaration of your \"impl\" " "function. This is where the builtin's implementation goes. Delete the " @@ -530,20 +549,20 @@ msgid "" "used different names for these variables, fix it." msgstr "" -#: ../../howto/clinic.rst:471 +#: ../../howto/clinic.rst:487 msgid "" "Let's reiterate, just because it's kind of weird. Your code should now look " "like this::" msgstr "" -#: ../../howto/clinic.rst:480 +#: ../../howto/clinic.rst:496 msgid "" "Argument Clinic generated the checksum line and the function prototype just " "above it. You should write the opening (and closing) curly braces for the " "function, and the implementation inside." msgstr "" -#: ../../howto/clinic.rst:525 +#: ../../howto/clinic.rst:541 msgid "" "Remember the macro with the :c:type:`PyMethodDef` structure for this " "function? Find the existing :c:type:`PyMethodDef` structure for this " @@ -553,51 +572,51 @@ msgid "" "to the implementation.)" msgstr "" -#: ../../howto/clinic.rst:532 +#: ../../howto/clinic.rst:548 msgid "" "Note that the body of the macro contains a trailing comma. So when you " "replace the existing static :c:type:`PyMethodDef` structure with the macro, " "*don't* add a comma to the end." msgstr "" -#: ../../howto/clinic.rst:545 +#: ../../howto/clinic.rst:561 msgid "Argument Clinic may generate new instances of ``_Py_ID``. For example::" msgstr "" -#: ../../howto/clinic.rst:549 +#: ../../howto/clinic.rst:565 msgid "" "If it does, you'll have to run ``Tools/scripts/generate_global_objects.py`` " "to regenerate the list of precompiled identifiers at this point." msgstr "" -#: ../../howto/clinic.rst:553 +#: ../../howto/clinic.rst:569 msgid "" "Compile, then run the relevant portions of the regression-test suite. This " "change should not introduce any new compile-time warnings or errors, and " "there should be no externally visible change to Python's behavior." msgstr "" -#: ../../howto/clinic.rst:557 +#: ../../howto/clinic.rst:573 msgid "" "Well, except for one difference: ``inspect.signature()`` run on your " "function should now provide a valid signature!" msgstr "" -#: ../../howto/clinic.rst:560 +#: ../../howto/clinic.rst:576 msgid "" "Congratulations, you've ported your first function to work with Argument " "Clinic!" msgstr "" -#: ../../howto/clinic.rst:564 +#: ../../howto/clinic.rst:582 msgid "How-to guides" msgstr "" -#: ../../howto/clinic.rst:568 +#: ../../howto/clinic.rst:586 msgid "How to to rename C functions and variables generated by Argument Clinic" msgstr "" -#: ../../howto/clinic.rst:570 +#: ../../howto/clinic.rst:588 msgid "" "Argument Clinic automatically names the functions it generates for you. " "Occasionally this may cause a problem, if the generated name collides with " @@ -609,19 +628,19 @@ msgid "" "impl function." msgstr "" -#: ../../howto/clinic.rst:578 +#: ../../howto/clinic.rst:596 msgid "" "For example, if we wanted to rename the C function names generated for " "``pickle.Pickler.dump``, it'd look like this::" msgstr "" -#: ../../howto/clinic.rst:586 +#: ../../howto/clinic.rst:604 msgid "" "The base function would now be named ``pickler_dumper()``, and the impl " "function would now be named ``pickler_dumper_impl()``." msgstr "" -#: ../../howto/clinic.rst:590 +#: ../../howto/clinic.rst:608 msgid "" "Similarly, you may have a problem where you want to give a parameter a " "specific Python name, but that name may be inconvenient in C. Argument " @@ -629,21 +648,21 @@ msgid "" "using the same ``\"as\"`` syntax::" msgstr "" -#: ../../howto/clinic.rst:604 +#: ../../howto/clinic.rst:622 msgid "" "Here, the name used in Python (in the signature and the ``keywords`` array) " "would be ``file``, but the C variable would be named ``file_obj``." msgstr "" -#: ../../howto/clinic.rst:607 +#: ../../howto/clinic.rst:625 msgid "You can use this to rename the ``self`` parameter too!" msgstr "" -#: ../../howto/clinic.rst:611 +#: ../../howto/clinic.rst:629 msgid "How to convert functions using ``PyArg_UnpackTuple``" msgstr "" -#: ../../howto/clinic.rst:613 +#: ../../howto/clinic.rst:631 msgid "" "To convert a function parsing its arguments with :c:func:" "`PyArg_UnpackTuple`, simply write out all the arguments, specifying each as " @@ -652,17 +671,17 @@ msgid "" "a line by itself after the last argument)." msgstr "" -#: ../../howto/clinic.rst:619 +#: ../../howto/clinic.rst:637 msgid "" "Currently the generated code will use :c:func:`PyArg_ParseTuple`, but this " "will change soon." msgstr "" -#: ../../howto/clinic.rst:624 +#: ../../howto/clinic.rst:642 msgid "How to use optional groups" msgstr "" -#: ../../howto/clinic.rst:626 +#: ../../howto/clinic.rst:644 msgid "" "Some legacy functions have a tricky approach to parsing their arguments: " "they count the number of positional arguments, then use a ``switch`` " @@ -673,7 +692,7 @@ msgid "" "created." msgstr "" -#: ../../howto/clinic.rst:633 +#: ../../howto/clinic.rst:651 msgid "" "While functions using this approach can often be converted to use :c:func:" "`PyArg_ParseTupleAndKeywords`, optional arguments, and default values, it's " @@ -687,7 +706,7 @@ msgid "" "pass in ``x`` you may not pass in ``y`` either.)" msgstr "" -#: ../../howto/clinic.rst:645 +#: ../../howto/clinic.rst:663 msgid "" "In any case, the goal of Argument Clinic is to support argument parsing for " "all existing CPython builtins without changing their semantics. Therefore " @@ -697,7 +716,7 @@ msgid "" "required arguments. They can *only* be used with positional-only parameters." msgstr "" -#: ../../howto/clinic.rst:653 +#: ../../howto/clinic.rst:671 msgid "" "Optional groups are *only* intended for use when converting functions that " "make multiple calls to :c:func:`PyArg_ParseTuple`! Functions that use *any* " @@ -708,7 +727,7 @@ msgid "" "possible." msgstr "" -#: ../../howto/clinic.rst:662 +#: ../../howto/clinic.rst:680 msgid "" "To specify an optional group, add a ``[`` on a line by itself before the " "parameters you wish to group together, and a ``]`` on a line by itself after " @@ -717,11 +736,11 @@ msgid "" "optional::" msgstr "" -#: ../../howto/clinic.rst:691 +#: ../../howto/clinic.rst:709 msgid "Notes:" msgstr "註解:" -#: ../../howto/clinic.rst:693 +#: ../../howto/clinic.rst:711 msgid "" "For every optional group, one additional parameter will be passed into the " "impl function representing the group. The parameter will be an int named " @@ -734,34 +753,34 @@ msgid "" "I mean whether or not the parameters received arguments in this invocation.)" msgstr "" -#: ../../howto/clinic.rst:704 +#: ../../howto/clinic.rst:722 msgid "" "If there are no required arguments, the optional groups will behave as if " "they're to the right of the required arguments." msgstr "" -#: ../../howto/clinic.rst:707 +#: ../../howto/clinic.rst:725 msgid "" "In the case of ambiguity, the argument parsing code favors parameters on the " "left (before the required parameters)." msgstr "" -#: ../../howto/clinic.rst:710 +#: ../../howto/clinic.rst:728 msgid "Optional groups can only contain positional-only parameters." msgstr "" -#: ../../howto/clinic.rst:712 +#: ../../howto/clinic.rst:730 msgid "" "Optional groups are *only* intended for legacy code. Please do not use " "optional groups for new code." msgstr "" -#: ../../howto/clinic.rst:717 +#: ../../howto/clinic.rst:735 msgid "" "How to use real Argument Clinic converters, instead of \"legacy converters\"" msgstr "" -#: ../../howto/clinic.rst:719 +#: ../../howto/clinic.rst:737 msgid "" "To save time, and to minimize how much you need to learn to achieve your " "first port to Argument Clinic, the walkthrough above tells you to use " @@ -770,38 +789,38 @@ msgid "" "be clear, their use is acceptable when porting code for Python 3.4." msgstr "" -#: ../../howto/clinic.rst:726 +#: ../../howto/clinic.rst:744 msgid "" "However, in the long term we probably want all our blocks to use Argument " "Clinic's real syntax for converters. Why? A couple reasons:" msgstr "" -#: ../../howto/clinic.rst:730 +#: ../../howto/clinic.rst:748 msgid "" "The proper converters are far easier to read and clearer in their intent." msgstr "" -#: ../../howto/clinic.rst:731 +#: ../../howto/clinic.rst:749 msgid "" "There are some format units that are unsupported as \"legacy converters\", " "because they require arguments, and the legacy converter syntax doesn't " "support specifying arguments." msgstr "" -#: ../../howto/clinic.rst:734 +#: ../../howto/clinic.rst:752 msgid "" "In the future we may have a new argument parsing library that isn't " "restricted to what :c:func:`PyArg_ParseTuple` supports; this flexibility " "won't be available to parameters using legacy converters." msgstr "" -#: ../../howto/clinic.rst:738 +#: ../../howto/clinic.rst:756 msgid "" "Therefore, if you don't mind a little extra effort, please use the normal " "converters instead of legacy converters." msgstr "" -#: ../../howto/clinic.rst:741 +#: ../../howto/clinic.rst:759 msgid "" "In a nutshell, the syntax for Argument Clinic (non-legacy) converters looks " "like a Python function call. However, if there are no explicit arguments to " @@ -809,17 +828,17 @@ msgid "" "parentheses. Thus ``bool`` and ``bool()`` are exactly the same converters." msgstr "" -#: ../../howto/clinic.rst:747 +#: ../../howto/clinic.rst:765 msgid "" "All arguments to Argument Clinic converters are keyword-only. All Argument " "Clinic converters accept the following arguments:" msgstr "" -#: ../../howto/clinic.rst:755 ../../howto/clinic.rst:1335 +#: ../../howto/clinic.rst:773 ../../howto/clinic.rst:1353 msgid "``c_default``" msgstr "``c_default``" -#: ../../howto/clinic.rst:751 +#: ../../howto/clinic.rst:769 msgid "" "The default value for this parameter when defined in C. Specifically, this " "will be the initializer for the variable declared in the \"parse " @@ -827,36 +846,36 @@ msgid "" "how to use this. Specified as a string." msgstr "" -#: ../../howto/clinic.rst:760 +#: ../../howto/clinic.rst:778 msgid "``annotation``" msgstr "``annotation``" -#: ../../howto/clinic.rst:758 +#: ../../howto/clinic.rst:776 msgid "" "The annotation value for this parameter. Not currently supported, because :" "pep:`8` mandates that the Python library may not use annotations." msgstr "" -#: ../../howto/clinic.rst:763 +#: ../../howto/clinic.rst:781 msgid "``unused``" msgstr "``unused``" -#: ../../howto/clinic.rst:763 +#: ../../howto/clinic.rst:781 msgid "" "Wrap the argument with :c:macro:`Py_UNUSED` in the impl function signature." msgstr "" -#: ../../howto/clinic.rst:765 +#: ../../howto/clinic.rst:783 msgid "" "In addition, some converters accept additional arguments. Here is a list of " "these arguments, along with their meanings:" msgstr "" -#: ../../howto/clinic.rst:774 +#: ../../howto/clinic.rst:792 msgid "``accept``" msgstr "``accept``" -#: ../../howto/clinic.rst:769 +#: ../../howto/clinic.rst:787 msgid "" "A set of Python types (and possibly pseudo-types); this restricts the " "allowable Python argument to values of these types. (This is not a general-" @@ -864,68 +883,68 @@ msgid "" "shown in the legacy converter table.)" msgstr "" -#: ../../howto/clinic.rst:774 +#: ../../howto/clinic.rst:792 msgid "To accept ``None``, add ``NoneType`` to this set." msgstr "" -#: ../../howto/clinic.rst:779 +#: ../../howto/clinic.rst:797 msgid "``bitwise``" msgstr "``bitwise``" -#: ../../howto/clinic.rst:777 +#: ../../howto/clinic.rst:795 msgid "" "Only supported for unsigned integers. The native integer value of this " "Python argument will be written to the parameter without any range checking, " "even for negative values." msgstr "" -#: ../../howto/clinic.rst:784 ../../howto/clinic.rst:1349 +#: ../../howto/clinic.rst:802 ../../howto/clinic.rst:1367 msgid "``converter``" msgstr "``converter``" -#: ../../howto/clinic.rst:782 +#: ../../howto/clinic.rst:800 msgid "" "Only supported by the ``object`` converter. Specifies the name of a :ref:`C " "\"converter function\" ` to use to convert this object to a " "native type." msgstr "" -#: ../../howto/clinic.rst:789 +#: ../../howto/clinic.rst:807 msgid "``encoding``" msgstr "``encoding``" -#: ../../howto/clinic.rst:787 +#: ../../howto/clinic.rst:805 msgid "" "Only supported for strings. Specifies the encoding to use when converting " "this string from a Python str (Unicode) value into a C ``char *`` value." msgstr "" -#: ../../howto/clinic.rst:793 +#: ../../howto/clinic.rst:811 msgid "``subclass_of``" msgstr "``subclass_of``" -#: ../../howto/clinic.rst:792 +#: ../../howto/clinic.rst:810 msgid "" "Only supported for the ``object`` converter. Requires that the Python value " "be a subclass of a Python type, as expressed in C." msgstr "" -#: ../../howto/clinic.rst:798 ../../howto/clinic.rst:1321 +#: ../../howto/clinic.rst:816 ../../howto/clinic.rst:1339 msgid "``type``" msgstr "``type``" -#: ../../howto/clinic.rst:796 +#: ../../howto/clinic.rst:814 msgid "" "Only supported for the ``object`` and ``self`` converters. Specifies the C " "type that will be used to declare the variable. Default value is " "``\"PyObject *\"``." msgstr "" -#: ../../howto/clinic.rst:804 +#: ../../howto/clinic.rst:822 msgid "``zeroes``" msgstr "``zeroes``" -#: ../../howto/clinic.rst:801 +#: ../../howto/clinic.rst:819 msgid "" "Only supported for strings. If true, embedded NUL bytes (``'\\\\0'``) are " "permitted inside the value. The length of the string will be passed in to " @@ -933,7 +952,7 @@ msgid "" "``_length``." msgstr "" -#: ../../howto/clinic.rst:806 +#: ../../howto/clinic.rst:824 msgid "" "Please note, not every possible combination of arguments will work. Usually " "these arguments are implemented by specific ``PyArg_ParseTuple`` *format " @@ -944,350 +963,350 @@ msgid "" "least, not yet.)" msgstr "" -#: ../../howto/clinic.rst:814 +#: ../../howto/clinic.rst:832 msgid "" "Below is a table showing the mapping of legacy converters into real Argument " "Clinic converters. On the left is the legacy converter, on the right is the " "text you'd replace it with." msgstr "" -#: ../../howto/clinic.rst:819 +#: ../../howto/clinic.rst:837 msgid "``'B'``" msgstr "``'B'``" -#: ../../howto/clinic.rst:819 +#: ../../howto/clinic.rst:837 msgid "``unsigned_char(bitwise=True)``" msgstr "``unsigned_char(bitwise=True)``" -#: ../../howto/clinic.rst:820 +#: ../../howto/clinic.rst:838 msgid "``'b'``" msgstr "``'b'``" -#: ../../howto/clinic.rst:820 +#: ../../howto/clinic.rst:838 msgid "``unsigned_char``" msgstr "``unsigned_char``" -#: ../../howto/clinic.rst:821 +#: ../../howto/clinic.rst:839 msgid "``'c'``" msgstr "``'c'``" -#: ../../howto/clinic.rst:821 +#: ../../howto/clinic.rst:839 msgid "``char``" msgstr "``char``" -#: ../../howto/clinic.rst:822 +#: ../../howto/clinic.rst:840 msgid "``'C'``" msgstr "``'C'``" -#: ../../howto/clinic.rst:822 +#: ../../howto/clinic.rst:840 msgid "``int(accept={str})``" msgstr "``int(accept={str})``" -#: ../../howto/clinic.rst:823 +#: ../../howto/clinic.rst:841 msgid "``'d'``" msgstr "``'d'``" -#: ../../howto/clinic.rst:823 +#: ../../howto/clinic.rst:841 msgid "``double``" msgstr "``double``" -#: ../../howto/clinic.rst:824 +#: ../../howto/clinic.rst:842 msgid "``'D'``" msgstr "``'D'``" -#: ../../howto/clinic.rst:824 +#: ../../howto/clinic.rst:842 msgid "``Py_complex``" msgstr "``Py_complex``" -#: ../../howto/clinic.rst:825 +#: ../../howto/clinic.rst:843 msgid "``'es'``" msgstr "``'es'``" -#: ../../howto/clinic.rst:825 +#: ../../howto/clinic.rst:843 msgid "``str(encoding='name_of_encoding')``" msgstr "``str(encoding='name_of_encoding')``" -#: ../../howto/clinic.rst:826 +#: ../../howto/clinic.rst:844 msgid "``'es#'``" msgstr "``'es#'``" -#: ../../howto/clinic.rst:826 +#: ../../howto/clinic.rst:844 msgid "``str(encoding='name_of_encoding', zeroes=True)``" msgstr "``str(encoding='name_of_encoding', zeroes=True)``" -#: ../../howto/clinic.rst:827 +#: ../../howto/clinic.rst:845 msgid "``'et'``" msgstr "``'et'``" -#: ../../howto/clinic.rst:827 +#: ../../howto/clinic.rst:845 msgid "``str(encoding='name_of_encoding', accept={bytes, bytearray, str})``" msgstr "``str(encoding='name_of_encoding', accept={bytes, bytearray, str})``" -#: ../../howto/clinic.rst:828 +#: ../../howto/clinic.rst:846 msgid "``'et#'``" msgstr "``'et#'``" -#: ../../howto/clinic.rst:828 +#: ../../howto/clinic.rst:846 msgid "" "``str(encoding='name_of_encoding', accept={bytes, bytearray, str}, " "zeroes=True)``" msgstr "" -#: ../../howto/clinic.rst:829 +#: ../../howto/clinic.rst:847 msgid "``'f'``" msgstr "``'f'``" -#: ../../howto/clinic.rst:829 +#: ../../howto/clinic.rst:847 msgid "``float``" msgstr "``float``" -#: ../../howto/clinic.rst:830 +#: ../../howto/clinic.rst:848 msgid "``'h'``" msgstr "``'h'``" -#: ../../howto/clinic.rst:830 +#: ../../howto/clinic.rst:848 msgid "``short``" msgstr "``short``" -#: ../../howto/clinic.rst:831 +#: ../../howto/clinic.rst:849 msgid "``'H'``" msgstr "``'H'``" -#: ../../howto/clinic.rst:831 +#: ../../howto/clinic.rst:849 msgid "``unsigned_short(bitwise=True)``" msgstr "``unsigned_short(bitwise=True)``" -#: ../../howto/clinic.rst:832 +#: ../../howto/clinic.rst:850 msgid "``'i'``" msgstr "``'i'``" -#: ../../howto/clinic.rst:832 +#: ../../howto/clinic.rst:850 msgid "``int``" msgstr "``int``" -#: ../../howto/clinic.rst:833 +#: ../../howto/clinic.rst:851 msgid "``'I'``" msgstr "``'I'``" -#: ../../howto/clinic.rst:833 +#: ../../howto/clinic.rst:851 msgid "``unsigned_int(bitwise=True)``" msgstr "``unsigned_int(bitwise=True)``" -#: ../../howto/clinic.rst:834 +#: ../../howto/clinic.rst:852 msgid "``'k'``" msgstr "``'k'``" -#: ../../howto/clinic.rst:834 +#: ../../howto/clinic.rst:852 msgid "``unsigned_long(bitwise=True)``" msgstr "``unsigned_long(bitwise=True)``" -#: ../../howto/clinic.rst:835 +#: ../../howto/clinic.rst:853 msgid "``'K'``" msgstr "``'K'``" -#: ../../howto/clinic.rst:835 +#: ../../howto/clinic.rst:853 msgid "``unsigned_long_long(bitwise=True)``" msgstr "``unsigned_long_long(bitwise=True)``" -#: ../../howto/clinic.rst:836 +#: ../../howto/clinic.rst:854 msgid "``'l'``" msgstr "``'l'``" -#: ../../howto/clinic.rst:836 +#: ../../howto/clinic.rst:854 msgid "``long``" msgstr "``long``" -#: ../../howto/clinic.rst:837 +#: ../../howto/clinic.rst:855 msgid "``'L'``" msgstr "``'L'``" -#: ../../howto/clinic.rst:837 +#: ../../howto/clinic.rst:855 msgid "``long long``" msgstr "``long long``" -#: ../../howto/clinic.rst:838 +#: ../../howto/clinic.rst:856 msgid "``'n'``" msgstr "``'n'``" -#: ../../howto/clinic.rst:838 +#: ../../howto/clinic.rst:856 msgid "``Py_ssize_t``" msgstr "``Py_ssize_t``" -#: ../../howto/clinic.rst:839 +#: ../../howto/clinic.rst:857 msgid "``'O'``" msgstr "``'O'``" -#: ../../howto/clinic.rst:839 +#: ../../howto/clinic.rst:857 msgid "``object``" msgstr "``object``" -#: ../../howto/clinic.rst:840 +#: ../../howto/clinic.rst:858 msgid "``'O!'``" msgstr "``'O!'``" -#: ../../howto/clinic.rst:840 +#: ../../howto/clinic.rst:858 msgid "``object(subclass_of='&PySomething_Type')``" msgstr "``object(subclass_of='&PySomething_Type')``" -#: ../../howto/clinic.rst:841 +#: ../../howto/clinic.rst:859 msgid "``'O&'``" msgstr "``'O&'``" -#: ../../howto/clinic.rst:841 +#: ../../howto/clinic.rst:859 msgid "``object(converter='name_of_c_function')``" msgstr "``object(converter='name_of_c_function')``" -#: ../../howto/clinic.rst:842 +#: ../../howto/clinic.rst:860 msgid "``'p'``" msgstr "``'p'``" -#: ../../howto/clinic.rst:842 +#: ../../howto/clinic.rst:860 msgid "``bool``" msgstr "``bool``" -#: ../../howto/clinic.rst:843 +#: ../../howto/clinic.rst:861 msgid "``'S'``" msgstr "``'S'``" -#: ../../howto/clinic.rst:843 +#: ../../howto/clinic.rst:861 msgid "``PyBytesObject``" msgstr "``PyBytesObject``" -#: ../../howto/clinic.rst:844 +#: ../../howto/clinic.rst:862 msgid "``'s'``" msgstr "``'s'``" -#: ../../howto/clinic.rst:844 +#: ../../howto/clinic.rst:862 msgid "``str``" msgstr "``str``" -#: ../../howto/clinic.rst:845 +#: ../../howto/clinic.rst:863 msgid "``'s#'``" msgstr "``'s#'``" -#: ../../howto/clinic.rst:845 +#: ../../howto/clinic.rst:863 msgid "``str(zeroes=True)``" msgstr "``str(zeroes=True)``" -#: ../../howto/clinic.rst:846 +#: ../../howto/clinic.rst:864 msgid "``'s*'``" msgstr "``'s*'``" -#: ../../howto/clinic.rst:846 +#: ../../howto/clinic.rst:864 msgid "``Py_buffer(accept={buffer, str})``" msgstr "``Py_buffer(accept={buffer, str})``" -#: ../../howto/clinic.rst:847 +#: ../../howto/clinic.rst:865 msgid "``'U'``" msgstr "``'U'``" -#: ../../howto/clinic.rst:847 +#: ../../howto/clinic.rst:865 msgid "``unicode``" msgstr "``unicode``" -#: ../../howto/clinic.rst:848 +#: ../../howto/clinic.rst:866 msgid "``'u'``" msgstr "``'u'``" -#: ../../howto/clinic.rst:848 +#: ../../howto/clinic.rst:866 msgid "``wchar_t``" msgstr "``wchar_t``" -#: ../../howto/clinic.rst:849 +#: ../../howto/clinic.rst:867 msgid "``'u#'``" msgstr "``'u#'``" -#: ../../howto/clinic.rst:849 +#: ../../howto/clinic.rst:867 msgid "``wchar_t(zeroes=True)``" msgstr "``wchar_t(zeroes=True)``" -#: ../../howto/clinic.rst:850 +#: ../../howto/clinic.rst:868 msgid "``'w*'``" msgstr "``'w*'``" -#: ../../howto/clinic.rst:850 +#: ../../howto/clinic.rst:868 msgid "``Py_buffer(accept={rwbuffer})``" msgstr "``Py_buffer(accept={rwbuffer})``" -#: ../../howto/clinic.rst:851 +#: ../../howto/clinic.rst:869 msgid "``'Y'``" msgstr "``'Y'``" -#: ../../howto/clinic.rst:851 +#: ../../howto/clinic.rst:869 msgid "``PyByteArrayObject``" msgstr "``PyByteArrayObject``" -#: ../../howto/clinic.rst:852 +#: ../../howto/clinic.rst:870 msgid "``'y'``" msgstr "``'y'``" -#: ../../howto/clinic.rst:852 +#: ../../howto/clinic.rst:870 msgid "``str(accept={bytes})``" msgstr "``str(accept={bytes})``" -#: ../../howto/clinic.rst:853 +#: ../../howto/clinic.rst:871 msgid "``'y#'``" msgstr "``'y#'``" -#: ../../howto/clinic.rst:853 +#: ../../howto/clinic.rst:871 msgid "``str(accept={robuffer}, zeroes=True)``" msgstr "``str(accept={robuffer}, zeroes=True)``" -#: ../../howto/clinic.rst:854 +#: ../../howto/clinic.rst:872 msgid "``'y*'``" msgstr "``'y*'``" -#: ../../howto/clinic.rst:854 +#: ../../howto/clinic.rst:872 msgid "``Py_buffer``" msgstr "``Py_buffer``" -#: ../../howto/clinic.rst:855 +#: ../../howto/clinic.rst:873 msgid "``'Z'``" msgstr "``'Z'``" -#: ../../howto/clinic.rst:855 +#: ../../howto/clinic.rst:873 msgid "``wchar_t(accept={str, NoneType})``" msgstr "``wchar_t(accept={str, NoneType})``" -#: ../../howto/clinic.rst:856 +#: ../../howto/clinic.rst:874 msgid "``'Z#'``" msgstr "``'Z#'``" -#: ../../howto/clinic.rst:856 +#: ../../howto/clinic.rst:874 msgid "``wchar_t(accept={str, NoneType}, zeroes=True)``" msgstr "``wchar_t(accept={str, NoneType}, zeroes=True)``" -#: ../../howto/clinic.rst:857 +#: ../../howto/clinic.rst:875 msgid "``'z'``" msgstr "``'z'``" -#: ../../howto/clinic.rst:857 +#: ../../howto/clinic.rst:875 msgid "``str(accept={str, NoneType})``" msgstr "``str(accept={str, NoneType})``" -#: ../../howto/clinic.rst:858 +#: ../../howto/clinic.rst:876 msgid "``'z#'``" msgstr "``'z#'``" -#: ../../howto/clinic.rst:858 +#: ../../howto/clinic.rst:876 msgid "``str(accept={str, NoneType}, zeroes=True)``" msgstr "``str(accept={str, NoneType}, zeroes=True)``" -#: ../../howto/clinic.rst:859 +#: ../../howto/clinic.rst:877 msgid "``'z*'``" msgstr "``'z*'``" -#: ../../howto/clinic.rst:859 +#: ../../howto/clinic.rst:877 msgid "``Py_buffer(accept={buffer, str, NoneType})``" msgstr "``Py_buffer(accept={buffer, str, NoneType})``" -#: ../../howto/clinic.rst:862 +#: ../../howto/clinic.rst:880 msgid "" "As an example, here's our sample ``pickle.Pickler.dump`` using the proper " "converter::" msgstr "" -#: ../../howto/clinic.rst:875 +#: ../../howto/clinic.rst:893 msgid "" "One advantage of real converters is that they're more flexible than legacy " "converters. For example, the ``unsigned_int`` converter (and all the " @@ -1296,7 +1315,7 @@ msgid "" "negative numbers. You just can't do that with a legacy converter!" msgstr "" -#: ../../howto/clinic.rst:881 +#: ../../howto/clinic.rst:899 msgid "" "Argument Clinic will show you all the converters it has available. For each " "converter it'll show you all the parameters it accepts, along with the " @@ -1304,11 +1323,11 @@ msgid "" "converters`` to see the full list." msgstr "" -#: ../../howto/clinic.rst:888 +#: ../../howto/clinic.rst:906 msgid "How to use the ``Py_buffer`` converter" msgstr "" -#: ../../howto/clinic.rst:890 +#: ../../howto/clinic.rst:908 msgid "" "When using the ``Py_buffer`` converter (or the ``'s*'``, ``'w*'``, ``'*y'``, " "or ``'z*'`` legacy converters), you *must* not call :c:func:" @@ -1316,17 +1335,17 @@ msgid "" "that does it for you (in the parsing function)." msgstr "" -#: ../../howto/clinic.rst:897 +#: ../../howto/clinic.rst:915 msgid "How to use advanced converters" msgstr "" -#: ../../howto/clinic.rst:899 +#: ../../howto/clinic.rst:917 msgid "" "Remember those format units you skipped for your first time because they " "were advanced? Here's how to handle those too." msgstr "" -#: ../../howto/clinic.rst:902 +#: ../../howto/clinic.rst:920 msgid "" "The trick is, all those format units take arguments—either conversion " "functions, or types, or strings specifying an encoding. (But \"legacy " @@ -1337,7 +1356,7 @@ msgid "" "units that start with ``e``)." msgstr "" -#: ../../howto/clinic.rst:910 +#: ../../howto/clinic.rst:928 msgid "" "When using ``subclass_of``, you may also want to use the other custom " "argument for ``object()``: ``type``, which lets you set the type actually " @@ -1346,7 +1365,7 @@ msgid "" "``object(type='PyUnicodeObject *', subclass_of='&PyUnicode_Type')``." msgstr "" -#: ../../howto/clinic.rst:916 +#: ../../howto/clinic.rst:934 msgid "" "One possible problem with using Argument Clinic: it takes away some possible " "flexibility for the format units starting with ``e``. When writing a " @@ -1359,31 +1378,31 @@ msgid "" "strings for parameters whose format units start with ``e``." msgstr "" -#: ../../howto/clinic.rst:929 +#: ../../howto/clinic.rst:947 msgid "How to assign default values to parameter" msgstr "" -#: ../../howto/clinic.rst:931 +#: ../../howto/clinic.rst:949 msgid "" "Default values for parameters can be any of a number of values. At their " "simplest, they can be string, int, or float literals:" msgstr "" -#: ../../howto/clinic.rst:940 +#: ../../howto/clinic.rst:958 msgid "They can also use any of Python's built-in constants:" msgstr "" -#: ../../howto/clinic.rst:948 +#: ../../howto/clinic.rst:966 msgid "" "There's also special support for a default value of ``NULL``, and for simple " "expressions, documented in the following sections." msgstr "" -#: ../../howto/clinic.rst:953 +#: ../../howto/clinic.rst:971 msgid "The ``NULL`` default value" msgstr "" -#: ../../howto/clinic.rst:955 +#: ../../howto/clinic.rst:973 msgid "" "For string and object parameters, you can set them to ``None`` to indicate " "that there's no default. However, that means the C variable will be " @@ -1393,45 +1412,45 @@ msgid "" "with ``NULL``." msgstr "" -#: ../../howto/clinic.rst:964 +#: ../../howto/clinic.rst:982 msgid "Symbolic default values" msgstr "" -#: ../../howto/clinic.rst:966 +#: ../../howto/clinic.rst:984 msgid "" "The default value you provide for a parameter can't be any arbitrary " "expression. Currently the following are explicitly supported:" msgstr "" -#: ../../howto/clinic.rst:969 +#: ../../howto/clinic.rst:987 msgid "Numeric constants (integer and float)" msgstr "" -#: ../../howto/clinic.rst:970 +#: ../../howto/clinic.rst:988 msgid "String constants" msgstr "" -#: ../../howto/clinic.rst:971 +#: ../../howto/clinic.rst:989 msgid "``True``, ``False``, and ``None``" msgstr "" -#: ../../howto/clinic.rst:972 +#: ../../howto/clinic.rst:990 msgid "" "Simple symbolic constants like ``sys.maxsize``, which must start with the " "name of the module" msgstr "" -#: ../../howto/clinic.rst:975 +#: ../../howto/clinic.rst:993 msgid "" "(In the future, this may need to get even more elaborate, to allow full " "expressions like ``CONSTANT - 1``.)" msgstr "" -#: ../../howto/clinic.rst:980 +#: ../../howto/clinic.rst:998 msgid "Expressions as default values" msgstr "" -#: ../../howto/clinic.rst:982 +#: ../../howto/clinic.rst:1000 msgid "" "The default value for a parameter can be more than just a literal value. It " "can be an entire expression, using math operators and looking up attributes " @@ -1439,11 +1458,11 @@ msgid "" "obvious semantics." msgstr "" -#: ../../howto/clinic.rst:987 +#: ../../howto/clinic.rst:1005 msgid "Consider the following example:" msgstr "" -#: ../../howto/clinic.rst:993 +#: ../../howto/clinic.rst:1011 msgid "" "``sys.maxsize`` can have different values on different platforms. Therefore " "Argument Clinic can't simply evaluate that expression locally and hard-code " @@ -1451,14 +1470,14 @@ msgid "" "at runtime, when the user asks for the function's signature." msgstr "" -#: ../../howto/clinic.rst:998 +#: ../../howto/clinic.rst:1016 msgid "" "What namespace is available when the expression is evaluated? It's " "evaluated in the context of the module the builtin came from. So, if your " "module has an attribute called \"``max_widgets``\", you may simply use it:" msgstr "" -#: ../../howto/clinic.rst:1006 +#: ../../howto/clinic.rst:1024 msgid "" "If the symbol isn't found in the current module, it fails over to looking in " "``sys.modules``. That's how it can find ``sys.maxsize`` for example. " @@ -1467,7 +1486,7 @@ msgid "" "Python itself.)" msgstr "" -#: ../../howto/clinic.rst:1011 +#: ../../howto/clinic.rst:1029 msgid "" "Evaluating default values only at runtime means Argument Clinic can't " "compute the correct equivalent C default value. So you need to tell it " @@ -1475,7 +1494,7 @@ msgid "" "expression in C, using the ``c_default`` parameter to the converter:" msgstr "" -#: ../../howto/clinic.rst:1020 +#: ../../howto/clinic.rst:1038 msgid "" "Another complication: Argument Clinic can't know in advance whether or not " "the expression you supply is valid. It parses it to make sure it looks " @@ -1483,38 +1502,38 @@ msgid "" "expressions to specify values that are guaranteed to be valid at runtime!" msgstr "" -#: ../../howto/clinic.rst:1025 +#: ../../howto/clinic.rst:1043 msgid "" "Finally, because expressions must be representable as static C values, there " "are many restrictions on legal expressions. Here's a list of Python " "features you're not permitted to use:" msgstr "" -#: ../../howto/clinic.rst:1029 +#: ../../howto/clinic.rst:1047 msgid "Function calls." msgstr "" -#: ../../howto/clinic.rst:1030 +#: ../../howto/clinic.rst:1048 msgid "Inline if statements (``3 if foo else 5``)." msgstr "" -#: ../../howto/clinic.rst:1031 +#: ../../howto/clinic.rst:1049 msgid "Automatic sequence unpacking (``*[1, 2, 3]``)." msgstr "" -#: ../../howto/clinic.rst:1032 +#: ../../howto/clinic.rst:1050 msgid "List/set/dict comprehensions and generator expressions." msgstr "" -#: ../../howto/clinic.rst:1033 +#: ../../howto/clinic.rst:1051 msgid "Tuple/list/set/dict literals." msgstr "" -#: ../../howto/clinic.rst:1037 +#: ../../howto/clinic.rst:1055 msgid "How to use return converters" msgstr "" -#: ../../howto/clinic.rst:1039 +#: ../../howto/clinic.rst:1057 msgid "" "By default, the impl function Argument Clinic generates for you returns :c:" "type:`PyObject * `. But your C function often computes some C " @@ -1524,38 +1543,38 @@ msgid "" "a Python type too?" msgstr "" -#: ../../howto/clinic.rst:1047 +#: ../../howto/clinic.rst:1065 msgid "" "That's what a \"return converter\" does. It changes your impl function to " "return some C type, then adds code to the generated (non-impl) function to " "handle converting that value into the appropriate :c:type:`!PyObject *`." msgstr "" -#: ../../howto/clinic.rst:1051 +#: ../../howto/clinic.rst:1069 msgid "" "The syntax for return converters is similar to that of parameter converters. " "You specify the return converter like it was a return annotation on the " "function itself, using ``->`` notation." msgstr "" -#: ../../howto/clinic.rst:1055 +#: ../../howto/clinic.rst:1073 msgid "For example:" msgstr "" -#: ../../howto/clinic.rst:1068 +#: ../../howto/clinic.rst:1086 msgid "" "Return converters behave much the same as parameter converters; they take " "arguments, the arguments are all keyword-only, and if you're not changing " "any of the default arguments you can omit the parentheses." msgstr "" -#: ../../howto/clinic.rst:1072 +#: ../../howto/clinic.rst:1090 msgid "" "(If you use both ``\"as\"`` *and* a return converter for your function, the " "``\"as\"`` should come before the return converter.)" msgstr "" -#: ../../howto/clinic.rst:1075 +#: ../../howto/clinic.rst:1093 msgid "" "There's one additional complication when using return converters: how do you " "indicate an error has occurred? Normally, a function returns a valid (non-" @@ -1568,127 +1587,127 @@ msgid "" "you return like normal." msgstr "" -#: ../../howto/clinic.rst:1084 +#: ../../howto/clinic.rst:1102 msgid "Currently Argument Clinic supports only a few return converters:" msgstr "" -#: ../../howto/clinic.rst:1098 +#: ../../howto/clinic.rst:1116 msgid "" "None of these take parameters. For all of these, return ``-1`` to indicate " "error." msgstr "" -#: ../../howto/clinic.rst:1101 +#: ../../howto/clinic.rst:1119 msgid "" "To see all the return converters Argument Clinic supports, along with their " "parameters (if any), just run ``Tools/clinic/clinic.py --converters`` for " "the full list." msgstr "" -#: ../../howto/clinic.rst:1107 +#: ../../howto/clinic.rst:1125 msgid "How to clone existing functions" msgstr "" -#: ../../howto/clinic.rst:1109 +#: ../../howto/clinic.rst:1127 msgid "" "If you have a number of functions that look similar, you may be able to use " "Clinic's \"clone\" feature. When you clone an existing function, you reuse:" msgstr "" -#: ../../howto/clinic.rst:1113 +#: ../../howto/clinic.rst:1131 msgid "its parameters, including" msgstr "" -#: ../../howto/clinic.rst:1115 +#: ../../howto/clinic.rst:1133 msgid "their names," msgstr "" -#: ../../howto/clinic.rst:1117 +#: ../../howto/clinic.rst:1135 msgid "their converters, with all parameters," msgstr "" -#: ../../howto/clinic.rst:1119 +#: ../../howto/clinic.rst:1137 msgid "their default values," msgstr "" -#: ../../howto/clinic.rst:1121 +#: ../../howto/clinic.rst:1139 msgid "their per-parameter docstrings," msgstr "" -#: ../../howto/clinic.rst:1123 +#: ../../howto/clinic.rst:1141 msgid "" "their *kind* (whether they're positional only, positional or keyword, or " "keyword only), and" msgstr "" -#: ../../howto/clinic.rst:1126 +#: ../../howto/clinic.rst:1144 msgid "its return converter." msgstr "" -#: ../../howto/clinic.rst:1128 +#: ../../howto/clinic.rst:1146 msgid "" "The only thing not copied from the original function is its docstring; the " "syntax allows you to specify a new docstring." msgstr "" -#: ../../howto/clinic.rst:1131 +#: ../../howto/clinic.rst:1149 msgid "Here's the syntax for cloning a function::" msgstr "" -#: ../../howto/clinic.rst:1139 +#: ../../howto/clinic.rst:1157 msgid "" "(The functions can be in different modules or classes. I wrote ``module." "class`` in the sample just to illustrate that you must use the full path to " "*both* functions.)" msgstr "" -#: ../../howto/clinic.rst:1143 +#: ../../howto/clinic.rst:1161 msgid "" "Sorry, there's no syntax for partially cloning a function, or cloning a " "function then modifying it. Cloning is an all-or nothing proposition." msgstr "" -#: ../../howto/clinic.rst:1146 +#: ../../howto/clinic.rst:1164 msgid "" "Also, the function you are cloning from must have been previously defined in " "the current file." msgstr "" -#: ../../howto/clinic.rst:1151 +#: ../../howto/clinic.rst:1169 msgid "How to call Python code" msgstr "" -#: ../../howto/clinic.rst:1153 +#: ../../howto/clinic.rst:1171 msgid "" "The rest of the advanced topics require you to write Python code which lives " "inside your C file and modifies Argument Clinic's runtime state. This is " "simple: you simply define a Python block." msgstr "" -#: ../../howto/clinic.rst:1157 +#: ../../howto/clinic.rst:1175 msgid "" "A Python block uses different delimiter lines than an Argument Clinic " "function block. It looks like this::" msgstr "" -#: ../../howto/clinic.rst:1164 +#: ../../howto/clinic.rst:1182 msgid "" "All the code inside the Python block is executed at the time it's parsed. " "All text written to stdout inside the block is redirected into the " "\"output\" after the block." msgstr "" -#: ../../howto/clinic.rst:1168 +#: ../../howto/clinic.rst:1186 msgid "" "As an example, here's a Python block that adds a static integer variable to " "the C code::" msgstr "" -#: ../../howto/clinic.rst:1179 +#: ../../howto/clinic.rst:1197 msgid "How to use the \"self converter\"" msgstr "" -#: ../../howto/clinic.rst:1181 +#: ../../howto/clinic.rst:1199 msgid "" "Argument Clinic automatically adds a \"self\" parameter for you using a " "default converter. It automatically sets the ``type`` of this parameter to " @@ -1699,13 +1718,13 @@ msgid "" "a subclass thereof." msgstr "" -#: ../../howto/clinic.rst:1190 +#: ../../howto/clinic.rst:1208 msgid "" "What's the point? This lets you override the type of ``self``, or give it a " "different default name." msgstr "" -#: ../../howto/clinic.rst:1193 +#: ../../howto/clinic.rst:1211 msgid "" "How do you specify the custom type you want to cast ``self`` to? If you only " "have one or two functions with the same type for ``self``, you can directly " @@ -1713,18 +1732,18 @@ msgid "" "want to use as the ``type`` parameter::" msgstr "" -#: ../../howto/clinic.rst:1209 +#: ../../howto/clinic.rst:1227 msgid "" "On the other hand, if you have a lot of functions that will use the same " "type for ``self``, it's best to create your own converter, subclassing " "``self_converter`` but overwriting the ``type`` member::" msgstr "" -#: ../../howto/clinic.rst:1231 +#: ../../howto/clinic.rst:1249 msgid "How to use the \"defining class\" converter" msgstr "" -#: ../../howto/clinic.rst:1233 +#: ../../howto/clinic.rst:1251 msgid "" "Argument Clinic facilitates gaining access to the defining class of a " "method. This is useful for :ref:`heap type ` methods that need " @@ -1734,25 +1753,25 @@ msgid "" "example from a module method." msgstr "" -#: ../../howto/clinic.rst:1239 +#: ../../howto/clinic.rst:1257 msgid "" "Example from ``Modules/zlibmodule.c``. First, ``defining_class`` is added " "to the clinic input::" msgstr "" -#: ../../howto/clinic.rst:1251 +#: ../../howto/clinic.rst:1269 msgid "" "After running the Argument Clinic tool, the following function signature is " "generated::" msgstr "" -#: ../../howto/clinic.rst:1261 +#: ../../howto/clinic.rst:1279 msgid "" "The following code can now use ``PyType_GetModuleState(cls)`` to fetch the " "module state::" msgstr "" -#: ../../howto/clinic.rst:1267 +#: ../../howto/clinic.rst:1285 msgid "" "Each method may only have one argument using this converter, and it must " "appear after ``self``, or, if ``self`` is not used, as the first argument. " @@ -1760,13 +1779,13 @@ msgid "" "appear in the ``__text_signature__``." msgstr "" -#: ../../howto/clinic.rst:1272 +#: ../../howto/clinic.rst:1290 msgid "" "The ``defining_class`` converter is not compatible with ``__init__`` and " "``__new__`` methods, which cannot use the ``METH_METHOD`` convention." msgstr "" -#: ../../howto/clinic.rst:1275 +#: ../../howto/clinic.rst:1293 msgid "" "It is not possible to use ``defining_class`` with slot methods. In order to " "fetch the module state from such methods, use :c:func:" @@ -1775,15 +1794,15 @@ msgid "" "``setattro`` slot method in ``Modules/_threadmodule.c``::" msgstr "" -#: ../../howto/clinic.rst:1290 +#: ../../howto/clinic.rst:1308 msgid "See also :pep:`573`." msgstr "也請見 :pep:`573`\\ 。" -#: ../../howto/clinic.rst:1294 +#: ../../howto/clinic.rst:1312 msgid "How to write a custom converter" msgstr "" -#: ../../howto/clinic.rst:1296 +#: ../../howto/clinic.rst:1314 msgid "" "As we hinted at in the previous section... you can write your own " "converters! A converter is simply a Python class that inherits from " @@ -1792,7 +1811,7 @@ msgid "" "a :c:func:`PyArg_ParseTuple` \"converter function\"." msgstr "" -#: ../../howto/clinic.rst:1302 +#: ../../howto/clinic.rst:1320 msgid "" "Your converter class should be named ``*something*_converter``. If the name " "follows this convention, then your converter class will be automatically " @@ -1801,7 +1820,7 @@ msgid "" "metaclass.)" msgstr "" -#: ../../howto/clinic.rst:1308 +#: ../../howto/clinic.rst:1326 msgid "" "You shouldn't subclass ``CConverter.__init__``. Instead, you should write a " "``converter_init()`` function. ``converter_init()`` always accepts a " @@ -1810,50 +1829,50 @@ msgid "" "passed along to your ``converter_init()``." msgstr "" -#: ../../howto/clinic.rst:1315 +#: ../../howto/clinic.rst:1333 msgid "" "There are some additional members of ``CConverter`` you may wish to specify " "in your subclass. Here's the current list:" msgstr "" -#: ../../howto/clinic.rst:1319 +#: ../../howto/clinic.rst:1337 msgid "" "The C type to use for this variable. ``type`` should be a Python string " "specifying the type, e.g. ``int``. If this is a pointer type, the type " "string should end with ``' *'``." msgstr "" -#: ../../howto/clinic.rst:1325 +#: ../../howto/clinic.rst:1343 msgid "``default``" msgstr "``default``" -#: ../../howto/clinic.rst:1324 +#: ../../howto/clinic.rst:1342 msgid "" "The Python default value for this parameter, as a Python value. Or the magic " "value ``unspecified`` if there is no default." msgstr "" -#: ../../howto/clinic.rst:1330 +#: ../../howto/clinic.rst:1348 msgid "``py_default``" msgstr "``py_default``" -#: ../../howto/clinic.rst:1328 +#: ../../howto/clinic.rst:1346 msgid "" "``default`` as it should appear in Python code, as a string. Or ``None`` if " "there is no default." msgstr "" -#: ../../howto/clinic.rst:1333 +#: ../../howto/clinic.rst:1351 msgid "" "``default`` as it should appear in C code, as a string. Or ``None`` if there " "is no default." msgstr "" -#: ../../howto/clinic.rst:1346 +#: ../../howto/clinic.rst:1364 msgid "``c_ignored_default``" msgstr "``c_ignored_default``" -#: ../../howto/clinic.rst:1338 +#: ../../howto/clinic.rst:1356 msgid "" "The default value used to initialize the C variable when there is no " "default, but not specifying a default may result in an \"uninitialized " @@ -1864,37 +1883,37 @@ msgid "" "non-empty string." msgstr "" -#: ../../howto/clinic.rst:1349 +#: ../../howto/clinic.rst:1367 msgid "The name of the C converter function, as a string." msgstr "" -#: ../../howto/clinic.rst:1354 +#: ../../howto/clinic.rst:1372 msgid "``impl_by_reference``" msgstr "``impl_by_reference``" -#: ../../howto/clinic.rst:1352 +#: ../../howto/clinic.rst:1370 msgid "" "A boolean value. If true, Argument Clinic will add a ``&`` in front of the " "name of the variable when passing it into the impl function." msgstr "" -#: ../../howto/clinic.rst:1360 +#: ../../howto/clinic.rst:1378 msgid "``parse_by_reference``" msgstr "``parse_by_reference``" -#: ../../howto/clinic.rst:1357 +#: ../../howto/clinic.rst:1375 msgid "" "A boolean value. If true, Argument Clinic will add a ``&`` in front of the " "name of the variable when passing it into :c:func:`PyArg_ParseTuple`." msgstr "" -#: ../../howto/clinic.rst:1362 +#: ../../howto/clinic.rst:1380 msgid "" "Here's the simplest example of a custom converter, from ``Modules/zlibmodule." "c``::" msgstr "" -#: ../../howto/clinic.rst:1373 +#: ../../howto/clinic.rst:1391 msgid "" "This block adds a converter to Argument Clinic named ``ssize_t``. " "Parameters declared as ``ssize_t`` will be declared as type :c:type:" @@ -1903,25 +1922,25 @@ msgid "" "automatically support default values." msgstr "" -#: ../../howto/clinic.rst:1379 +#: ../../howto/clinic.rst:1397 msgid "" "More sophisticated custom converters can insert custom C code to handle " "initialization and cleanup. You can see more examples of custom converters " "in the CPython source tree; grep the C files for the string ``CConverter``." msgstr "" -#: ../../howto/clinic.rst:1386 +#: ../../howto/clinic.rst:1404 msgid "How to write a custom return converter" msgstr "" -#: ../../howto/clinic.rst:1388 +#: ../../howto/clinic.rst:1406 msgid "" "Writing a custom return converter is much like writing a custom converter. " "Except it's somewhat simpler, because return converters are themselves much " "simpler." msgstr "" -#: ../../howto/clinic.rst:1392 +#: ../../howto/clinic.rst:1410 msgid "" "Return converters must subclass ``CReturnConverter``. There are no examples " "yet of custom return converters, because they are not widely used yet. If " @@ -1930,59 +1949,59 @@ msgid "" "its subclasses." msgstr "" -#: ../../howto/clinic.rst:1401 +#: ../../howto/clinic.rst:1419 msgid "How to convert ``METH_O`` and ``METH_NOARGS`` functions" msgstr "" -#: ../../howto/clinic.rst:1403 +#: ../../howto/clinic.rst:1421 msgid "" "To convert a function using ``METH_O``, make sure the function's single " "argument is using the ``object`` converter, and mark the arguments as " "positional-only::" msgstr "" -#: ../../howto/clinic.rst:1415 +#: ../../howto/clinic.rst:1433 msgid "" "To convert a function using ``METH_NOARGS``, just don't specify any " "arguments." msgstr "" -#: ../../howto/clinic.rst:1418 +#: ../../howto/clinic.rst:1436 msgid "" "You can still use a self converter, a return converter, and specify a " "``type`` argument to the object converter for ``METH_O``." msgstr "" -#: ../../howto/clinic.rst:1423 +#: ../../howto/clinic.rst:1441 msgid "How to convert ``tp_new`` and ``tp_init`` functions" msgstr "" -#: ../../howto/clinic.rst:1425 +#: ../../howto/clinic.rst:1443 msgid "" "You can convert ``tp_new`` and ``tp_init`` functions. Just name them " "``__new__`` or ``__init__`` as appropriate. Notes:" msgstr "" -#: ../../howto/clinic.rst:1428 +#: ../../howto/clinic.rst:1446 msgid "" "The function name generated for ``__new__`` doesn't end in ``__new__`` like " "it would by default. It's just the name of the class, converted into a " "valid C identifier." msgstr "" -#: ../../howto/clinic.rst:1432 +#: ../../howto/clinic.rst:1450 msgid "No ``PyMethodDef`` ``#define`` is generated for these functions." msgstr "" -#: ../../howto/clinic.rst:1434 +#: ../../howto/clinic.rst:1452 msgid "``__init__`` functions return ``int``, not ``PyObject *``." msgstr "" -#: ../../howto/clinic.rst:1436 +#: ../../howto/clinic.rst:1454 msgid "Use the docstring as the class docstring." msgstr "" -#: ../../howto/clinic.rst:1438 +#: ../../howto/clinic.rst:1456 msgid "" "Although ``__new__`` and ``__init__`` functions must always accept both the " "``args`` and ``kwargs`` objects, when converting you may specify any " @@ -1991,11 +2010,11 @@ msgid "" "it receives any.)" msgstr "" -#: ../../howto/clinic.rst:1446 +#: ../../howto/clinic.rst:1464 msgid "How to change and redirect Clinic's output" msgstr "" -#: ../../howto/clinic.rst:1448 +#: ../../howto/clinic.rst:1466 msgid "" "It can be inconvenient to have Clinic's output interspersed with your " "conventional hand-edited C code. Luckily, Clinic is configurable: you can " @@ -2004,7 +2023,7 @@ msgid "" "Clinic's generated output." msgstr "" -#: ../../howto/clinic.rst:1454 +#: ../../howto/clinic.rst:1472 msgid "" "While changing Clinic's output in this manner can be a boon to readability, " "it may result in Clinic code using types before they are defined, or your " @@ -2016,15 +2035,15 @@ msgid "" "rearranging your code to fix definition-before-use problems.)" msgstr "" -#: ../../howto/clinic.rst:1463 +#: ../../howto/clinic.rst:1481 msgid "Let's start with defining some terminology:" msgstr "" -#: ../../howto/clinic.rst:1490 +#: ../../howto/clinic.rst:1508 msgid "*field*" msgstr "" -#: ../../howto/clinic.rst:1466 +#: ../../howto/clinic.rst:1484 msgid "" "A field, in this context, is a subsection of Clinic's output. For example, " "the ``#define`` for the ``PyMethodDef`` structure is a field, called " @@ -2032,7 +2051,7 @@ msgid "" "function definition:" msgstr "" -#: ../../howto/clinic.rst:1481 +#: ../../howto/clinic.rst:1499 msgid "" "All the names are of the form ``\"_\"``, where ``\"\"`` is the " "semantic object represented (the parsing function, the impl function, the " @@ -2045,45 +2064,45 @@ msgid "" "``\"_define\"``, representing that it's a preprocessor #define.)" msgstr "" -#: ../../howto/clinic.rst:1524 +#: ../../howto/clinic.rst:1542 msgid "*destination*" msgstr "" -#: ../../howto/clinic.rst:1493 +#: ../../howto/clinic.rst:1511 msgid "" "A destination is a place Clinic can write output to. There are five built-" "in destinations:" msgstr "" -#: ../../howto/clinic.rst:1498 ../../howto/clinic.rst:1573 -#: ../../howto/clinic.rst:1651 +#: ../../howto/clinic.rst:1516 ../../howto/clinic.rst:1591 +#: ../../howto/clinic.rst:1669 msgid "``block``" msgstr "``block``" -#: ../../howto/clinic.rst:1497 +#: ../../howto/clinic.rst:1515 msgid "" "The default destination: printed in the output section of the current Clinic " "block." msgstr "" -#: ../../howto/clinic.rst:1504 ../../howto/clinic.rst:1600 -#: ../../howto/clinic.rst:1654 +#: ../../howto/clinic.rst:1522 ../../howto/clinic.rst:1618 +#: ../../howto/clinic.rst:1672 msgid "``buffer``" msgstr "``buffer``" -#: ../../howto/clinic.rst:1501 +#: ../../howto/clinic.rst:1519 msgid "" "A text buffer where you can save text for later. Text sent here is appended " "to the end of any existing text. It's an error to have any text left in the " "buffer when Clinic finishes processing a file." msgstr "" -#: ../../howto/clinic.rst:1515 ../../howto/clinic.rst:1586 -#: ../../howto/clinic.rst:1680 +#: ../../howto/clinic.rst:1533 ../../howto/clinic.rst:1604 +#: ../../howto/clinic.rst:1698 msgid "``file``" msgstr "``file``" -#: ../../howto/clinic.rst:1507 +#: ../../howto/clinic.rst:1525 msgid "" "A separate \"clinic file\" that will be created automatically by Clinic. The " "filename chosen for the file is ``{basename}.clinic{extension}``, where " @@ -2092,65 +2111,65 @@ msgid "" "for ``_pickle.c`` would be written to ``_pickle.clinic.c``.)" msgstr "" -#: ../../howto/clinic.rst:1514 +#: ../../howto/clinic.rst:1532 msgid "" "**Important: When using a** ``file`` **destination, you** *must check in* " "**the generated file!**" msgstr "" -#: ../../howto/clinic.rst:1520 ../../howto/clinic.rst:1613 -#: ../../howto/clinic.rst:1684 +#: ../../howto/clinic.rst:1538 ../../howto/clinic.rst:1631 +#: ../../howto/clinic.rst:1702 msgid "``two-pass``" msgstr "``two-pass``" -#: ../../howto/clinic.rst:1518 +#: ../../howto/clinic.rst:1536 msgid "" "A buffer like ``buffer``. However, a two-pass buffer can only be dumped " "once, and it prints out all text sent to it during all processing, even from " "Clinic blocks *after* the dumping point." msgstr "" -#: ../../howto/clinic.rst:1524 ../../howto/clinic.rst:1647 +#: ../../howto/clinic.rst:1542 ../../howto/clinic.rst:1665 msgid "``suppress``" msgstr "``suppress``" -#: ../../howto/clinic.rst:1523 +#: ../../howto/clinic.rst:1541 msgid "The text is suppressed—thrown away." msgstr "" -#: ../../howto/clinic.rst:1526 +#: ../../howto/clinic.rst:1544 msgid "Clinic defines five new directives that let you reconfigure its output." msgstr "" -#: ../../howto/clinic.rst:1528 +#: ../../howto/clinic.rst:1546 msgid "The first new directive is ``dump``:" msgstr "" -#: ../../howto/clinic.rst:1534 +#: ../../howto/clinic.rst:1552 msgid "" "This dumps the current contents of the named destination into the output of " "the current block, and empties it. This only works with ``buffer`` and " "``two-pass`` destinations." msgstr "" -#: ../../howto/clinic.rst:1538 +#: ../../howto/clinic.rst:1556 msgid "" "The second new directive is ``output``. The most basic form of ``output`` " "is like this:" msgstr "" -#: ../../howto/clinic.rst:1545 +#: ../../howto/clinic.rst:1563 msgid "" "This tells Clinic to output *field* to *destination*. ``output`` also " "supports a special meta-destination, called ``everything``, which tells " "Clinic to output *all* fields to that *destination*." msgstr "" -#: ../../howto/clinic.rst:1549 +#: ../../howto/clinic.rst:1567 msgid "``output`` has a number of other functions:" msgstr "" -#: ../../howto/clinic.rst:1558 +#: ../../howto/clinic.rst:1576 msgid "" "``output push`` and ``output pop`` allow you to push and pop configurations " "on an internal configuration stack, so that you can temporarily modify the " @@ -2159,25 +2178,25 @@ msgid "" "when you wish to restore the previous configuration." msgstr "" -#: ../../howto/clinic.rst:1565 +#: ../../howto/clinic.rst:1583 msgid "" "``output preset`` sets Clinic's output to one of several built-in preset " "configurations, as follows:" msgstr "" -#: ../../howto/clinic.rst:1569 +#: ../../howto/clinic.rst:1587 msgid "" "Clinic's original starting configuration. Writes everything immediately " "after the input block." msgstr "" -#: ../../howto/clinic.rst:1572 +#: ../../howto/clinic.rst:1590 msgid "" "Suppress the ``parser_prototype`` and ``docstring_prototype``, write " "everything else to ``block``." msgstr "" -#: ../../howto/clinic.rst:1576 +#: ../../howto/clinic.rst:1594 msgid "" "Designed to write everything to the \"clinic file\" that it can. You then " "``#include`` this file near the top of your file. You may need to rearrange " @@ -2185,17 +2204,17 @@ msgid "" "declarations for various ``typedef`` and ``PyTypeObject`` definitions." msgstr "" -#: ../../howto/clinic.rst:1582 +#: ../../howto/clinic.rst:1600 msgid "" "Suppress the ``parser_prototype`` and ``docstring_prototype``, write the " "``impl_definition`` to ``block``, and write everything else to ``file``." msgstr "" -#: ../../howto/clinic.rst:1586 +#: ../../howto/clinic.rst:1604 msgid "The default filename is ``\"{dirname}/clinic/{basename}.h\"``." msgstr "" -#: ../../howto/clinic.rst:1589 +#: ../../howto/clinic.rst:1607 msgid "" "Save up most of the output from Clinic, to be written into your file near " "the end. For Python files implementing modules or builtin types, it's " @@ -2205,14 +2224,14 @@ msgid "" "static ``PyMethodDef`` arrays defined in the middle of the file." msgstr "" -#: ../../howto/clinic.rst:1598 +#: ../../howto/clinic.rst:1616 msgid "" "Suppress the ``parser_prototype``, ``impl_prototype``, and " "``docstring_prototype``, write the ``impl_definition`` to ``block``, and " "write everything else to ``file``." msgstr "" -#: ../../howto/clinic.rst:1603 +#: ../../howto/clinic.rst:1621 msgid "" "Similar to the ``buffer`` preset, but writes forward declarations to the " "``two-pass`` buffer, and definitions to the ``buffer``. This is similar to " @@ -2221,18 +2240,18 @@ msgid "" "near the end just like you would when using the ``buffer`` preset." msgstr "" -#: ../../howto/clinic.rst:1610 +#: ../../howto/clinic.rst:1628 msgid "" "Suppresses the ``impl_prototype``, write the ``impl_definition`` to " "``block``, write ``docstring_prototype``, ``methoddef_define``, and " "``parser_prototype`` to ``two-pass``, write everything else to ``buffer``." msgstr "" -#: ../../howto/clinic.rst:1624 +#: ../../howto/clinic.rst:1642 msgid "``partial-buffer``" msgstr "``partial-buffer``" -#: ../../howto/clinic.rst:1616 +#: ../../howto/clinic.rst:1634 msgid "" "Similar to the ``buffer`` preset, but writes more things to ``block``, only " "writing the really big chunks of generated code to ``buffer``. This avoids " @@ -2242,137 +2261,137 @@ msgid "" "preset." msgstr "" -#: ../../howto/clinic.rst:1623 +#: ../../howto/clinic.rst:1641 msgid "" "Suppresses the ``impl_prototype``, write the ``docstring_definition`` and " "``parser_definition`` to ``buffer``, write everything else to ``block``." msgstr "" -#: ../../howto/clinic.rst:1626 +#: ../../howto/clinic.rst:1644 msgid "The third new directive is ``destination``:" msgstr "" -#: ../../howto/clinic.rst:1632 +#: ../../howto/clinic.rst:1650 msgid "This performs an operation on the destination named ``name``." msgstr "" -#: ../../howto/clinic.rst:1634 +#: ../../howto/clinic.rst:1652 msgid "There are two defined subcommands: ``new`` and ``clear``." msgstr "" -#: ../../howto/clinic.rst:1636 +#: ../../howto/clinic.rst:1654 msgid "The ``new`` subcommand works like this:" msgstr "" -#: ../../howto/clinic.rst:1642 +#: ../../howto/clinic.rst:1660 msgid "" "This creates a new destination with name ```` and type ````." msgstr "" -#: ../../howto/clinic.rst:1644 +#: ../../howto/clinic.rst:1662 msgid "There are five destination types:" msgstr "" -#: ../../howto/clinic.rst:1647 +#: ../../howto/clinic.rst:1665 msgid "Throws the text away." msgstr "" -#: ../../howto/clinic.rst:1650 +#: ../../howto/clinic.rst:1668 msgid "" "Writes the text to the current block. This is what Clinic originally did." msgstr "" -#: ../../howto/clinic.rst:1654 +#: ../../howto/clinic.rst:1672 msgid "A simple text buffer, like the \"buffer\" builtin destination above." msgstr "" -#: ../../howto/clinic.rst:1657 +#: ../../howto/clinic.rst:1675 msgid "" "A text file. The file destination takes an extra argument, a template to " "use for building the filename, like so:" msgstr "" -#: ../../howto/clinic.rst:1660 +#: ../../howto/clinic.rst:1678 msgid "destination new " msgstr "" -#: ../../howto/clinic.rst:1662 +#: ../../howto/clinic.rst:1680 msgid "" "The template can use three strings internally that will be replaced by bits " "of the filename:" msgstr "" -#: ../../howto/clinic.rst:1665 +#: ../../howto/clinic.rst:1683 msgid "{path}" msgstr "{path}" -#: ../../howto/clinic.rst:1666 +#: ../../howto/clinic.rst:1684 msgid "The full path to the file, including directory and full filename." msgstr "" -#: ../../howto/clinic.rst:1667 +#: ../../howto/clinic.rst:1685 msgid "{dirname}" msgstr "{dirname}" -#: ../../howto/clinic.rst:1668 +#: ../../howto/clinic.rst:1686 msgid "The name of the directory the file is in." msgstr "" -#: ../../howto/clinic.rst:1669 +#: ../../howto/clinic.rst:1687 msgid "{basename}" msgstr "{basename}" -#: ../../howto/clinic.rst:1670 +#: ../../howto/clinic.rst:1688 msgid "Just the name of the file, not including the directory." msgstr "" -#: ../../howto/clinic.rst:1672 +#: ../../howto/clinic.rst:1690 msgid "{basename_root}" msgstr "{basename_root}" -#: ../../howto/clinic.rst:1672 +#: ../../howto/clinic.rst:1690 msgid "" "Basename with the extension clipped off (everything up to but not including " "the last '.')." msgstr "" -#: ../../howto/clinic.rst:1676 +#: ../../howto/clinic.rst:1694 msgid "{basename_extension}" msgstr "{basename_extension}" -#: ../../howto/clinic.rst:1675 +#: ../../howto/clinic.rst:1693 msgid "" "The last '.' and everything after it. If the basename does not contain a " "period, this will be the empty string." msgstr "" -#: ../../howto/clinic.rst:1678 +#: ../../howto/clinic.rst:1696 msgid "" "If there are no periods in the filename, {basename} and {filename} are the " "same, and {extension} is empty. \"{basename}{extension}\" is always exactly " "the same as \"{filename}\".\"" msgstr "" -#: ../../howto/clinic.rst:1683 +#: ../../howto/clinic.rst:1701 msgid "A two-pass buffer, like the \"two-pass\" builtin destination above." msgstr "" -#: ../../howto/clinic.rst:1686 +#: ../../howto/clinic.rst:1704 msgid "The ``clear`` subcommand works like this:" msgstr "" -#: ../../howto/clinic.rst:1692 +#: ../../howto/clinic.rst:1710 msgid "" "It removes all the accumulated text up to this point in the destination. (I " "don't know what you'd need this for, but I thought maybe it'd be useful " "while someone's experimenting.)" msgstr "" -#: ../../howto/clinic.rst:1696 +#: ../../howto/clinic.rst:1714 msgid "The fourth new directive is ``set``:" msgstr "" -#: ../../howto/clinic.rst:1703 +#: ../../howto/clinic.rst:1721 msgid "" "``set`` lets you set two internal variables in Clinic. ``line_prefix`` is a " "string that will be prepended to every line of Clinic's output; " @@ -2380,35 +2399,35 @@ msgid "" "output." msgstr "" -#: ../../howto/clinic.rst:1707 +#: ../../howto/clinic.rst:1725 msgid "Both of these support two format strings:" msgstr "" -#: ../../howto/clinic.rst:1710 +#: ../../howto/clinic.rst:1728 msgid "``{block comment start}``" msgstr "``{block comment start}``" -#: ../../howto/clinic.rst:1710 +#: ../../howto/clinic.rst:1728 msgid "" "Turns into the string ``/*``, the start-comment text sequence for C files." msgstr "" -#: ../../howto/clinic.rst:1713 +#: ../../howto/clinic.rst:1731 msgid "``{block comment end}``" msgstr "``{block comment end}``" -#: ../../howto/clinic.rst:1713 +#: ../../howto/clinic.rst:1731 msgid "" "Turns into the string ``*/``, the end-comment text sequence for C files." msgstr "" -#: ../../howto/clinic.rst:1715 +#: ../../howto/clinic.rst:1733 msgid "" "The final new directive is one you shouldn't need to use directly, called " "``preserve``:" msgstr "" -#: ../../howto/clinic.rst:1722 +#: ../../howto/clinic.rst:1740 msgid "" "This tells Clinic that the current contents of the output should be kept, " "unmodified. This is used internally by Clinic when dumping output into " @@ -2417,36 +2436,36 @@ msgid "" "gets overwritten." msgstr "" -#: ../../howto/clinic.rst:1729 +#: ../../howto/clinic.rst:1747 msgid "How to use the ``#ifdef`` trick" msgstr "" -#: ../../howto/clinic.rst:1731 +#: ../../howto/clinic.rst:1749 msgid "" "If you're converting a function that isn't available on all platforms, " "there's a trick you can use to make life a little easier. The existing code " "probably looks like this::" msgstr "" -#: ../../howto/clinic.rst:1742 +#: ../../howto/clinic.rst:1760 msgid "" "And then in the ``PyMethodDef`` structure at the bottom the existing code " "will have:" msgstr "" -#: ../../howto/clinic.rst:1751 +#: ../../howto/clinic.rst:1769 msgid "" "In this scenario, you should enclose the body of your impl function inside " "the ``#ifdef``, like so::" msgstr "" -#: ../../howto/clinic.rst:1765 +#: ../../howto/clinic.rst:1783 msgid "" "Then, remove those three lines from the ``PyMethodDef`` structure, replacing " "them with the macro Argument Clinic generated:" msgstr "" -#: ../../howto/clinic.rst:1772 +#: ../../howto/clinic.rst:1790 msgid "" "(You can find the real name for this macro inside the generated code. Or you " "can calculate it yourself: it's the name of your function as defined on the " @@ -2454,27 +2473,27 @@ msgid "" "uppercased, and ``\"_METHODDEF\"`` added to the end.)" msgstr "" -#: ../../howto/clinic.rst:1777 +#: ../../howto/clinic.rst:1795 msgid "" "Perhaps you're wondering: what if ``HAVE_FUNCTIONNAME`` isn't defined? The " "``MODULE_FUNCTIONNAME_METHODDEF`` macro won't be defined either!" msgstr "" -#: ../../howto/clinic.rst:1780 +#: ../../howto/clinic.rst:1798 msgid "" "Here's where Argument Clinic gets very clever. It actually detects that the " "Argument Clinic block might be deactivated by the ``#ifdef``. When that " "happens, it generates a little extra code that looks like this::" msgstr "" -#: ../../howto/clinic.rst:1788 +#: ../../howto/clinic.rst:1806 msgid "" "That means the macro always works. If the function is defined, this turns " "into the correct structure, including the trailing comma. If the function " "is undefined, this turns into nothing." msgstr "" -#: ../../howto/clinic.rst:1792 +#: ../../howto/clinic.rst:1810 msgid "" "However, this causes one ticklish problem: where should Argument Clinic put " "this extra code when using the \"block\" output preset? It can't go in the " @@ -2482,24 +2501,24 @@ msgid "" "the whole point!)" msgstr "" -#: ../../howto/clinic.rst:1796 +#: ../../howto/clinic.rst:1814 msgid "" "In this situation, Argument Clinic writes the extra code to the \"buffer\" " "destination. This may mean that you get a complaint from Argument Clinic:" msgstr "" -#: ../../howto/clinic.rst:1804 +#: ../../howto/clinic.rst:1822 msgid "" "When this happens, just open your file, find the ``dump buffer`` block that " "Argument Clinic added to your file (it'll be at the very bottom), then move " "it above the ``PyMethodDef`` structure where that macro is used." msgstr "" -#: ../../howto/clinic.rst:1810 +#: ../../howto/clinic.rst:1828 msgid "How to use Argument Clinic in Python files" msgstr "" -#: ../../howto/clinic.rst:1812 +#: ../../howto/clinic.rst:1830 msgid "" "It's actually possible to use Argument Clinic to preprocess Python files. " "There's no point to using Argument Clinic blocks, of course, as the output " @@ -2507,7 +2526,7 @@ msgid "" "Clinic to run Python blocks lets you use Python as a Python preprocessor!" msgstr "" -#: ../../howto/clinic.rst:1817 +#: ../../howto/clinic.rst:1835 msgid "" "Since Python comments are different from C comments, Argument Clinic blocks " "embedded in Python files look slightly different. They look like this:" diff --git a/library/email.utils.po b/library/email.utils.po index 9a4477fbd0..74b695635d 100644 --- a/library/email.utils.po +++ b/library/email.utils.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-17 17:39+0800\n" +"POT-Creation-Date: 2023-07-21 09:32+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-" @@ -90,14 +90,7 @@ msgid "" "unless the parse fails, in which case a 2-tuple of ``('', '')`` is returned." msgstr "" -#: ../../library/email.utils.rst:68 -msgid "" -"For security reasons, addresses that were ambiguous and could parse into " -"multiple different addresses now cause ``('', '')`` to be returned instead " -"of only one of the *potential* addresses." -msgstr "" - -#: ../../library/email.utils.rst:76 +#: ../../library/email.utils.rst:71 msgid "" "The inverse of :meth:`parseaddr`, this takes a 2-tuple of the form " "``(realname, email_address)`` and returns the string value suitable for a :" @@ -105,7 +98,7 @@ msgid "" "is false, then the second element is returned unmodified." msgstr "" -#: ../../library/email.utils.rst:81 +#: ../../library/email.utils.rst:76 msgid "" "Optional *charset* is the character set that will be used in the :rfc:`2047` " "encoding of the ``realname`` if the ``realname`` contains non-ASCII " @@ -113,49 +106,19 @@ msgid "" "Charset`. Defaults to ``utf-8``." msgstr "" -#: ../../library/email.utils.rst:86 +#: ../../library/email.utils.rst:81 msgid "Added the *charset* option." msgstr "新增 *charset* 選項。" -#: ../../library/email.utils.rst:92 +#: ../../library/email.utils.rst:87 msgid "" "This method returns a list of 2-tuples of the form returned by " "``parseaddr()``. *fieldvalues* is a sequence of header field values as might " "be returned by :meth:`Message.get_all `. " -"Here's a simple example that gets all the recipients of a message:" -msgstr "" - -#: ../../library/email.utils.rst:97 -msgid "from email.utils import getaddresses" -msgstr "" - -#: ../../library/email.utils.rst:99 -msgid "" -"tos = msg.get_all('to', []) ccs = msg.get_all('cc', []) resent_tos = msg." -"get_all('resent-to', []) resent_ccs = msg.get_all('resent-cc', []) " -"all_recipients = getaddresses(tos + ccs + resent_tos + resent_ccs)" -msgstr "" - -#: ../../library/email.utils.rst:105 -msgid "" -"When parsing fails for a single fieldvalue, a 2-tuple of ``('', '')`` is " -"returned in its place. Other errors in parsing the list of addresses such " -"as a fieldvalue seemingly parsing into multiple addresses may result in a " -"list containing a single empty 2-tuple ``[('', '')]`` being returned rather " -"than returning potentially invalid output." -msgstr "" - -#: ../../library/email.utils.rst:112 -msgid "Example malformed input parsing:" -msgstr "" - -#: ../../library/email.utils.rst:120 -msgid "" -"The 2-tuple of ``('', '')`` in the returned values when parsing fails were " -"added as to address a security issue." +"Here's a simple example that gets all the recipients of a message::" msgstr "" -#: ../../library/email.utils.rst:127 +#: ../../library/email.utils.rst:103 msgid "" "Attempts to parse a date according to the rules in :rfc:`2822`. however, " "some mailers don't follow that format as specified, so :func:`parsedate` " @@ -166,7 +129,7 @@ msgid "" "returned. Note that indexes 6, 7, and 8 of the result tuple are not usable." msgstr "" -#: ../../library/email.utils.rst:138 +#: ../../library/email.utils.rst:114 msgid "" "Performs the same function as :func:`parsedate`, but returns either ``None`` " "or a 10-tuple; the first 9 elements make up a tuple that can be passed " @@ -177,7 +140,7 @@ msgid "" "the result tuple are not usable." msgstr "" -#: ../../library/email.utils.rst:148 +#: ../../library/email.utils.rst:124 msgid "" "The inverse of :func:`format_datetime`. Performs the same function as :func:" "`parsedate`, but on success returns a :mod:`~datetime.datetime`; otherwise " @@ -191,25 +154,25 @@ msgid "" "corresponding a :class:`~datetime.timezone` :class:`~datetime.tzinfo`." msgstr "" -#: ../../library/email.utils.rst:164 +#: ../../library/email.utils.rst:140 msgid "" "Turn a 10-tuple as returned by :func:`parsedate_tz` into a UTC timestamp " "(seconds since the Epoch). If the timezone item in the tuple is ``None``, " "assume local time." msgstr "" -#: ../../library/email.utils.rst:171 +#: ../../library/email.utils.rst:147 msgid "Returns a date string as per :rfc:`2822`, e.g.::" msgstr "" -#: ../../library/email.utils.rst:175 +#: ../../library/email.utils.rst:151 msgid "" "Optional *timeval* if given is a floating point time value as accepted by :" "func:`time.gmtime` and :func:`time.localtime`, otherwise the current time is " "used." msgstr "" -#: ../../library/email.utils.rst:179 +#: ../../library/email.utils.rst:155 msgid "" "Optional *localtime* is a flag that when ``True``, interprets *timeval*, and " "returns a date relative to the local timezone instead of UTC, properly " @@ -217,7 +180,7 @@ msgid "" "UTC is used." msgstr "" -#: ../../library/email.utils.rst:184 +#: ../../library/email.utils.rst:160 msgid "" "Optional *usegmt* is a flag that when ``True``, outputs a date string with " "the timezone as an ascii string ``GMT``, rather than a numeric ``-0000``. " @@ -225,7 +188,7 @@ msgid "" "*localtime* is ``False``. The default is ``False``." msgstr "" -#: ../../library/email.utils.rst:192 +#: ../../library/email.utils.rst:168 msgid "" "Like ``formatdate``, but the input is a :mod:`datetime` instance. If it is " "a naive datetime, it is assumed to be \"UTC with no information about the " @@ -237,11 +200,11 @@ msgid "" "date headers." msgstr "" -#: ../../library/email.utils.rst:206 +#: ../../library/email.utils.rst:182 msgid "Decode the string *s* according to :rfc:`2231`." msgstr "" -#: ../../library/email.utils.rst:211 +#: ../../library/email.utils.rst:187 msgid "" "Encode the string *s* according to :rfc:`2231`. Optional *charset* and " "*language*, if given is the character set name and language name to use. If " @@ -250,7 +213,7 @@ msgid "" "*language*." msgstr "" -#: ../../library/email.utils.rst:219 +#: ../../library/email.utils.rst:195 msgid "" "When a header parameter is encoded in :rfc:`2231` format, :meth:`Message." "get_param ` may return a 3-tuple containing " @@ -262,23 +225,23 @@ msgid "" "defaults to ``'us-ascii'``." msgstr "" -#: ../../library/email.utils.rst:228 +#: ../../library/email.utils.rst:204 msgid "" "For convenience, if the *value* passed to :func:`collapse_rfc2231_value` is " "not a tuple, it should be a string and it is returned unquoted." msgstr "" -#: ../../library/email.utils.rst:234 +#: ../../library/email.utils.rst:210 msgid "" "Decode parameters list according to :rfc:`2231`. *params* is a sequence of " "2-tuples containing elements of the form ``(content-type, string-value)``." msgstr "" -#: ../../library/email.utils.rst:239 +#: ../../library/email.utils.rst:215 msgid "Footnotes" msgstr "註解" -#: ../../library/email.utils.rst:240 +#: ../../library/email.utils.rst:216 msgid "" "Note that the sign of the timezone offset is the opposite of the sign of the " "``time.timezone`` variable for the same timezone; the latter variable " diff --git a/whatsnew/3.12.po b/whatsnew/3.12.po index 4c021a6ae8..30df79131f 100644 --- a/whatsnew/3.12.po +++ b/whatsnew/3.12.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-17 17:39+0800\n" +"POT-Creation-Date: 2023-07-21 09:32+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -132,7 +132,7 @@ msgid "" "in :gh:`91058`." msgstr "" -#: ../../whatsnew/3.12.rst:143 ../../whatsnew/3.12.rst:1600 +#: ../../whatsnew/3.12.rst:143 ../../whatsnew/3.12.rst:1592 msgid "New Features" msgstr "新增特性" @@ -670,46 +670,34 @@ msgid "" msgstr "" #: ../../whatsnew/3.12.rst:574 -msgid "email" -msgstr "email" - -#: ../../whatsnew/3.12.rst:576 -msgid "" -":func:`email.utils.getaddresses` and :func:`email.utils.parseaddr` now " -"return ``('', '')`` 2-tuples in more situations where invalid email " -"addresses are encountered instead of potentially inaccurate values. " -"(Contributed by Thomas Dwyer for :gh:`102988` to ameliorate CVE-2023-27043.)" -msgstr "" - -#: ../../whatsnew/3.12.rst:582 msgid "fractions" msgstr "fractions" -#: ../../whatsnew/3.12.rst:584 +#: ../../whatsnew/3.12.rst:576 msgid "" "Objects of type :class:`fractions.Fraction` now support float-style " "formatting. (Contributed by Mark Dickinson in :gh:`100161`.)" msgstr "" -#: ../../whatsnew/3.12.rst:588 +#: ../../whatsnew/3.12.rst:580 msgid "inspect" msgstr "inspect" -#: ../../whatsnew/3.12.rst:590 +#: ../../whatsnew/3.12.rst:582 msgid "" "Add :func:`inspect.markcoroutinefunction` to mark sync functions that return " "a :term:`coroutine` for use with :func:`inspect.iscoroutinefunction`. " "(Contributed Carlton Gibson in :gh:`99247`.)" msgstr "" -#: ../../whatsnew/3.12.rst:594 +#: ../../whatsnew/3.12.rst:586 msgid "" "Add :func:`inspect.getasyncgenstate` and :func:`inspect.getasyncgenlocals` " "for determining the current state of asynchronous generators. (Contributed " "by Thomas Krennwallner in :issue:`35759`.)" msgstr "" -#: ../../whatsnew/3.12.rst:598 +#: ../../whatsnew/3.12.rst:590 msgid "" "The performance of :func:`inspect.getattr_static` has been considerably " "improved. Most calls to the function should be at least 2x faster than they " @@ -717,60 +705,60 @@ msgid "" "Waygood in :gh:`103193`.)" msgstr "" -#: ../../whatsnew/3.12.rst:604 +#: ../../whatsnew/3.12.rst:596 msgid "itertools" msgstr "itertools" -#: ../../whatsnew/3.12.rst:606 +#: ../../whatsnew/3.12.rst:598 msgid "" "Added :class:`itertools.batched()` for collecting into even-sized tuples " "where the last batch may be shorter than the rest. (Contributed by Raymond " "Hettinger in :gh:`98363`.)" msgstr "" -#: ../../whatsnew/3.12.rst:611 +#: ../../whatsnew/3.12.rst:603 msgid "math" msgstr "math" -#: ../../whatsnew/3.12.rst:613 +#: ../../whatsnew/3.12.rst:605 msgid "" "Added :func:`math.sumprod` for computing a sum of products. (Contributed by " "Raymond Hettinger in :gh:`100485`.)" msgstr "" -#: ../../whatsnew/3.12.rst:616 +#: ../../whatsnew/3.12.rst:608 msgid "" "Extended :func:`math.nextafter` to include a *steps* argument for moving up " "or down multiple steps at a time. (By Matthias Goergens, Mark Dickinson, and " "Raymond Hettinger in :gh:`94906`.)" msgstr "" -#: ../../whatsnew/3.12.rst:621 +#: ../../whatsnew/3.12.rst:613 msgid "os" msgstr "os" -#: ../../whatsnew/3.12.rst:623 +#: ../../whatsnew/3.12.rst:615 msgid "" "Add :data:`os.PIDFD_NONBLOCK` to open a file descriptor for a process with :" "func:`os.pidfd_open` in non-blocking mode. (Contributed by Kumar Aditya in :" "gh:`93312`.)" msgstr "" -#: ../../whatsnew/3.12.rst:627 +#: ../../whatsnew/3.12.rst:619 msgid "" ":class:`os.DirEntry` now includes an :meth:`os.DirEntry.is_junction` method " "to check if the entry is a junction. (Contributed by Charles Machalow in :gh:" "`99547`.)" msgstr "" -#: ../../whatsnew/3.12.rst:631 +#: ../../whatsnew/3.12.rst:623 msgid "" "Add :func:`os.listdrives`, :func:`os.listvolumes` and :func:`os.listmounts` " "functions on Windows for enumerating drives, volumes and mount points. " "(Contributed by Steve Dower in :gh:`102519`.)" msgstr "" -#: ../../whatsnew/3.12.rst:635 +#: ../../whatsnew/3.12.rst:627 msgid "" ":func:`os.stat` and :func:`os.lstat` are now more accurate on Windows. The " "``st_birthtime`` field will now be filled with the creation time of the " @@ -783,27 +771,27 @@ msgid "" "`99726`.)" msgstr "" -#: ../../whatsnew/3.12.rst:646 +#: ../../whatsnew/3.12.rst:638 msgid "os.path" msgstr "os.path" -#: ../../whatsnew/3.12.rst:648 +#: ../../whatsnew/3.12.rst:640 msgid "" "Add :func:`os.path.isjunction` to check if a given path is a junction. " "(Contributed by Charles Machalow in :gh:`99547`.)" msgstr "" -#: ../../whatsnew/3.12.rst:651 +#: ../../whatsnew/3.12.rst:643 msgid "" "Add :func:`os.path.splitroot` to split a path into a triad ``(drive, root, " "tail)``. (Contributed by Barney Gale in :gh:`101000`.)" msgstr "" -#: ../../whatsnew/3.12.rst:655 +#: ../../whatsnew/3.12.rst:647 msgid "pathlib" msgstr "pathlib" -#: ../../whatsnew/3.12.rst:657 +#: ../../whatsnew/3.12.rst:649 msgid "" "Add support for subclassing :class:`pathlib.PurePath` and :class:`~pathlib." "Path`, plus their Posix- and Windows-specific variants. Subclasses may " @@ -811,14 +799,14 @@ msgid "" "information between path instances." msgstr "" -#: ../../whatsnew/3.12.rst:662 +#: ../../whatsnew/3.12.rst:654 msgid "" "Add :meth:`~pathlib.Path.walk` for walking the directory trees and " "generating all file or directory names within them, similar to :func:`os." "walk`. (Contributed by Stanislav Zmiev in :gh:`90385`.)" msgstr "" -#: ../../whatsnew/3.12.rst:666 +#: ../../whatsnew/3.12.rst:658 msgid "" "Add *walk_up* optional parameter to :meth:`pathlib.PurePath.relative_to` to " "allow the insertion of ``..`` entries in the result; this behavior is more " @@ -826,13 +814,13 @@ msgid "" "issue:`40358`.)" msgstr "" -#: ../../whatsnew/3.12.rst:671 +#: ../../whatsnew/3.12.rst:663 msgid "" "Add :meth:`pathlib.Path.is_junction` as a proxy to :func:`os.path." "isjunction`. (Contributed by Charles Machalow in :gh:`99547`.)" msgstr "" -#: ../../whatsnew/3.12.rst:674 +#: ../../whatsnew/3.12.rst:666 msgid "" "Add *case_sensitive* optional parameter to :meth:`pathlib.Path.glob`, :meth:" "`pathlib.Path.rglob` and :meth:`pathlib.PurePath.match` for matching the " @@ -840,38 +828,38 @@ msgid "" "process." msgstr "" -#: ../../whatsnew/3.12.rst:679 +#: ../../whatsnew/3.12.rst:671 msgid "pdb" msgstr "pdb" -#: ../../whatsnew/3.12.rst:681 +#: ../../whatsnew/3.12.rst:673 msgid "" "Add convenience variables to hold values temporarily for debug session and " "provide quick access to values like the current frame or the return value. " "(Contributed by Tian Gao in :gh:`103693`.)" msgstr "" -#: ../../whatsnew/3.12.rst:687 +#: ../../whatsnew/3.12.rst:679 msgid "random" msgstr "random" -#: ../../whatsnew/3.12.rst:689 +#: ../../whatsnew/3.12.rst:681 msgid "" "Added :func:`random.binomialvariate`. (Contributed by Raymond Hettinger in :" "gh:`81620`.)" msgstr "" -#: ../../whatsnew/3.12.rst:692 +#: ../../whatsnew/3.12.rst:684 msgid "" "Added a default of ``lamb=1.0`` to :func:`random.expovariate`. (Contributed " "by Raymond Hettinger in :gh:`100234`.)" msgstr "" -#: ../../whatsnew/3.12.rst:696 +#: ../../whatsnew/3.12.rst:688 msgid "shutil" msgstr "shutil" -#: ../../whatsnew/3.12.rst:698 +#: ../../whatsnew/3.12.rst:690 msgid "" ":func:`shutil.make_archive` now passes the *root_dir* argument to custom " "archivers which support it. In this case it no longer temporarily changes " @@ -879,7 +867,7 @@ msgid "" "archiving. (Contributed by Serhiy Storchaka in :gh:`74696`.)" msgstr "" -#: ../../whatsnew/3.12.rst:704 +#: ../../whatsnew/3.12.rst:696 msgid "" ":func:`shutil.rmtree` now accepts a new argument *onexc* which is an error " "handler like *onerror* but which expects an exception instance rather than a " @@ -887,14 +875,14 @@ msgid "" "Python 3.14. (Contributed by Irit Katriel in :gh:`102828`.)" msgstr "" -#: ../../whatsnew/3.12.rst:710 +#: ../../whatsnew/3.12.rst:702 msgid "" ":func:`shutil.which` now consults the *PATHEXT* environment variable to find " "matches within *PATH* on Windows even when the given *cmd* includes a " "directory component. (Contributed by Charles Machalow in :gh:`103179`.)" msgstr "" -#: ../../whatsnew/3.12.rst:715 +#: ../../whatsnew/3.12.rst:707 msgid "" ":func:`shutil.which` will call ``NeedCurrentDirectoryForExePathW`` when " "querying for executables on Windows to determine if the current working " @@ -902,24 +890,24 @@ msgid "" "Machalow in :gh:`103179`.)" msgstr "" -#: ../../whatsnew/3.12.rst:720 +#: ../../whatsnew/3.12.rst:712 msgid "" ":func:`shutil.which` will return a path matching the *cmd* with a component " "from ``PATHEXT`` prior to a direct match elsewhere in the search path on " "Windows. (Contributed by Charles Machalow in :gh:`103179`.)" msgstr "" -#: ../../whatsnew/3.12.rst:726 +#: ../../whatsnew/3.12.rst:718 msgid "sqlite3" msgstr "sqlite3" -#: ../../whatsnew/3.12.rst:728 +#: ../../whatsnew/3.12.rst:720 msgid "" "Add a :ref:`command-line interface `. (Contributed by Erlend E. " "Aasland in :gh:`77617`.)" msgstr "" -#: ../../whatsnew/3.12.rst:731 +#: ../../whatsnew/3.12.rst:723 msgid "" "Add the :attr:`~sqlite3.Connection.autocommit` attribute to :class:`~sqlite3." "Connection` and the *autocommit* parameter to :func:`~sqlite3.connect` to " @@ -927,36 +915,36 @@ msgid "" "control-autocommit>`. (Contributed by Erlend E. Aasland in :gh:`83638`.)" msgstr "" -#: ../../whatsnew/3.12.rst:738 +#: ../../whatsnew/3.12.rst:730 msgid "" "Add *entrypoint* keyword-only parameter to :meth:`~sqlite3.Connection." "load_extension`, for overriding the SQLite extension entry point. " "(Contributed by Erlend E. Aasland in :gh:`103015`.)" msgstr "" -#: ../../whatsnew/3.12.rst:743 +#: ../../whatsnew/3.12.rst:735 msgid "" "Add :meth:`~sqlite3.Connection.getconfig` and :meth:`~sqlite3.Connection." "setconfig` to :class:`~sqlite3.Connection` to make configuration changes to " "a database connection. (Contributed by Erlend E. Aasland in :gh:`103489`.)" msgstr "" -#: ../../whatsnew/3.12.rst:749 +#: ../../whatsnew/3.12.rst:741 msgid "statistics" msgstr "statistics" -#: ../../whatsnew/3.12.rst:751 +#: ../../whatsnew/3.12.rst:743 msgid "" "Extended :func:`statistics.correlation` to include as a ``ranked`` method " "for computing the Spearman correlation of ranked data. (Contributed by " "Raymond Hettinger in :gh:`95861`.)" msgstr "" -#: ../../whatsnew/3.12.rst:756 +#: ../../whatsnew/3.12.rst:748 msgid "sys" msgstr "sys" -#: ../../whatsnew/3.12.rst:758 +#: ../../whatsnew/3.12.rst:750 msgid "" "Add :func:`sys.activate_stack_trampoline` and :func:`sys." "deactivate_stack_trampoline` for activating and deactivating stack profiler " @@ -966,7 +954,7 @@ msgid "" "Shannon in :gh:`96123`.)" msgstr "" -#: ../../whatsnew/3.12.rst:767 +#: ../../whatsnew/3.12.rst:759 msgid "" "Add :data:`sys.last_exc` which holds the last unhandled exception that was " "raised (for post-mortem debugging use cases). Deprecate the three fields " @@ -975,34 +963,34 @@ msgid "" "Katriel in :gh:`102778`.)" msgstr "" -#: ../../whatsnew/3.12.rst:773 ../../whatsnew/3.12.rst:1510 +#: ../../whatsnew/3.12.rst:765 ../../whatsnew/3.12.rst:1502 msgid "" ":func:`sys._current_exceptions` now returns a mapping from thread-id to an " "exception instance, rather than to a ``(typ, exc, tb)`` tuple. (Contributed " "by Irit Katriel in :gh:`103176`.)" msgstr "" -#: ../../whatsnew/3.12.rst:778 +#: ../../whatsnew/3.12.rst:770 msgid "tempfile" msgstr "tempfile" -#: ../../whatsnew/3.12.rst:780 +#: ../../whatsnew/3.12.rst:772 msgid "" "The :class:`tempfile.NamedTemporaryFile` function has a new optional " "parameter *delete_on_close* (Contributed by Evgeny Zorin in :gh:`58451`.)" msgstr "" -#: ../../whatsnew/3.12.rst:782 +#: ../../whatsnew/3.12.rst:774 msgid "" ":func:`tempfile.mkdtemp` now always returns an absolute path, even if the " "argument provided to the *dir* parameter is a relative path." msgstr "" -#: ../../whatsnew/3.12.rst:788 +#: ../../whatsnew/3.12.rst:780 msgid "threading" msgstr "threading" -#: ../../whatsnew/3.12.rst:790 +#: ../../whatsnew/3.12.rst:782 msgid "" "Add :func:`threading.settrace_all_threads` and :func:`threading." "setprofile_all_threads` that allow to set tracing and profiling functions in " @@ -1010,11 +998,11 @@ msgid "" "Galindo in :gh:`93503`.)" msgstr "" -#: ../../whatsnew/3.12.rst:796 +#: ../../whatsnew/3.12.rst:788 msgid "tkinter" msgstr "tkinter" -#: ../../whatsnew/3.12.rst:798 +#: ../../whatsnew/3.12.rst:790 msgid "" "``tkinter.Canvas.coords()`` now flattens its arguments. It now accepts not " "only coordinates as separate arguments (``x1, y1, x2, y2, ...``) and a " @@ -1024,11 +1012,11 @@ msgid "" "in :gh:`94473`.)" msgstr "" -#: ../../whatsnew/3.12.rst:807 +#: ../../whatsnew/3.12.rst:799 msgid "tokenize" msgstr "tokenize" -#: ../../whatsnew/3.12.rst:809 +#: ../../whatsnew/3.12.rst:801 msgid "" "The :mod:`tokenize` module includes the changes introduced in :pep:`701`. " "( Contributed by Marta Gómez Macías and Pablo Galindo in :gh:`102856`.) See :" @@ -1036,22 +1024,22 @@ msgid "" "to the :mod:`tokenize` module." msgstr "" -#: ../../whatsnew/3.12.rst:815 +#: ../../whatsnew/3.12.rst:807 msgid "types" msgstr "types" -#: ../../whatsnew/3.12.rst:817 +#: ../../whatsnew/3.12.rst:809 msgid "" "Add :func:`types.get_original_bases` to allow for further introspection of :" "ref:`user-defined-generics` when subclassed. (Contributed by James Hilton-" "Balfe and Alex Waygood in :gh:`101827`.)" msgstr "" -#: ../../whatsnew/3.12.rst:822 +#: ../../whatsnew/3.12.rst:814 msgid "typing" msgstr "typing" -#: ../../whatsnew/3.12.rst:824 +#: ../../whatsnew/3.12.rst:816 msgid "" ":func:`isinstance` checks against :func:`runtime-checkable protocols ` now use :func:`inspect.getattr_static` rather than :func:" @@ -1064,7 +1052,7 @@ msgid "" "affected by this change. (Contributed by Alex Waygood in :gh:`102433`.)" msgstr "" -#: ../../whatsnew/3.12.rst:835 +#: ../../whatsnew/3.12.rst:827 msgid "" "The members of a runtime-checkable protocol are now considered \"frozen\" at " "runtime as soon as the class has been created. Monkey-patching attributes " @@ -1072,13 +1060,13 @@ msgid "" "on :func:`isinstance` checks comparing objects to the protocol. For example::" msgstr "" -#: ../../whatsnew/3.12.rst:857 +#: ../../whatsnew/3.12.rst:849 msgid "" "This change was made in order to speed up ``isinstance()`` checks against " "runtime-checkable protocols." msgstr "" -#: ../../whatsnew/3.12.rst:860 +#: ../../whatsnew/3.12.rst:852 msgid "" "The performance profile of :func:`isinstance` checks against :func:`runtime-" "checkable protocols ` has changed significantly. " @@ -1089,71 +1077,71 @@ msgid "" "in :gh:`74690` and :gh:`103193`.)" msgstr "" -#: ../../whatsnew/3.12.rst:868 +#: ../../whatsnew/3.12.rst:860 msgid "" "All :data:`typing.TypedDict` and :data:`typing.NamedTuple` classes now have " "the ``__orig_bases__`` attribute. (Contributed by Adrian Garcia Badaracco " "in :gh:`103699`.)" msgstr "" -#: ../../whatsnew/3.12.rst:872 +#: ../../whatsnew/3.12.rst:864 msgid "" "Add ``frozen_default`` parameter to :func:`typing.dataclass_transform`. " "(Contributed by Erik De Bonte in :gh:`99957`.)" msgstr "" -#: ../../whatsnew/3.12.rst:876 +#: ../../whatsnew/3.12.rst:868 msgid "unicodedata" msgstr "unicodedata" -#: ../../whatsnew/3.12.rst:878 +#: ../../whatsnew/3.12.rst:870 msgid "" "The Unicode database has been updated to version 15.0.0. (Contributed by " "Benjamin Peterson in :gh:`96734`)." msgstr "" -#: ../../whatsnew/3.12.rst:882 +#: ../../whatsnew/3.12.rst:874 msgid "unittest" msgstr "unittest" -#: ../../whatsnew/3.12.rst:884 +#: ../../whatsnew/3.12.rst:876 msgid "" "Added ``--durations`` command line option, showing the N slowest test cases::" msgstr "" -#: ../../whatsnew/3.12.rst:900 +#: ../../whatsnew/3.12.rst:892 msgid "(Contributed by Giampaolo Rodola in :issue:`4080`)" msgstr "" -#: ../../whatsnew/3.12.rst:903 +#: ../../whatsnew/3.12.rst:895 msgid "uuid" msgstr "uuid" -#: ../../whatsnew/3.12.rst:905 +#: ../../whatsnew/3.12.rst:897 msgid "" "Add a :ref:`command-line interface `. (Contributed by Adam Chhina " "in :gh:`88597`.)" msgstr "" -#: ../../whatsnew/3.12.rst:910 +#: ../../whatsnew/3.12.rst:902 msgid "Optimizations" msgstr "" -#: ../../whatsnew/3.12.rst:912 +#: ../../whatsnew/3.12.rst:904 msgid "" "Removed ``wstr`` and ``wstr_length`` members from Unicode objects. It " "reduces object size by 8 or 16 bytes on 64bit platform. (:pep:`623`) " "(Contributed by Inada Naoki in :gh:`92536`.)" msgstr "" -#: ../../whatsnew/3.12.rst:916 +#: ../../whatsnew/3.12.rst:908 msgid "" "Added experimental support for using the BOLT binary optimizer in the build " "process, which improves performance by 1-5%. (Contributed by Kevin " "Modzelewski in :gh:`90536` and tuned by Dong-hee Na in :gh:`101525`)" msgstr "" -#: ../../whatsnew/3.12.rst:920 +#: ../../whatsnew/3.12.rst:912 msgid "" "Speed up the regular expression substitution (functions :func:`re.sub` and :" "func:`re.subn` and corresponding :class:`!re.Pattern` methods) for " @@ -1161,13 +1149,13 @@ msgid "" "by Serhiy Storchaka in :gh:`91524`.)" msgstr "" -#: ../../whatsnew/3.12.rst:925 +#: ../../whatsnew/3.12.rst:917 msgid "" "Speed up :class:`asyncio.Task` creation by deferring expensive string " "formatting. (Contributed by Itamar O in :gh:`103793`.)" msgstr "" -#: ../../whatsnew/3.12.rst:928 +#: ../../whatsnew/3.12.rst:920 msgid "" "The :func:`tokenize.tokenize` and :func:`tokenize.generate_tokens` functions " "are up to 64% faster as a side effect of the changes required to cover :pep:" @@ -1175,18 +1163,18 @@ msgid "" "Pablo Galindo in :gh:`102856`.)" msgstr "" -#: ../../whatsnew/3.12.rst:933 +#: ../../whatsnew/3.12.rst:925 msgid "" "Speed up :func:`super` method calls and attribute loads via the new :opcode:" "`LOAD_SUPER_ATTR` instruction. (Contributed by Carl Meyer and Vladimir " "Matveev in :gh:`103497`.)" msgstr "" -#: ../../whatsnew/3.12.rst:939 +#: ../../whatsnew/3.12.rst:931 msgid "CPython bytecode changes" msgstr "" -#: ../../whatsnew/3.12.rst:941 +#: ../../whatsnew/3.12.rst:933 msgid "" "Remove the :opcode:`LOAD_METHOD` instruction. It has been merged into :" "opcode:`LOAD_ATTR`. :opcode:`LOAD_ATTR` will now behave like the old :opcode:" @@ -1194,20 +1182,20 @@ msgid "" "by Ken Jin in :gh:`93429`.)" msgstr "" -#: ../../whatsnew/3.12.rst:946 +#: ../../whatsnew/3.12.rst:938 msgid "" "Remove the :opcode:`!JUMP_IF_FALSE_OR_POP` and :opcode:`!" "JUMP_IF_TRUE_OR_POP` instructions. (Contributed by Irit Katriel in :gh:" "`102859`.)" msgstr "" -#: ../../whatsnew/3.12.rst:949 +#: ../../whatsnew/3.12.rst:941 msgid "" "Add the :opcode:`LOAD_FAST_AND_CLEAR` instruction as part of the " "implementation of :pep:`709`. (Contributed by Carl Meyer in :gh:`101441`.)" msgstr "" -#: ../../whatsnew/3.12.rst:952 +#: ../../whatsnew/3.12.rst:944 msgid "" "Add the :opcode:`LOAD_FROM_DICT_OR_DEREF`, :opcode:" "`LOAD_FROM_DICT_OR_GLOBALS`, and :opcode:`LOAD_LOCALS` opcodes as part of " @@ -1216,41 +1204,41 @@ msgid "" "`LOAD_FROM_DICT_OR_DEREF`. (Contributed by Jelle Zijlstra in :gh:`103764`.)" msgstr "" -#: ../../whatsnew/3.12.rst:958 +#: ../../whatsnew/3.12.rst:950 msgid "" "Add the :opcode:`LOAD_SUPER_ATTR` instruction. (Contributed by Carl Meyer " "and Vladimir Matveev in :gh:`103497`.)" msgstr "" -#: ../../whatsnew/3.12.rst:962 +#: ../../whatsnew/3.12.rst:954 msgid "Demos and Tools" msgstr "" -#: ../../whatsnew/3.12.rst:964 +#: ../../whatsnew/3.12.rst:956 msgid "" "Remove the ``Tools/demo/`` directory which contained old demo scripts. A " "copy can be found in the `old-demos project `_. (Contributed by Victor Stinner in :gh:`97681`.)" msgstr "" -#: ../../whatsnew/3.12.rst:969 +#: ../../whatsnew/3.12.rst:961 msgid "" "Remove outdated example scripts of the ``Tools/scripts/`` directory. A copy " "can be found in the `old-demos project `_. (Contributed by Victor Stinner in :gh:`97669`.)" msgstr "" -#: ../../whatsnew/3.12.rst:976 ../../whatsnew/3.12.rst:1875 +#: ../../whatsnew/3.12.rst:968 ../../whatsnew/3.12.rst:1867 msgid "Deprecated" msgstr "" -#: ../../whatsnew/3.12.rst:978 +#: ../../whatsnew/3.12.rst:970 msgid "" ":class:`typing.Hashable` and :class:`typing.Sized` aliases for :class:" "`collections.abc.Hashable` and :class:`collections.abc.Sized`. (:gh:`94309`.)" msgstr "" -#: ../../whatsnew/3.12.rst:981 +#: ../../whatsnew/3.12.rst:973 msgid "" "The :mod:`sqlite3` :ref:`default adapters and converters ` are now deprecated. Instead, use the :ref:`sqlite3-adapter-" @@ -1258,7 +1246,7 @@ msgid "" "Aasland in :gh:`90016`.)" msgstr "" -#: ../../whatsnew/3.12.rst:987 +#: ../../whatsnew/3.12.rst:979 msgid "" "In :meth:`~sqlite3.Cursor.execute`, :exc:`DeprecationWarning` is now emitted " "when :ref:`named placeholders ` are used together with " @@ -1268,7 +1256,7 @@ msgid "" "Erlend E. Aasland in :gh:`101698`.)" msgstr "" -#: ../../whatsnew/3.12.rst:994 +#: ../../whatsnew/3.12.rst:986 msgid "" "The 3-arg signatures (type, value, traceback) of :meth:`~coroutine.throw`, :" "meth:`~generator.throw` and :meth:`~agen.athrow` are deprecated and may be " @@ -1276,14 +1264,14 @@ msgid "" "functions instead. (Contributed by Ofey Chan in :gh:`89874`.)" msgstr "" -#: ../../whatsnew/3.12.rst:999 +#: ../../whatsnew/3.12.rst:991 msgid "" ":exc:`DeprecationWarning` is now raised when ``__package__`` on a module " "differs from ``__spec__.parent`` (previously it was :exc:`ImportWarning`). " "(Contributed by Brett Cannon in :gh:`65961`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1004 +#: ../../whatsnew/3.12.rst:996 msgid "" "The :meth:`~asyncio.get_event_loop` method of the default event loop policy " "now emits a :exc:`DeprecationWarning` if there is no current event loop set " @@ -1291,7 +1279,7 @@ msgid "" "Rossum in :gh:`100160`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1009 +#: ../../whatsnew/3.12.rst:1001 msgid "" "The :mod:`xml.etree.ElementTree` module now emits :exc:`DeprecationWarning` " "when testing the truth value of an :class:`xml.etree.ElementTree.Element`. " @@ -1299,7 +1287,7 @@ msgid "" "implementation emitted nothing." msgstr "" -#: ../../whatsnew/3.12.rst:1014 +#: ../../whatsnew/3.12.rst:1006 msgid "" "In accordance with :pep:`699`, the ``ma_version_tag`` field in :c:type:" "`PyDictObject` is deprecated for extension modules. Accessing this field " @@ -1308,7 +1296,7 @@ msgid "" "PEP by Ken Jin.)" msgstr "" -#: ../../whatsnew/3.12.rst:1019 +#: ../../whatsnew/3.12.rst:1011 msgid "" "The ``st_ctime`` fields return by :func:`os.stat` and :func:`os.lstat` on " "Windows are deprecated. In a future release, they will contain the last " @@ -1317,35 +1305,35 @@ msgid "" "``st_birthtime`` field. (Contributed by Steve Dower in :gh:`99726`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1025 +#: ../../whatsnew/3.12.rst:1017 msgid "" "The :data:`sys.last_type`, :data:`sys.last_value` and :data:`sys." "last_traceback` fields are deprecated. Use :data:`sys.last_exc` instead. " "(Contributed by Irit Katriel in :gh:`102778`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1029 +#: ../../whatsnew/3.12.rst:1021 msgid "" "The *onerror* argument of :func:`shutil.rmtree` is deprecated as will be " "removed in Python 3.14. Use *onexc* instead. (Contributed by Irit Katriel " "in :gh:`102828`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1032 +#: ../../whatsnew/3.12.rst:1024 msgid "" "Extracting tar archives without specifying *filter* is deprecated until " "Python 3.14, when ``'data'`` filter will become the default. See :ref:" "`tarfile-extraction-filter` for details." msgstr "" -#: ../../whatsnew/3.12.rst:1036 +#: ../../whatsnew/3.12.rst:1028 msgid "" "``calendar.January`` and ``calendar.February`` constants are deprecated and " "replaced by :data:`calendar.Month.JANUARY` and :data:`calendar.Month." "FEBRUARY`. (Contributed by Prince Roshan in :gh:`103636`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1040 +#: ../../whatsnew/3.12.rst:1032 msgid "" "The bitwise inversion operator (``~``) on bool is deprecated. It will throw " "an error in Python 3.14. Use ``not`` for logical negation of bools instead. " @@ -1354,7 +1342,7 @@ msgid "" "by Tim Hoffmann in :gh:`103487`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1046 +#: ../../whatsnew/3.12.rst:1038 msgid "" ":class:`datetime.datetime`'s :meth:`~datetime.datetime.utcnow` and :meth:" "`~datetime.datetime.utcfromtimestamp` are deprecated and will be removed in " @@ -1364,175 +1352,175 @@ msgid "" "`datetime.UTC`. (Contributed by Paul Ganssle in :gh:`103857`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1057 +#: ../../whatsnew/3.12.rst:1049 msgid "Pending Removal in Python 3.13" msgstr "" -#: ../../whatsnew/3.12.rst:1059 +#: ../../whatsnew/3.12.rst:1051 msgid "" "The following modules and APIs have been deprecated in earlier Python " "releases, and will be removed in Python 3.13." msgstr "" -#: ../../whatsnew/3.12.rst:1062 +#: ../../whatsnew/3.12.rst:1054 msgid "Modules (see :pep:`594`):" msgstr "" -#: ../../whatsnew/3.12.rst:1064 +#: ../../whatsnew/3.12.rst:1056 msgid ":mod:`aifc`" msgstr ":mod:`aifc`" -#: ../../whatsnew/3.12.rst:1065 +#: ../../whatsnew/3.12.rst:1057 msgid ":mod:`audioop`" msgstr ":mod:`audioop`" -#: ../../whatsnew/3.12.rst:1066 +#: ../../whatsnew/3.12.rst:1058 msgid ":mod:`cgi`" msgstr ":mod:`cgi`" -#: ../../whatsnew/3.12.rst:1067 +#: ../../whatsnew/3.12.rst:1059 msgid ":mod:`cgitb`" msgstr ":mod:`cgitb`" -#: ../../whatsnew/3.12.rst:1068 +#: ../../whatsnew/3.12.rst:1060 msgid ":mod:`chunk`" msgstr ":mod:`chunk`" -#: ../../whatsnew/3.12.rst:1069 +#: ../../whatsnew/3.12.rst:1061 msgid ":mod:`crypt`" msgstr ":mod:`crypt`" -#: ../../whatsnew/3.12.rst:1070 +#: ../../whatsnew/3.12.rst:1062 msgid ":mod:`imghdr`" msgstr ":mod:`imghdr`" -#: ../../whatsnew/3.12.rst:1071 +#: ../../whatsnew/3.12.rst:1063 msgid ":mod:`mailcap`" msgstr ":mod:`mailcap`" -#: ../../whatsnew/3.12.rst:1072 +#: ../../whatsnew/3.12.rst:1064 msgid ":mod:`msilib`" msgstr ":mod:`msilib`" -#: ../../whatsnew/3.12.rst:1073 +#: ../../whatsnew/3.12.rst:1065 msgid ":mod:`nis`" msgstr ":mod:`nis`" -#: ../../whatsnew/3.12.rst:1074 +#: ../../whatsnew/3.12.rst:1066 msgid ":mod:`nntplib`" msgstr ":mod:`nntplib`" -#: ../../whatsnew/3.12.rst:1075 +#: ../../whatsnew/3.12.rst:1067 msgid ":mod:`ossaudiodev`" msgstr ":mod:`ossaudiodev`" -#: ../../whatsnew/3.12.rst:1076 +#: ../../whatsnew/3.12.rst:1068 msgid ":mod:`pipes`" msgstr ":mod:`pipes`" -#: ../../whatsnew/3.12.rst:1077 +#: ../../whatsnew/3.12.rst:1069 msgid ":mod:`sndhdr`" msgstr ":mod:`sndhdr`" -#: ../../whatsnew/3.12.rst:1078 +#: ../../whatsnew/3.12.rst:1070 msgid ":mod:`spwd`" msgstr ":mod:`spwd`" -#: ../../whatsnew/3.12.rst:1079 +#: ../../whatsnew/3.12.rst:1071 msgid ":mod:`sunau`" msgstr ":mod:`sunau`" -#: ../../whatsnew/3.12.rst:1080 +#: ../../whatsnew/3.12.rst:1072 msgid ":mod:`telnetlib`" msgstr ":mod:`telnetlib`" -#: ../../whatsnew/3.12.rst:1081 +#: ../../whatsnew/3.12.rst:1073 msgid ":mod:`uu`" msgstr ":mod:`uu`" -#: ../../whatsnew/3.12.rst:1082 +#: ../../whatsnew/3.12.rst:1074 msgid ":mod:`xdrlib`" msgstr ":mod:`xdrlib`" -#: ../../whatsnew/3.12.rst:1084 +#: ../../whatsnew/3.12.rst:1076 msgid "APIs:" msgstr "" -#: ../../whatsnew/3.12.rst:1086 +#: ../../whatsnew/3.12.rst:1078 msgid ":class:`!configparser.LegacyInterpolation` (:gh:`90765`)" msgstr ":class:`!configparser.LegacyInterpolation` (:gh:`90765`)" -#: ../../whatsnew/3.12.rst:1087 +#: ../../whatsnew/3.12.rst:1079 msgid ":func:`locale.getdefaultlocale` (:gh:`90817`)" msgstr ":func:`locale.getdefaultlocale` (:gh:`90817`)" -#: ../../whatsnew/3.12.rst:1088 +#: ../../whatsnew/3.12.rst:1080 msgid ":meth:`!turtle.RawTurtle.settiltangle` (:gh:`50096`)" msgstr ":meth:`!turtle.RawTurtle.settiltangle` (:gh:`50096`)" -#: ../../whatsnew/3.12.rst:1089 +#: ../../whatsnew/3.12.rst:1081 msgid ":func:`!unittest.findTestCases` (:gh:`50096`)" msgstr ":func:`!unittest.findTestCases` (:gh:`50096`)" -#: ../../whatsnew/3.12.rst:1090 +#: ../../whatsnew/3.12.rst:1082 msgid ":func:`!unittest.getTestCaseNames` (:gh:`50096`)" msgstr ":func:`!unittest.getTestCaseNames` (:gh:`50096`)" -#: ../../whatsnew/3.12.rst:1091 +#: ../../whatsnew/3.12.rst:1083 msgid ":func:`!unittest.makeSuite` (:gh:`50096`)" msgstr ":func:`!unittest.makeSuite` (:gh:`50096`)" -#: ../../whatsnew/3.12.rst:1092 +#: ../../whatsnew/3.12.rst:1084 msgid ":meth:`!unittest.TestProgram.usageExit` (:gh:`67048`)" msgstr ":meth:`!unittest.TestProgram.usageExit` (:gh:`67048`)" -#: ../../whatsnew/3.12.rst:1093 +#: ../../whatsnew/3.12.rst:1085 msgid ":class:`!webbrowser.MacOSX` (:gh:`86421`)" msgstr ":class:`!webbrowser.MacOSX` (:gh:`86421`)" -#: ../../whatsnew/3.12.rst:1094 +#: ../../whatsnew/3.12.rst:1086 msgid ":class:`classmethod` descriptor chaining (:gh:`89519`)" msgstr "" -#: ../../whatsnew/3.12.rst:1097 +#: ../../whatsnew/3.12.rst:1089 msgid "Pending Removal in Python 3.14" msgstr "" -#: ../../whatsnew/3.12.rst:1099 +#: ../../whatsnew/3.12.rst:1091 msgid "" "Deprecated the following :mod:`importlib.abc` classes, scheduled for removal " "in Python 3.14:" msgstr "" -#: ../../whatsnew/3.12.rst:1102 +#: ../../whatsnew/3.12.rst:1094 msgid ":class:`!importlib.abc.ResourceReader`" msgstr ":class:`!importlib.abc.ResourceReader`" -#: ../../whatsnew/3.12.rst:1103 +#: ../../whatsnew/3.12.rst:1095 msgid ":class:`!importlib.abc.Traversable`" msgstr ":class:`!importlib.abc.Traversable`" -#: ../../whatsnew/3.12.rst:1104 +#: ../../whatsnew/3.12.rst:1096 msgid ":class:`!importlib.abc.TraversableResources`" msgstr ":class:`!importlib.abc.TraversableResources`" -#: ../../whatsnew/3.12.rst:1106 +#: ../../whatsnew/3.12.rst:1098 msgid "Use :mod:`importlib.resources.abc` classes instead:" msgstr "" -#: ../../whatsnew/3.12.rst:1108 +#: ../../whatsnew/3.12.rst:1100 msgid ":class:`importlib.resources.abc.Traversable`" msgstr ":class:`importlib.resources.abc.Traversable`" -#: ../../whatsnew/3.12.rst:1109 +#: ../../whatsnew/3.12.rst:1101 msgid ":class:`importlib.resources.abc.TraversableResources`" msgstr ":class:`importlib.resources.abc.TraversableResources`" -#: ../../whatsnew/3.12.rst:1111 +#: ../../whatsnew/3.12.rst:1103 msgid "(Contributed by Jason R. Coombs and Hugo van Kemenade in :gh:`93963`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1113 +#: ../../whatsnew/3.12.rst:1105 msgid "" "Deprecated :class:`collections.abc.ByteString`. Prefer :class:`Sequence` or :" "class:`collections.abc.Buffer`. For use in typing, prefer a union, like " @@ -1540,37 +1528,37 @@ msgid "" "Shantanu Jain in :gh:`91896`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1118 +#: ../../whatsnew/3.12.rst:1110 msgid "" ":class:`typing.ByteString`, deprecated since Python 3.9, now causes a :exc:" "`DeprecationWarning` to be emitted when it is used." msgstr "" -#: ../../whatsnew/3.12.rst:1121 +#: ../../whatsnew/3.12.rst:1113 msgid "" "Creating immutable types (:data:`Py_TPFLAGS_IMMUTABLETYPE`) with mutable " "bases using the C API." msgstr "" -#: ../../whatsnew/3.12.rst:1124 +#: ../../whatsnew/3.12.rst:1116 msgid "" "Deprecated the *isdst* parameter in :func:`email.utils.localtime`. " "(Contributed by Alan Williams in :gh:`72346`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1127 +#: ../../whatsnew/3.12.rst:1119 msgid "" "``__package__`` and ``__cached__`` will cease to be set or taken into " "consideration by the import system (:gh:`97879`)." msgstr "" -#: ../../whatsnew/3.12.rst:1130 +#: ../../whatsnew/3.12.rst:1122 msgid "" "Testing the truth value of an :class:`xml.etree.ElementTree.Element` is " "deprecated and will raise an exception in Python 3.14." msgstr "" -#: ../../whatsnew/3.12.rst:1133 +#: ../../whatsnew/3.12.rst:1125 msgid "" "The default :mod:`multiprocessing` start method will change to a safer one " "on Linux, BSDs, and other non-macOS POSIX platforms where ``'fork'`` is " @@ -1581,14 +1569,14 @@ msgid "" "``'fork'``. See :ref:`multiprocessing-start-methods`." msgstr "" -#: ../../whatsnew/3.12.rst:1141 +#: ../../whatsnew/3.12.rst:1133 msgid "" ":mod:`pty` has two undocumented ``master_open()`` and ``slave_open()`` " "functions that have been deprecated since Python 2 but only gained a proper :" "exc:`DeprecationWarning` in 3.12. Remove them in 3.14." msgstr "" -#: ../../whatsnew/3.12.rst:1145 +#: ../../whatsnew/3.12.rst:1137 msgid "" ":mod:`itertools` had undocumented, inefficient, historically buggy, and " "inconsistent support for copy, deepcopy, and pickle operations. This will be " @@ -1596,7 +1584,7 @@ msgid "" "burden. (Contributed by Raymond Hettinger in :gh:`101588`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1151 +#: ../../whatsnew/3.12.rst:1143 msgid "" "Accessing ``co_lnotab`` was deprecated in :pep:`626` since 3.10 and was " "planned to be removed in 3.12 but it only got a proper :exc:" @@ -1604,74 +1592,74 @@ msgid "" "Sobolev in :gh:`101866`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1157 +#: ../../whatsnew/3.12.rst:1149 msgid "" "The *onerror* argument of :func:`shutil.rmtree` is deprecated in 3.12, and " "will be removed in 3.14." msgstr "" -#: ../../whatsnew/3.12.rst:1160 +#: ../../whatsnew/3.12.rst:1152 msgid "" "The *type*, *choices*, and *metavar* parameters of :class:`!argparse." "BooleanOptionalAction` are deprecated and will be removed in 3.14. " "(Contributed by Nikita Sobolev in :gh:`92248`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1165 +#: ../../whatsnew/3.12.rst:1157 msgid "" ":func:`pkgutil.find_loader` and :func:`pkgutil.get_loader` now raise :exc:" "`DeprecationWarning`; use :func:`importlib.util.find_spec` instead. " "(Contributed by Nikita Sobolev in :gh:`97850`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1170 +#: ../../whatsnew/3.12.rst:1162 msgid "" "The following :mod:`ast` features have been deprecated in documentation " "since Python 3.8, now cause a :exc:`DeprecationWarning` to be emitted at " "runtime when they are accessed or used, and will be removed in Python 3.14:" msgstr "" -#: ../../whatsnew/3.12.rst:1174 +#: ../../whatsnew/3.12.rst:1166 msgid ":class:`!ast.Num`" msgstr ":class:`!ast.Num`" -#: ../../whatsnew/3.12.rst:1175 +#: ../../whatsnew/3.12.rst:1167 msgid ":class:`!ast.Str`" msgstr ":class:`!ast.Str`" -#: ../../whatsnew/3.12.rst:1176 +#: ../../whatsnew/3.12.rst:1168 msgid ":class:`!ast.Bytes`" msgstr ":class:`!ast.Bytes`" -#: ../../whatsnew/3.12.rst:1177 +#: ../../whatsnew/3.12.rst:1169 msgid ":class:`!ast.NameConstant`" msgstr ":class:`!ast.NameConstant`" -#: ../../whatsnew/3.12.rst:1178 +#: ../../whatsnew/3.12.rst:1170 msgid ":class:`!ast.Ellipsis`" msgstr ":class:`!ast.Ellipsis`" -#: ../../whatsnew/3.12.rst:1180 +#: ../../whatsnew/3.12.rst:1172 msgid "" "Use :class:`ast.Constant` instead. (Contributed by Serhiy Storchaka in :gh:" "`90953`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1184 +#: ../../whatsnew/3.12.rst:1176 msgid "Pending Removal in Future Versions" msgstr "" -#: ../../whatsnew/3.12.rst:1186 +#: ../../whatsnew/3.12.rst:1178 msgid "" "The following APIs were deprecated in earlier Python versions and will be " "removed, although there is currently no date scheduled for their removal." msgstr "" -#: ../../whatsnew/3.12.rst:1189 +#: ../../whatsnew/3.12.rst:1181 msgid ":class:`typing.Text` (:gh:`92332`)" msgstr ":class:`typing.Text` (:gh:`92332`)" -#: ../../whatsnew/3.12.rst:1191 +#: ../../whatsnew/3.12.rst:1183 msgid "" "Currently Python accepts numeric literals immediately followed by keywords, " "for example ``0in x``, ``1or x``, ``0if 1else 2``. It allows confusing and " @@ -1683,11 +1671,11 @@ msgid "" "syntax error. (:gh:`87999`)" msgstr "" -#: ../../whatsnew/3.12.rst:1202 ../../whatsnew/3.12.rst:1957 +#: ../../whatsnew/3.12.rst:1194 ../../whatsnew/3.12.rst:1949 msgid "Removed" msgstr "" -#: ../../whatsnew/3.12.rst:1204 +#: ../../whatsnew/3.12.rst:1196 msgid "" "Remove the ``distutils`` package. It was deprecated in Python 3.10 by :pep:" "`632` \"Deprecate distutils module\". For projects still using ``distutils`` " @@ -1696,13 +1684,13 @@ msgid "" "in :gh:`92584`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1210 +#: ../../whatsnew/3.12.rst:1202 msgid "" "Remove the bundled setuptools wheel from :mod:`ensurepip`, and stop " "installing setuptools in environments created by :mod:`venv`." msgstr "" -#: ../../whatsnew/3.12.rst:1213 +#: ../../whatsnew/3.12.rst:1205 msgid "" "``pip (>= 22.1)`` does not require setuptools to be installed in the " "environment. ``setuptools``-based (and ``distutils``-based) packages can " @@ -1710,7 +1698,7 @@ msgid "" "the build environment it uses for building a package." msgstr "" -#: ../../whatsnew/3.12.rst:1219 +#: ../../whatsnew/3.12.rst:1211 msgid "" "``easy_install``, ``pkg_resources``, ``setuptools`` and ``distutils`` are no " "longer provided by default in environments created with ``venv`` or " @@ -1720,222 +1708,222 @@ msgid "" "(typically, using pip)." msgstr "" -#: ../../whatsnew/3.12.rst:1226 +#: ../../whatsnew/3.12.rst:1218 msgid "(Contributed by Pradyun Gedam in :gh:`95299`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1228 +#: ../../whatsnew/3.12.rst:1220 msgid "Removed many old deprecated :mod:`unittest` features:" msgstr "" -#: ../../whatsnew/3.12.rst:1230 +#: ../../whatsnew/3.12.rst:1222 msgid "A number of :class:`~unittest.TestCase` method aliases:" msgstr "" -#: ../../whatsnew/3.12.rst:1233 +#: ../../whatsnew/3.12.rst:1225 msgid "Deprecated alias" msgstr "" -#: ../../whatsnew/3.12.rst:1233 +#: ../../whatsnew/3.12.rst:1225 msgid "Method Name" msgstr "" -#: ../../whatsnew/3.12.rst:1233 +#: ../../whatsnew/3.12.rst:1225 msgid "Deprecated in" msgstr "" -#: ../../whatsnew/3.12.rst:1235 +#: ../../whatsnew/3.12.rst:1227 msgid "``failUnless``" msgstr "``failUnless``" -#: ../../whatsnew/3.12.rst:1235 ../../whatsnew/3.12.rst:1242 +#: ../../whatsnew/3.12.rst:1227 ../../whatsnew/3.12.rst:1234 msgid ":meth:`.assertTrue`" msgstr ":meth:`.assertTrue`" -#: ../../whatsnew/3.12.rst:1235 ../../whatsnew/3.12.rst:1236 -#: ../../whatsnew/3.12.rst:1237 ../../whatsnew/3.12.rst:1238 -#: ../../whatsnew/3.12.rst:1239 ../../whatsnew/3.12.rst:1240 -#: ../../whatsnew/3.12.rst:1241 +#: ../../whatsnew/3.12.rst:1227 ../../whatsnew/3.12.rst:1228 +#: ../../whatsnew/3.12.rst:1229 ../../whatsnew/3.12.rst:1230 +#: ../../whatsnew/3.12.rst:1231 ../../whatsnew/3.12.rst:1232 +#: ../../whatsnew/3.12.rst:1233 msgid "3.1" msgstr "3.1" -#: ../../whatsnew/3.12.rst:1236 +#: ../../whatsnew/3.12.rst:1228 msgid "``failIf``" msgstr "``failIf``" -#: ../../whatsnew/3.12.rst:1236 +#: ../../whatsnew/3.12.rst:1228 msgid ":meth:`.assertFalse`" msgstr ":meth:`.assertFalse`" -#: ../../whatsnew/3.12.rst:1237 +#: ../../whatsnew/3.12.rst:1229 msgid "``failUnlessEqual``" msgstr "``failUnlessEqual``" -#: ../../whatsnew/3.12.rst:1237 ../../whatsnew/3.12.rst:1243 +#: ../../whatsnew/3.12.rst:1229 ../../whatsnew/3.12.rst:1235 msgid ":meth:`.assertEqual`" msgstr ":meth:`.assertEqual`" -#: ../../whatsnew/3.12.rst:1238 +#: ../../whatsnew/3.12.rst:1230 msgid "``failIfEqual``" msgstr "``failIfEqual``" -#: ../../whatsnew/3.12.rst:1238 ../../whatsnew/3.12.rst:1244 +#: ../../whatsnew/3.12.rst:1230 ../../whatsnew/3.12.rst:1236 msgid ":meth:`.assertNotEqual`" msgstr ":meth:`.assertNotEqual`" -#: ../../whatsnew/3.12.rst:1239 +#: ../../whatsnew/3.12.rst:1231 msgid "``failUnlessAlmostEqual``" msgstr "``failUnlessAlmostEqual``" -#: ../../whatsnew/3.12.rst:1239 ../../whatsnew/3.12.rst:1245 +#: ../../whatsnew/3.12.rst:1231 ../../whatsnew/3.12.rst:1237 msgid ":meth:`.assertAlmostEqual`" msgstr ":meth:`.assertAlmostEqual`" -#: ../../whatsnew/3.12.rst:1240 +#: ../../whatsnew/3.12.rst:1232 msgid "``failIfAlmostEqual``" msgstr "``failIfAlmostEqual``" -#: ../../whatsnew/3.12.rst:1240 ../../whatsnew/3.12.rst:1246 +#: ../../whatsnew/3.12.rst:1232 ../../whatsnew/3.12.rst:1238 msgid ":meth:`.assertNotAlmostEqual`" msgstr ":meth:`.assertNotAlmostEqual`" -#: ../../whatsnew/3.12.rst:1241 +#: ../../whatsnew/3.12.rst:1233 msgid "``failUnlessRaises``" msgstr "``failUnlessRaises``" -#: ../../whatsnew/3.12.rst:1241 +#: ../../whatsnew/3.12.rst:1233 msgid ":meth:`.assertRaises`" msgstr ":meth:`.assertRaises`" -#: ../../whatsnew/3.12.rst:1242 +#: ../../whatsnew/3.12.rst:1234 msgid "``assert_``" msgstr "``assert_``" -#: ../../whatsnew/3.12.rst:1242 ../../whatsnew/3.12.rst:1243 -#: ../../whatsnew/3.12.rst:1244 ../../whatsnew/3.12.rst:1245 -#: ../../whatsnew/3.12.rst:1246 ../../whatsnew/3.12.rst:1247 -#: ../../whatsnew/3.12.rst:1248 +#: ../../whatsnew/3.12.rst:1234 ../../whatsnew/3.12.rst:1235 +#: ../../whatsnew/3.12.rst:1236 ../../whatsnew/3.12.rst:1237 +#: ../../whatsnew/3.12.rst:1238 ../../whatsnew/3.12.rst:1239 +#: ../../whatsnew/3.12.rst:1240 msgid "3.2" msgstr "3.2" -#: ../../whatsnew/3.12.rst:1243 +#: ../../whatsnew/3.12.rst:1235 msgid "``assertEquals``" msgstr "``assertEquals``" -#: ../../whatsnew/3.12.rst:1244 +#: ../../whatsnew/3.12.rst:1236 msgid "``assertNotEquals``" msgstr "``assertNotEquals``" -#: ../../whatsnew/3.12.rst:1245 +#: ../../whatsnew/3.12.rst:1237 msgid "``assertAlmostEquals``" msgstr "``assertAlmostEquals``" -#: ../../whatsnew/3.12.rst:1246 +#: ../../whatsnew/3.12.rst:1238 msgid "``assertNotAlmostEquals``" msgstr "``assertNotAlmostEquals``" -#: ../../whatsnew/3.12.rst:1247 +#: ../../whatsnew/3.12.rst:1239 msgid "``assertRegexpMatches``" msgstr "``assertRegexpMatches``" -#: ../../whatsnew/3.12.rst:1247 +#: ../../whatsnew/3.12.rst:1239 msgid ":meth:`.assertRegex`" msgstr ":meth:`.assertRegex`" -#: ../../whatsnew/3.12.rst:1248 +#: ../../whatsnew/3.12.rst:1240 msgid "``assertRaisesRegexp``" msgstr "``assertRaisesRegexp``" -#: ../../whatsnew/3.12.rst:1248 +#: ../../whatsnew/3.12.rst:1240 msgid ":meth:`.assertRaisesRegex`" msgstr ":meth:`.assertRaisesRegex`" -#: ../../whatsnew/3.12.rst:1249 +#: ../../whatsnew/3.12.rst:1241 msgid "``assertNotRegexpMatches``" msgstr "``assertNotRegexpMatches``" -#: ../../whatsnew/3.12.rst:1249 +#: ../../whatsnew/3.12.rst:1241 msgid ":meth:`.assertNotRegex`" msgstr ":meth:`.assertNotRegex`" -#: ../../whatsnew/3.12.rst:1249 +#: ../../whatsnew/3.12.rst:1241 msgid "3.5" msgstr "3.5" -#: ../../whatsnew/3.12.rst:1252 +#: ../../whatsnew/3.12.rst:1244 msgid "" "You can use https://github.com/isidentical/teyit to automatically modernise " "your unit tests." msgstr "" -#: ../../whatsnew/3.12.rst:1255 +#: ../../whatsnew/3.12.rst:1247 msgid "" "Undocumented and broken :class:`~unittest.TestCase` method " "``assertDictContainsSubset`` (deprecated in Python 3.2)." msgstr "" -#: ../../whatsnew/3.12.rst:1258 +#: ../../whatsnew/3.12.rst:1250 msgid "" "Undocumented :meth:`TestLoader.loadTestsFromModule ` parameter *use_load_tests* (deprecated and ignored " "since Python 3.2)." msgstr "" -#: ../../whatsnew/3.12.rst:1262 +#: ../../whatsnew/3.12.rst:1254 msgid "" "An alias of the :class:`~unittest.TextTestResult` class: ``_TextTestResult`` " "(deprecated in Python 3.2)." msgstr "" -#: ../../whatsnew/3.12.rst:1265 +#: ../../whatsnew/3.12.rst:1257 msgid "(Contributed by Serhiy Storchaka in :issue:`45162`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1267 +#: ../../whatsnew/3.12.rst:1259 msgid "" "Several names deprecated in the :mod:`configparser` way back in 3.2 have " "been removed per :gh:`89336`:" msgstr "" -#: ../../whatsnew/3.12.rst:1270 +#: ../../whatsnew/3.12.rst:1262 msgid "" ":class:`configparser.ParsingError` no longer has a ``filename`` attribute or " "argument. Use the ``source`` attribute and argument instead." msgstr "" -#: ../../whatsnew/3.12.rst:1272 +#: ../../whatsnew/3.12.rst:1264 msgid "" ":mod:`configparser` no longer has a ``SafeConfigParser`` class. Use the " "shorter :class:`~configparser.ConfigParser` name instead." msgstr "" -#: ../../whatsnew/3.12.rst:1274 +#: ../../whatsnew/3.12.rst:1266 msgid "" ":class:`configparser.ConfigParser` no longer has a ``readfp`` method. Use :" "meth:`~configparser.ConfigParser.read_file` instead." msgstr "" -#: ../../whatsnew/3.12.rst:1277 +#: ../../whatsnew/3.12.rst:1269 msgid "" "The following undocumented :mod:`sqlite3` features, deprecated in Python " "3.10, are now removed:" msgstr "" -#: ../../whatsnew/3.12.rst:1280 +#: ../../whatsnew/3.12.rst:1272 msgid "``sqlite3.enable_shared_cache()``" msgstr "``sqlite3.enable_shared_cache()``" -#: ../../whatsnew/3.12.rst:1281 +#: ../../whatsnew/3.12.rst:1273 msgid "``sqlite3.OptimizedUnicode``" msgstr "``sqlite3.OptimizedUnicode``" -#: ../../whatsnew/3.12.rst:1283 +#: ../../whatsnew/3.12.rst:1275 msgid "" "If a shared cache must be used, open the database in URI mode using the " "``cache=shared`` query parameter." msgstr "" -#: ../../whatsnew/3.12.rst:1286 +#: ../../whatsnew/3.12.rst:1278 msgid "" "The ``sqlite3.OptimizedUnicode`` text factory has been an alias for :class:" "`str` since Python 3.3. Code that previously set the text factory to " @@ -1943,11 +1931,11 @@ msgid "" "default value which is also ``str``." msgstr "" -#: ../../whatsnew/3.12.rst:1291 +#: ../../whatsnew/3.12.rst:1283 msgid "(Contributed by Erlend E. Aasland in :gh:`92548`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1293 +#: ../../whatsnew/3.12.rst:1285 msgid "" "``smtpd`` has been removed according to the schedule in :pep:`594`, having " "been deprecated in Python 3.4.7 and 3.5.4. Use aiosmtpd_ PyPI module or any " @@ -1955,14 +1943,14 @@ msgid "" "gh:`93243`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1301 +#: ../../whatsnew/3.12.rst:1293 msgid "" "``asynchat`` and ``asyncore`` have been removed according to the schedule " "in :pep:`594`, having been deprecated in Python 3.6. Use :mod:`asyncio` " "instead. (Contributed by Nikita Sobolev in :gh:`96580`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1307 +#: ../../whatsnew/3.12.rst:1299 msgid "" "Remove ``io.OpenWrapper`` and ``_pyio.OpenWrapper``, deprecated in Python " "3.10: just use :func:`open` instead. The :func:`open` (:func:`io.open`) " @@ -1970,14 +1958,14 @@ msgid "" "also a static method. (Contributed by Victor Stinner in :gh:`94169`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1313 +#: ../../whatsnew/3.12.rst:1305 msgid "" "Remove the :func:`!ssl.RAND_pseudo_bytes` function, deprecated in Python " "3.6: use :func:`os.urandom` or :func:`ssl.RAND_bytes` instead. (Contributed " "by Victor Stinner in :gh:`94199`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1317 +#: ../../whatsnew/3.12.rst:1309 msgid "" ":mod:`gzip`: Remove the ``filename`` attribute of :class:`gzip.GzipFile`, " "deprecated since Python 2.6, use the :attr:`~gzip.GzipFile.name` attribute " @@ -1986,7 +1974,7 @@ msgid "" "`94196`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1323 +#: ../../whatsnew/3.12.rst:1315 msgid "" "Remove the :func:`!ssl.match_hostname` function. It was deprecated in Python " "3.7. OpenSSL performs hostname matching since Python 3.7, Python no longer " @@ -1994,14 +1982,14 @@ msgid "" "Stinner in :gh:`94199`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1329 +#: ../../whatsnew/3.12.rst:1321 msgid "" "Remove the :func:`!locale.format` function, deprecated in Python 3.7: use :" "func:`locale.format_string` instead. (Contributed by Victor Stinner in :gh:" "`94226`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1333 +#: ../../whatsnew/3.12.rst:1325 msgid "" ":mod:`hashlib`: Remove the pure Python implementation of :func:`hashlib." "pbkdf2_hmac()`, deprecated in Python 3.10. Python 3.10 and newer requires " @@ -2010,7 +1998,7 @@ msgid "" "Stinner in :gh:`94199`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1339 +#: ../../whatsnew/3.12.rst:1331 msgid "" ":mod:`xml.etree.ElementTree`: Remove the ``ElementTree.Element.copy()`` " "method of the pure Python implementation, deprecated in Python 3.10, use " @@ -2019,14 +2007,14 @@ msgid "" "(Contributed by Victor Stinner in :gh:`94383`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1345 +#: ../../whatsnew/3.12.rst:1337 msgid "" ":mod:`zipimport`: Remove ``find_loader()`` and ``find_module()`` methods, " "deprecated in Python 3.10: use the ``find_spec()`` method instead. See :pep:" "`451` for the rationale. (Contributed by Victor Stinner in :gh:`94379`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1350 +#: ../../whatsnew/3.12.rst:1342 msgid "" "Remove the :func:`!ssl.wrap_socket` function, deprecated in Python 3.7: " "instead, create a :class:`ssl.SSLContext` object and call its :class:`ssl." @@ -2037,185 +2025,185 @@ msgid "" "Validation. (Contributed by Victor Stinner in :gh:`94199`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1359 +#: ../../whatsnew/3.12.rst:1351 msgid "" "Many previously deprecated cleanups in :mod:`importlib` have now been " "completed:" msgstr "" -#: ../../whatsnew/3.12.rst:1362 +#: ../../whatsnew/3.12.rst:1354 msgid "" "References to, and support for :meth:`!module_repr()` has been removed. " "(Contributed by Barry Warsaw in :gh:`97850`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1365 +#: ../../whatsnew/3.12.rst:1357 msgid "" "``importlib.util.set_package`` has been removed. (Contributed by Brett " "Cannon in :gh:`65961`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1368 +#: ../../whatsnew/3.12.rst:1360 msgid "" "Support for ``find_loader()`` and ``find_module()`` APIs have been removed. " "(Contributed by Barry Warsaw in :gh:`98040`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1371 +#: ../../whatsnew/3.12.rst:1363 msgid "" "``importlib.abc.Finder``, ``pkgutil.ImpImporter``, and ``pkgutil.ImpLoader`` " "have been removed. (Contributed by Barry Warsaw in :gh:`98040`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1374 +#: ../../whatsnew/3.12.rst:1366 msgid "" "The :mod:`!imp` module has been removed. (Contributed by Barry Warsaw in :" "gh:`98040`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1377 +#: ../../whatsnew/3.12.rst:1369 msgid "Replace removed :mod:`!imp` functions with :mod:`importlib` functions:" msgstr "" -#: ../../whatsnew/3.12.rst:1380 +#: ../../whatsnew/3.12.rst:1372 msgid "imp" msgstr "imp" -#: ../../whatsnew/3.12.rst:1380 +#: ../../whatsnew/3.12.rst:1372 msgid "importlib" msgstr "importlib" -#: ../../whatsnew/3.12.rst:1382 +#: ../../whatsnew/3.12.rst:1374 msgid "``imp.NullImporter``" msgstr "``imp.NullImporter``" -#: ../../whatsnew/3.12.rst:1382 +#: ../../whatsnew/3.12.rst:1374 msgid "Insert ``None`` into ``sys.path_importer_cache``" msgstr "" -#: ../../whatsnew/3.12.rst:1383 +#: ../../whatsnew/3.12.rst:1375 msgid "``imp.cache_from_source()``" msgstr "``imp.cache_from_source()``" -#: ../../whatsnew/3.12.rst:1383 +#: ../../whatsnew/3.12.rst:1375 msgid ":func:`importlib.util.cache_from_source`" msgstr ":func:`importlib.util.cache_from_source`" -#: ../../whatsnew/3.12.rst:1384 +#: ../../whatsnew/3.12.rst:1376 msgid "``imp.find_module()``" msgstr "``imp.find_module()``" -#: ../../whatsnew/3.12.rst:1384 +#: ../../whatsnew/3.12.rst:1376 msgid ":func:`importlib.util.find_spec`" msgstr ":func:`importlib.util.find_spec`" -#: ../../whatsnew/3.12.rst:1385 +#: ../../whatsnew/3.12.rst:1377 msgid "``imp.get_magic()``" msgstr "``imp.get_magic()``" -#: ../../whatsnew/3.12.rst:1385 +#: ../../whatsnew/3.12.rst:1377 msgid ":attr:`importlib.util.MAGIC_NUMBER`" msgstr ":attr:`importlib.util.MAGIC_NUMBER`" -#: ../../whatsnew/3.12.rst:1386 +#: ../../whatsnew/3.12.rst:1378 msgid "``imp.get_suffixes()``" msgstr "``imp.get_suffixes()``" -#: ../../whatsnew/3.12.rst:1386 +#: ../../whatsnew/3.12.rst:1378 msgid "" ":attr:`importlib.machinery.SOURCE_SUFFIXES`, :attr:`importlib.machinery." "EXTENSION_SUFFIXES`, and :attr:`importlib.machinery.BYTECODE_SUFFIXES`" msgstr "" -#: ../../whatsnew/3.12.rst:1387 +#: ../../whatsnew/3.12.rst:1379 msgid "``imp.get_tag()``" msgstr "``imp.get_tag()``" -#: ../../whatsnew/3.12.rst:1387 +#: ../../whatsnew/3.12.rst:1379 msgid ":attr:`sys.implementation.cache_tag `" msgstr ":attr:`sys.implementation.cache_tag `" -#: ../../whatsnew/3.12.rst:1388 +#: ../../whatsnew/3.12.rst:1380 msgid "``imp.load_module()``" msgstr "``imp.load_module()``" -#: ../../whatsnew/3.12.rst:1388 +#: ../../whatsnew/3.12.rst:1380 msgid ":func:`importlib.import_module`" msgstr ":func:`importlib.import_module`" -#: ../../whatsnew/3.12.rst:1389 +#: ../../whatsnew/3.12.rst:1381 msgid "``imp.new_module(name)``" msgstr "``imp.new_module(name)``" -#: ../../whatsnew/3.12.rst:1389 +#: ../../whatsnew/3.12.rst:1381 msgid "``types.ModuleType(name)``" msgstr "``types.ModuleType(name)``" -#: ../../whatsnew/3.12.rst:1390 +#: ../../whatsnew/3.12.rst:1382 msgid "``imp.reload()``" msgstr "``imp.reload()``" -#: ../../whatsnew/3.12.rst:1390 +#: ../../whatsnew/3.12.rst:1382 msgid ":func:`importlib.reload`" msgstr ":func:`importlib.reload`" -#: ../../whatsnew/3.12.rst:1391 +#: ../../whatsnew/3.12.rst:1383 msgid "``imp.source_from_cache()``" msgstr "``imp.source_from_cache()``" -#: ../../whatsnew/3.12.rst:1391 +#: ../../whatsnew/3.12.rst:1383 msgid ":func:`importlib.util.source_from_cache`" msgstr ":func:`importlib.util.source_from_cache`" -#: ../../whatsnew/3.12.rst:1394 +#: ../../whatsnew/3.12.rst:1386 msgid "Replace ``imp.load_source()`` with::" msgstr "" -#: ../../whatsnew/3.12.rst:1409 +#: ../../whatsnew/3.12.rst:1401 msgid "Removed :mod:`!imp` functions and attributes with no replacements:" msgstr "" -#: ../../whatsnew/3.12.rst:1411 +#: ../../whatsnew/3.12.rst:1403 msgid "undocumented functions:" msgstr "" -#: ../../whatsnew/3.12.rst:1413 +#: ../../whatsnew/3.12.rst:1405 msgid "``imp.init_builtin()``" msgstr "``imp.init_builtin()``" -#: ../../whatsnew/3.12.rst:1414 +#: ../../whatsnew/3.12.rst:1406 msgid "``imp.load_compiled()``" msgstr "``imp.load_compiled()``" -#: ../../whatsnew/3.12.rst:1415 +#: ../../whatsnew/3.12.rst:1407 msgid "``imp.load_dynamic()``" msgstr "``imp.load_dynamic()``" -#: ../../whatsnew/3.12.rst:1416 +#: ../../whatsnew/3.12.rst:1408 msgid "``imp.load_package()``" msgstr "``imp.load_package()``" -#: ../../whatsnew/3.12.rst:1418 +#: ../../whatsnew/3.12.rst:1410 msgid "" "``imp.lock_held()``, ``imp.acquire_lock()``, ``imp.release_lock()``: the " "locking scheme has changed in Python 3.3 to per-module locks." msgstr "" -#: ../../whatsnew/3.12.rst:1420 +#: ../../whatsnew/3.12.rst:1412 msgid "" "``imp.find_module()`` constants: ``SEARCH_ERROR``, ``PY_SOURCE``, " "``PY_COMPILED``, ``C_EXTENSION``, ``PY_RESOURCE``, ``PKG_DIRECTORY``, " "``C_BUILTIN``, ``PY_FROZEN``, ``PY_CODERESOURCE``, ``IMP_HOOK``." msgstr "" -#: ../../whatsnew/3.12.rst:1424 +#: ../../whatsnew/3.12.rst:1416 msgid "" "Removed the ``suspicious`` rule from the documentation Makefile, and removed " "``Doc/tools/rstlint.py``, both in favor of `sphinx-lint `_. (Contributed by Julien Palard in :gh:`98179`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1429 +#: ../../whatsnew/3.12.rst:1421 msgid "" "Remove the *keyfile* and *certfile* parameters from the :mod:`ftplib`, :mod:" "`imaplib`, :mod:`poplib` and :mod:`smtplib` modules, and the *key_file*, " @@ -2225,34 +2213,34 @@ msgid "" "in :gh:`94172`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1437 +#: ../../whatsnew/3.12.rst:1429 msgid "" ":mod:`ftplib`: Remove the ``FTP_TLS.ssl_version`` class attribute: use the " "*context* parameter instead. (Contributed by Victor Stinner in :gh:`94172`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1441 +#: ../../whatsnew/3.12.rst:1433 msgid "" "Remove support for obsolete browsers from :mod:`webbrowser`. Removed " "browsers include: Grail, Mosaic, Netscape, Galeon, Skipstone, Iceape, " "Firebird, and Firefox versions 35 and below (:gh:`102871`)." msgstr "" -#: ../../whatsnew/3.12.rst:1449 ../../whatsnew/3.12.rst:1753 +#: ../../whatsnew/3.12.rst:1441 ../../whatsnew/3.12.rst:1745 msgid "Porting to Python 3.12" msgstr "" -#: ../../whatsnew/3.12.rst:1451 +#: ../../whatsnew/3.12.rst:1443 msgid "" "This section lists previously described changes and other bugfixes that may " "require changes to your code." msgstr "" -#: ../../whatsnew/3.12.rst:1455 +#: ../../whatsnew/3.12.rst:1447 msgid "Changes in the Python API" msgstr "" -#: ../../whatsnew/3.12.rst:1457 +#: ../../whatsnew/3.12.rst:1449 msgid "" "More strict rules are now applied for numerical group references and group " "names in regular expressions. Only sequence of ASCII digits is now accepted " @@ -2261,7 +2249,7 @@ msgid "" "(Contributed by Serhiy Storchaka in :gh:`91760`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1464 +#: ../../whatsnew/3.12.rst:1456 msgid "" "Removed ``randrange()`` functionality deprecated since Python 3.10. " "Formerly, ``randrange(10.0)`` losslessly converted to ``randrange(10)``. " @@ -2273,7 +2261,7 @@ msgid "" "`86388`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1472 +#: ../../whatsnew/3.12.rst:1464 msgid "" ":class:`argparse.ArgumentParser` changed encoding and error handler for " "reading arguments from file (e.g. ``fromfile_prefix_chars`` option) from " @@ -2283,21 +2271,21 @@ msgid "" "on Windows." msgstr "" -#: ../../whatsnew/3.12.rst:1478 +#: ../../whatsnew/3.12.rst:1470 msgid "" "Removed the ``asyncore``-based ``smtpd`` module deprecated in Python 3.4.7 " "and 3.5.4. A recommended replacement is the :mod:`asyncio`-based aiosmtpd_ " "PyPI module." msgstr "" -#: ../../whatsnew/3.12.rst:1482 +#: ../../whatsnew/3.12.rst:1474 msgid "" ":func:`shlex.split`: Passing ``None`` for *s* argument now raises an " "exception, rather than reading :data:`sys.stdin`. The feature was deprecated " "in Python 3.9. (Contributed by Victor Stinner in :gh:`94352`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1487 +#: ../../whatsnew/3.12.rst:1479 msgid "" "The :mod:`os` module no longer accepts bytes-like paths, like :class:" "`bytearray` and :class:`memoryview` types: only the exact :class:`bytes` " @@ -2305,7 +2293,7 @@ msgid "" "`98393`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1492 +#: ../../whatsnew/3.12.rst:1484 msgid "" ":func:`syslog.openlog` and :func:`syslog.closelog` now fail if used in " "subinterpreters. :func:`syslog.syslog` may still be used in subinterpreters, " @@ -2317,7 +2305,7 @@ msgid "" "(Contributed by Dong-hee Na in :gh:`99127`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1501 +#: ../../whatsnew/3.12.rst:1493 msgid "" "The undocumented locking behavior of :func:`~functools.cached_property` is " "removed, because it locked across all instances of the class, leading to " @@ -2329,14 +2317,14 @@ msgid "" "property getter function or around multi-threaded access points." msgstr "" -#: ../../whatsnew/3.12.rst:1514 +#: ../../whatsnew/3.12.rst:1506 msgid "" "When extracting tar files using :mod:`tarfile` or :func:`shutil." "unpack_archive`, pass the *filter* argument to limit features that may be " "surprising or dangerous. See :ref:`tarfile-extraction-filter` for details." msgstr "" -#: ../../whatsnew/3.12.rst:1519 +#: ../../whatsnew/3.12.rst:1511 msgid "" "The output of the :func:`tokenize.tokenize` and :func:`tokenize." "generate_tokens` functions is now changed due to the changes introduced in :" @@ -2348,45 +2336,45 @@ msgid "" "``f\"start {1+1} end\"`` the old version of the tokenizer emitted::" msgstr "" -#: ../../whatsnew/3.12.rst:1530 +#: ../../whatsnew/3.12.rst:1522 msgid "while the new version emits::" msgstr "" -#: ../../whatsnew/3.12.rst:1542 +#: ../../whatsnew/3.12.rst:1534 msgid "" "Additionally, there may be some minor behavioral changes as a consecuence of " "the changes required to support :pep:`701`. Some of these changes include:" msgstr "" -#: ../../whatsnew/3.12.rst:1545 +#: ../../whatsnew/3.12.rst:1537 msgid "" "The ``type`` attribute of the tokens emitted when tokenizing some invalid " "Python characters such as ``!`` has changed from ``ERRORTOKEN`` to ``OP``." msgstr "" -#: ../../whatsnew/3.12.rst:1548 +#: ../../whatsnew/3.12.rst:1540 msgid "" "Incomplete single-line strings now also raise :exc:`tokenize.TokenError` as " "incomplete multiline strings do." msgstr "" -#: ../../whatsnew/3.12.rst:1551 +#: ../../whatsnew/3.12.rst:1543 msgid "" "Some incomplete or invalid Python code now raises :exc:`tokenize.TokenError` " "instead of returning arbitrary ``ERRORTOKEN`` tokens when tokenizing it." msgstr "" -#: ../../whatsnew/3.12.rst:1554 +#: ../../whatsnew/3.12.rst:1546 msgid "" "Mixing tabs and spaces as indentation in the same file is not supported " "anymore and will raise a :exc:`TabError`." msgstr "" -#: ../../whatsnew/3.12.rst:1558 +#: ../../whatsnew/3.12.rst:1550 msgid "Build Changes" msgstr "" -#: ../../whatsnew/3.12.rst:1560 +#: ../../whatsnew/3.12.rst:1552 msgid "" "Python no longer uses ``setup.py`` to build shared C extension modules. " "Build parameters like headers and libraries are detected in ``configure`` " @@ -2395,21 +2383,21 @@ msgid "" "in :gh:`93939`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1566 +#: ../../whatsnew/3.12.rst:1558 msgid "" "``va_start()`` with two parameters, like ``va_start(args, format),`` is now " "required to build Python. ``va_start()`` is no longer called with a single " "parameter. (Contributed by Kumar Aditya in :gh:`93207`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1571 +#: ../../whatsnew/3.12.rst:1563 msgid "" "CPython now uses the ThinLTO option as the default link time optimization " "policy if the Clang compiler accepts the flag. (Contributed by Dong-hee Na " "in :gh:`89536`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1575 +#: ../../whatsnew/3.12.rst:1567 msgid "" "Add ``COMPILEALL_OPTS`` variable in Makefile to override :mod:`compileall` " "options (default: ``-j0``) in ``make install``. Also merged the 3 " @@ -2418,41 +2406,41 @@ msgid "" "`99289`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1581 +#: ../../whatsnew/3.12.rst:1573 msgid "Add platform triplets for 64-bit LoongArch:" msgstr "" -#: ../../whatsnew/3.12.rst:1583 +#: ../../whatsnew/3.12.rst:1575 msgid "loongarch64-linux-gnusf" msgstr "loongarch64-linux-gnusf" -#: ../../whatsnew/3.12.rst:1584 +#: ../../whatsnew/3.12.rst:1576 msgid "loongarch64-linux-gnuf32" msgstr "loongarch64-linux-gnuf32" -#: ../../whatsnew/3.12.rst:1585 +#: ../../whatsnew/3.12.rst:1577 msgid "loongarch64-linux-gnu" msgstr "loongarch64-linux-gnu" -#: ../../whatsnew/3.12.rst:1587 +#: ../../whatsnew/3.12.rst:1579 msgid "(Contributed by Zhang Na in :gh:`90656`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1589 +#: ../../whatsnew/3.12.rst:1581 msgid "``PYTHON_FOR_REGEN`` now require Python 3.10 or newer." msgstr "" -#: ../../whatsnew/3.12.rst:1591 +#: ../../whatsnew/3.12.rst:1583 msgid "" "Autoconf 2.71 and aclocal 1.16.4 is now required to regenerate :file:`!" "configure`. (Contributed by Christian Heimes in :gh:`89886`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1597 +#: ../../whatsnew/3.12.rst:1589 msgid "C API Changes" msgstr "" -#: ../../whatsnew/3.12.rst:1603 +#: ../../whatsnew/3.12.rst:1595 msgid "" ":pep:`697`: Introduced the :ref:`Unstable C API tier `, " "intended for low-level tools like debuggers and JIT compilers. This API may " @@ -2460,84 +2448,84 @@ msgid "" "contents are marked by the ``PyUnstable_`` prefix in names." msgstr "" -#: ../../whatsnew/3.12.rst:1609 +#: ../../whatsnew/3.12.rst:1601 msgid "Code object constructors:" msgstr "" -#: ../../whatsnew/3.12.rst:1611 +#: ../../whatsnew/3.12.rst:1603 msgid "``PyUnstable_Code_New()`` (renamed from ``PyCode_New``)" msgstr "" -#: ../../whatsnew/3.12.rst:1612 +#: ../../whatsnew/3.12.rst:1604 msgid "" "``PyUnstable_Code_NewWithPosOnlyArgs()`` (renamed from " "``PyCode_NewWithPosOnlyArgs``)" msgstr "" -#: ../../whatsnew/3.12.rst:1614 +#: ../../whatsnew/3.12.rst:1606 msgid "Extra storage for code objects (:pep:`523`):" msgstr "" -#: ../../whatsnew/3.12.rst:1616 +#: ../../whatsnew/3.12.rst:1608 msgid "" "``PyUnstable_Eval_RequestCodeExtraIndex()`` (renamed from " "``_PyEval_RequestCodeExtraIndex``)" msgstr "" -#: ../../whatsnew/3.12.rst:1617 +#: ../../whatsnew/3.12.rst:1609 msgid "``PyUnstable_Code_GetExtra()`` (renamed from ``_PyCode_GetExtra``)" msgstr "" -#: ../../whatsnew/3.12.rst:1618 +#: ../../whatsnew/3.12.rst:1610 msgid "``PyUnstable_Code_SetExtra()`` (renamed from ``_PyCode_SetExtra``)" msgstr "" -#: ../../whatsnew/3.12.rst:1620 +#: ../../whatsnew/3.12.rst:1612 msgid "" "The original names will continue to be available until the respective API " "changes." msgstr "" -#: ../../whatsnew/3.12.rst:1623 +#: ../../whatsnew/3.12.rst:1615 msgid "(Contributed by Petr Viktorin in :gh:`101101`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1625 +#: ../../whatsnew/3.12.rst:1617 msgid "" ":pep:`697`: Added API for extending types whose instance memory layout is " "opaque:" msgstr "" -#: ../../whatsnew/3.12.rst:1628 +#: ../../whatsnew/3.12.rst:1620 msgid "" ":c:member:`PyType_Spec.basicsize` can be zero or negative to specify " "inheriting or extending the base class size." msgstr "" -#: ../../whatsnew/3.12.rst:1630 +#: ../../whatsnew/3.12.rst:1622 msgid "" ":c:func:`PyObject_GetTypeData` and :c:func:`PyType_GetTypeDataSize` added to " "allow access to subclass-specific instance data." msgstr "" -#: ../../whatsnew/3.12.rst:1632 +#: ../../whatsnew/3.12.rst:1624 msgid "" ":const:`Py_TPFLAGS_ITEMS_AT_END` and :c:func:`PyObject_GetItemData` added to " "allow safely extending certain variable-sized types, including :c:var:" "`PyType_Type`." msgstr "" -#: ../../whatsnew/3.12.rst:1635 +#: ../../whatsnew/3.12.rst:1627 msgid "" ":c:macro:`Py_RELATIVE_OFFSET` added to allow defining :c:type:`members " "` in terms of a subclass-specific struct." msgstr "" -#: ../../whatsnew/3.12.rst:1638 +#: ../../whatsnew/3.12.rst:1630 msgid "(Contributed by Petr Viktorin in :gh:`103509`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1640 +#: ../../whatsnew/3.12.rst:1632 msgid "" "Added the new :ref:`limited C API ` function :c:func:" "`PyType_FromMetaclass`, which generalizes the existing :c:func:" @@ -2545,29 +2533,29 @@ msgid "" "(Contributed by Wenzel Jakob in :gh:`93012`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1645 +#: ../../whatsnew/3.12.rst:1637 msgid "" "API for creating objects that can be called using :ref:`the vectorcall " "protocol ` was added to the :ref:`Limited API `:" msgstr "" -#: ../../whatsnew/3.12.rst:1649 +#: ../../whatsnew/3.12.rst:1641 msgid ":const:`Py_TPFLAGS_HAVE_VECTORCALL`" msgstr ":const:`Py_TPFLAGS_HAVE_VECTORCALL`" -#: ../../whatsnew/3.12.rst:1650 +#: ../../whatsnew/3.12.rst:1642 msgid ":c:func:`PyVectorcall_NARGS`" msgstr ":c:func:`PyVectorcall_NARGS`" -#: ../../whatsnew/3.12.rst:1651 +#: ../../whatsnew/3.12.rst:1643 msgid ":c:func:`PyVectorcall_Call`" msgstr ":c:func:`PyVectorcall_Call`" -#: ../../whatsnew/3.12.rst:1652 +#: ../../whatsnew/3.12.rst:1644 msgid ":c:type:`vectorcallfunc`" msgstr ":c:type:`vectorcallfunc`" -#: ../../whatsnew/3.12.rst:1654 +#: ../../whatsnew/3.12.rst:1646 msgid "" "The :const:`Py_TPFLAGS_HAVE_VECTORCALL` flag is now removed from a class " "when the class's :py:meth:`~object.__call__` method is reassigned. This " @@ -2578,7 +2566,7 @@ msgid "" "`93274`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1662 +#: ../../whatsnew/3.12.rst:1654 msgid "" "The :const:`Py_TPFLAGS_MANAGED_DICT` and :const:`Py_TPFLAGS_MANAGED_WEAKREF` " "flags have been added. This allows extensions classes to support object " @@ -2586,32 +2574,32 @@ msgid "" "faster access." msgstr "" -#: ../../whatsnew/3.12.rst:1667 +#: ../../whatsnew/3.12.rst:1659 msgid "" "API for performing calls using :ref:`the vectorcall protocol ` " "was added to the :ref:`Limited API `:" msgstr "" -#: ../../whatsnew/3.12.rst:1671 +#: ../../whatsnew/3.12.rst:1663 msgid ":c:func:`PyObject_Vectorcall`" msgstr ":c:func:`PyObject_Vectorcall`" -#: ../../whatsnew/3.12.rst:1672 +#: ../../whatsnew/3.12.rst:1664 msgid ":c:func:`PyObject_VectorcallMethod`" msgstr ":c:func:`PyObject_VectorcallMethod`" -#: ../../whatsnew/3.12.rst:1673 +#: ../../whatsnew/3.12.rst:1665 msgid ":const:`PY_VECTORCALL_ARGUMENTS_OFFSET`" msgstr ":const:`PY_VECTORCALL_ARGUMENTS_OFFSET`" -#: ../../whatsnew/3.12.rst:1675 +#: ../../whatsnew/3.12.rst:1667 msgid "" "This means that both the incoming and outgoing ends of the vector call " "protocol are now available in the :ref:`Limited API `. (Contributed " "by Wenzel Jakob in :gh:`98586`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1679 +#: ../../whatsnew/3.12.rst:1671 msgid "" "Added two new public functions, :c:func:`PyEval_SetProfileAllThreads` and :c:" "func:`PyEval_SetTraceAllThreads`, that allow to set tracing and profiling " @@ -2619,14 +2607,14 @@ msgid "" "(Contributed by Pablo Galindo in :gh:`93503`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1685 +#: ../../whatsnew/3.12.rst:1677 msgid "" "Added new function :c:func:`PyFunction_SetVectorcall` to the C API which " "sets the vectorcall field of a given :c:type:`PyFunctionObject`. " "(Contributed by Andrew Frost in :gh:`92257`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1689 +#: ../../whatsnew/3.12.rst:1681 msgid "" "The C API now permits registering callbacks via :c:func:" "`PyDict_AddWatcher`, :c:func:`PyDict_Watch` and related APIs to be called " @@ -2635,28 +2623,28 @@ msgid "" "`91052`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1695 +#: ../../whatsnew/3.12.rst:1687 msgid "" "Added :c:func:`PyType_AddWatcher` and :c:func:`PyType_Watch` API to register " "callbacks to receive notification on changes to a type. (Contributed by Carl " "Meyer in :gh:`91051`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1699 +#: ../../whatsnew/3.12.rst:1691 msgid "" "Added :c:func:`PyCode_AddWatcher` and :c:func:`PyCode_ClearWatcher` APIs to " "register callbacks to receive notification on creation and destruction of " "code objects. (Contributed by Itamar Ostricher in :gh:`91054`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1704 +#: ../../whatsnew/3.12.rst:1696 msgid "" "Add :c:func:`PyFrame_GetVar` and :c:func:`PyFrame_GetVarString` functions to " "get a frame variable by its name. (Contributed by Victor Stinner in :gh:" "`91248`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1708 +#: ../../whatsnew/3.12.rst:1700 msgid "" "Add :c:func:`PyErr_GetRaisedException` and :c:func:" "`PyErr_SetRaisedException` for saving and restoring the current exception. " @@ -2666,14 +2654,14 @@ msgid "" "(Contributed by Mark Shannon in :gh:`101578`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1716 +#: ../../whatsnew/3.12.rst:1708 msgid "" "Add ``_PyErr_ChainExceptions1``, which takes an exception instance, to " "replace the legacy-API ``_PyErr_ChainExceptions``, which is now deprecated. " "(Contributed by Mark Shannon in :gh:`101578`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1720 +#: ../../whatsnew/3.12.rst:1712 msgid "" "Add :c:func:`PyException_GetArgs` and :c:func:`PyException_SetArgs` as " "convenience functions for retrieving and modifying the :attr:`~BaseException." @@ -2681,91 +2669,91 @@ msgid "" "in :gh:`101578`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1725 +#: ../../whatsnew/3.12.rst:1717 msgid "" "Add :c:func:`PyErr_DisplayException`, which takes an exception instance, to " "replace the legacy-api :c:func:`!PyErr_Display`. (Contributed by Irit " "Katriel in :gh:`102755`)." msgstr "" -#: ../../whatsnew/3.12.rst:1729 +#: ../../whatsnew/3.12.rst:1721 msgid "" ":pep:`683`: Introduced Immortal Objects to Python which allows objects to " "bypass reference counts and introduced changes to the C-API:" msgstr "" -#: ../../whatsnew/3.12.rst:1732 +#: ../../whatsnew/3.12.rst:1724 msgid "``_Py_IMMORTAL_REFCNT``: The reference count that defines an object" msgstr "" -#: ../../whatsnew/3.12.rst:1733 +#: ../../whatsnew/3.12.rst:1725 msgid "as immortal." msgstr "" -#: ../../whatsnew/3.12.rst:1734 +#: ../../whatsnew/3.12.rst:1726 msgid "" "``_Py_IsImmortal`` Checks if an object has the immortal reference count." msgstr "" -#: ../../whatsnew/3.12.rst:1735 +#: ../../whatsnew/3.12.rst:1727 msgid "``PyObject_HEAD_INIT`` This will now initialize reference count to" msgstr "" -#: ../../whatsnew/3.12.rst:1736 +#: ../../whatsnew/3.12.rst:1728 msgid "``_Py_IMMORTAL_REFCNT`` when used with ``Py_BUILD_CORE``." msgstr "" -#: ../../whatsnew/3.12.rst:1737 +#: ../../whatsnew/3.12.rst:1729 msgid "``SSTATE_INTERNED_IMMORTAL`` An identifier for interned unicode objects" msgstr "" -#: ../../whatsnew/3.12.rst:1738 +#: ../../whatsnew/3.12.rst:1730 msgid "that are immortal." msgstr "" -#: ../../whatsnew/3.12.rst:1739 +#: ../../whatsnew/3.12.rst:1731 msgid "``SSTATE_INTERNED_IMMORTAL_STATIC`` An identifier for interned unicode" msgstr "" -#: ../../whatsnew/3.12.rst:1740 +#: ../../whatsnew/3.12.rst:1732 msgid "objects that are immortal and static" msgstr "" -#: ../../whatsnew/3.12.rst:1743 +#: ../../whatsnew/3.12.rst:1735 msgid "``sys.getunicodeinternedsize`` This returns the total number of unicode" msgstr "" -#: ../../whatsnew/3.12.rst:1742 +#: ../../whatsnew/3.12.rst:1734 msgid "" "objects that have been interned. This is now needed for refleak.py to " "correctly track reference counts and allocated blocks" msgstr "" -#: ../../whatsnew/3.12.rst:1745 +#: ../../whatsnew/3.12.rst:1737 msgid "(Contributed by Eddie Elizondo in :gh:`84436`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1747 +#: ../../whatsnew/3.12.rst:1739 msgid "" "In the limited C API version 3.12, :c:func:`Py_INCREF` and :c:func:" "`Py_DECREF` functions are now implemented as opaque function calls to hide " "implementation details. (Contributed by Victor Stinner in :gh:`105387`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1755 +#: ../../whatsnew/3.12.rst:1747 msgid "" "Legacy Unicode APIs based on ``Py_UNICODE*`` representation has been " "removed. Please migrate to APIs based on UTF-8 or ``wchar_t*``." msgstr "" -#: ../../whatsnew/3.12.rst:1758 +#: ../../whatsnew/3.12.rst:1750 msgid "" "Argument parsing functions like :c:func:`PyArg_ParseTuple` doesn't support " "``Py_UNICODE*`` based format (e.g. ``u``, ``Z``) anymore. Please migrate to " "other formats for Unicode like ``s``, ``z``, ``es``, and ``U``." msgstr "" -#: ../../whatsnew/3.12.rst:1762 +#: ../../whatsnew/3.12.rst:1754 msgid "" "``tp_weaklist`` for all static builtin types is always ``NULL``. This is an " "internal-only field on ``PyTypeObject`` but we're pointing out the change in " @@ -2774,7 +2762,7 @@ msgid "" "necessary, the (internal-only) ``_PyObject_GET_WEAKREFS_LISTPTR()`` macro." msgstr "" -#: ../../whatsnew/3.12.rst:1769 +#: ../../whatsnew/3.12.rst:1761 msgid "" "This internal-only :c:member:`PyTypeObject.tp_subclasses` may now not be a " "valid object pointer. Its type was changed to :c:expr:`void *` to reflect " @@ -2782,13 +2770,13 @@ msgid "" "only field directly." msgstr "" -#: ../../whatsnew/3.12.rst:1774 +#: ../../whatsnew/3.12.rst:1766 msgid "" "To get a list of subclasses, call the Python method :py:meth:`~class." "__subclasses__` (using :c:func:`PyObject_CallMethod`, for example)." msgstr "" -#: ../../whatsnew/3.12.rst:1778 +#: ../../whatsnew/3.12.rst:1770 msgid "" "Add support of more formatting options (left aligning, octals, uppercase " "hexadecimals, ``intmax_t``, ``ptrdiff_t``, ``wchar_t`` C strings, variable " @@ -2796,7 +2784,7 @@ msgid "" "`PyUnicode_FromFormatV`. (Contributed by Serhiy Storchaka in :gh:`98836`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1784 +#: ../../whatsnew/3.12.rst:1776 msgid "" "An unrecognized format character in :c:func:`PyUnicode_FromFormat` and :c:" "func:`PyUnicode_FromFormatV` now sets a :exc:`SystemError`. In previous " @@ -2805,13 +2793,13 @@ msgid "" "Storchaka in :gh:`95781`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1790 +#: ../../whatsnew/3.12.rst:1782 msgid "" "Fixed wrong sign placement in :c:func:`PyUnicode_FromFormat` and :c:func:" "`PyUnicode_FromFormatV`. (Contributed by Philip Georgi in :gh:`95504`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1794 +#: ../../whatsnew/3.12.rst:1786 msgid "" "Extension classes wanting to add a ``__dict__`` or weak reference slot " "should use :const:`Py_TPFLAGS_MANAGED_DICT` and :const:" @@ -2825,7 +2813,7 @@ msgid "" "func:`PyObject_ClearWeakRefs`, as before." msgstr "" -#: ../../whatsnew/3.12.rst:1806 +#: ../../whatsnew/3.12.rst:1798 msgid "" "The :c:func:`PyUnicode_FSDecoder` function no longer accepts bytes-like " "paths, like :class:`bytearray` and :class:`memoryview` types: only the " @@ -2833,7 +2821,7 @@ msgid "" "Victor Stinner in :gh:`98393`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1811 +#: ../../whatsnew/3.12.rst:1803 msgid "" "The :c:macro:`Py_CLEAR`, :c:macro:`Py_SETREF` and :c:macro:`Py_XSETREF` " "macros now only evaluate their arguments once. If an argument has side " @@ -2841,7 +2829,7 @@ msgid "" "Stinner in :gh:`98724`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1816 +#: ../../whatsnew/3.12.rst:1808 msgid "" "The interpreter's error indicator is now always normalized. This means that :" "c:func:`PyErr_SetObject`, :c:func:`PyErr_SetString` and the other functions " @@ -2849,7 +2837,7 @@ msgid "" "(Contributed by Mark Shannon in :gh:`101578`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1821 +#: ../../whatsnew/3.12.rst:1813 msgid "" "``_Py_RefTotal`` is no longer authoritative and only kept around for ABI " "compatibility. Note that it is an internal global and only available on " @@ -2857,25 +2845,25 @@ msgid "" "``_Py_GetGlobalRefTotal()``." msgstr "" -#: ../../whatsnew/3.12.rst:1826 +#: ../../whatsnew/3.12.rst:1818 msgid "" "The following functions now select an appropriate metaclass for the newly " "created type:" msgstr "" -#: ../../whatsnew/3.12.rst:1829 +#: ../../whatsnew/3.12.rst:1821 msgid ":c:func:`PyType_FromSpec`" msgstr ":c:func:`PyType_FromSpec`" -#: ../../whatsnew/3.12.rst:1830 +#: ../../whatsnew/3.12.rst:1822 msgid ":c:func:`PyType_FromSpecWithBases`" msgstr ":c:func:`PyType_FromSpecWithBases`" -#: ../../whatsnew/3.12.rst:1831 +#: ../../whatsnew/3.12.rst:1823 msgid ":c:func:`PyType_FromModuleAndSpec`" msgstr ":c:func:`PyType_FromModuleAndSpec`" -#: ../../whatsnew/3.12.rst:1833 +#: ../../whatsnew/3.12.rst:1825 msgid "" "Creating classes whose metaclass overrides :c:member:`~PyTypeObject.tp_new` " "is deprecated, and in Python 3.14+ it will be disallowed. Note that these " @@ -2883,14 +2871,14 @@ msgid "" "initialization." msgstr "" -#: ../../whatsnew/3.12.rst:1838 +#: ../../whatsnew/3.12.rst:1830 msgid "" "Note that :c:func:`PyType_FromMetaclass` (added in Python 3.12) already " "disallows creating classes whose metaclass overrides ``tp_new`` (:meth:" "`~object.__new__` in Python)." msgstr "" -#: ../../whatsnew/3.12.rst:1842 +#: ../../whatsnew/3.12.rst:1834 msgid "" "Since ``tp_new`` overrides almost everything ``PyType_From*`` functions do, " "the two are incompatible with each other. The existing behavior -- ignoring " @@ -2899,37 +2887,37 @@ msgid "" "general workaround. One of the following may work for you:" msgstr "" -#: ../../whatsnew/3.12.rst:1849 +#: ../../whatsnew/3.12.rst:1841 msgid "If you control the metaclass, avoid using ``tp_new`` in it:" msgstr "" -#: ../../whatsnew/3.12.rst:1851 +#: ../../whatsnew/3.12.rst:1843 msgid "" "If initialization can be skipped, it can be done in :c:member:`~PyTypeObject." "tp_init` instead." msgstr "" -#: ../../whatsnew/3.12.rst:1853 +#: ../../whatsnew/3.12.rst:1845 msgid "" "If the metaclass doesn't need to be instantiated from Python, set its " "``tp_new`` to ``NULL`` using the :const:`Py_TPFLAGS_DISALLOW_INSTANTIATION` " "flag. This makes it acceptable for ``PyType_From*`` functions." msgstr "" -#: ../../whatsnew/3.12.rst:1858 +#: ../../whatsnew/3.12.rst:1850 msgid "" "Avoid ``PyType_From*`` functions: if you don't need C-specific features " "(slots or setting the instance size), create types by :ref:`calling ` " "the metaclass." msgstr "" -#: ../../whatsnew/3.12.rst:1862 +#: ../../whatsnew/3.12.rst:1854 msgid "" "If you *know* the ``tp_new`` can be skipped safely, filter the deprecation " "warning out using :func:`warnings.catch_warnings` from Python." msgstr "" -#: ../../whatsnew/3.12.rst:1865 +#: ../../whatsnew/3.12.rst:1857 msgid "" ":c:var:`PyOS_InputHook` and :c:var:`PyOS_ReadlineFunctionPointer` are no " "longer called in :ref:`subinterpreters `. This is " @@ -2937,289 +2925,292 @@ msgid "" "callbacks have no way of recovering extension module state)." msgstr "" -#: ../../whatsnew/3.12.rst:1870 +#: ../../whatsnew/3.12.rst:1862 msgid "" "This also avoids situations where extensions may find themselves running in " "a subinterpreter that they don't support (or haven't yet been loaded in). " "See :gh:`104668` for more info." msgstr "" -#: ../../whatsnew/3.12.rst:1877 +#: ../../whatsnew/3.12.rst:1869 msgid "Deprecate global configuration variable:" msgstr "" -#: ../../whatsnew/3.12.rst:1879 +#: ../../whatsnew/3.12.rst:1871 msgid ":c:var:`Py_DebugFlag`: use :c:member:`PyConfig.parser_debug`" msgstr "" -#: ../../whatsnew/3.12.rst:1880 +#: ../../whatsnew/3.12.rst:1872 msgid ":c:var:`Py_VerboseFlag`: use :c:member:`PyConfig.verbose`" msgstr "" -#: ../../whatsnew/3.12.rst:1881 +#: ../../whatsnew/3.12.rst:1873 msgid ":c:var:`Py_QuietFlag`: use :c:member:`PyConfig.quiet`" msgstr "" -#: ../../whatsnew/3.12.rst:1882 +#: ../../whatsnew/3.12.rst:1874 msgid ":c:var:`Py_InteractiveFlag`: use :c:member:`PyConfig.interactive`" msgstr "" -#: ../../whatsnew/3.12.rst:1883 +#: ../../whatsnew/3.12.rst:1875 msgid ":c:var:`Py_InspectFlag`: use :c:member:`PyConfig.inspect`" msgstr "" -#: ../../whatsnew/3.12.rst:1884 +#: ../../whatsnew/3.12.rst:1876 msgid ":c:var:`Py_OptimizeFlag`: use :c:member:`PyConfig.optimization_level`" msgstr "" -#: ../../whatsnew/3.12.rst:1885 +#: ../../whatsnew/3.12.rst:1877 msgid ":c:var:`Py_NoSiteFlag`: use :c:member:`PyConfig.site_import`" msgstr "" -#: ../../whatsnew/3.12.rst:1886 +#: ../../whatsnew/3.12.rst:1878 msgid ":c:var:`Py_BytesWarningFlag`: use :c:member:`PyConfig.bytes_warning`" msgstr "" -#: ../../whatsnew/3.12.rst:1887 +#: ../../whatsnew/3.12.rst:1879 msgid ":c:var:`Py_FrozenFlag`: use :c:member:`PyConfig.pathconfig_warnings`" msgstr "" -#: ../../whatsnew/3.12.rst:1888 +#: ../../whatsnew/3.12.rst:1880 msgid "" ":c:var:`Py_IgnoreEnvironmentFlag`: use :c:member:`PyConfig.use_environment`" msgstr "" -#: ../../whatsnew/3.12.rst:1889 +#: ../../whatsnew/3.12.rst:1881 msgid "" ":c:var:`Py_DontWriteBytecodeFlag`: use :c:member:`PyConfig.write_bytecode`" msgstr "" -#: ../../whatsnew/3.12.rst:1890 +#: ../../whatsnew/3.12.rst:1882 msgid "" ":c:var:`Py_NoUserSiteDirectory`: use :c:member:`PyConfig.user_site_directory`" msgstr "" -#: ../../whatsnew/3.12.rst:1891 +#: ../../whatsnew/3.12.rst:1883 msgid "" ":c:var:`Py_UnbufferedStdioFlag`: use :c:member:`PyConfig.buffered_stdio`" msgstr "" -#: ../../whatsnew/3.12.rst:1892 +#: ../../whatsnew/3.12.rst:1884 msgid "" ":c:var:`Py_HashRandomizationFlag`: use :c:member:`PyConfig.use_hash_seed` " "and :c:member:`PyConfig.hash_seed`" msgstr "" -#: ../../whatsnew/3.12.rst:1894 +#: ../../whatsnew/3.12.rst:1886 msgid ":c:var:`Py_IsolatedFlag`: use :c:member:`PyConfig.isolated`" msgstr "" -#: ../../whatsnew/3.12.rst:1895 +#: ../../whatsnew/3.12.rst:1887 msgid "" ":c:var:`Py_LegacyWindowsFSEncodingFlag`: use :c:member:`PyPreConfig." "legacy_windows_fs_encoding`" msgstr "" -#: ../../whatsnew/3.12.rst:1896 +#: ../../whatsnew/3.12.rst:1888 msgid "" ":c:var:`Py_LegacyWindowsStdioFlag`: use :c:member:`PyConfig." "legacy_windows_stdio`" msgstr "" -#: ../../whatsnew/3.12.rst:1897 +#: ../../whatsnew/3.12.rst:1889 msgid "" ":c:var:`!Py_FileSystemDefaultEncoding`: use :c:member:`PyConfig." "filesystem_encoding`" msgstr "" -#: ../../whatsnew/3.12.rst:1898 +#: ../../whatsnew/3.12.rst:1890 msgid "" ":c:var:`!Py_HasFileSystemDefaultEncoding`: use :c:member:`PyConfig." "filesystem_encoding`" msgstr "" -#: ../../whatsnew/3.12.rst:1899 +#: ../../whatsnew/3.12.rst:1891 msgid "" ":c:var:`!Py_FileSystemDefaultEncodeErrors`: use :c:member:`PyConfig." "filesystem_errors`" msgstr "" -#: ../../whatsnew/3.12.rst:1900 +#: ../../whatsnew/3.12.rst:1892 msgid "" ":c:var:`!Py_UTF8Mode`: use :c:member:`PyPreConfig.utf8_mode` (see :c:func:" "`Py_PreInitialize`)" msgstr "" -#: ../../whatsnew/3.12.rst:1902 +#: ../../whatsnew/3.12.rst:1894 msgid "" "The :c:func:`Py_InitializeFromConfig` API should be used with :c:type:" "`PyConfig` instead. (Contributed by Victor Stinner in :gh:`77782`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1906 +#: ../../whatsnew/3.12.rst:1898 msgid "" "Creating immutable types (:const:`Py_TPFLAGS_IMMUTABLETYPE`) with mutable " "bases is deprecated and will be disabled in Python 3.14." msgstr "" -#: ../../whatsnew/3.12.rst:1909 +#: ../../whatsnew/3.12.rst:1901 msgid "" "The ``structmember.h`` header is deprecated, though it continues to be " "available and there are no plans to remove it." msgstr "" -#: ../../whatsnew/3.12.rst:1912 +#: ../../whatsnew/3.12.rst:1904 msgid "" "Its contents are now available just by including ``Python.h``, with a ``Py`` " "prefix added if it was missing:" msgstr "" -#: ../../whatsnew/3.12.rst:1915 +#: ../../whatsnew/3.12.rst:1907 msgid "" ":c:struct:`PyMemberDef`, :c:func:`PyMember_GetOne` and :c:func:" "`PyMember_SetOne`" msgstr "" -#: ../../whatsnew/3.12.rst:1917 +#: ../../whatsnew/3.12.rst:1909 msgid "" "Type macros like :c:macro:`Py_T_INT`, :c:macro:`Py_T_DOUBLE`, etc. " "(previously ``T_INT``, ``T_DOUBLE``, etc.)" msgstr "" -#: ../../whatsnew/3.12.rst:1919 +#: ../../whatsnew/3.12.rst:1911 msgid "" "The flags :c:macro:`Py_READONLY` (previously ``READONLY``) and :c:macro:" "`Py_AUDIT_READ` (previously all uppercase)" msgstr "" -#: ../../whatsnew/3.12.rst:1922 +#: ../../whatsnew/3.12.rst:1914 msgid "Several items are not exposed from ``Python.h``:" msgstr "" -#: ../../whatsnew/3.12.rst:1924 +#: ../../whatsnew/3.12.rst:1916 msgid ":c:macro:`T_OBJECT` (use :c:macro:`Py_T_OBJECT_EX`)" msgstr "" -#: ../../whatsnew/3.12.rst:1925 +#: ../../whatsnew/3.12.rst:1917 msgid ":c:macro:`T_NONE` (previously undocumented, and pretty quirky)" msgstr "" -#: ../../whatsnew/3.12.rst:1926 +#: ../../whatsnew/3.12.rst:1918 msgid "The macro ``WRITE_RESTRICTED`` which does nothing." msgstr "" -#: ../../whatsnew/3.12.rst:1927 +#: ../../whatsnew/3.12.rst:1919 msgid "" "The macros ``RESTRICTED`` and ``READ_RESTRICTED``, equivalents of :c:macro:" "`Py_AUDIT_READ`." msgstr "" -#: ../../whatsnew/3.12.rst:1929 +#: ../../whatsnew/3.12.rst:1921 msgid "" "In some configurations, ```` is not included from ``Python.h``. It " "should be included manually when using ``offsetof()``." msgstr "" -#: ../../whatsnew/3.12.rst:1932 +#: ../../whatsnew/3.12.rst:1924 msgid "" "The deprecated header continues to provide its original contents under the " "original names. Your old code can stay unchanged, unless the extra include " "and non-namespaced macros bother you greatly." msgstr "" -#: ../../whatsnew/3.12.rst:1937 +#: ../../whatsnew/3.12.rst:1929 msgid "" "(Contributed in :gh:`47146` by Petr Viktorin, based on earlier work by " "Alexander Belopolsky and Matthias Braun.)" msgstr "" -#: ../../whatsnew/3.12.rst:1940 +#: ../../whatsnew/3.12.rst:1932 msgid "" ":c:func:`PyErr_Fetch` and :c:func:`PyErr_Restore` are deprecated. Use :c:" "func:`PyErr_GetRaisedException` and :c:func:`PyErr_SetRaisedException` " "instead. (Contributed by Mark Shannon in :gh:`101578`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1945 +#: ../../whatsnew/3.12.rst:1937 msgid "" ":c:func:`!PyErr_Display` is deprecated. Use :c:func:`PyErr_DisplayException` " "instead. (Contributed by Irit Katriel in :gh:`102755`)." msgstr "" -#: ../../whatsnew/3.12.rst:1948 +#: ../../whatsnew/3.12.rst:1940 msgid "" "``_PyErr_ChainExceptions`` is deprecated. Use ``_PyErr_ChainExceptions1`` " "instead. (Contributed by Irit Katriel in :gh:`102192`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1951 +#: ../../whatsnew/3.12.rst:1943 msgid "" "Using :c:func:`PyType_FromSpec`, :c:func:`PyType_FromSpecWithBases` or :c:" "func:`PyType_FromModuleAndSpec` to create a class whose metaclass overrides :" "c:member:`~PyTypeObject.tp_new` is deprecated. Call the metaclass instead." msgstr "" -#: ../../whatsnew/3.12.rst:1959 +#: ../../whatsnew/3.12.rst:1951 msgid "" "Remove the ``token.h`` header file. There was never any public tokenizer C " "API. The ``token.h`` header file was only designed to be used by Python " "internals. (Contributed by Victor Stinner in :gh:`92651`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1964 +#: ../../whatsnew/3.12.rst:1956 msgid "Legacy Unicode APIs have been removed. See :pep:`623` for detail." msgstr "" -#: ../../whatsnew/3.12.rst:1966 +#: ../../whatsnew/3.12.rst:1958 msgid ":c:macro:`!PyUnicode_WCHAR_KIND`" msgstr ":c:macro:`!PyUnicode_WCHAR_KIND`" -#: ../../whatsnew/3.12.rst:1967 +#: ../../whatsnew/3.12.rst:1959 msgid ":c:func:`!PyUnicode_AS_UNICODE`" msgstr ":c:func:`!PyUnicode_AS_UNICODE`" -#: ../../whatsnew/3.12.rst:1968 +#: ../../whatsnew/3.12.rst:1960 msgid ":c:func:`!PyUnicode_AsUnicode`" msgstr ":c:func:`!PyUnicode_AsUnicode`" -#: ../../whatsnew/3.12.rst:1969 +#: ../../whatsnew/3.12.rst:1961 msgid ":c:func:`!PyUnicode_AsUnicodeAndSize`" msgstr ":c:func:`!PyUnicode_AsUnicodeAndSize`" -#: ../../whatsnew/3.12.rst:1970 +#: ../../whatsnew/3.12.rst:1962 msgid ":c:func:`!PyUnicode_AS_DATA`" msgstr ":c:func:`!PyUnicode_AS_DATA`" -#: ../../whatsnew/3.12.rst:1971 +#: ../../whatsnew/3.12.rst:1963 msgid ":c:func:`!PyUnicode_FromUnicode`" msgstr ":c:func:`!PyUnicode_FromUnicode`" -#: ../../whatsnew/3.12.rst:1972 +#: ../../whatsnew/3.12.rst:1964 msgid ":c:func:`!PyUnicode_GET_SIZE`" msgstr ":c:func:`!PyUnicode_GET_SIZE`" -#: ../../whatsnew/3.12.rst:1973 +#: ../../whatsnew/3.12.rst:1965 msgid ":c:func:`!PyUnicode_GetSize`" msgstr ":c:func:`!PyUnicode_GetSize`" -#: ../../whatsnew/3.12.rst:1974 +#: ../../whatsnew/3.12.rst:1966 msgid ":c:func:`!PyUnicode_GET_DATA_SIZE`" msgstr ":c:func:`!PyUnicode_GET_DATA_SIZE`" -#: ../../whatsnew/3.12.rst:1976 +#: ../../whatsnew/3.12.rst:1968 msgid "" "Remove the ``PyUnicode_InternImmortal()`` function macro. (Contributed by " "Victor Stinner in :gh:`85858`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1979 +#: ../../whatsnew/3.12.rst:1971 msgid "" "Remove ``Jython`` compatibility hacks from several stdlib modules and tests. " "(Contributed by Nikita Sobolev in :gh:`99482`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1982 +#: ../../whatsnew/3.12.rst:1974 msgid "" "Remove ``_use_broken_old_ctypes_structure_semantics_`` flag from :mod:" "`ctypes` module. (Contributed by Nikita Sobolev in :gh:`99285`.)" msgstr "" + +#~ msgid "email" +#~ msgstr "email" From 30552b927f79a5c223375097882a54c08742119f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 22 Jul 2023 00:06:19 +0000 Subject: [PATCH 05/10] sync with cpython d0176ed9 --- c-api/arg.po | 6 +- c-api/call.po | 26 +- c-api/complex.po | 6 +- c-api/exceptions.po | 24 +- c-api/file.po | 9 +- c-api/float.po | 14 +- c-api/gcsupport.po | 110 +++-- c-api/import.po | 8 +- c-api/init.po | 49 +- c-api/long.po | 18 +- c-api/memory.po | 21 +- c-api/module.po | 8 +- c-api/object.po | 34 +- c-api/slice.po | 4 +- c-api/stable.po | 5 +- c-api/structures.po | 328 +++++++------ c-api/sys.po | 6 +- c-api/type.po | 23 +- c-api/typeobj.po | 754 +++++++++++++++-------------- c-api/unicode.po | 12 +- c-api/veryhigh.po | 10 +- extending/extending.po | 6 +- extending/newtypes_tutorial.po | 12 +- howto/isolating-extensions.po | 17 +- install/index.po | 6 +- library/__main__.po | 6 +- library/_thread.po | 12 +- library/asyncio-dev.po | 8 +- library/asyncio-eventloop.po | 37 +- library/asyncio-platforms.po | 13 +- library/asyncio-subprocess.po | 6 +- library/compileall.po | 6 +- library/devmode.po | 4 +- library/dis.po | 8 +- library/exceptions.po | 42 +- library/fcntl.po | 10 +- library/filecmp.po | 4 +- library/ftplib.po | 11 +- library/functions.po | 6 +- library/gc.po | 9 +- library/gzip.po | 4 +- library/http.client.po | 4 +- library/imaplib.po | 6 +- library/importlib.po | 20 +- library/importlib.resources.abc.po | 4 +- library/io.po | 8 +- library/json.po | 8 +- library/logging.handlers.po | 6 +- library/multiprocessing.po | 4 +- library/optparse.po | 10 +- library/os.path.po | 4 +- library/os.po | 147 +++--- library/platform.po | 5 +- library/poplib.po | 6 +- library/shelve.po | 16 +- library/shutil.po | 4 +- library/smtplib.po | 6 +- library/socket.po | 4 +- library/sqlite3.po | 14 +- library/ssl.po | 10 +- library/subprocess.po | 6 +- library/sys.po | 21 +- library/tarfile.po | 14 +- library/tempfile.po | 10 +- library/test.po | 6 +- library/tkinter.po | 4 +- library/unittest.mock.po | 4 +- library/unittest.po | 6 +- library/urllib.request.po | 9 +- library/xml.po | 4 +- reference/compound_stmts.po | 6 +- reference/datamodel.po | 6 +- using/cmdline.po | 10 +- using/configure.po | 6 +- using/windows.po | 4 +- whatsnew/2.2.po | 8 +- whatsnew/2.3.po | 12 +- whatsnew/2.4.po | 4 +- whatsnew/2.5.po | 8 +- whatsnew/2.6.po | 8 +- whatsnew/2.7.po | 8 +- whatsnew/3.1.po | 6 +- whatsnew/3.10.po | 152 ++++-- whatsnew/3.11.po | 106 ++-- whatsnew/3.12.po | 51 +- whatsnew/3.2.po | 40 +- whatsnew/3.3.po | 48 +- whatsnew/3.4.po | 49 +- whatsnew/3.5.po | 14 +- whatsnew/3.6.po | 22 +- whatsnew/3.7.po | 16 +- whatsnew/3.8.po | 10 +- whatsnew/3.9.po | 27 +- 93 files changed, 1462 insertions(+), 1231 deletions(-) diff --git a/c-api/arg.po b/c-api/arg.po index 1b53e73a90..f9d136f14a 100644 --- a/c-api/arg.po +++ b/c-api/arg.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-17 17:39+0800\n" +"POT-Creation-Date: 2023-07-22 00:04+0000\n" "PO-Revision-Date: 2022-10-16 03:21+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -662,7 +662,7 @@ msgstr "" #: ../../c-api/arg.rst:345 msgid "" "It is possible to pass \"long\" integers (integers whose value exceeds the " -"platform's :const:`LONG_MAX`) however no proper range checking is done --- " +"platform's :c:macro:`LONG_MAX`) however no proper range checking is done --- " "the most significant bits are silently truncated when the receiving field is " "too small to receive the value (actually, the semantics are inherited from " "downcasts in C --- your mileage may vary)." @@ -807,7 +807,7 @@ msgstr "" msgid "" "A simpler form of parameter retrieval which does not use a format string to " "specify the types of the arguments. Functions which use this method to " -"retrieve their parameters should be declared as :const:`METH_VARARGS` in " +"retrieve their parameters should be declared as :c:macro:`METH_VARARGS` in " "function or method tables. The tuple containing the actual parameters " "should be passed as *args*; it must actually be a tuple. The length of the " "tuple must be at least *min* and no more than *max*; *min* and *max* may be " diff --git a/c-api/call.po b/c-api/call.po index 299ed4ba40..7a5dc34edc 100644 --- a/c-api/call.po +++ b/c-api/call.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-17 17:39+0800\n" +"POT-Creation-Date: 2023-07-22 00:04+0000\n" "PO-Revision-Date: 2022-10-16 03:20+0800\n" "Last-Translator: Matt Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -111,11 +111,11 @@ msgstr "" #: ../../c-api/call.rst:62 msgid "" -"The :const:`Py_TPFLAGS_HAVE_VECTORCALL` flag is now removed from a class " +"The :c:macro:`Py_TPFLAGS_HAVE_VECTORCALL` flag is now removed from a class " "when the class's :py:meth:`~object.__call__` method is reassigned. (This " "internally sets :c:member:`~PyTypeObject.tp_call` only, and thus may make it " "behave differently than the vectorcall function.) In earlier Python " -"versions, vectorcall should only be used with :const:`immutable " +"versions, vectorcall should only be used with :c:macro:`immutable " "` or static types." msgstr "" @@ -131,8 +131,9 @@ msgstr "" "典),那麼實作 vectorcall 就沒有意義。" #: ../../c-api/call.rst:74 +#, fuzzy msgid "" -"Classes can implement the vectorcall protocol by enabling the :const:" +"Classes can implement the vectorcall protocol by enabling the :c:macro:" "`Py_TPFLAGS_HAVE_VECTORCALL` flag and setting :c:member:`~PyTypeObject." "tp_vectorcall_offset` to the offset inside the object structure where a " "*vectorcallfunc* appears. This is a pointer to a function with the following " @@ -162,8 +163,9 @@ msgid "*nargsf* is the number of positional arguments plus possibly the" msgstr "*nargsf* 是位置引數的數量加上可能會有的" #: ../../c-api/call.rst:87 +#, fuzzy msgid "" -":const:`PY_VECTORCALL_ARGUMENTS_OFFSET` flag. To get the actual number of " +":c:macro:`PY_VECTORCALL_ARGUMENTS_OFFSET` flag. To get the actual number of " "positional arguments from *nargsf*, use :c:func:`PyVectorcall_NARGS`." msgstr "" ":const:`PY_VECTORCALL_ARGUMENTS_OFFSET` 旗標。如果要從 *nargsf* 獲得實際的位" @@ -203,9 +205,10 @@ msgstr "" "``args[0]`` 被改變。" #: ../../c-api/call.rst:106 +#, fuzzy msgid "" "Whenever they can do so cheaply (without additional allocation), callers are " -"encouraged to use :const:`PY_VECTORCALL_ARGUMENTS_OFFSET`. Doing so will " +"encouraged to use :c:macro:`PY_VECTORCALL_ARGUMENTS_OFFSET`. Doing so will " "allow callables such as bound methods to make their onward calls (which " "include a prepended *self* argument) very efficiently." msgstr "" @@ -312,10 +315,11 @@ msgstr "" "tuple 和 dict 格式給定。" #: ../../c-api/call.rst:175 +#, fuzzy msgid "" "This is a specialized function, intended to be put in the :c:member:" "`~PyTypeObject.tp_call` slot or be used in an implementation of ``tp_call``. " -"It does not check the :const:`Py_TPFLAGS_HAVE_VECTORCALL` flag and it does " +"It does not check the :c:macro:`Py_TPFLAGS_HAVE_VECTORCALL` flag and it does " "not fall back to ``tp_call``." msgstr "" "這是一個專門函式,其目的是被放入 :c:member:`~PyTypeObject.tp_call` 擴充槽或是" @@ -649,13 +653,14 @@ msgstr "" "方已經擁有一個要作為關鍵字引數的字典、但沒有作為位置引數的 tuple 時才被使用。" #: ../../c-api/call.rst:390 +#, fuzzy msgid "" "Call a method using the vectorcall calling convention. The name of the " "method is given as a Python string *name*. The object whose method is called " "is *args[0]*, and the *args* array starting at *args[1]* represents the " "arguments of the call. There must be at least one positional argument. " -"*nargsf* is the number of positional arguments including *args[0]*, plus :" -"const:`PY_VECTORCALL_ARGUMENTS_OFFSET` if the value of ``args[0]`` may " +"*nargsf* is the number of positional arguments including *args[0]*, plus :c:" +"macro:`PY_VECTORCALL_ARGUMENTS_OFFSET` if the value of ``args[0]`` may " "temporarily be changed. Keyword arguments can be passed just like in :c:func:" "`PyObject_Vectorcall`." msgstr "" @@ -667,8 +672,9 @@ msgstr "" "`PyObject_Vectorcall` 中一樣被傳入。" #: ../../c-api/call.rst:399 +#, fuzzy msgid "" -"If the object has the :const:`Py_TPFLAGS_METHOD_DESCRIPTOR` feature, this " +"If the object has the :c:macro:`Py_TPFLAGS_METHOD_DESCRIPTOR` feature, this " "will call the unbound method object with the full *args* vector as arguments." msgstr "" "如果物件具有 :const:`Py_TPFLAGS_METHOD_DESCRIPTOR` 特性,這將以完整的 *args* " diff --git a/c-api/complex.po b/c-api/complex.po index 4f283a1141..1a4140e607 100644 --- a/c-api/complex.po +++ b/c-api/complex.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-06-30 15:31+0000\n" +"POT-Creation-Date: 2023-07-22 00:04+0000\n" "PO-Revision-Date: 2015-12-09 17:51+0000\n" "Last-Translator: Liang-Bo Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -82,7 +82,7 @@ msgstr "" #: ../../c-api/complex.rst:66 msgid "" "If *divisor* is null, this method returns zero and sets :c:data:`errno` to :" -"c:data:`EDOM`." +"c:macro:`EDOM`." msgstr "" #: ../../c-api/complex.rst:72 @@ -94,7 +94,7 @@ msgstr "" #: ../../c-api/complex.rst:75 msgid "" "If *num* is null and *exp* is not a positive real number, this method " -"returns zero and sets :c:data:`errno` to :c:data:`EDOM`." +"returns zero and sets :c:data:`errno` to :c:macro:`EDOM`." msgstr "" #: ../../c-api/complex.rst:80 diff --git a/c-api/exceptions.po b/c-api/exceptions.po index af5f44460c..97d8081dd1 100644 --- a/c-api/exceptions.po +++ b/c-api/exceptions.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-17 17:39+0800\n" +"POT-Creation-Date: 2023-07-22 00:04+0000\n" "PO-Revision-Date: 2018-05-23 14:05+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -203,7 +203,7 @@ msgid "" "constructs a tuple object whose first item is the integer :c:data:`errno` " "value and whose second item is the corresponding error message (gotten from :" "c:func:`strerror`), and then calls ``PyErr_SetObject(type, object)``. On " -"Unix, when the :c:data:`errno` value is :const:`EINTR`, indicating an " +"Unix, when the :c:data:`errno` value is :c:macro:`EINTR`, indicating an " "interrupted system call, this calls :c:func:`PyErr_CheckSignals`, and if " "that set the error indicator, leaves it set to that. The function always " "returns ``NULL``, so a wrapper function around a system call can write " @@ -649,14 +649,14 @@ msgstr "" #: ../../c-api/exceptions.rst:634 msgid "" -"The default Python signal handler for :const:`SIGINT` raises the :exc:" +"The default Python signal handler for :c:macro:`SIGINT` raises the :exc:" "`KeyboardInterrupt` exception." msgstr "" #: ../../c-api/exceptions.rst:645 msgid "" -"Simulate the effect of a :const:`SIGINT` signal arriving. This is equivalent " -"to ``PyErr_SetInterruptEx(SIGINT)``." +"Simulate the effect of a :c:macro:`SIGINT` signal arriving. This is " +"equivalent to ``PyErr_SetInterruptEx(SIGINT)``." msgstr "" #: ../../c-api/exceptions.rst:649 ../../c-api/exceptions.rst:676 @@ -682,8 +682,8 @@ msgstr "" #: ../../c-api/exceptions.rst:668 msgid "" -"If the given signal isn't handled by Python (it was set to :data:`signal." -"SIG_DFL` or :data:`signal.SIG_IGN`), it will be ignored." +"If the given signal isn't handled by Python (it was set to :py:const:`signal." +"SIG_DFL` or :py:const:`signal.SIG_IGN`), it will be ignored." msgstr "" #: ../../c-api/exceptions.rst:671 @@ -776,7 +776,7 @@ msgstr "" #: ../../c-api/exceptions.rst:757 msgid "" -"Return the cause (either an exception instance, or :const:`None`, set by " +"Return the cause (either an exception instance, or ``None``, set by " "``raise ... from ...``) associated with the exception as a new reference, as " "accessible from Python through :attr:`__cause__`." msgstr "" @@ -785,7 +785,7 @@ msgstr "" msgid "" "Set the cause associated with the exception to *cause*. Use ``NULL`` to " "clear it. There is no type check to make sure that *cause* is either an " -"exception instance or :const:`None`. This steals a reference to *cause*." +"exception instance or ``None``. This steals a reference to *cause*." msgstr "" #: ../../c-api/exceptions.rst:768 @@ -894,9 +894,9 @@ msgstr "" #: ../../c-api/exceptions.rst:877 msgid "" -"If :const:`USE_STACKCHECK` is defined, this function checks if the OS stack " -"overflowed using :c:func:`PyOS_CheckStack`. In this is the case, it sets a :" -"exc:`MemoryError` and returns a nonzero value." +"If :c:macro:`USE_STACKCHECK` is defined, this function checks if the OS " +"stack overflowed using :c:func:`PyOS_CheckStack`. In this is the case, it " +"sets a :exc:`MemoryError` and returns a nonzero value." msgstr "" #: ../../c-api/exceptions.rst:881 diff --git a/c-api/file.po b/c-api/file.po index d350067db4..c4a6e48ba7 100644 --- a/c-api/file.po +++ b/c-api/file.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-05-09 00:15+0000\n" +"POT-Creation-Date: 2023-07-22 00:04+0000\n" "PO-Revision-Date: 2023-04-24 20:38+0800\n" "Last-Translator: Matt Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -160,11 +160,12 @@ msgstr "" "``setopencodehook``\\ 。" #: ../../c-api/file.rst:95 +#, fuzzy msgid "" "Write object *obj* to file object *p*. The only supported flag for *flags* " -"is :const:`Py_PRINT_RAW`; if given, the :func:`str` of the object is written " -"instead of the :func:`repr`. Return ``0`` on success or ``-1`` on failure; " -"the appropriate exception will be set." +"is :c:macro:`Py_PRINT_RAW`; if given, the :func:`str` of the object is " +"written instead of the :func:`repr`. Return ``0`` on success or ``-1`` on " +"failure; the appropriate exception will be set." msgstr "" "將物件 *obj* 寫入檔案物件 *p*。 *flags* 唯一支援的旗標是 :const:" "`Py_PRINT_RAW`;如果有給定,則寫入物件的 :func:`str` 而不是 :func:`repr`。在" diff --git a/c-api/float.po b/c-api/float.po index 26ca33b963..17030a1fec 100644 --- a/c-api/float.po +++ b/c-api/float.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-06-30 15:31+0000\n" +"POT-Creation-Date: 2023-07-22 00:04+0000\n" "PO-Revision-Date: 2017-09-22 18:26+0000\n" "Last-Translator: Liang-Bo Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -138,9 +138,9 @@ msgid "" "The pack routines write 2, 4 or 8 bytes, starting at *p*. *le* is an :c:expr:" "`int` argument, non-zero if you want the bytes string in little-endian " "format (exponent last, at ``p+1``, ``p+3``, or ``p+6`` ``p+7``), zero if you " -"want big-endian format (exponent first, at *p*). The :c:data:`PY_BIG_ENDIAN` " -"constant can be used to use the native endian: it is equal to ``1`` on big " -"endian processor, or ``0`` on little endian processor." +"want big-endian format (exponent first, at *p*). The :c:macro:" +"`PY_BIG_ENDIAN` constant can be used to use the native endian: it is equal " +"to ``1`` on big endian processor, or ``0`` on little endian processor." msgstr "" #: ../../c-api/float.rst:116 @@ -182,9 +182,9 @@ msgid "" "The unpack routines read 2, 4 or 8 bytes, starting at *p*. *le* is an :c:" "expr:`int` argument, non-zero if the bytes string is in little-endian format " "(exponent last, at ``p+1``, ``p+3`` or ``p+6`` and ``p+7``), zero if big-" -"endian (exponent first, at *p*). The :c:data:`PY_BIG_ENDIAN` constant can be " -"used to use the native endian: it is equal to ``1`` on big endian processor, " -"or ``0`` on little endian processor." +"endian (exponent first, at *p*). The :c:macro:`PY_BIG_ENDIAN` constant can " +"be used to use the native endian: it is equal to ``1`` on big endian " +"processor, or ``0`` on little endian processor." msgstr "" #: ../../c-api/float.rst:147 diff --git a/c-api/gcsupport.po b/c-api/gcsupport.po index f80c8177ca..c6702ff165 100644 --- a/c-api/gcsupport.po +++ b/c-api/gcsupport.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-17 17:39+0800\n" +"POT-Creation-Date: 2023-07-22 00:04+0000\n" "PO-Revision-Date: 2018-05-23 14:31+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -35,60 +35,64 @@ msgstr "" #: ../../c-api/gcsupport.rst:15 msgid "" "To create a container type, the :c:member:`~PyTypeObject.tp_flags` field of " -"the type object must include the :const:`Py_TPFLAGS_HAVE_GC` and provide an " -"implementation of the :c:member:`~PyTypeObject.tp_traverse` handler. If " +"the type object must include the :c:macro:`Py_TPFLAGS_HAVE_GC` and provide " +"an implementation of the :c:member:`~PyTypeObject.tp_traverse` handler. If " "instances of the type are mutable, a :c:member:`~PyTypeObject.tp_clear` " "implementation must also be provided." msgstr "" #: ../../c-api/gcsupport.rst:24 +msgid ":c:macro:`Py_TPFLAGS_HAVE_GC`" +msgstr "" + +#: ../../c-api/gcsupport.rst:22 msgid "" "Objects with a type with this flag set must conform with the rules " "documented here. For convenience these objects will be referred to as " "container objects." msgstr "" -#: ../../c-api/gcsupport.rst:28 +#: ../../c-api/gcsupport.rst:26 msgid "Constructors for container types must conform to two rules:" msgstr "" -#: ../../c-api/gcsupport.rst:30 +#: ../../c-api/gcsupport.rst:28 msgid "" "The memory for the object must be allocated using :c:func:`PyObject_GC_New` " "or :c:func:`PyObject_GC_NewVar`." msgstr "" -#: ../../c-api/gcsupport.rst:33 +#: ../../c-api/gcsupport.rst:31 msgid "" "Once all the fields which may contain references to other containers are " "initialized, it must call :c:func:`PyObject_GC_Track`." msgstr "" -#: ../../c-api/gcsupport.rst:36 +#: ../../c-api/gcsupport.rst:34 msgid "" "Similarly, the deallocator for the object must conform to a similar pair of " "rules:" msgstr "" -#: ../../c-api/gcsupport.rst:39 +#: ../../c-api/gcsupport.rst:37 msgid "" "Before fields which refer to other containers are invalidated, :c:func:" "`PyObject_GC_UnTrack` must be called." msgstr "" -#: ../../c-api/gcsupport.rst:42 +#: ../../c-api/gcsupport.rst:40 msgid "" "The object's memory must be deallocated using :c:func:`PyObject_GC_Del`." msgstr "" -#: ../../c-api/gcsupport.rst:45 +#: ../../c-api/gcsupport.rst:43 msgid "" "If a type adds the Py_TPFLAGS_HAVE_GC, then it *must* implement at least a :" "c:member:`~PyTypeObject.tp_traverse` handler or explicitly use one from its " "subclass or subclasses." msgstr "" -#: ../../c-api/gcsupport.rst:49 +#: ../../c-api/gcsupport.rst:47 msgid "" "When calling :c:func:`PyType_Ready` or some of the APIs that indirectly call " "it like :c:func:`PyType_FromSpecWithBases` or :c:func:`PyType_FromSpec` the " @@ -96,22 +100,22 @@ msgid "" "tp_flags`, :c:member:`~PyTypeObject.tp_traverse` and :c:member:" "`~PyTypeObject.tp_clear` fields if the type inherits from a class that " "implements the garbage collector protocol and the child class does *not* " -"include the :const:`Py_TPFLAGS_HAVE_GC` flag." +"include the :c:macro:`Py_TPFLAGS_HAVE_GC` flag." msgstr "" -#: ../../c-api/gcsupport.rst:59 +#: ../../c-api/gcsupport.rst:57 msgid "" -"Analogous to :c:func:`PyObject_New` but for container objects with the :" -"const:`Py_TPFLAGS_HAVE_GC` flag set." +"Analogous to :c:func:`PyObject_New` but for container objects with the :c:" +"macro:`Py_TPFLAGS_HAVE_GC` flag set." msgstr "" -#: ../../c-api/gcsupport.rst:64 +#: ../../c-api/gcsupport.rst:62 msgid "" -"Analogous to :c:func:`PyObject_NewVar` but for container objects with the :" -"const:`Py_TPFLAGS_HAVE_GC` flag set." +"Analogous to :c:func:`PyObject_NewVar` but for container objects with the :c:" +"macro:`Py_TPFLAGS_HAVE_GC` flag set." msgstr "" -#: ../../c-api/gcsupport.rst:69 +#: ../../c-api/gcsupport.rst:67 msgid "" "Analogous to :c:func:`PyObject_GC_New` but allocates *extra_size* bytes at " "the end of the object (at offset :c:member:`~PyTypeObject.tp_basicsize`). " @@ -119,13 +123,13 @@ msgid "" "object header `." msgstr "" -#: ../../c-api/gcsupport.rst:75 +#: ../../c-api/gcsupport.rst:73 msgid "" "The extra data will be deallocated with the object, but otherwise it is not " "managed by Python." msgstr "" -#: ../../c-api/gcsupport.rst:79 +#: ../../c-api/gcsupport.rst:77 msgid "" "The function is marked as unstable because the final mechanism for reserving " "extra data after an instance is not yet decided. For allocating a variable " @@ -133,14 +137,14 @@ msgid "" "`~PyTypeObject.tp_itemsize` instead." msgstr "" -#: ../../c-api/gcsupport.rst:90 +#: ../../c-api/gcsupport.rst:88 msgid "" "Resize an object allocated by :c:func:`PyObject_NewVar`. Returns the " "resized object or ``NULL`` on failure. *op* must not be tracked by the " "collector yet." msgstr "" -#: ../../c-api/gcsupport.rst:96 +#: ../../c-api/gcsupport.rst:94 msgid "" "Adds the object *op* to the set of container objects tracked by the " "collector. The collector can run at unexpected times so objects must be " @@ -149,45 +153,45 @@ msgid "" "usually near the end of the constructor." msgstr "" -#: ../../c-api/gcsupport.rst:105 +#: ../../c-api/gcsupport.rst:103 msgid "" "Returns non-zero if the object implements the garbage collector protocol, " "otherwise returns 0." msgstr "" -#: ../../c-api/gcsupport.rst:108 +#: ../../c-api/gcsupport.rst:106 msgid "" "The object cannot be tracked by the garbage collector if this function " "returns 0." msgstr "" -#: ../../c-api/gcsupport.rst:113 +#: ../../c-api/gcsupport.rst:111 msgid "" "Returns 1 if the object type of *op* implements the GC protocol and *op* is " "being currently tracked by the garbage collector and 0 otherwise." msgstr "" -#: ../../c-api/gcsupport.rst:116 +#: ../../c-api/gcsupport.rst:114 msgid "This is analogous to the Python function :func:`gc.is_tracked`." msgstr "" -#: ../../c-api/gcsupport.rst:123 +#: ../../c-api/gcsupport.rst:121 msgid "" "Returns 1 if the object type of *op* implements the GC protocol and *op* has " "been already finalized by the garbage collector and 0 otherwise." msgstr "" -#: ../../c-api/gcsupport.rst:126 +#: ../../c-api/gcsupport.rst:124 msgid "This is analogous to the Python function :func:`gc.is_finalized`." msgstr "" -#: ../../c-api/gcsupport.rst:133 +#: ../../c-api/gcsupport.rst:131 msgid "" "Releases memory allocated to an object using :c:func:`PyObject_GC_New` or :c:" "func:`PyObject_GC_NewVar`." msgstr "" -#: ../../c-api/gcsupport.rst:139 +#: ../../c-api/gcsupport.rst:137 msgid "" "Remove the object *op* from the set of container objects tracked by the " "collector. Note that :c:func:`PyObject_GC_Track` can be called again on " @@ -197,19 +201,19 @@ msgid "" "handler become invalid." msgstr "" -#: ../../c-api/gcsupport.rst:148 +#: ../../c-api/gcsupport.rst:146 msgid "" "The :c:func:`_PyObject_GC_TRACK` and :c:func:`_PyObject_GC_UNTRACK` macros " "have been removed from the public C API." msgstr "" -#: ../../c-api/gcsupport.rst:151 +#: ../../c-api/gcsupport.rst:149 msgid "" "The :c:member:`~PyTypeObject.tp_traverse` handler accepts a function " "parameter of this type:" msgstr "" -#: ../../c-api/gcsupport.rst:156 +#: ../../c-api/gcsupport.rst:154 msgid "" "Type of the visitor function passed to the :c:member:`~PyTypeObject." "tp_traverse` handler. The function should be called with an object to " @@ -219,13 +223,13 @@ msgid "" "users will need to write their own visitor functions." msgstr "" -#: ../../c-api/gcsupport.rst:163 +#: ../../c-api/gcsupport.rst:161 msgid "" "The :c:member:`~PyTypeObject.tp_traverse` handler must have the following " "type:" msgstr "" -#: ../../c-api/gcsupport.rst:168 +#: ../../c-api/gcsupport.rst:166 msgid "" "Traversal function for a container object. Implementations must call the " "*visit* function for each object directly contained by *self*, with the " @@ -235,7 +239,7 @@ msgid "" "returned immediately." msgstr "" -#: ../../c-api/gcsupport.rst:175 +#: ../../c-api/gcsupport.rst:173 msgid "" "To simplify writing :c:member:`~PyTypeObject.tp_traverse` handlers, a :c:" "func:`Py_VISIT` macro is provided. In order to use this macro, the :c:" @@ -243,20 +247,20 @@ msgid "" "exactly *visit* and *arg*:" msgstr "" -#: ../../c-api/gcsupport.rst:182 +#: ../../c-api/gcsupport.rst:180 msgid "" "If *o* is not ``NULL``, call the *visit* callback, with arguments *o* and " "*arg*. If *visit* returns a non-zero value, then return it. Using this " "macro, :c:member:`~PyTypeObject.tp_traverse` handlers look like::" msgstr "" -#: ../../c-api/gcsupport.rst:195 +#: ../../c-api/gcsupport.rst:193 msgid "" "The :c:member:`~PyTypeObject.tp_clear` handler must be of the :c:type:" "`inquiry` type, or ``NULL`` if the object is immutable." msgstr "" -#: ../../c-api/gcsupport.rst:201 +#: ../../c-api/gcsupport.rst:199 msgid "" "Drop references that may have created reference cycles. Immutable objects " "do not have to define this method since they can never directly create " @@ -266,23 +270,23 @@ msgid "" "in a reference cycle." msgstr "" -#: ../../c-api/gcsupport.rst:210 +#: ../../c-api/gcsupport.rst:208 msgid "Controlling the Garbage Collector State" msgstr "" -#: ../../c-api/gcsupport.rst:212 +#: ../../c-api/gcsupport.rst:210 msgid "" "The C-API provides the following functions for controlling garbage " "collection runs." msgstr "" -#: ../../c-api/gcsupport.rst:217 +#: ../../c-api/gcsupport.rst:215 msgid "" "Perform a full garbage collection, if the garbage collector is enabled. " "(Note that :func:`gc.collect` runs it unconditionally.)" msgstr "" -#: ../../c-api/gcsupport.rst:220 +#: ../../c-api/gcsupport.rst:218 msgid "" "Returns the number of collected + unreachable objects which cannot be " "collected. If the garbage collector is disabled or already collecting, " @@ -290,54 +294,54 @@ msgid "" "data:`sys.unraisablehook`. This function does not raise exceptions." msgstr "" -#: ../../c-api/gcsupport.rst:230 +#: ../../c-api/gcsupport.rst:228 msgid "" "Enable the garbage collector: similar to :func:`gc.enable`. Returns the " "previous state, 0 for disabled and 1 for enabled." msgstr "" -#: ../../c-api/gcsupport.rst:238 +#: ../../c-api/gcsupport.rst:236 msgid "" "Disable the garbage collector: similar to :func:`gc.disable`. Returns the " "previous state, 0 for disabled and 1 for enabled." msgstr "" -#: ../../c-api/gcsupport.rst:246 +#: ../../c-api/gcsupport.rst:244 msgid "" "Query the state of the garbage collector: similar to :func:`gc.isenabled`. " "Returns the current state, 0 for disabled and 1 for enabled." msgstr "" -#: ../../c-api/gcsupport.rst:253 +#: ../../c-api/gcsupport.rst:251 msgid "Querying Garbage Collector State" msgstr "" -#: ../../c-api/gcsupport.rst:255 +#: ../../c-api/gcsupport.rst:253 msgid "" "The C-API provides the following interface for querying information about " "the garbage collector." msgstr "" -#: ../../c-api/gcsupport.rst:260 +#: ../../c-api/gcsupport.rst:258 msgid "" "Run supplied *callback* on all live GC-capable objects. *arg* is passed " "through to all invocations of *callback*." msgstr "" -#: ../../c-api/gcsupport.rst:264 +#: ../../c-api/gcsupport.rst:262 msgid "" "If new objects are (de)allocated by the callback it is undefined if they " "will be visited." msgstr "" -#: ../../c-api/gcsupport.rst:267 +#: ../../c-api/gcsupport.rst:265 msgid "" "Garbage collection is disabled during operation. Explicitly running a " "collection in the callback may lead to undefined behaviour e.g. visiting the " "same objects multiple times or not at all." msgstr "" -#: ../../c-api/gcsupport.rst:275 +#: ../../c-api/gcsupport.rst:273 msgid "" "Type of the visitor function to be passed to :c:func:" "`PyUnstable_GC_VisitObjects`. *arg* is the same as the *arg* passed to " diff --git a/c-api/import.po b/c-api/import.po index 142a055500..51c28be036 100644 --- a/c-api/import.po +++ b/c-api/import.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-17 17:39+0800\n" +"POT-Creation-Date: 2023-07-22 00:04+0000\n" "PO-Revision-Date: 2018-05-23 14:06+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -135,10 +135,10 @@ msgid "" "object read from a Python bytecode file or obtained from the built-in " "function :func:`compile`, load the module. Return a new reference to the " "module object, or ``NULL`` with an exception set if an error occurred. " -"*name* is removed from :attr:`sys.modules` in error cases, even if *name* " -"was already in :attr:`sys.modules` on entry to :c:func:" +"*name* is removed from :data:`sys.modules` in error cases, even if *name* " +"was already in :data:`sys.modules` on entry to :c:func:" "`PyImport_ExecCodeModule`. Leaving incompletely initialized modules in :" -"attr:`sys.modules` is dangerous, as imports of such modules have no way to " +"data:`sys.modules` is dangerous, as imports of such modules have no way to " "know that the module object is an unknown (and probably damaged with respect " "to the module author's intents) state." msgstr "" diff --git a/c-api/init.po b/c-api/init.po index 5580d2c144..df7fd57324 100644 --- a/c-api/init.po +++ b/c-api/init.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-17 17:39+0800\n" +"POT-Creation-Date: 2023-07-22 00:04+0000\n" "PO-Revision-Date: 2023-04-24 20:49+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -1585,8 +1585,8 @@ msgid "" "This function does not steal any references to *exc*. To prevent naive " "misuse, you must write your own C extension to call this. Must be called " "with the GIL held. Returns the number of thread states modified; this is " -"normally one, but will be zero if the thread id isn't found. If *exc* is :" -"const:`NULL`, the pending exception (if any) for the thread is cleared. This " +"normally one, but will be zero if the thread id isn't found. If *exc* is " +"``NULL``, the pending exception (if any) for the thread is cleared. This " "raises no exceptions." msgstr "" @@ -1897,10 +1897,11 @@ msgid "" "The type of the trace function registered using :c:func:`PyEval_SetProfile` " "and :c:func:`PyEval_SetTrace`. The first parameter is the object passed to " "the registration function as *obj*, *frame* is the frame object to which the " -"event pertains, *what* is one of the constants :const:`PyTrace_CALL`, :const:" -"`PyTrace_EXCEPTION`, :const:`PyTrace_LINE`, :const:`PyTrace_RETURN`, :const:" -"`PyTrace_C_CALL`, :const:`PyTrace_C_EXCEPTION`, :const:`PyTrace_C_RETURN`, " -"or :const:`PyTrace_OPCODE`, and *arg* depends on the value of *what*:" +"event pertains, *what* is one of the constants :c:data:`PyTrace_CALL`, :c:" +"data:`PyTrace_EXCEPTION`, :c:data:`PyTrace_LINE`, :c:data:`PyTrace_RETURN`, :" +"c:data:`PyTrace_C_CALL`, :c:data:`PyTrace_C_EXCEPTION`, :c:data:" +"`PyTrace_C_RETURN`, or :c:data:`PyTrace_OPCODE`, and *arg* depends on the " +"value of *what*:" msgstr "" #: ../../c-api/init.rst:1684 @@ -1912,7 +1913,8 @@ msgid "Meaning of *arg*" msgstr "" #: ../../c-api/init.rst:1686 -msgid ":const:`PyTrace_CALL`" +#, fuzzy +msgid ":c:data:`PyTrace_CALL`" msgstr ":const:`PyTrace_CALL`" #: ../../c-api/init.rst:1686 ../../c-api/init.rst:1691 @@ -1921,7 +1923,8 @@ msgid "Always :c:data:`Py_None`." msgstr "" #: ../../c-api/init.rst:1688 -msgid ":const:`PyTrace_EXCEPTION`" +#, fuzzy +msgid ":c:data:`PyTrace_EXCEPTION`" msgstr ":const:`PyTrace_EXCEPTION`" #: ../../c-api/init.rst:1688 @@ -1929,11 +1932,13 @@ msgid "Exception information as returned by :func:`sys.exc_info`." msgstr "" #: ../../c-api/init.rst:1691 -msgid ":const:`PyTrace_LINE`" +#, fuzzy +msgid ":c:data:`PyTrace_LINE`" msgstr ":const:`PyTrace_LINE`" #: ../../c-api/init.rst:1693 -msgid ":const:`PyTrace_RETURN`" +#, fuzzy +msgid ":c:data:`PyTrace_RETURN`" msgstr ":const:`PyTrace_RETURN`" #: ../../c-api/init.rst:1693 @@ -1942,7 +1947,8 @@ msgid "" msgstr "" #: ../../c-api/init.rst:1696 -msgid ":const:`PyTrace_C_CALL`" +#, fuzzy +msgid ":c:data:`PyTrace_C_CALL`" msgstr ":const:`PyTrace_C_CALL`" #: ../../c-api/init.rst:1696 ../../c-api/init.rst:1698 @@ -1951,15 +1957,18 @@ msgid "Function object being called." msgstr "" #: ../../c-api/init.rst:1698 -msgid ":const:`PyTrace_C_EXCEPTION`" +#, fuzzy +msgid ":c:data:`PyTrace_C_EXCEPTION`" msgstr ":const:`PyTrace_C_EXCEPTION`" #: ../../c-api/init.rst:1700 -msgid ":const:`PyTrace_C_RETURN`" +#, fuzzy +msgid ":c:data:`PyTrace_C_RETURN`" msgstr ":const:`PyTrace_C_RETURN`" #: ../../c-api/init.rst:1702 -msgid ":const:`PyTrace_OPCODE`" +#, fuzzy +msgid ":c:data:`PyTrace_OPCODE`" msgstr ":const:`PyTrace_OPCODE`" #: ../../c-api/init.rst:1707 @@ -2029,8 +2038,8 @@ msgid "" "function as its first parameter, and may be any Python object, or ``NULL``. " "If the profile function needs to maintain state, using a different value for " "*obj* for each thread provides a convenient and thread-safe place to store " -"it. The profile function is called for all monitored events except :const:" -"`PyTrace_LINE` :const:`PyTrace_OPCODE` and :const:`PyTrace_EXCEPTION`." +"it. The profile function is called for all monitored events except :c:data:" +"`PyTrace_LINE` :c:data:`PyTrace_OPCODE` and :c:data:`PyTrace_EXCEPTION`." msgstr "" #: ../../c-api/init.rst:1773 @@ -2061,9 +2070,9 @@ msgid "" "`PyEval_SetProfile`, except the tracing function does receive line-number " "events and per-opcode events, but does not receive any event related to C " "function objects being called. Any trace function registered using :c:func:" -"`PyEval_SetTrace` will not receive :const:`PyTrace_C_CALL`, :const:" -"`PyTrace_C_EXCEPTION` or :const:`PyTrace_C_RETURN` as a value for the *what* " -"parameter." +"`PyEval_SetTrace` will not receive :c:data:`PyTrace_C_CALL`, :c:data:" +"`PyTrace_C_EXCEPTION` or :c:data:`PyTrace_C_RETURN` as a value for the " +"*what* parameter." msgstr "" #: ../../c-api/init.rst:1799 diff --git a/c-api/long.po b/c-api/long.po index 3fcacd8eaf..61e8cfc2db 100644 --- a/c-api/long.po +++ b/c-api/long.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-17 17:39+0800\n" +"POT-Creation-Date: 2023-07-22 00:04+0000\n" "PO-Revision-Date: 2018-05-23 14:06+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -169,10 +169,10 @@ msgstr "" #: ../../c-api/long.rst:145 msgid "" -"If the value of *obj* is greater than :const:`LONG_MAX` or less than :const:" -"`LONG_MIN`, set *\\*overflow* to ``1`` or ``-1``, respectively, and return " -"``-1``; otherwise, set *\\*overflow* to ``0``. If any other exception " -"occurs set *\\*overflow* to ``0`` and return ``-1`` as usual." +"If the value of *obj* is greater than :c:macro:`LONG_MAX` or less than :c:" +"macro:`LONG_MIN`, set *\\*overflow* to ``1`` or ``-1``, respectively, and " +"return ``-1``; otherwise, set *\\*overflow* to ``0``. If any other " +"exception occurs set *\\*overflow* to ``0`` and return ``-1`` as usual." msgstr "" #: ../../c-api/long.rst:164 ../../c-api/long.rst:182 @@ -190,10 +190,10 @@ msgstr "" #: ../../c-api/long.rst:186 msgid "" -"If the value of *obj* is greater than :const:`LLONG_MAX` or less than :const:" -"`LLONG_MIN`, set *\\*overflow* to ``1`` or ``-1``, respectively, and return " -"``-1``; otherwise, set *\\*overflow* to ``0``. If any other exception " -"occurs set *\\*overflow* to ``0`` and return ``-1`` as usual." +"If the value of *obj* is greater than :c:macro:`LLONG_MAX` or less than :c:" +"macro:`LLONG_MIN`, set *\\*overflow* to ``1`` or ``-1``, respectively, and " +"return ``-1``; otherwise, set *\\*overflow* to ``0``. If any other " +"exception occurs set *\\*overflow* to ``0`` and return ``-1`` as usual." msgstr "" #: ../../c-api/long.rst:208 diff --git a/c-api/memory.po b/c-api/memory.po index 66ab7313d4..e2b090650c 100644 --- a/c-api/memory.po +++ b/c-api/memory.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-05-09 00:15+0000\n" +"POT-Creation-Date: 2023-07-22 00:04+0000\n" "PO-Revision-Date: 2018-05-23 14:06+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -684,7 +684,7 @@ msgstr "" #: ../../c-api/memory.rst:473 msgid "" -"For the :c:data:`PYMEM_DOMAIN_RAW` domain, the allocator must be thread-" +"For the :c:macro:`PYMEM_DOMAIN_RAW` domain, the allocator must be thread-" "safe: the :term:`GIL ` is not held when the " "allocator is called." msgstr "" @@ -785,8 +785,9 @@ msgstr "" #: ../../c-api/memory.rst:538 msgid "" "Check that the :term:`GIL ` is held when allocator " -"functions of :c:data:`PYMEM_DOMAIN_OBJ` (ex: :c:func:`PyObject_Malloc`) and :" -"c:data:`PYMEM_DOMAIN_MEM` (ex: :c:func:`PyMem_Malloc`) domains are called." +"functions of :c:macro:`PYMEM_DOMAIN_OBJ` (ex: :c:func:`PyObject_Malloc`) " +"and :c:macro:`PYMEM_DOMAIN_MEM` (ex: :c:func:`PyMem_Malloc`) domains are " +"called." msgstr "" #: ../../c-api/memory.rst:543 @@ -826,15 +827,15 @@ msgid "API identifier (ASCII character):" msgstr "" #: ../../c-api/memory.rst:560 -msgid "``'r'`` for :c:data:`PYMEM_DOMAIN_RAW`." +msgid "``'r'`` for :c:macro:`PYMEM_DOMAIN_RAW`." msgstr "" #: ../../c-api/memory.rst:561 -msgid "``'m'`` for :c:data:`PYMEM_DOMAIN_MEM`." +msgid "``'m'`` for :c:macro:`PYMEM_DOMAIN_MEM`." msgstr "" #: ../../c-api/memory.rst:562 -msgid "``'o'`` for :c:data:`PYMEM_DOMAIN_OBJ`." +msgid "``'o'`` for :c:macro:`PYMEM_DOMAIN_OBJ`." msgstr "" #: ../../c-api/memory.rst:565 @@ -906,8 +907,8 @@ msgid "" "The :c:func:`PyMem_SetupDebugHooks` function now also works on Python " "compiled in release mode. On error, the debug hooks now use :mod:" "`tracemalloc` to get the traceback where a memory block was allocated. The " -"debug hooks now also check if the GIL is held when functions of :c:data:" -"`PYMEM_DOMAIN_OBJ` and :c:data:`PYMEM_DOMAIN_MEM` domains are called." +"debug hooks now also check if the GIL is held when functions of :c:macro:" +"`PYMEM_DOMAIN_OBJ` and :c:macro:`PYMEM_DOMAIN_MEM` domains are called." msgstr "" #: ../../c-api/memory.rst:607 @@ -934,7 +935,7 @@ msgstr "" #: ../../c-api/memory.rst:624 msgid "" "*pymalloc* is the :ref:`default allocator ` of " -"the :c:data:`PYMEM_DOMAIN_MEM` (ex: :c:func:`PyMem_Malloc`) and :c:data:" +"the :c:macro:`PYMEM_DOMAIN_MEM` (ex: :c:func:`PyMem_Malloc`) and :c:macro:" "`PYMEM_DOMAIN_OBJ` (ex: :c:func:`PyObject_Malloc`) domains." msgstr "" diff --git a/c-api/module.po b/c-api/module.po index c56523e7bb..b2b11efceb 100644 --- a/c-api/module.po +++ b/c-api/module.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-05-09 00:15+0000\n" +"POT-Creation-Date: 2023-07-22 00:04+0000\n" "PO-Revision-Date: 2018-05-23 14:32+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -148,7 +148,7 @@ msgid "" msgstr "" #: ../../c-api/module.rst:148 -msgid "Always initialize this member to :const:`PyModuleDef_HEAD_INIT`." +msgid "Always initialize this member to :c:data:`PyModuleDef_HEAD_INIT`." msgstr "" #: ../../c-api/module.rst:152 @@ -269,7 +269,7 @@ msgstr "" #: ../../c-api/module.rst:257 msgid "" "Create a new module object, given the definition in *def*. This behaves " -"like :c:func:`PyModule_Create2` with *module_api_version* set to :const:" +"like :c:func:`PyModule_Create2` with *module_api_version* set to :c:macro:" "`PYTHON_API_VERSION`." msgstr "" @@ -446,7 +446,7 @@ msgstr "" msgid "" "Create a new module object, given the definition in *def* and the ModuleSpec " "*spec*. This behaves like :c:func:`PyModule_FromDefAndSpec2` with " -"*module_api_version* set to :const:`PYTHON_API_VERSION`." +"*module_api_version* set to :c:macro:`PYTHON_API_VERSION`." msgstr "" #: ../../c-api/module.rst:399 diff --git a/c-api/object.po b/c-api/object.po index b0a56f9468..1e23b76317 100644 --- a/c-api/object.po +++ b/c-api/object.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-17 17:39+0800\n" +"POT-Creation-Date: 2023-07-22 00:04+0000\n" "PO-Revision-Date: 2018-05-23 14:32+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -39,7 +39,7 @@ msgstr "" msgid "" "Print an object *o*, on file *fp*. Returns ``-1`` on error. The flags " "argument is used to enable certain printing options. The only option " -"currently supported is :const:`Py_PRINT_RAW`; if given, the :func:`str` of " +"currently supported is :c:macro:`Py_PRINT_RAW`; if given, the :func:`str` of " "the object is written instead of the :func:`repr`." msgstr "" @@ -168,29 +168,29 @@ msgstr "" #: ../../c-api/object.rst:164 msgid "" "Compare the values of *o1* and *o2* using the operation specified by *opid*, " -"which must be one of :const:`Py_LT`, :const:`Py_LE`, :const:`Py_EQ`, :const:" -"`Py_NE`, :const:`Py_GT`, or :const:`Py_GE`, corresponding to ``<``, ``<=``, " -"``==``, ``!=``, ``>``, or ``>=`` respectively. This is the equivalent of the " -"Python expression ``o1 op o2``, where ``op`` is the operator corresponding " -"to *opid*. Returns the value of the comparison on success, or ``NULL`` on " -"failure." +"which must be one of :c:macro:`Py_LT`, :c:macro:`Py_LE`, :c:macro:`Py_EQ`, :" +"c:macro:`Py_NE`, :c:macro:`Py_GT`, or :c:macro:`Py_GE`, corresponding to " +"``<``, ``<=``, ``==``, ``!=``, ``>``, or ``>=`` respectively. This is the " +"equivalent of the Python expression ``o1 op o2``, where ``op`` is the " +"operator corresponding to *opid*. Returns the value of the comparison on " +"success, or ``NULL`` on failure." msgstr "" #: ../../c-api/object.rst:174 msgid "" "Compare the values of *o1* and *o2* using the operation specified by *opid*, " -"which must be one of :const:`Py_LT`, :const:`Py_LE`, :const:`Py_EQ`, :const:" -"`Py_NE`, :const:`Py_GT`, or :const:`Py_GE`, corresponding to ``<``, ``<=``, " -"``==``, ``!=``, ``>``, or ``>=`` respectively. Returns ``-1`` on error, " -"``0`` if the result is false, ``1`` otherwise. This is the equivalent of the " -"Python expression ``o1 op o2``, where ``op`` is the operator corresponding " -"to *opid*." +"which must be one of :c:macro:`Py_LT`, :c:macro:`Py_LE`, :c:macro:`Py_EQ`, :" +"c:macro:`Py_NE`, :c:macro:`Py_GT`, or :c:macro:`Py_GE`, corresponding to " +"``<``, ``<=``, ``==``, ``!=``, ``>``, or ``>=`` respectively. Returns ``-1`` " +"on error, ``0`` if the result is false, ``1`` otherwise. This is the " +"equivalent of the Python expression ``o1 op o2``, where ``op`` is the " +"operator corresponding to *opid*." msgstr "" #: ../../c-api/object.rst:183 msgid "" "If *o1* and *o2* are the same object, :c:func:`PyObject_RichCompareBool` " -"will always return ``1`` for :const:`Py_EQ` and ``0`` for :const:`Py_NE`." +"will always return ``1`` for :c:macro:`Py_EQ` and ``0`` for :c:macro:`Py_NE`." msgstr "" #: ../../c-api/object.rst:188 @@ -454,14 +454,14 @@ msgstr "" #: ../../c-api/object.rst:433 msgid "" -"Get a pointer to per-item data for a class with :const:" +"Get a pointer to per-item data for a class with :c:macro:" "`Py_TPFLAGS_ITEMS_AT_END`." msgstr "" #: ../../c-api/object.rst:436 msgid "" "On error, set an exception and return ``NULL``. :py:exc:`TypeError` is " -"raised if *o* does not have :const:`Py_TPFLAGS_ITEMS_AT_END` set." +"raised if *o* does not have :c:macro:`Py_TPFLAGS_ITEMS_AT_END` set." msgstr "" #: ../../c-api/object.rst:197 ../../c-api/object.rst:209 diff --git a/c-api/slice.po b/c-api/slice.po index 39ab0db837..952d8af806 100644 --- a/c-api/slice.po +++ b/c-api/slice.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-17 17:39+0800\n" +"POT-Creation-Date: 2023-07-22 00:04+0000\n" "PO-Revision-Date: 2018-05-23 14:07+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -54,7 +54,7 @@ msgstr "" #: ../../c-api/slice.rst:36 msgid "" "Returns ``0`` on success and ``-1`` on error with no exception set (unless " -"one of the indices was not :const:`None` and failed to be converted to an " +"one of the indices was not ``None`` and failed to be converted to an " "integer, in which case ``-1`` is returned with an exception set)." msgstr "" diff --git a/c-api/stable.po b/c-api/stable.po index 7f6405b6f6..3651b428d1 100644 --- a/c-api/stable.po +++ b/c-api/stable.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-17 17:39+0800\n" +"POT-Creation-Date: 2023-07-22 00:04+0000\n" "PO-Revision-Date: 2023-01-24 21:07+0800\n" "Last-Translator: Matt Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -140,8 +140,9 @@ msgstr "" "在包含 ``Python.h`` 之前定義此巨集以選擇只使用受限 API,並挑選受限 API 版本。" #: ../../c-api/stable.rst:77 +#, fuzzy msgid "" -"Define ``Py_LIMITED_API`` to the value of :c:data:`PY_VERSION_HEX` " +"Define ``Py_LIMITED_API`` to the value of :c:macro:`PY_VERSION_HEX` " "corresponding to the lowest Python version your extension supports. The " "extension will work without recompilation with all Python 3 releases from " "the specified one onward, and can use Limited API introduced up to that " diff --git a/c-api/structures.po b/c-api/structures.po index a097366367..df5d611176 100644 --- a/c-api/structures.po +++ b/c-api/structures.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-17 17:39+0800\n" +"POT-Creation-Date: 2023-07-22 00:04+0000\n" "PO-Revision-Date: 2018-05-23 14:07+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -189,26 +189,28 @@ msgstr "" #: ../../c-api/structures.rst:181 msgid "" "Type of the functions used to implement Python callables in C with " -"signature :const:`METH_VARARGS | METH_KEYWORDS`. The function signature is::" +"signature :ref:`METH_VARARGS | METH_KEYWORDS `. " +"The function signature is::" msgstr "" #: ../../c-api/structures.rst:192 msgid "" "Type of the functions used to implement Python callables in C with " -"signature :const:`METH_FASTCALL`. The function signature is::" +"signature :c:macro:`METH_FASTCALL`. The function signature is::" msgstr "" #: ../../c-api/structures.rst:202 msgid "" "Type of the functions used to implement Python callables in C with " -"signature :const:`METH_FASTCALL | METH_KEYWORDS`. The function signature is::" +"signature :ref:`METH_FASTCALL | METH_KEYWORDS `. The function signature is::" msgstr "" #: ../../c-api/structures.rst:213 msgid "" "Type of the functions used to implement Python callables in C with " -"signature :const:`METH_METHOD | METH_FASTCALL | METH_KEYWORDS`. The function " -"signature is::" +"signature :ref:`METH_METHOD | METH_FASTCALL | METH_KEYWORDS `. The function signature is::" msgstr "" #: ../../c-api/structures.rst:228 @@ -266,6 +268,19 @@ msgstr "" #: ../../c-api/structures.rst:272 msgid "" +"Can only be used in certain combinations with other flags: :ref:" +"`METH_VARARGS | METH_KEYWORDS `, :ref:" +"`METH_FASTCALL | METH_KEYWORDS ` and :ref:" +"`METH_METHOD | METH_FASTCALL | METH_KEYWORDS `." +msgstr "" + +#: ../../c-api/structures.rst:286 +msgid ":c:expr:`METH_VARARGS | METH_KEYWORDS`" +msgstr "" + +#: ../../c-api/structures.rst:281 +msgid "" "Methods with these flags must be of type :c:type:`PyCFunctionWithKeywords`. " "The function expects three parameters: *self*, *args*, *kwargs* where " "*kwargs* is a dictionary of all the keyword arguments or possibly ``NULL`` " @@ -273,7 +288,7 @@ msgid "" "using :c:func:`PyArg_ParseTupleAndKeywords`." msgstr "" -#: ../../c-api/structures.rst:281 +#: ../../c-api/structures.rst:290 msgid "" "Fast calling convention supporting only positional arguments. The methods " "have the type :c:type:`_PyCFunctionFast`. The first parameter is *self*, the " @@ -282,61 +297,76 @@ msgid "" "the array)." msgstr "" -#: ../../c-api/structures.rst:291 +#: ../../c-api/structures.rst:300 msgid "``METH_FASTCALL`` is now part of the :ref:`stable ABI `." msgstr "" -#: ../../c-api/structures.rst:296 +#: ../../c-api/structures.rst:317 +msgid ":c:expr:`METH_FASTCALL | METH_KEYWORDS`" +msgstr "" + +#: ../../c-api/structures.rst:306 +msgid "" +"Extension of :c:macro:`METH_FASTCALL` supporting also keyword arguments, " +"with methods of type :c:type:`_PyCFunctionFastWithKeywords`. Keyword " +"arguments are passed the same way as in the :ref:`vectorcall protocol " +"`: there is an additional fourth :c:expr:`PyObject*` parameter " +"which is a tuple representing the names of the keyword arguments (which are " +"guaranteed to be strings) or possibly ``NULL`` if there are no keywords. " +"The values of the keyword arguments are stored in the *args* array, after " +"the positional arguments." +msgstr "" + +#: ../../c-api/structures.rst:321 msgid "" -"Extension of :const:`METH_FASTCALL` supporting also keyword arguments, with " -"methods of type :c:type:`_PyCFunctionFastWithKeywords`. Keyword arguments " -"are passed the same way as in the :ref:`vectorcall protocol `: " -"there is an additional fourth :c:expr:`PyObject*` parameter which is a tuple " -"representing the names of the keyword arguments (which are guaranteed to be " -"strings) or possibly ``NULL`` if there are no keywords. The values of the " -"keyword arguments are stored in the *args* array, after the positional " -"arguments." +"Can only be used in the combination with other flags: :ref:`METH_METHOD | " +"METH_FASTCALL | METH_KEYWORDS `." msgstr "" -#: ../../c-api/structures.rst:311 +#: ../../c-api/structures.rst:338 +msgid ":c:expr:`METH_METHOD | METH_FASTCALL | METH_KEYWORDS`" +msgstr "" + +#: ../../c-api/structures.rst:328 msgid "" -"Extension of :const:`METH_FASTCALL | METH_KEYWORDS` supporting the *defining " -"class*, that is, the class that contains the method in question. The " -"defining class might be a superclass of ``Py_TYPE(self)``." +"Extension of :ref:`METH_FASTCALL | METH_KEYWORDS ` supporting the *defining class*, that is, the class that " +"contains the method in question. The defining class might be a superclass of " +"``Py_TYPE(self)``." msgstr "" -#: ../../c-api/structures.rst:315 +#: ../../c-api/structures.rst:333 msgid "" "The method needs to be of type :c:type:`PyCMethod`, the same as for " "``METH_FASTCALL | METH_KEYWORDS`` with ``defining_class`` argument added " "after ``self``." msgstr "" -#: ../../c-api/structures.rst:324 +#: ../../c-api/structures.rst:342 msgid "" "Methods without parameters don't need to check whether arguments are given " -"if they are listed with the :const:`METH_NOARGS` flag. They need to be of " +"if they are listed with the :c:macro:`METH_NOARGS` flag. They need to be of " "type :c:type:`PyCFunction`. The first parameter is typically named *self* " "and will hold a reference to the module or object instance. In all cases " "the second parameter will be ``NULL``." msgstr "" -#: ../../c-api/structures.rst:330 +#: ../../c-api/structures.rst:348 msgid "" "The function must have 2 parameters. Since the second parameter is unused, :" "c:macro:`Py_UNUSED` can be used to prevent a compiler warning." msgstr "" -#: ../../c-api/structures.rst:336 +#: ../../c-api/structures.rst:354 msgid "" -"Methods with a single object argument can be listed with the :const:`METH_O` " -"flag, instead of invoking :c:func:`PyArg_ParseTuple` with a ``\"O\"`` " -"argument. They have the type :c:type:`PyCFunction`, with the *self* " -"parameter, and a :c:expr:`PyObject*` parameter representing the single " -"argument." +"Methods with a single object argument can be listed with the :c:macro:" +"`METH_O` flag, instead of invoking :c:func:`PyArg_ParseTuple` with a " +"``\"O\"`` argument. They have the type :c:type:`PyCFunction`, with the " +"*self* parameter, and a :c:expr:`PyObject*` parameter representing the " +"single argument." msgstr "" -#: ../../c-api/structures.rst:342 +#: ../../c-api/structures.rst:360 msgid "" "These two constants are not used to indicate the calling convention but the " "binding when use with methods of classes. These may not be used for " @@ -344,27 +374,27 @@ msgid "" "any given method." msgstr "" -#: ../../c-api/structures.rst:352 +#: ../../c-api/structures.rst:370 msgid "" "The method will be passed the type object as the first parameter rather than " "an instance of the type. This is used to create *class methods*, similar to " "what is created when using the :func:`classmethod` built-in function." msgstr "" -#: ../../c-api/structures.rst:362 +#: ../../c-api/structures.rst:380 msgid "" "The method will be passed ``NULL`` as the first parameter rather than an " "instance of the type. This is used to create *static methods*, similar to " "what is created when using the :func:`staticmethod` built-in function." msgstr "" -#: ../../c-api/structures.rst:366 +#: ../../c-api/structures.rst:384 msgid "" "One other constant controls whether a method is loaded in place of another " "definition with the same method name." msgstr "" -#: ../../c-api/structures.rst:372 +#: ../../c-api/structures.rst:390 msgid "" "The method will be loaded in place of existing definitions. Without " "*METH_COEXIST*, the default is to skip repeated definitions. Since slot " @@ -377,48 +407,48 @@ msgid "" "calls." msgstr "" -#: ../../c-api/structures.rst:384 +#: ../../c-api/structures.rst:402 msgid "Accessing attributes of extension types" msgstr "" -#: ../../c-api/structures.rst:388 +#: ../../c-api/structures.rst:406 msgid "" "Structure which describes an attribute of a type which corresponds to a C " "struct member. Its fields are, in order:" msgstr "" -#: ../../c-api/structures.rst:393 +#: ../../c-api/structures.rst:411 msgid "" "Name of the member. A NULL value marks the end of a ``PyMemberDef[]`` array." msgstr "" -#: ../../c-api/structures.rst:396 +#: ../../c-api/structures.rst:414 msgid "The string should be static, no copy is made of it." msgstr "" -#: ../../c-api/structures.rst:400 +#: ../../c-api/structures.rst:418 msgid "" "The offset in bytes that the member is located on the type’s object struct." msgstr "" -#: ../../c-api/structures.rst:404 +#: ../../c-api/structures.rst:422 msgid "" "The type of the member in the C struct. See :ref:`PyMemberDef-types` for the " "possible values." msgstr "" -#: ../../c-api/structures.rst:409 +#: ../../c-api/structures.rst:427 msgid "" "Zero or more of the :ref:`PyMemberDef-flags`, combined using bitwise OR." msgstr "" -#: ../../c-api/structures.rst:413 +#: ../../c-api/structures.rst:431 msgid "" "The docstring, or NULL. The string should be static, no copy is made of it. " "Typically, it is defined using :c:macro:`PyDoc_STR`." msgstr "" -#: ../../c-api/structures.rst:417 +#: ../../c-api/structures.rst:435 msgid "" "By default (when :c:member:`flags` is ``0``), members allow both read and " "write access. Use the :c:macro:`Py_READONLY` flag for read-only access. " @@ -427,7 +457,7 @@ msgid "" "be deleted." msgstr "" -#: ../../c-api/structures.rst:426 +#: ../../c-api/structures.rst:444 msgid "" "For heap-allocated types (created using :c:func:`PyType_FromSpec` or " "similar), ``PyMemberDef`` may contain a definition for the special member " @@ -436,112 +466,112 @@ msgid "" "``Py_T_PYSSIZET`` and ``Py_READONLY``, for example::" msgstr "" -#: ../../c-api/structures.rst:438 +#: ../../c-api/structures.rst:456 msgid "(You may need to ``#include `` for :c:func:`!offsetof`.)" msgstr "" -#: ../../c-api/structures.rst:440 +#: ../../c-api/structures.rst:458 msgid "" "The legacy offsets :c:member:`~PyTypeObject.tp_dictoffset` and :c:member:" "`~PyTypeObject.tp_weaklistoffset` can be defined similarly using " "``\"__dictoffset__\"`` and ``\"__weaklistoffset__\"`` members, but " -"extensions are strongly encouraged to use :const:`Py_TPFLAGS_MANAGED_DICT` " -"and :const:`Py_TPFLAGS_MANAGED_WEAKREF` instead." +"extensions are strongly encouraged to use :c:macro:`Py_TPFLAGS_MANAGED_DICT` " +"and :c:macro:`Py_TPFLAGS_MANAGED_WEAKREF` instead." msgstr "" -#: ../../c-api/structures.rst:448 +#: ../../c-api/structures.rst:466 msgid "" "``PyMemberDef`` is always available. Previously, it required including " "``\"structmember.h\"``." msgstr "" -#: ../../c-api/structures.rst:453 +#: ../../c-api/structures.rst:471 msgid "" "Get an attribute belonging to the object at address *obj_addr*. The " "attribute is described by ``PyMemberDef`` *m*. Returns ``NULL`` on error." msgstr "" -#: ../../c-api/structures.rst:459 +#: ../../c-api/structures.rst:477 msgid "" "``PyMember_GetOne`` is always available. Previously, it required including " "``\"structmember.h\"``." msgstr "" -#: ../../c-api/structures.rst:464 +#: ../../c-api/structures.rst:482 msgid "" "Set an attribute belonging to the object at address *obj_addr* to object " "*o*. The attribute to set is described by ``PyMemberDef`` *m*. Returns " "``0`` if successful and a negative value on failure." msgstr "" -#: ../../c-api/structures.rst:470 +#: ../../c-api/structures.rst:488 msgid "" "``PyMember_SetOne`` is always available. Previously, it required including " "``\"structmember.h\"``." msgstr "" -#: ../../c-api/structures.rst:476 +#: ../../c-api/structures.rst:494 msgid "Member flags" msgstr "" -#: ../../c-api/structures.rst:478 +#: ../../c-api/structures.rst:496 msgid "The following flags can be used with :c:member:`PyMemberDef.flags`:" msgstr "" -#: ../../c-api/structures.rst:482 +#: ../../c-api/structures.rst:500 msgid "Not writable." msgstr "" -#: ../../c-api/structures.rst:486 +#: ../../c-api/structures.rst:504 msgid "" "Emit an ``object.__getattr__`` :ref:`audit event ` before " "reading." msgstr "" -#: ../../c-api/structures.rst:491 +#: ../../c-api/structures.rst:509 msgid "" "Indicates that the :c:member:`~PyMemberDef.offset` of this ``PyMemberDef`` " "entry indicates an offset from the subclass-specific data, rather than from " "``PyObject``." msgstr "" -#: ../../c-api/structures.rst:495 +#: ../../c-api/structures.rst:513 msgid "" "Can only be used as part of :c:member:`Py_tp_members ` :c:type:`slot ` when creating a class using " "negative :c:member:`~PyTypeDef.basicsize`. It is mandatory in that case." msgstr "" -#: ../../c-api/structures.rst:500 +#: ../../c-api/structures.rst:518 msgid "" "This flag is only used in :c:type:`PyTypeSlot`. When setting :c:member:" "`~PyTypeObject.tp_members` during class creation, Python clears it and sets :" "c:member:`PyMemberDef.offset` to the offset from the ``PyObject`` struct." msgstr "" -#: ../../c-api/structures.rst:512 +#: ../../c-api/structures.rst:530 msgid "" -"The :const:`!RESTRICTED`, :const:`!READ_RESTRICTED` and :const:`!" +"The :c:macro:`!RESTRICTED`, :c:macro:`!READ_RESTRICTED` and :c:macro:`!" "WRITE_RESTRICTED` macros available with ``#include \"structmember.h\"`` are " -"deprecated. :const:`!READ_RESTRICTED` and :const:`!RESTRICTED` are " -"equivalent to :const:`Py_AUDIT_READ`; :const:`!WRITE_RESTRICTED` does " +"deprecated. :c:macro:`!READ_RESTRICTED` and :c:macro:`!RESTRICTED` are " +"equivalent to :c:macro:`Py_AUDIT_READ`; :c:macro:`!WRITE_RESTRICTED` does " "nothing." msgstr "" -#: ../../c-api/structures.rst:523 +#: ../../c-api/structures.rst:541 msgid "" -"The :const:`!READONLY` macro was renamed to :const:`Py_READONLY`. The :const:" -"`!PY_AUDIT_READ` macro was renamed with the ``Py_`` prefix. The new names " -"are now always available. Previously, these required ``#include " +"The :c:macro:`!READONLY` macro was renamed to :c:macro:`Py_READONLY`. The :c:" +"macro:`!PY_AUDIT_READ` macro was renamed with the ``Py_`` prefix. The new " +"names are now always available. Previously, these required ``#include " "\"structmember.h\"``. The header is still available and it provides the old " "names." msgstr "" -#: ../../c-api/structures.rst:532 +#: ../../c-api/structures.rst:550 msgid "Member types" msgstr "" -#: ../../c-api/structures.rst:534 +#: ../../c-api/structures.rst:552 msgid "" ":c:member:`PyMemberDef.type` can be one of the following macros " "corresponding to various C types. When the member is accessed in Python, it " @@ -550,147 +580,147 @@ msgid "" "exception such as :exc:`TypeError` or :exc:`ValueError` is raised." msgstr "" -#: ../../c-api/structures.rst:542 +#: ../../c-api/structures.rst:560 msgid "" "Unless marked (D), attributes defined this way cannot be deleted using e.g. :" "keyword:`del` or :py:func:`delattr`." msgstr "" -#: ../../c-api/structures.rst:546 +#: ../../c-api/structures.rst:564 msgid "Macro name" msgstr "" -#: ../../c-api/structures.rst:546 +#: ../../c-api/structures.rst:564 msgid "C type" msgstr "" -#: ../../c-api/structures.rst:546 +#: ../../c-api/structures.rst:564 msgid "Python type" msgstr "" -#: ../../c-api/structures.rst:548 +#: ../../c-api/structures.rst:566 msgid ":c:expr:`char`" msgstr "" -#: ../../c-api/structures.rst:548 ../../c-api/structures.rst:549 -#: ../../c-api/structures.rst:550 ../../c-api/structures.rst:551 -#: ../../c-api/structures.rst:552 ../../c-api/structures.rst:553 -#: ../../c-api/structures.rst:554 ../../c-api/structures.rst:555 -#: ../../c-api/structures.rst:556 ../../c-api/structures.rst:557 -#: ../../c-api/structures.rst:558 +#: ../../c-api/structures.rst:566 ../../c-api/structures.rst:567 +#: ../../c-api/structures.rst:568 ../../c-api/structures.rst:569 +#: ../../c-api/structures.rst:570 ../../c-api/structures.rst:571 +#: ../../c-api/structures.rst:572 ../../c-api/structures.rst:573 +#: ../../c-api/structures.rst:574 ../../c-api/structures.rst:575 +#: ../../c-api/structures.rst:576 msgid ":py:class:`int`" msgstr ":py:class:`int`" -#: ../../c-api/structures.rst:549 +#: ../../c-api/structures.rst:567 msgid ":c:expr:`short`" msgstr ":c:expr:`short`" -#: ../../c-api/structures.rst:550 +#: ../../c-api/structures.rst:568 msgid ":c:expr:`int`" msgstr ":c:expr:`int`" -#: ../../c-api/structures.rst:551 +#: ../../c-api/structures.rst:569 msgid ":c:expr:`long`" msgstr ":c:expr:`long`" -#: ../../c-api/structures.rst:552 +#: ../../c-api/structures.rst:570 msgid ":c:expr:`long long`" msgstr ":c:expr:`long long`" -#: ../../c-api/structures.rst:553 +#: ../../c-api/structures.rst:571 msgid ":c:expr:`unsigned char`" msgstr ":c:expr:`unsigned char`" -#: ../../c-api/structures.rst:554 +#: ../../c-api/structures.rst:572 msgid ":c:expr:`unsigned int`" msgstr ":c:expr:`unsigned int`" -#: ../../c-api/structures.rst:555 +#: ../../c-api/structures.rst:573 msgid ":c:expr:`unsigned short`" msgstr ":c:expr:`unsigned short`" -#: ../../c-api/structures.rst:556 +#: ../../c-api/structures.rst:574 msgid ":c:expr:`unsigned long`" msgstr ":c:expr:`unsigned long`" -#: ../../c-api/structures.rst:557 +#: ../../c-api/structures.rst:575 msgid ":c:expr:`unsigned long long`" msgstr ":c:expr:`unsigned long long`" -#: ../../c-api/structures.rst:558 +#: ../../c-api/structures.rst:576 msgid ":c:expr:`Py_ssize_t`" msgstr ":c:expr:`Py_ssize_t`" -#: ../../c-api/structures.rst:559 +#: ../../c-api/structures.rst:577 msgid ":c:expr:`float`" msgstr ":c:expr:`float`" -#: ../../c-api/structures.rst:559 ../../c-api/structures.rst:560 +#: ../../c-api/structures.rst:577 ../../c-api/structures.rst:578 msgid ":py:class:`float`" msgstr ":py:class:`float`" -#: ../../c-api/structures.rst:560 +#: ../../c-api/structures.rst:578 msgid ":c:expr:`double`" msgstr ":c:expr:`double`" -#: ../../c-api/structures.rst:561 +#: ../../c-api/structures.rst:579 msgid ":c:expr:`char` (written as 0 or 1)" msgstr ":c:expr:`char` (寫成 0 或 1)" -#: ../../c-api/structures.rst:561 +#: ../../c-api/structures.rst:579 msgid ":py:class:`bool`" msgstr ":py:class:`bool`" -#: ../../c-api/structures.rst:563 +#: ../../c-api/structures.rst:581 msgid ":c:expr:`const char *` (*)" msgstr ":c:expr:`const char *` (*)" -#: ../../c-api/structures.rst:563 ../../c-api/structures.rst:564 +#: ../../c-api/structures.rst:581 ../../c-api/structures.rst:582 msgid ":py:class:`str` (RO)" msgstr ":py:class:`str` (RO)" -#: ../../c-api/structures.rst:564 +#: ../../c-api/structures.rst:582 msgid ":c:expr:`const char[]` (*)" msgstr ":c:expr:`const char[]` (*)" -#: ../../c-api/structures.rst:565 +#: ../../c-api/structures.rst:583 msgid ":c:expr:`char` (0-127)" msgstr ":c:expr:`char` (0-127)" -#: ../../c-api/structures.rst:565 +#: ../../c-api/structures.rst:583 msgid ":py:class:`str` (**)" msgstr ":py:class:`str` (**)" -#: ../../c-api/structures.rst:566 +#: ../../c-api/structures.rst:584 msgid ":c:expr:`PyObject *`" msgstr ":c:expr:`PyObject *`" -#: ../../c-api/structures.rst:566 +#: ../../c-api/structures.rst:584 msgid ":py:class:`object` (D)" msgstr ":py:class:`object` (D)" -#: ../../c-api/structures.rst:569 +#: ../../c-api/structures.rst:587 msgid "" "(*): Zero-terminated, UTF8-encoded C string. With :c:macro:`!Py_T_STRING` " "the C representation is a pointer; with :c:macro:`!Py_T_STRING_INLINE` the " "string is stored directly in the structure." msgstr "" -#: ../../c-api/structures.rst:574 +#: ../../c-api/structures.rst:592 msgid "(**): String of length 1. Only ASCII is accepted." msgstr "" -#: ../../c-api/structures.rst:576 +#: ../../c-api/structures.rst:594 msgid "(RO): Implies :c:macro:`Py_READONLY`." msgstr "" -#: ../../c-api/structures.rst:578 +#: ../../c-api/structures.rst:596 msgid "" "(D): Can be deleted, in which case the pointer is set to ``NULL``. Reading a " "``NULL`` pointer raises :py:exc:`AttributeError`." msgstr "" -#: ../../c-api/structures.rst:604 +#: ../../c-api/structures.rst:622 msgid "" "In previous versions, the macros were only available with ``#include " "\"structmember.h\"`` and were named without the ``Py_`` prefix (e.g. as " @@ -698,174 +728,174 @@ msgid "" "with the following deprecated types:" msgstr "" -#: ../../c-api/structures.rst:612 +#: ../../c-api/structures.rst:630 msgid "" "Like ``Py_T_OBJECT_EX``, but ``NULL`` is converted to ``None``. This results " "in surprising behavior in Python: deleting the attribute effectively sets it " "to ``None``." msgstr "" -#: ../../c-api/structures.rst:618 +#: ../../c-api/structures.rst:636 msgid "Always ``None``. Must be used with :c:macro:`Py_READONLY`." msgstr "" -#: ../../c-api/structures.rst:621 +#: ../../c-api/structures.rst:639 msgid "Defining Getters and Setters" msgstr "" -#: ../../c-api/structures.rst:625 +#: ../../c-api/structures.rst:643 msgid "" "Structure to define property-like access for a type. See also description of " "the :c:member:`PyTypeObject.tp_getset` slot." msgstr "" -#: ../../c-api/structures.rst:630 +#: ../../c-api/structures.rst:648 msgid "attribute name" msgstr "" -#: ../../c-api/structures.rst:634 +#: ../../c-api/structures.rst:652 msgid "C function to get the attribute." msgstr "" -#: ../../c-api/structures.rst:638 +#: ../../c-api/structures.rst:656 msgid "" "Optional C function to set or delete the attribute, if omitted the attribute " "is readonly." msgstr "" -#: ../../c-api/structures.rst:642 +#: ../../c-api/structures.rst:660 msgid "optional docstring" msgstr "" -#: ../../c-api/structures.rst:646 +#: ../../c-api/structures.rst:664 msgid "" "Optional function pointer, providing additional data for getter and setter." msgstr "" -#: ../../c-api/structures.rst:648 +#: ../../c-api/structures.rst:666 msgid "" "The ``get`` function takes one :c:expr:`PyObject*` parameter (the instance) " "and a function pointer (the associated ``closure``)::" msgstr "" -#: ../../c-api/structures.rst:653 +#: ../../c-api/structures.rst:671 msgid "" "It should return a new reference on success or ``NULL`` with a set exception " "on failure." msgstr "" -#: ../../c-api/structures.rst:656 +#: ../../c-api/structures.rst:674 msgid "" "``set`` functions take two :c:expr:`PyObject*` parameters (the instance and " "the value to be set) and a function pointer (the associated ``closure``)::" msgstr "" -#: ../../c-api/structures.rst:661 +#: ../../c-api/structures.rst:679 msgid "" "In case the attribute should be deleted the second parameter is ``NULL``. " "Should return ``0`` on success or ``-1`` with a set exception on failure." msgstr "" -#: ../../c-api/structures.rst:350 ../../c-api/structures.rst:360 +#: ../../c-api/structures.rst:368 ../../c-api/structures.rst:378 msgid "built-in function" msgstr "built-in function(內建函式)" -#: ../../c-api/structures.rst:350 +#: ../../c-api/structures.rst:368 msgid "classmethod" msgstr "classmethod" -#: ../../c-api/structures.rst:360 +#: ../../c-api/structures.rst:378 msgid "staticmethod" msgstr "staticmethod" -#: ../../c-api/structures.rst:505 +#: ../../c-api/structures.rst:523 msgid "READ_RESTRICTED" msgstr "READ_RESTRICTED" -#: ../../c-api/structures.rst:505 +#: ../../c-api/structures.rst:523 msgid "WRITE_RESTRICTED" msgstr "WRITE_RESTRICTED" -#: ../../c-api/structures.rst:505 +#: ../../c-api/structures.rst:523 msgid "RESTRICTED" msgstr "RESTRICTED" -#: ../../c-api/structures.rst:518 +#: ../../c-api/structures.rst:536 msgid "READONLY" msgstr "READONLY" -#: ../../c-api/structures.rst:581 +#: ../../c-api/structures.rst:599 msgid "T_BYTE" msgstr "T_BYTE" -#: ../../c-api/structures.rst:581 +#: ../../c-api/structures.rst:599 msgid "T_SHORT" msgstr "T_SHORT" -#: ../../c-api/structures.rst:581 +#: ../../c-api/structures.rst:599 msgid "T_INT" msgstr "T_INT" -#: ../../c-api/structures.rst:581 +#: ../../c-api/structures.rst:599 msgid "T_LONG" msgstr "T_LONG" -#: ../../c-api/structures.rst:581 +#: ../../c-api/structures.rst:599 msgid "T_LONGLONG" msgstr "T_LONGLONG" -#: ../../c-api/structures.rst:581 +#: ../../c-api/structures.rst:599 msgid "T_UBYTE" msgstr "T_UBYTE" -#: ../../c-api/structures.rst:581 +#: ../../c-api/structures.rst:599 msgid "T_USHORT" msgstr "T_USHORT" -#: ../../c-api/structures.rst:581 +#: ../../c-api/structures.rst:599 msgid "T_UINT" msgstr "T_UINT" -#: ../../c-api/structures.rst:581 +#: ../../c-api/structures.rst:599 msgid "T_ULONG" msgstr "T_ULONG" -#: ../../c-api/structures.rst:581 +#: ../../c-api/structures.rst:599 msgid "T_ULONGULONG" msgstr "T_ULONGULONG" -#: ../../c-api/structures.rst:581 +#: ../../c-api/structures.rst:599 msgid "T_PYSSIZET" msgstr "T_PYSSIZET" -#: ../../c-api/structures.rst:581 +#: ../../c-api/structures.rst:599 msgid "T_FLOAT" msgstr "T_FLOAT" -#: ../../c-api/structures.rst:581 +#: ../../c-api/structures.rst:599 msgid "T_DOUBLE" msgstr "T_DOUBLE" -#: ../../c-api/structures.rst:581 +#: ../../c-api/structures.rst:599 msgid "T_BOOL" msgstr "T_BOOL" -#: ../../c-api/structures.rst:581 +#: ../../c-api/structures.rst:599 msgid "T_CHAR" msgstr "T_CHAR" -#: ../../c-api/structures.rst:581 +#: ../../c-api/structures.rst:599 msgid "T_STRING" msgstr "T_STRING" -#: ../../c-api/structures.rst:581 +#: ../../c-api/structures.rst:599 msgid "T_STRING_INPLACE" msgstr "T_STRING_INPLACE" -#: ../../c-api/structures.rst:581 +#: ../../c-api/structures.rst:599 msgid "T_OBJECT_EX" msgstr "T_OBJECT_EX" -#: ../../c-api/structures.rst:581 +#: ../../c-api/structures.rst:599 msgid "structmember.h" msgstr "structmember.h" diff --git a/c-api/sys.po b/c-api/sys.po index 3ae4ed08ad..edb881a192 100644 --- a/c-api/sys.po +++ b/c-api/sys.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-17 17:39+0800\n" +"POT-Creation-Date: 2023-07-22 00:04+0000\n" "PO-Revision-Date: 2018-05-23 14:07+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -118,9 +118,9 @@ msgstr "" #: ../../c-api/sys.rst:99 msgid "" "Return true when the interpreter runs out of stack space. This is a " -"reliable check, but is only available when :const:`USE_STACKCHECK` is " +"reliable check, but is only available when :c:macro:`USE_STACKCHECK` is " "defined (currently on certain versions of Windows using the Microsoft Visual " -"C++ compiler). :const:`USE_STACKCHECK` will be defined automatically; you " +"C++ compiler). :c:macro:`USE_STACKCHECK` will be defined automatically; you " "should never change the definition in your own code." msgstr "" diff --git a/c-api/type.po b/c-api/type.po index 4a53443559..d599613b94 100644 --- a/c-api/type.po +++ b/c-api/type.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-17 17:39+0800\n" +"POT-Creation-Date: 2023-07-22 00:04+0000\n" "PO-Revision-Date: 2015-12-09 17:51+0000\n" "Last-Translator: Liang-Bo Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -149,7 +149,7 @@ msgstr "" #: ../../c-api/type.rst:134 msgid "" "Return true if the type object includes support for the cycle detector; this " -"tests the type flag :const:`Py_TPFLAGS_HAVE_GC`." +"tests the type flag :c:macro:`Py_TPFLAGS_HAVE_GC`." msgstr "" #: ../../c-api/type.rst:140 @@ -188,11 +188,12 @@ msgstr "" #: ../../c-api/type.rst:167 msgid "" "If some of the base classes implements the GC protocol and the provided type " -"does not include the :const:`Py_TPFLAGS_HAVE_GC` in its flags, then the GC " +"does not include the :c:macro:`Py_TPFLAGS_HAVE_GC` in its flags, then the GC " "protocol will be automatically implemented from its parents. On the " -"contrary, if the type being created does include :const:`Py_TPFLAGS_HAVE_GC` " -"in its flags then it **must** implement the GC protocol itself by at least " -"implementing the :c:member:`~PyTypeObject.tp_traverse` handle." +"contrary, if the type being created does include :c:macro:" +"`Py_TPFLAGS_HAVE_GC` in its flags then it **must** implement the GC protocol " +"itself by at least implementing the :c:member:`~PyTypeObject.tp_traverse` " +"handle." msgstr "" #: ../../c-api/type.rst:177 @@ -304,8 +305,8 @@ msgstr "" #: ../../c-api/type.rst:270 msgid "" -"Create and return a :ref:`heap type ` from the *spec* (see :" -"const:`Py_TPFLAGS_HEAPTYPE`)." +"Create and return a :ref:`heap type ` from the *spec* (see :c:" +"macro:`Py_TPFLAGS_HEAPTYPE`)." msgstr "" #: ../../c-api/type.rst:273 @@ -477,7 +478,7 @@ msgid "" msgstr "" #: ../../c-api/type.rst:423 -msgid "With the :const:`Py_TPFLAGS_ITEMS_AT_END` flag." +msgid "With the :c:macro:`Py_TPFLAGS_ITEMS_AT_END` flag." msgstr "" #: ../../c-api/type.rst:427 @@ -562,13 +563,13 @@ msgstr ":c:member:`~PyTypeObject.tp_vectorcall`" #: ../../c-api/type.rst:473 msgid "" -":c:member:`~PyTypeObject.tp_weaklistoffset` (use :const:" +":c:member:`~PyTypeObject.tp_weaklistoffset` (use :c:macro:" "`Py_TPFLAGS_MANAGED_WEAKREF` instead)" msgstr "" #: ../../c-api/type.rst:475 msgid "" -":c:member:`~PyTypeObject.tp_dictoffset` (use :const:" +":c:member:`~PyTypeObject.tp_dictoffset` (use :c:macro:" "`Py_TPFLAGS_MANAGED_DICT` instead)" msgstr "" diff --git a/c-api/typeobj.po b/c-api/typeobj.po index 62ca193f90..5fe4583d1c 100644 --- a/c-api/typeobj.po +++ b/c-api/typeobj.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-17 17:39+0800\n" +"POT-Creation-Date: 2023-07-22 00:04+0000\n" "PO-Revision-Date: 2018-05-23 14:33+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -1192,28 +1192,28 @@ msgstr "" #: ../../c-api/typeobj.rst:916 ../../c-api/typeobj.rst:936 #: ../../c-api/typeobj.rst:957 ../../c-api/typeobj.rst:983 #: ../../c-api/typeobj.rst:1002 ../../c-api/typeobj.rst:1018 -#: ../../c-api/typeobj.rst:1054 ../../c-api/typeobj.rst:1065 -#: ../../c-api/typeobj.rst:1075 ../../c-api/typeobj.rst:1085 -#: ../../c-api/typeobj.rst:1099 ../../c-api/typeobj.rst:1117 -#: ../../c-api/typeobj.rst:1140 ../../c-api/typeobj.rst:1155 -#: ../../c-api/typeobj.rst:1168 ../../c-api/typeobj.rst:1190 -#: ../../c-api/typeobj.rst:1234 ../../c-api/typeobj.rst:1255 -#: ../../c-api/typeobj.rst:1274 ../../c-api/typeobj.rst:1304 -#: ../../c-api/typeobj.rst:1326 ../../c-api/typeobj.rst:1352 -#: ../../c-api/typeobj.rst:1420 ../../c-api/typeobj.rst:1487 -#: ../../c-api/typeobj.rst:1546 ../../c-api/typeobj.rst:1582 -#: ../../c-api/typeobj.rst:1607 ../../c-api/typeobj.rst:1630 -#: ../../c-api/typeobj.rst:1643 ../../c-api/typeobj.rst:1658 -#: ../../c-api/typeobj.rst:1672 ../../c-api/typeobj.rst:1702 -#: ../../c-api/typeobj.rst:1734 ../../c-api/typeobj.rst:1760 -#: ../../c-api/typeobj.rst:1778 ../../c-api/typeobj.rst:1807 -#: ../../c-api/typeobj.rst:1851 ../../c-api/typeobj.rst:1868 -#: ../../c-api/typeobj.rst:1909 ../../c-api/typeobj.rst:1931 -#: ../../c-api/typeobj.rst:1963 ../../c-api/typeobj.rst:1991 -#: ../../c-api/typeobj.rst:2004 ../../c-api/typeobj.rst:2014 -#: ../../c-api/typeobj.rst:2031 ../../c-api/typeobj.rst:2048 -#: ../../c-api/typeobj.rst:2062 ../../c-api/typeobj.rst:2108 -#: ../../c-api/typeobj.rst:2131 +#: ../../c-api/typeobj.rst:1056 ../../c-api/typeobj.rst:1067 +#: ../../c-api/typeobj.rst:1077 ../../c-api/typeobj.rst:1087 +#: ../../c-api/typeobj.rst:1101 ../../c-api/typeobj.rst:1119 +#: ../../c-api/typeobj.rst:1142 ../../c-api/typeobj.rst:1157 +#: ../../c-api/typeobj.rst:1170 ../../c-api/typeobj.rst:1192 +#: ../../c-api/typeobj.rst:1236 ../../c-api/typeobj.rst:1257 +#: ../../c-api/typeobj.rst:1276 ../../c-api/typeobj.rst:1306 +#: ../../c-api/typeobj.rst:1328 ../../c-api/typeobj.rst:1354 +#: ../../c-api/typeobj.rst:1422 ../../c-api/typeobj.rst:1489 +#: ../../c-api/typeobj.rst:1548 ../../c-api/typeobj.rst:1584 +#: ../../c-api/typeobj.rst:1609 ../../c-api/typeobj.rst:1632 +#: ../../c-api/typeobj.rst:1645 ../../c-api/typeobj.rst:1660 +#: ../../c-api/typeobj.rst:1674 ../../c-api/typeobj.rst:1704 +#: ../../c-api/typeobj.rst:1736 ../../c-api/typeobj.rst:1762 +#: ../../c-api/typeobj.rst:1780 ../../c-api/typeobj.rst:1809 +#: ../../c-api/typeobj.rst:1853 ../../c-api/typeobj.rst:1870 +#: ../../c-api/typeobj.rst:1911 ../../c-api/typeobj.rst:1933 +#: ../../c-api/typeobj.rst:1965 ../../c-api/typeobj.rst:1993 +#: ../../c-api/typeobj.rst:2006 ../../c-api/typeobj.rst:2016 +#: ../../c-api/typeobj.rst:2033 ../../c-api/typeobj.rst:2050 +#: ../../c-api/typeobj.rst:2064 ../../c-api/typeobj.rst:2110 +#: ../../c-api/typeobj.rst:2133 msgid "**Inheritance:**" msgstr "" @@ -1244,10 +1244,10 @@ msgstr "" #: ../../c-api/typeobj.rst:528 ../../c-api/typeobj.rst:709 #: ../../c-api/typeobj.rst:826 ../../c-api/typeobj.rst:918 -#: ../../c-api/typeobj.rst:938 ../../c-api/typeobj.rst:1609 -#: ../../c-api/typeobj.rst:1632 ../../c-api/typeobj.rst:1762 -#: ../../c-api/typeobj.rst:1780 ../../c-api/typeobj.rst:1853 -#: ../../c-api/typeobj.rst:1965 ../../c-api/typeobj.rst:2110 +#: ../../c-api/typeobj.rst:938 ../../c-api/typeobj.rst:1611 +#: ../../c-api/typeobj.rst:1634 ../../c-api/typeobj.rst:1764 +#: ../../c-api/typeobj.rst:1782 ../../c-api/typeobj.rst:1855 +#: ../../c-api/typeobj.rst:1967 ../../c-api/typeobj.rst:2112 msgid "This field is inherited by subtypes." msgstr "" @@ -1426,25 +1426,25 @@ msgid "" "all memory buffers owned by the instance (using the freeing function " "corresponding to the allocation function used to allocate the buffer), and " "call the type's :c:member:`~PyTypeObject.tp_free` function. If the type is " -"not subtypable (doesn't have the :const:`Py_TPFLAGS_BASETYPE` flag bit set), " -"it is permissible to call the object deallocator directly instead of via :c:" -"member:`~PyTypeObject.tp_free`. The object deallocator should be the one " -"used to allocate the instance; this is normally :c:func:`PyObject_Del` if " -"the instance was allocated using :c:func:`PyObject_New` or :c:func:" +"not subtypable (doesn't have the :c:macro:`Py_TPFLAGS_BASETYPE` flag bit " +"set), it is permissible to call the object deallocator directly instead of " +"via :c:member:`~PyTypeObject.tp_free`. The object deallocator should be the " +"one used to allocate the instance; this is normally :c:func:`PyObject_Del` " +"if the instance was allocated using :c:func:`PyObject_New` or :c:func:" "`PyObject_VarNew`, or :c:func:`PyObject_GC_Del` if the instance was " "allocated using :c:func:`PyObject_GC_New` or :c:func:`PyObject_GC_NewVar`." msgstr "" #: ../../c-api/typeobj.rst:680 msgid "" -"If the type supports garbage collection (has the :const:`Py_TPFLAGS_HAVE_GC` " -"flag bit set), the destructor should call :c:func:`PyObject_GC_UnTrack` " -"before clearing any member fields." +"If the type supports garbage collection (has the :c:macro:" +"`Py_TPFLAGS_HAVE_GC` flag bit set), the destructor should call :c:func:" +"`PyObject_GC_UnTrack` before clearing any member fields." msgstr "" #: ../../c-api/typeobj.rst:692 msgid "" -"Finally, if the type is heap allocated (:const:`Py_TPFLAGS_HEAPTYPE`), the " +"Finally, if the type is heap allocated (:c:macro:`Py_TPFLAGS_HEAPTYPE`), the " "deallocator should decrement the reference count for its type object after " "calling the type deallocator. In order to avoid dangling pointers, the " "recommended way to achieve this is:" @@ -1459,7 +1459,7 @@ msgstr "" #: ../../c-api/typeobj.rst:719 msgid "" -"This field is only used if the flag :const:`Py_TPFLAGS_HAVE_VECTORCALL` is " +"This field is only used if the flag :c:macro:`Py_TPFLAGS_HAVE_VECTORCALL` is " "set. If so, this must be a positive integer containing the offset in the " "instance of a :c:type:`vectorcallfunc` pointer." msgstr "" @@ -1467,7 +1467,7 @@ msgstr "" #: ../../c-api/typeobj.rst:723 msgid "" "The *vectorcallfunc* pointer may be ``NULL``, in which case the instance " -"behaves as if :const:`Py_TPFLAGS_HAVE_VECTORCALL` was not set: calling the " +"behaves as if :c:macro:`Py_TPFLAGS_HAVE_VECTORCALL` was not set: calling the " "instance falls back to :c:member:`~PyTypeObject.tp_call`." msgstr "" @@ -1491,13 +1491,13 @@ msgid "" "` to implement the vectorcall protocol. When a user sets :attr:" "`~type.__call__` in Python code, only *tp_call* is updated, likely making it " "inconsistent with the vectorcall function. Since 3.12, setting ``__call__`` " -"will disable vectorcall optimization by clearing the :const:" +"will disable vectorcall optimization by clearing the :c:macro:" "`Py_TPFLAGS_HAVE_VECTORCALL` flag." msgstr "" #: ../../c-api/typeobj.rst:750 msgid "" -"This field is always inherited. However, the :const:" +"This field is always inherited. However, the :c:macro:" "`Py_TPFLAGS_HAVE_VECTORCALL` flag is not always inherited. If it's not set, " "then the subclass won't use :ref:`vectorcall `, except when :c:" "func:`PyVectorcall_Call` is explicitly called." @@ -1592,12 +1592,12 @@ msgstr "" #: ../../c-api/typeobj.rst:828 ../../c-api/typeobj.rst:940 #: ../../c-api/typeobj.rst:965 ../../c-api/typeobj.rst:991 -#: ../../c-api/typeobj.rst:1032 ../../c-api/typeobj.rst:1555 -#: ../../c-api/typeobj.rst:1589 ../../c-api/typeobj.rst:1706 -#: ../../c-api/typeobj.rst:1739 ../../c-api/typeobj.rst:1814 -#: ../../c-api/typeobj.rst:1855 ../../c-api/typeobj.rst:1873 -#: ../../c-api/typeobj.rst:1915 ../../c-api/typeobj.rst:1936 -#: ../../c-api/typeobj.rst:1967 +#: ../../c-api/typeobj.rst:1032 ../../c-api/typeobj.rst:1557 +#: ../../c-api/typeobj.rst:1591 ../../c-api/typeobj.rst:1708 +#: ../../c-api/typeobj.rst:1741 ../../c-api/typeobj.rst:1816 +#: ../../c-api/typeobj.rst:1857 ../../c-api/typeobj.rst:1875 +#: ../../c-api/typeobj.rst:1917 ../../c-api/typeobj.rst:1938 +#: ../../c-api/typeobj.rst:1969 msgid "**Default:**" msgstr "**預設:**" @@ -1682,7 +1682,7 @@ msgid "" "`PyObject_HashNotImplemented`." msgstr "" -#: ../../c-api/typeobj.rst:900 ../../c-api/typeobj.rst:1548 +#: ../../c-api/typeobj.rst:900 ../../c-api/typeobj.rst:1550 msgid "Group: :attr:`tp_hash`, :attr:`tp_richcompare`" msgstr "" @@ -1814,9 +1814,9 @@ msgid "" "this flag bit. The flag bits that pertain to extension structures are " "strictly inherited if the extension structure is inherited, i.e. the base " "type's value of the flag bit is copied into the subtype together with a " -"pointer to the extension structure. The :const:`Py_TPFLAGS_HAVE_GC` flag " +"pointer to the extension structure. The :c:macro:`Py_TPFLAGS_HAVE_GC` flag " "bit is inherited together with the :c:member:`~PyTypeObject.tp_traverse` " -"and :c:member:`~PyTypeObject.tp_clear` fields, i.e. if the :const:" +"and :c:member:`~PyTypeObject.tp_clear` fields, i.e. if the :c:macro:" "`Py_TPFLAGS_HAVE_GC` flag bit is clear in the subtype and the :c:member:" "`~PyTypeObject.tp_traverse` and :c:member:`~PyTypeObject.tp_clear` fields in " "the subtype exist and have ``NULL`` values. .. XXX are most flag bits " @@ -1833,7 +1833,7 @@ msgstr "" msgid "**Bit Masks:**" msgstr "" -#: ../../c-api/typeobj.rst:1039 +#: ../../c-api/typeobj.rst:1041 msgid "" "The following bit masks are currently defined; these can be ORed together " "using the ``|`` operator to form the value of the :c:member:`~PyTypeObject." @@ -1842,7 +1842,7 @@ msgid "" "zero." msgstr "" -#: ../../c-api/typeobj.rst:1046 +#: ../../c-api/typeobj.rst:1048 msgid "" "This bit is set when the type object itself is allocated on the heap, for " "example, types created dynamically using :c:func:`PyType_FromSpec`. In this " @@ -1853,32 +1853,32 @@ msgid "" "gets INCREF'ed or DECREF'ed)." msgstr "" -#: ../../c-api/typeobj.rst:1056 ../../c-api/typeobj.rst:1067 -#: ../../c-api/typeobj.rst:1077 ../../c-api/typeobj.rst:1087 -#: ../../c-api/typeobj.rst:1119 +#: ../../c-api/typeobj.rst:1058 ../../c-api/typeobj.rst:1069 +#: ../../c-api/typeobj.rst:1079 ../../c-api/typeobj.rst:1089 +#: ../../c-api/typeobj.rst:1121 msgid "???" msgstr "" -#: ../../c-api/typeobj.rst:1061 +#: ../../c-api/typeobj.rst:1063 msgid "" "This bit is set when the type can be used as the base type of another type. " "If this bit is clear, the type cannot be subtyped (similar to a \"final\" " "class in Java)." msgstr "" -#: ../../c-api/typeobj.rst:1072 +#: ../../c-api/typeobj.rst:1074 msgid "" "This bit is set when the type object has been fully initialized by :c:func:" "`PyType_Ready`." msgstr "" -#: ../../c-api/typeobj.rst:1082 +#: ../../c-api/typeobj.rst:1084 msgid "" "This bit is set while :c:func:`PyType_Ready` is in the process of " "initializing the type object." msgstr "" -#: ../../c-api/typeobj.rst:1092 +#: ../../c-api/typeobj.rst:1094 msgid "" "This bit is set when the object supports garbage collection. If this bit is " "set, instances must be created using :c:func:`PyObject_GC_New` and destroyed " @@ -1888,114 +1888,114 @@ msgid "" "tp_clear` are present in the type object." msgstr "" -#: ../../c-api/typeobj.rst:1101 ../../c-api/typeobj.rst:1422 -#: ../../c-api/typeobj.rst:1489 +#: ../../c-api/typeobj.rst:1103 ../../c-api/typeobj.rst:1424 +#: ../../c-api/typeobj.rst:1491 msgid "" -"Group: :const:`Py_TPFLAGS_HAVE_GC`, :attr:`tp_traverse`, :attr:`tp_clear`" +"Group: :c:macro:`Py_TPFLAGS_HAVE_GC`, :attr:`tp_traverse`, :attr:`tp_clear`" msgstr "" -#: ../../c-api/typeobj.rst:1103 +#: ../../c-api/typeobj.rst:1105 msgid "" -"The :const:`Py_TPFLAGS_HAVE_GC` flag bit is inherited together with the :" -"attr:`tp_traverse` and :attr:`tp_clear` fields, i.e. if the :const:" +"The :c:macro:`Py_TPFLAGS_HAVE_GC` flag bit is inherited together with the :" +"attr:`tp_traverse` and :attr:`tp_clear` fields, i.e. if the :c:macro:" "`Py_TPFLAGS_HAVE_GC` flag bit is clear in the subtype and the :attr:" "`tp_traverse` and :attr:`tp_clear` fields in the subtype exist and have " "``NULL`` values." msgstr "" -#: ../../c-api/typeobj.rst:1113 +#: ../../c-api/typeobj.rst:1115 msgid "" "This is a bitmask of all the bits that pertain to the existence of certain " "fields in the type object and its extension structures. Currently, it " -"includes the following bits: :const:`Py_TPFLAGS_HAVE_STACKLESS_EXTENSION`." +"includes the following bits: :c:macro:`Py_TPFLAGS_HAVE_STACKLESS_EXTENSION`." msgstr "" -#: ../../c-api/typeobj.rst:1124 +#: ../../c-api/typeobj.rst:1126 msgid "This bit indicates that objects behave like unbound methods." msgstr "" -#: ../../c-api/typeobj.rst:1126 +#: ../../c-api/typeobj.rst:1128 msgid "If this flag is set for ``type(meth)``, then:" msgstr "" -#: ../../c-api/typeobj.rst:1128 +#: ../../c-api/typeobj.rst:1130 msgid "" "``meth.__get__(obj, cls)(*args, **kwds)`` (with ``obj`` not None) must be " "equivalent to ``meth(obj, *args, **kwds)``." msgstr "" -#: ../../c-api/typeobj.rst:1131 +#: ../../c-api/typeobj.rst:1133 msgid "" "``meth.__get__(None, cls)(*args, **kwds)`` must be equivalent to " "``meth(*args, **kwds)``." msgstr "" -#: ../../c-api/typeobj.rst:1134 +#: ../../c-api/typeobj.rst:1136 msgid "" "This flag enables an optimization for typical method calls like ``obj." "meth()``: it avoids creating a temporary \"bound method\" object for ``obj." "meth``." msgstr "" -#: ../../c-api/typeobj.rst:1142 +#: ../../c-api/typeobj.rst:1144 msgid "" -"This flag is never inherited by types without the :const:" +"This flag is never inherited by types without the :c:macro:" "`Py_TPFLAGS_IMMUTABLETYPE` flag set. For extension types, it is inherited " "whenever :c:member:`~PyTypeObject.tp_descr_get` is inherited." msgstr "" -#: ../../c-api/typeobj.rst:1148 +#: ../../c-api/typeobj.rst:1150 msgid "" "This bit indicates that instances of the class have a ``__dict__`` " "attribute, and that the space for the dictionary is managed by the VM." msgstr "" -#: ../../c-api/typeobj.rst:1151 -msgid "If this flag is set, :const:`Py_TPFLAGS_HAVE_GC` should also be set." +#: ../../c-api/typeobj.rst:1153 +msgid "If this flag is set, :c:macro:`Py_TPFLAGS_HAVE_GC` should also be set." msgstr "" -#: ../../c-api/typeobj.rst:1157 +#: ../../c-api/typeobj.rst:1159 msgid "" "This flag is inherited unless the :c:member:`~PyTypeObject.tp_dictoffset` " "field is set in a superclass." msgstr "" -#: ../../c-api/typeobj.rst:1163 +#: ../../c-api/typeobj.rst:1165 msgid "" "This bit indicates that instances of the class should be weakly " "referenceable." msgstr "" -#: ../../c-api/typeobj.rst:1170 +#: ../../c-api/typeobj.rst:1172 msgid "" "This flag is inherited unless the :c:member:`~PyTypeObject." "tp_weaklistoffset` field is set in a superclass." msgstr "" -#: ../../c-api/typeobj.rst:1176 +#: ../../c-api/typeobj.rst:1178 msgid "" "Only usable with variable-size types, i.e. ones with non-zero :c:member:" "`~PyObject.tp_itemsize`." msgstr "" -#: ../../c-api/typeobj.rst:1179 +#: ../../c-api/typeobj.rst:1181 msgid "" "Indicates that the variable-sized portion of an instance of this type is at " "the end of the instance's memory area, at an offset of :c:expr:`Py_TYPE(obj)-" ">tp_basicsize` (which may be different in each subclass)." msgstr "" -#: ../../c-api/typeobj.rst:1184 +#: ../../c-api/typeobj.rst:1186 msgid "" "When setting this flag, be sure that all superclasses either use this memory " "layout, or are not variable-sized. Python does not check this." msgstr "" -#: ../../c-api/typeobj.rst:1192 +#: ../../c-api/typeobj.rst:1194 msgid "This flag is inherited." msgstr "" -#: ../../c-api/typeobj.rst:1206 +#: ../../c-api/typeobj.rst:1208 msgid "" "These flags are used by functions such as :c:func:`PyLong_Check` to quickly " "determine if a type is a subclass of a built-in type; such specific checks " @@ -2005,90 +2005,90 @@ msgid "" "behave differently depending on what kind of check is used." msgstr "" -#: ../../c-api/typeobj.rst:1217 +#: ../../c-api/typeobj.rst:1219 msgid "" "This bit is set when the :c:member:`~PyTypeObject.tp_finalize` slot is " "present in the type structure." msgstr "" -#: ../../c-api/typeobj.rst:1222 +#: ../../c-api/typeobj.rst:1224 msgid "" "This flag isn't necessary anymore, as the interpreter assumes the :c:member:" "`~PyTypeObject.tp_finalize` slot is always present in the type structure." msgstr "" -#: ../../c-api/typeobj.rst:1230 +#: ../../c-api/typeobj.rst:1232 msgid "" "This bit is set when the class implements the :ref:`vectorcall protocol " "`. See :c:member:`~PyTypeObject.tp_vectorcall_offset` for " "details." msgstr "" -#: ../../c-api/typeobj.rst:1236 +#: ../../c-api/typeobj.rst:1238 msgid "" "This bit is inherited if :c:member:`~PyTypeObject.tp_call` is also inherited." msgstr "" -#: ../../c-api/typeobj.rst:1243 +#: ../../c-api/typeobj.rst:1245 msgid "" "This flag is now removed from a class when the class's :py:meth:`~object." "__call__` method is reassigned." msgstr "" -#: ../../c-api/typeobj.rst:1246 +#: ../../c-api/typeobj.rst:1248 msgid "This flag can now be inherited by mutable classes." msgstr "" -#: ../../c-api/typeobj.rst:1250 +#: ../../c-api/typeobj.rst:1252 msgid "" "This bit is set for type objects that are immutable: type attributes cannot " "be set nor deleted." msgstr "" -#: ../../c-api/typeobj.rst:1252 +#: ../../c-api/typeobj.rst:1254 msgid "" ":c:func:`PyType_Ready` automatically applies this flag to :ref:`static types " "`." msgstr "" -#: ../../c-api/typeobj.rst:1257 +#: ../../c-api/typeobj.rst:1259 msgid "This flag is not inherited." msgstr "" -#: ../../c-api/typeobj.rst:1263 +#: ../../c-api/typeobj.rst:1265 msgid "" "Disallow creating instances of the type: set :c:member:`~PyTypeObject." "tp_new` to NULL and don't create the ``__new__`` key in the type dictionary." msgstr "" -#: ../../c-api/typeobj.rst:1267 +#: ../../c-api/typeobj.rst:1269 msgid "" "The flag must be set before creating the type, not after. For example, it " "must be set before :c:func:`PyType_Ready` is called on the type." msgstr "" -#: ../../c-api/typeobj.rst:1270 +#: ../../c-api/typeobj.rst:1272 msgid "" "The flag is set automatically on :ref:`static types ` if :c:" "member:`~PyTypeObject.tp_base` is NULL or ``&PyBaseObject_Type`` and :c:" "member:`~PyTypeObject.tp_new` is NULL." msgstr "" -#: ../../c-api/typeobj.rst:1276 +#: ../../c-api/typeobj.rst:1278 msgid "" "This flag is not inherited. However, subclasses will not be instantiable " "unless they provide a non-NULL :c:member:`~PyTypeObject.tp_new` (which is " "only possible via the C API)." msgstr "" -#: ../../c-api/typeobj.rst:1283 +#: ../../c-api/typeobj.rst:1285 msgid "" "To disallow instantiating a class directly but allow instantiating its " "subclasses (e.g. for an :term:`abstract base class`), do not use this flag. " "Instead, make :c:member:`~PyTypeObject.tp_new` only succeed for subclasses." msgstr "" -#: ../../c-api/typeobj.rst:1294 +#: ../../c-api/typeobj.rst:1296 msgid "" "This bit indicates that instances of the class may match mapping patterns " "when used as the subject of a :keyword:`match` block. It is automatically " @@ -2096,23 +2096,23 @@ msgid "" "unset when registering :class:`collections.abc.Sequence`." msgstr "" -#: ../../c-api/typeobj.rst:1301 ../../c-api/typeobj.rst:1323 +#: ../../c-api/typeobj.rst:1303 ../../c-api/typeobj.rst:1325 msgid "" -":const:`Py_TPFLAGS_MAPPING` and :const:`Py_TPFLAGS_SEQUENCE` are mutually " -"exclusive; it is an error to enable both flags simultaneously." +":c:macro:`Py_TPFLAGS_MAPPING` and :c:macro:`Py_TPFLAGS_SEQUENCE` are " +"mutually exclusive; it is an error to enable both flags simultaneously." msgstr "" -#: ../../c-api/typeobj.rst:1306 +#: ../../c-api/typeobj.rst:1308 msgid "" -"This flag is inherited by types that do not already set :const:" +"This flag is inherited by types that do not already set :c:macro:" "`Py_TPFLAGS_SEQUENCE`." msgstr "" -#: ../../c-api/typeobj.rst:1309 ../../c-api/typeobj.rst:1331 +#: ../../c-api/typeobj.rst:1311 ../../c-api/typeobj.rst:1333 msgid ":pep:`634` -- Structural Pattern Matching: Specification" msgstr "" -#: ../../c-api/typeobj.rst:1316 +#: ../../c-api/typeobj.rst:1318 msgid "" "This bit indicates that instances of the class may match sequence patterns " "when used as the subject of a :keyword:`match` block. It is automatically " @@ -2120,49 +2120,49 @@ msgid "" "unset when registering :class:`collections.abc.Mapping`." msgstr "" -#: ../../c-api/typeobj.rst:1328 +#: ../../c-api/typeobj.rst:1330 msgid "" -"This flag is inherited by types that do not already set :const:" +"This flag is inherited by types that do not already set :c:macro:" "`Py_TPFLAGS_MAPPING`." msgstr "" -#: ../../c-api/typeobj.rst:1338 +#: ../../c-api/typeobj.rst:1340 msgid "" "Internal. Do not set or unset this flag. To indicate that a class has " "changed call :c:func:`PyType_Modified`" msgstr "" -#: ../../c-api/typeobj.rst:1342 +#: ../../c-api/typeobj.rst:1344 msgid "" "This flag is present in header files, but is an internal feature and should " "not be used. It will be removed in a future version of CPython" msgstr "" -#: ../../c-api/typeobj.rst:1348 +#: ../../c-api/typeobj.rst:1350 msgid "" "An optional pointer to a NUL-terminated C string giving the docstring for " "this type object. This is exposed as the :attr:`__doc__` attribute on the " "type and instances of the type." msgstr "" -#: ../../c-api/typeobj.rst:1354 +#: ../../c-api/typeobj.rst:1356 msgid "This field is *not* inherited by subtypes." msgstr "" -#: ../../c-api/typeobj.rst:1359 +#: ../../c-api/typeobj.rst:1361 msgid "" "An optional pointer to a traversal function for the garbage collector. This " -"is only used if the :const:`Py_TPFLAGS_HAVE_GC` flag bit is set. The " +"is only used if the :c:macro:`Py_TPFLAGS_HAVE_GC` flag bit is set. The " "signature is::" msgstr "" -#: ../../c-api/typeobj.rst:1364 ../../c-api/typeobj.rst:1484 +#: ../../c-api/typeobj.rst:1366 ../../c-api/typeobj.rst:1486 msgid "" "More information about Python's garbage collection scheme can be found in " "section :ref:`supporting-cycle-detection`." msgstr "" -#: ../../c-api/typeobj.rst:1367 +#: ../../c-api/typeobj.rst:1369 msgid "" "The :c:member:`~PyTypeObject.tp_traverse` pointer is used by the garbage " "collector to detect reference cycles. A typical implementation of a :c:" @@ -2172,7 +2172,7 @@ msgid "" "`_thread` extension module::" msgstr "" -#: ../../c-api/typeobj.rst:1382 +#: ../../c-api/typeobj.rst:1384 msgid "" "Note that :c:func:`Py_VISIT` is called only on those members that can " "participate in reference cycles. Although there is also a ``self->key`` " @@ -2180,14 +2180,14 @@ msgid "" "part of a reference cycle." msgstr "" -#: ../../c-api/typeobj.rst:1386 +#: ../../c-api/typeobj.rst:1388 msgid "" "On the other hand, even if you know a member can never be part of a cycle, " "as a debugging aid you may want to visit it anyway just so the :mod:`gc` " "module's :func:`~gc.get_referents` function will include it." msgstr "" -#: ../../c-api/typeobj.rst:1391 +#: ../../c-api/typeobj.rst:1393 msgid "" "When implementing :c:member:`~PyTypeObject.tp_traverse`, only the members " "that the instance *owns* (by having :term:`strong references ` hold a reference to " "their type. Their traversal function must therefore either visit :c:func:" @@ -2216,29 +2216,29 @@ msgid "" "superclass). If they do not, the type object may not be garbage-collected." msgstr "" -#: ../../c-api/typeobj.rst:1415 +#: ../../c-api/typeobj.rst:1417 msgid "" "Heap-allocated types are expected to visit ``Py_TYPE(self)`` in " "``tp_traverse``. In earlier versions of Python, due to `bug 40217 `_, doing this may lead to crashes in subclasses." msgstr "" -#: ../../c-api/typeobj.rst:1424 +#: ../../c-api/typeobj.rst:1426 msgid "" "This field is inherited by subtypes together with :c:member:`~PyTypeObject." -"tp_clear` and the :const:`Py_TPFLAGS_HAVE_GC` flag bit: the flag bit, :c:" +"tp_clear` and the :c:macro:`Py_TPFLAGS_HAVE_GC` flag bit: the flag bit, :c:" "member:`~PyTypeObject.tp_traverse`, and :c:member:`~PyTypeObject.tp_clear` " "are all inherited from the base type if they are all zero in the subtype." msgstr "" -#: ../../c-api/typeobj.rst:1432 +#: ../../c-api/typeobj.rst:1434 msgid "" "An optional pointer to a clear function for the garbage collector. This is " -"only used if the :const:`Py_TPFLAGS_HAVE_GC` flag bit is set. The signature " -"is::" +"only used if the :c:macro:`Py_TPFLAGS_HAVE_GC` flag bit is set. The " +"signature is::" msgstr "" -#: ../../c-api/typeobj.rst:1437 +#: ../../c-api/typeobj.rst:1439 msgid "" "The :c:member:`~PyTypeObject.tp_clear` member function is used to break " "reference cycles in cyclic garbage detected by the garbage collector. Taken " @@ -2253,7 +2253,7 @@ msgid "" "good reason to avoid implementing :c:member:`~PyTypeObject.tp_clear`." msgstr "" -#: ../../c-api/typeobj.rst:1447 +#: ../../c-api/typeobj.rst:1449 msgid "" "Implementations of :c:member:`~PyTypeObject.tp_clear` should drop the " "instance's references to those of its members that may be Python objects, " @@ -2261,7 +2261,7 @@ msgid "" "example::" msgstr "" -#: ../../c-api/typeobj.rst:1461 +#: ../../c-api/typeobj.rst:1463 msgid "" "The :c:func:`Py_CLEAR` macro should be used, because clearing references is " "delicate: the reference to the contained object must not be decremented " @@ -2276,7 +2276,7 @@ msgid "" "in a safe order." msgstr "" -#: ../../c-api/typeobj.rst:1472 +#: ../../c-api/typeobj.rst:1474 msgid "" "Note that :c:member:`~PyTypeObject.tp_clear` is not *always* called before " "an instance is deallocated. For example, when reference counting is enough " @@ -2284,7 +2284,7 @@ msgid "" "is not involved and :c:member:`~PyTypeObject.tp_dealloc` is called directly." msgstr "" -#: ../../c-api/typeobj.rst:1478 +#: ../../c-api/typeobj.rst:1480 msgid "" "Because the goal of :c:member:`~PyTypeObject.tp_clear` functions is to break " "reference cycles, it's not necessary to clear contained objects like Python " @@ -2294,26 +2294,26 @@ msgid "" "invoke :c:member:`~PyTypeObject.tp_clear`." msgstr "" -#: ../../c-api/typeobj.rst:1491 +#: ../../c-api/typeobj.rst:1493 msgid "" "This field is inherited by subtypes together with :c:member:`~PyTypeObject." -"tp_traverse` and the :const:`Py_TPFLAGS_HAVE_GC` flag bit: the flag bit, :c:" -"member:`~PyTypeObject.tp_traverse`, and :c:member:`~PyTypeObject.tp_clear` " +"tp_traverse` and the :c:macro:`Py_TPFLAGS_HAVE_GC` flag bit: the flag bit, :" +"c:member:`~PyTypeObject.tp_traverse`, and :c:member:`~PyTypeObject.tp_clear` " "are all inherited from the base type if they are all zero in the subtype." msgstr "" -#: ../../c-api/typeobj.rst:1499 +#: ../../c-api/typeobj.rst:1501 msgid "" "An optional pointer to the rich comparison function, whose signature is::" msgstr "" -#: ../../c-api/typeobj.rst:1503 +#: ../../c-api/typeobj.rst:1505 msgid "" "The first parameter is guaranteed to be an instance of the type that is " "defined by :c:type:`PyTypeObject`." msgstr "" -#: ../../c-api/typeobj.rst:1506 +#: ../../c-api/typeobj.rst:1508 msgid "" "The function should return the result of the comparison (usually ``Py_True`` " "or ``Py_False``). If the comparison is undefined, it must return " @@ -2321,74 +2321,80 @@ msgid "" "set an exception condition." msgstr "" -#: ../../c-api/typeobj.rst:1511 +#: ../../c-api/typeobj.rst:1513 msgid "" "The following constants are defined to be used as the third argument for :c:" "member:`~PyTypeObject.tp_richcompare` and for :c:func:`PyObject_RichCompare`:" msgstr "" -#: ../../c-api/typeobj.rst:1515 +#: ../../c-api/typeobj.rst:1517 msgid "Constant" msgstr "常數" -#: ../../c-api/typeobj.rst:1515 +#: ../../c-api/typeobj.rst:1517 msgid "Comparison" msgstr "" -#: ../../c-api/typeobj.rst:1517 -msgid ":const:`Py_LT`" +#: ../../c-api/typeobj.rst:1519 +#, fuzzy +msgid ":c:macro:`Py_LT`" msgstr ":const:`Py_LT`" -#: ../../c-api/typeobj.rst:1517 +#: ../../c-api/typeobj.rst:1519 msgid "``<``" msgstr "``<``" -#: ../../c-api/typeobj.rst:1519 -msgid ":const:`Py_LE`" +#: ../../c-api/typeobj.rst:1521 +#, fuzzy +msgid ":c:macro:`Py_LE`" msgstr ":const:`Py_LE`" -#: ../../c-api/typeobj.rst:1519 +#: ../../c-api/typeobj.rst:1521 msgid "``<=``" msgstr "``<=``" -#: ../../c-api/typeobj.rst:1521 -msgid ":const:`Py_EQ`" +#: ../../c-api/typeobj.rst:1523 +#, fuzzy +msgid ":c:macro:`Py_EQ`" msgstr ":const:`Py_EQ`" -#: ../../c-api/typeobj.rst:1521 +#: ../../c-api/typeobj.rst:1523 msgid "``==``" msgstr "``==``" -#: ../../c-api/typeobj.rst:1523 -msgid ":const:`Py_NE`" +#: ../../c-api/typeobj.rst:1525 +#, fuzzy +msgid ":c:macro:`Py_NE`" msgstr ":const:`Py_NE`" -#: ../../c-api/typeobj.rst:1523 +#: ../../c-api/typeobj.rst:1525 msgid "``!=``" msgstr "``!=``" -#: ../../c-api/typeobj.rst:1525 -msgid ":const:`Py_GT`" +#: ../../c-api/typeobj.rst:1527 +#, fuzzy +msgid ":c:macro:`Py_GT`" msgstr ":const:`Py_GT`" -#: ../../c-api/typeobj.rst:1525 +#: ../../c-api/typeobj.rst:1527 msgid "``>``" msgstr "``>``" -#: ../../c-api/typeobj.rst:1527 -msgid ":const:`Py_GE`" +#: ../../c-api/typeobj.rst:1529 +#, fuzzy +msgid ":c:macro:`Py_GE`" msgstr ":const:`Py_GE`" -#: ../../c-api/typeobj.rst:1527 +#: ../../c-api/typeobj.rst:1529 msgid "``>=``" msgstr "``>=``" -#: ../../c-api/typeobj.rst:1530 +#: ../../c-api/typeobj.rst:1532 msgid "" "The following macro is defined to ease writing rich comparison functions:" msgstr "" -#: ../../c-api/typeobj.rst:1534 +#: ../../c-api/typeobj.rst:1536 msgid "" "Return ``Py_True`` or ``Py_False`` from the function, depending on the " "result of a comparison. VAL_A and VAL_B must be orderable by C comparison " @@ -2396,15 +2402,15 @@ msgid "" "specifies the requested operation, as for :c:func:`PyObject_RichCompare`." msgstr "" -#: ../../c-api/typeobj.rst:1540 +#: ../../c-api/typeobj.rst:1542 msgid "The return value's reference count is properly incremented." msgstr "" -#: ../../c-api/typeobj.rst:1542 +#: ../../c-api/typeobj.rst:1544 msgid "On error, sets an exception and returns ``NULL`` from the function." msgstr "" -#: ../../c-api/typeobj.rst:1550 +#: ../../c-api/typeobj.rst:1552 msgid "" "This field is inherited by subtypes together with :c:member:`~PyTypeObject." "tp_hash`: a subtype inherits :c:member:`~PyTypeObject.tp_richcompare` and :c:" @@ -2412,7 +2418,7 @@ msgid "" "tp_richcompare` and :c:member:`~PyTypeObject.tp_hash` are both ``NULL``." msgstr "" -#: ../../c-api/typeobj.rst:1557 +#: ../../c-api/typeobj.rst:1559 msgid "" ":c:type:`PyBaseObject_Type` provides a :attr:`tp_richcompare` " "implementation, which may be inherited. However, if only :attr:`tp_hash` is " @@ -2420,13 +2426,13 @@ msgid "" "will not be able to participate in any comparisons." msgstr "" -#: ../../c-api/typeobj.rst:1566 +#: ../../c-api/typeobj.rst:1568 msgid "" -"While this field is still supported, :const:`Py_TPFLAGS_MANAGED_WEAKREF` " +"While this field is still supported, :c:macro:`Py_TPFLAGS_MANAGED_WEAKREF` " "should be used instead, if at all possible." msgstr "" -#: ../../c-api/typeobj.rst:1569 +#: ../../c-api/typeobj.rst:1571 msgid "" "If the instances of this type are weakly referenceable, this field is " "greater than zero and contains the offset in the instance structure of the " @@ -2436,19 +2442,19 @@ msgid "" "`PyObject*` which is initialized to ``NULL``." msgstr "" -#: ../../c-api/typeobj.rst:1576 +#: ../../c-api/typeobj.rst:1578 msgid "" "Do not confuse this field with :c:member:`~PyTypeObject.tp_weaklist`; that " "is the list head for weak references to the type object itself." msgstr "" -#: ../../c-api/typeobj.rst:1579 +#: ../../c-api/typeobj.rst:1581 msgid "" -"It is an error to set both the :const:`Py_TPFLAGS_MANAGED_WEAKREF` bit and :" -"c:member:`~PyTypeObject.tp_weaklist`." +"It is an error to set both the :c:macro:`Py_TPFLAGS_MANAGED_WEAKREF` bit " +"and :c:member:`~PyTypeObject.tp_weaklist`." msgstr "" -#: ../../c-api/typeobj.rst:1584 +#: ../../c-api/typeobj.rst:1586 msgid "" "This field is inherited by subtypes, but see the rules listed below. A " "subtype may override this offset; this means that the subtype uses a " @@ -2457,32 +2463,32 @@ msgid "" "not be a problem." msgstr "" -#: ../../c-api/typeobj.rst:1591 +#: ../../c-api/typeobj.rst:1593 msgid "" -"If the :const:`Py_TPFLAGS_MANAGED_WEAKREF` bit is set in the :c:member:" +"If the :c:macro:`Py_TPFLAGS_MANAGED_WEAKREF` bit is set in the :c:member:" "`~PyTypeObject.tp_dict` field, then :c:member:`~PyTypeObject." "tp_weaklistoffset` will be set to a negative value, to indicate that it is " "unsafe to use this field." msgstr "" -#: ../../c-api/typeobj.rst:1599 +#: ../../c-api/typeobj.rst:1601 msgid "" "An optional pointer to a function that returns an :term:`iterator` for the " "object. Its presence normally signals that the instances of this type are :" "term:`iterable` (although sequences may be iterable without this function)." msgstr "" -#: ../../c-api/typeobj.rst:1603 +#: ../../c-api/typeobj.rst:1605 msgid "This function has the same signature as :c:func:`PyObject_GetIter`::" msgstr "" -#: ../../c-api/typeobj.rst:1614 +#: ../../c-api/typeobj.rst:1616 msgid "" "An optional pointer to a function that returns the next item in an :term:" "`iterator`. The signature is::" msgstr "" -#: ../../c-api/typeobj.rst:1619 +#: ../../c-api/typeobj.rst:1621 msgid "" "When the iterator is exhausted, it must return ``NULL``; a :exc:" "`StopIteration` exception may or may not be set. When another error occurs, " @@ -2490,74 +2496,74 @@ msgid "" "this type are iterators." msgstr "" -#: ../../c-api/typeobj.rst:1624 +#: ../../c-api/typeobj.rst:1626 msgid "" "Iterator types should also define the :c:member:`~PyTypeObject.tp_iter` " "function, and that function should return the iterator instance itself (not " "a new iterator instance)." msgstr "" -#: ../../c-api/typeobj.rst:1628 +#: ../../c-api/typeobj.rst:1630 msgid "This function has the same signature as :c:func:`PyIter_Next`." msgstr "" -#: ../../c-api/typeobj.rst:1637 +#: ../../c-api/typeobj.rst:1639 msgid "" "An optional pointer to a static ``NULL``-terminated array of :c:type:" "`PyMethodDef` structures, declaring regular methods of this type." msgstr "" -#: ../../c-api/typeobj.rst:1640 +#: ../../c-api/typeobj.rst:1642 msgid "" "For each entry in the array, an entry is added to the type's dictionary " "(see :c:member:`~PyTypeObject.tp_dict` below) containing a method descriptor." msgstr "" -#: ../../c-api/typeobj.rst:1645 +#: ../../c-api/typeobj.rst:1647 msgid "" "This field is not inherited by subtypes (methods are inherited through a " "different mechanism)." msgstr "" -#: ../../c-api/typeobj.rst:1651 +#: ../../c-api/typeobj.rst:1653 msgid "" "An optional pointer to a static ``NULL``-terminated array of :c:type:" "`PyMemberDef` structures, declaring regular data members (fields or slots) " "of instances of this type." msgstr "" -#: ../../c-api/typeobj.rst:1655 +#: ../../c-api/typeobj.rst:1657 msgid "" "For each entry in the array, an entry is added to the type's dictionary " "(see :c:member:`~PyTypeObject.tp_dict` below) containing a member descriptor." msgstr "" -#: ../../c-api/typeobj.rst:1660 +#: ../../c-api/typeobj.rst:1662 msgid "" "This field is not inherited by subtypes (members are inherited through a " "different mechanism)." msgstr "" -#: ../../c-api/typeobj.rst:1666 +#: ../../c-api/typeobj.rst:1668 msgid "" "An optional pointer to a static ``NULL``-terminated array of :c:type:" "`PyGetSetDef` structures, declaring computed attributes of instances of this " "type." msgstr "" -#: ../../c-api/typeobj.rst:1669 +#: ../../c-api/typeobj.rst:1671 msgid "" "For each entry in the array, an entry is added to the type's dictionary " "(see :c:member:`~PyTypeObject.tp_dict` below) containing a getset descriptor." msgstr "" -#: ../../c-api/typeobj.rst:1674 +#: ../../c-api/typeobj.rst:1676 msgid "" "This field is not inherited by subtypes (computed attributes are inherited " "through a different mechanism)." msgstr "" -#: ../../c-api/typeobj.rst:1680 +#: ../../c-api/typeobj.rst:1682 msgid "" "An optional pointer to a base type from which type properties are " "inherited. At this level, only single inheritance is supported; multiple " @@ -2565,7 +2571,7 @@ msgid "" "metatype." msgstr "" -#: ../../c-api/typeobj.rst:1688 +#: ../../c-api/typeobj.rst:1690 msgid "" "Slot initialization is subject to the rules of initializing globals. C99 " "requires the initializers to be \"address constants\". Function designators " @@ -2573,7 +2579,7 @@ msgid "" "valid C99 address constants." msgstr "" -#: ../../c-api/typeobj.rst:1693 +#: ../../c-api/typeobj.rst:1695 msgid "" "However, the unary '&' operator applied to a non-static variable like :c:" "func:`PyBaseObject_Type` is not required to produce an address constant. " @@ -2581,27 +2587,27 @@ msgid "" "strictly standard conforming in this particular behavior." msgstr "" -#: ../../c-api/typeobj.rst:1699 +#: ../../c-api/typeobj.rst:1701 msgid "" "Consequently, :c:member:`~PyTypeObject.tp_base` should be set in the " "extension module's init function." msgstr "" -#: ../../c-api/typeobj.rst:1704 +#: ../../c-api/typeobj.rst:1706 msgid "This field is not inherited by subtypes (obviously)." msgstr "" -#: ../../c-api/typeobj.rst:1708 +#: ../../c-api/typeobj.rst:1710 msgid "" "This field defaults to ``&PyBaseObject_Type`` (which to Python programmers " "is known as the type :class:`object`)." msgstr "" -#: ../../c-api/typeobj.rst:1714 +#: ../../c-api/typeobj.rst:1716 msgid "The type's dictionary is stored here by :c:func:`PyType_Ready`." msgstr "" -#: ../../c-api/typeobj.rst:1716 +#: ../../c-api/typeobj.rst:1718 msgid "" "This field should normally be initialized to ``NULL`` before PyType_Ready is " "called; it may also be initialized to a dictionary containing initial " @@ -2612,64 +2618,64 @@ msgid "" "read-only." msgstr "" -#: ../../c-api/typeobj.rst:1724 +#: ../../c-api/typeobj.rst:1726 msgid "" "Some types may not store their dictionary in this slot. Use :c:func:" "`PyType_GetDict` to retreive the dictionary for an arbitrary type." msgstr "" -#: ../../c-api/typeobj.rst:1730 +#: ../../c-api/typeobj.rst:1732 msgid "" "Internals detail: For static builtin types, this is always ``NULL``. " "Instead, the dict for such types is stored on ``PyInterpreterState``. Use :c:" "func:`PyType_GetDict` to get the dict for an arbitrary type." msgstr "" -#: ../../c-api/typeobj.rst:1736 +#: ../../c-api/typeobj.rst:1738 msgid "" "This field is not inherited by subtypes (though the attributes defined in " "here are inherited through a different mechanism)." msgstr "" -#: ../../c-api/typeobj.rst:1741 +#: ../../c-api/typeobj.rst:1743 msgid "" "If this field is ``NULL``, :c:func:`PyType_Ready` will assign a new " "dictionary to it." msgstr "" -#: ../../c-api/typeobj.rst:1746 +#: ../../c-api/typeobj.rst:1748 msgid "" "It is not safe to use :c:func:`PyDict_SetItem` on or otherwise modify :c:" "member:`~PyTypeObject.tp_dict` with the dictionary C-API." msgstr "" -#: ../../c-api/typeobj.rst:1752 +#: ../../c-api/typeobj.rst:1754 msgid "An optional pointer to a \"descriptor get\" function." msgstr "" -#: ../../c-api/typeobj.rst:1754 ../../c-api/typeobj.rst:1770 -#: ../../c-api/typeobj.rst:1834 ../../c-api/typeobj.rst:1864 -#: ../../c-api/typeobj.rst:1888 +#: ../../c-api/typeobj.rst:1756 ../../c-api/typeobj.rst:1772 +#: ../../c-api/typeobj.rst:1836 ../../c-api/typeobj.rst:1866 +#: ../../c-api/typeobj.rst:1890 msgid "The function signature is::" msgstr "" -#: ../../c-api/typeobj.rst:1767 +#: ../../c-api/typeobj.rst:1769 msgid "" "An optional pointer to a function for setting and deleting a descriptor's " "value." msgstr "" -#: ../../c-api/typeobj.rst:1774 +#: ../../c-api/typeobj.rst:1776 msgid "The *value* argument is set to ``NULL`` to delete the value." msgstr "" -#: ../../c-api/typeobj.rst:1785 +#: ../../c-api/typeobj.rst:1787 msgid "" -"While this field is still supported, :const:`Py_TPFLAGS_MANAGED_DICT` should " -"be used instead, if at all possible." +"While this field is still supported, :c:macro:`Py_TPFLAGS_MANAGED_DICT` " +"should be used instead, if at all possible." msgstr "" -#: ../../c-api/typeobj.rst:1788 +#: ../../c-api/typeobj.rst:1790 msgid "" "If the instances of this type have a dictionary containing instance " "variables, this field is non-zero and contains the offset in the instances " @@ -2677,19 +2683,19 @@ msgid "" "func:`PyObject_GenericGetAttr`." msgstr "" -#: ../../c-api/typeobj.rst:1793 +#: ../../c-api/typeobj.rst:1795 msgid "" "Do not confuse this field with :c:member:`~PyTypeObject.tp_dict`; that is " "the dictionary for attributes of the type object itself." msgstr "" -#: ../../c-api/typeobj.rst:1796 +#: ../../c-api/typeobj.rst:1798 msgid "" "The value specifies the offset of the dictionary from the start of the " "instance structure." msgstr "" -#: ../../c-api/typeobj.rst:1798 +#: ../../c-api/typeobj.rst:1800 msgid "" "The :c:member:`~PyTypeObject.tp_dictoffset` should be regarded as write-" "only. To get the pointer to the dictionary call :c:func:" @@ -2698,38 +2704,38 @@ msgid "" "to call :c:func:`PyObject_GetAttr` when accessing an attribute on the object." msgstr "" -#: ../../c-api/typeobj.rst:1804 +#: ../../c-api/typeobj.rst:1806 msgid "" -"It is an error to set both the :const:`Py_TPFLAGS_MANAGED_WEAKREF` bit and :" -"c:member:`~PyTypeObject.tp_dictoffset`." +"It is an error to set both the :c:macro:`Py_TPFLAGS_MANAGED_WEAKREF` bit " +"and :c:member:`~PyTypeObject.tp_dictoffset`." msgstr "" -#: ../../c-api/typeobj.rst:1809 +#: ../../c-api/typeobj.rst:1811 msgid "" "This field is inherited by subtypes. A subtype should not override this " "offset; doing so could be unsafe, if C code tries to access the dictionary " -"at the previous offset. To properly support inheritance, use :const:" +"at the previous offset. To properly support inheritance, use :c:macro:" "`Py_TPFLAGS_MANAGED_DICT`." msgstr "" -#: ../../c-api/typeobj.rst:1816 +#: ../../c-api/typeobj.rst:1818 msgid "" "This slot has no default. For :ref:`static types `, if the " "field is ``NULL`` then no :attr:`__dict__` gets created for instances." msgstr "" -#: ../../c-api/typeobj.rst:1819 +#: ../../c-api/typeobj.rst:1821 msgid "" -"If the :const:`Py_TPFLAGS_MANAGED_DICT` bit is set in the :c:member:" +"If the :c:macro:`Py_TPFLAGS_MANAGED_DICT` bit is set in the :c:member:" "`~PyTypeObject.tp_dict` field, then :c:member:`~PyTypeObject.tp_dictoffset` " "will be set to ``-1``, to indicate that it is unsafe to use this field." msgstr "" -#: ../../c-api/typeobj.rst:1827 +#: ../../c-api/typeobj.rst:1829 msgid "An optional pointer to an instance initialization function." msgstr "" -#: ../../c-api/typeobj.rst:1829 +#: ../../c-api/typeobj.rst:1831 msgid "" "This function corresponds to the :meth:`__init__` method of classes. Like :" "meth:`__init__`, it is possible to create an instance without calling :meth:" @@ -2737,14 +2743,14 @@ msgid "" "meth:`__init__` method again." msgstr "" -#: ../../c-api/typeobj.rst:1838 +#: ../../c-api/typeobj.rst:1840 msgid "" "The self argument is the instance to be initialized; the *args* and *kwds* " "arguments represent positional and keyword arguments of the call to :meth:" "`__init__`." msgstr "" -#: ../../c-api/typeobj.rst:1842 +#: ../../c-api/typeobj.rst:1844 msgid "" "The :c:member:`~PyTypeObject.tp_init` function, if not ``NULL``, is called " "when an instance is created normally by calling its type, after the type's :" @@ -2756,43 +2762,43 @@ msgid "" "subtype's :c:member:`~PyTypeObject.tp_init` is called." msgstr "" -#: ../../c-api/typeobj.rst:1849 +#: ../../c-api/typeobj.rst:1851 msgid "Returns ``0`` on success, ``-1`` and sets an exception on error." msgstr "" -#: ../../c-api/typeobj.rst:1857 +#: ../../c-api/typeobj.rst:1859 msgid "" "For :ref:`static types ` this field does not have a default." msgstr "" -#: ../../c-api/typeobj.rst:1862 +#: ../../c-api/typeobj.rst:1864 msgid "An optional pointer to an instance allocation function." msgstr "" -#: ../../c-api/typeobj.rst:1870 +#: ../../c-api/typeobj.rst:1872 msgid "" "This field is inherited by static subtypes, but not by dynamic subtypes " "(subtypes created by a class statement)." msgstr "" -#: ../../c-api/typeobj.rst:1875 +#: ../../c-api/typeobj.rst:1877 msgid "" "For dynamic subtypes, this field is always set to :c:func:" "`PyType_GenericAlloc`, to force a standard heap allocation strategy." msgstr "" -#: ../../c-api/typeobj.rst:1879 +#: ../../c-api/typeobj.rst:1881 msgid "" "For static subtypes, :c:type:`PyBaseObject_Type` uses :c:func:" "`PyType_GenericAlloc`. That is the recommended value for all statically " "defined types." msgstr "" -#: ../../c-api/typeobj.rst:1886 +#: ../../c-api/typeobj.rst:1888 msgid "An optional pointer to an instance creation function." msgstr "" -#: ../../c-api/typeobj.rst:1892 +#: ../../c-api/typeobj.rst:1894 msgid "" "The *subtype* argument is the type of the object being created; the *args* " "and *kwds* arguments represent positional and keyword arguments of the call " @@ -2801,7 +2807,7 @@ msgid "" "that type (but not an unrelated type)." msgstr "" -#: ../../c-api/typeobj.rst:1898 +#: ../../c-api/typeobj.rst:1900 msgid "" "The :c:member:`~PyTypeObject.tp_new` function should call ``subtype-" ">tp_alloc(subtype, nitems)`` to allocate space for the object, and then do " @@ -2813,20 +2819,20 @@ msgid "" "be deferred to :c:member:`~PyTypeObject.tp_init`." msgstr "" -#: ../../c-api/typeobj.rst:1906 +#: ../../c-api/typeobj.rst:1908 msgid "" -"Set the :const:`Py_TPFLAGS_DISALLOW_INSTANTIATION` flag to disallow creating " -"instances of the type in Python." +"Set the :c:macro:`Py_TPFLAGS_DISALLOW_INSTANTIATION` flag to disallow " +"creating instances of the type in Python." msgstr "" -#: ../../c-api/typeobj.rst:1911 +#: ../../c-api/typeobj.rst:1913 msgid "" "This field is inherited by subtypes, except it is not inherited by :ref:" "`static types ` whose :c:member:`~PyTypeObject.tp_base` is " "``NULL`` or ``&PyBaseObject_Type``." msgstr "" -#: ../../c-api/typeobj.rst:1917 +#: ../../c-api/typeobj.rst:1919 msgid "" "For :ref:`static types ` this field has no default. This means " "if the slot is defined as ``NULL``, the type cannot be called to create new " @@ -2834,43 +2840,43 @@ msgid "" "factory function." msgstr "" -#: ../../c-api/typeobj.rst:1925 +#: ../../c-api/typeobj.rst:1927 msgid "" "An optional pointer to an instance deallocation function. Its signature is::" msgstr "" -#: ../../c-api/typeobj.rst:1929 +#: ../../c-api/typeobj.rst:1931 msgid "" "An initializer that is compatible with this signature is :c:func:" "`PyObject_Free`." msgstr "" -#: ../../c-api/typeobj.rst:1933 +#: ../../c-api/typeobj.rst:1935 msgid "" "This field is inherited by static subtypes, but not by dynamic subtypes " "(subtypes created by a class statement)" msgstr "" -#: ../../c-api/typeobj.rst:1938 +#: ../../c-api/typeobj.rst:1940 msgid "" "In dynamic subtypes, this field is set to a deallocator suitable to match :c:" -"func:`PyType_GenericAlloc` and the value of the :const:`Py_TPFLAGS_HAVE_GC` " -"flag bit." +"func:`PyType_GenericAlloc` and the value of the :c:macro:" +"`Py_TPFLAGS_HAVE_GC` flag bit." msgstr "" -#: ../../c-api/typeobj.rst:1942 +#: ../../c-api/typeobj.rst:1944 msgid "For static subtypes, :c:type:`PyBaseObject_Type` uses PyObject_Del." msgstr "" -#: ../../c-api/typeobj.rst:1947 +#: ../../c-api/typeobj.rst:1949 msgid "An optional pointer to a function called by the garbage collector." msgstr "" -#: ../../c-api/typeobj.rst:1949 +#: ../../c-api/typeobj.rst:1951 msgid "" "The garbage collector needs to know whether a particular object is " "collectible or not. Normally, it is sufficient to look at the object's " -"type's :c:member:`~PyTypeObject.tp_flags` field, and check the :const:" +"type's :c:member:`~PyTypeObject.tp_flags` field, and check the :c:macro:" "`Py_TPFLAGS_HAVE_GC` flag bit. But some types have a mixture of statically " "and dynamically allocated instances, and the statically allocated instances " "are not collectible. Such types should define this function; it should " @@ -2878,89 +2884,89 @@ msgid "" "instance. The signature is::" msgstr "" -#: ../../c-api/typeobj.rst:1959 +#: ../../c-api/typeobj.rst:1961 msgid "" "(The only example of this are types themselves. The metatype, :c:data:" "`PyType_Type`, defines this function to distinguish between statically and :" "ref:`dynamically allocated types `.)" msgstr "" -#: ../../c-api/typeobj.rst:1969 +#: ../../c-api/typeobj.rst:1971 msgid "" -"This slot has no default. If this field is ``NULL``, :const:" +"This slot has no default. If this field is ``NULL``, :c:macro:" "`Py_TPFLAGS_HAVE_GC` is used as the functional equivalent." msgstr "" -#: ../../c-api/typeobj.rst:1975 +#: ../../c-api/typeobj.rst:1977 msgid "Tuple of base types." msgstr "" -#: ../../c-api/typeobj.rst:1977 ../../c-api/typeobj.rst:2001 +#: ../../c-api/typeobj.rst:1979 ../../c-api/typeobj.rst:2003 msgid "" "This field should be set to ``NULL`` and treated as read-only. Python will " "fill it in when the type is :c:func:`initialized `." msgstr "" -#: ../../c-api/typeobj.rst:1980 +#: ../../c-api/typeobj.rst:1982 msgid "" "For dynamically created classes, the ``Py_tp_bases`` :c:type:`slot " "` can be used instead of the *bases* argument of :c:func:" "`PyType_FromSpecWithBases`. The argument form is preferred." msgstr "" -#: ../../c-api/typeobj.rst:1987 +#: ../../c-api/typeobj.rst:1989 msgid "" "Multiple inheritance does not work well for statically defined types. If you " "set ``tp_bases`` to a tuple, Python will not raise an error, but some slots " "will only be inherited from the first base." msgstr "" -#: ../../c-api/typeobj.rst:1993 ../../c-api/typeobj.rst:2016 -#: ../../c-api/typeobj.rst:2033 ../../c-api/typeobj.rst:2050 -#: ../../c-api/typeobj.rst:2064 +#: ../../c-api/typeobj.rst:1995 ../../c-api/typeobj.rst:2018 +#: ../../c-api/typeobj.rst:2035 ../../c-api/typeobj.rst:2052 +#: ../../c-api/typeobj.rst:2066 msgid "This field is not inherited." msgstr "" -#: ../../c-api/typeobj.rst:1998 +#: ../../c-api/typeobj.rst:2000 msgid "" "Tuple containing the expanded set of base types, starting with the type " "itself and ending with :class:`object`, in Method Resolution Order." msgstr "" -#: ../../c-api/typeobj.rst:2006 +#: ../../c-api/typeobj.rst:2008 msgid "" "This field is not inherited; it is calculated fresh by :c:func:" "`PyType_Ready`." msgstr "" -#: ../../c-api/typeobj.rst:2012 +#: ../../c-api/typeobj.rst:2014 msgid "Unused. Internal use only." msgstr "" -#: ../../c-api/typeobj.rst:2021 +#: ../../c-api/typeobj.rst:2023 msgid "" "A collection of subclasses. Internal use only. May be an invalid pointer." msgstr "" -#: ../../c-api/typeobj.rst:2023 +#: ../../c-api/typeobj.rst:2025 msgid "" "To get a list of subclasses, call the Python method :py:meth:`~class." "__subclasses__`." msgstr "" -#: ../../c-api/typeobj.rst:2028 +#: ../../c-api/typeobj.rst:2030 msgid "" "For some types, this field does not hold a valid :c:expr:`PyObject*`. The " "type was changed to :c:expr:`void*` to indicate this." msgstr "" -#: ../../c-api/typeobj.rst:2038 +#: ../../c-api/typeobj.rst:2040 msgid "" "Weak reference list head, for weak references to this type object. Not " "inherited. Internal use only." msgstr "" -#: ../../c-api/typeobj.rst:2043 +#: ../../c-api/typeobj.rst:2045 msgid "" "Internals detail: For the static builtin types this is always ``NULL``, even " "if weakrefs are added. Instead, the weakrefs for each are stored on " @@ -2968,21 +2974,21 @@ msgid "" "``_PyObject_GET_WEAKREFS_LISTPTR()`` macro to avoid the distinction." msgstr "" -#: ../../c-api/typeobj.rst:2055 +#: ../../c-api/typeobj.rst:2057 msgid "" "This field is deprecated. Use :c:member:`~PyTypeObject.tp_finalize` instead." msgstr "" -#: ../../c-api/typeobj.rst:2060 +#: ../../c-api/typeobj.rst:2062 msgid "Used to index into the method cache. Internal use only." msgstr "" -#: ../../c-api/typeobj.rst:2069 +#: ../../c-api/typeobj.rst:2071 msgid "" "An optional pointer to an instance finalization function. Its signature is::" msgstr "" -#: ../../c-api/typeobj.rst:2073 +#: ../../c-api/typeobj.rst:2075 msgid "" "If :c:member:`~PyTypeObject.tp_finalize` is set, the interpreter calls it " "once when finalizing an instance. It is called either from the garbage " @@ -2992,14 +2998,14 @@ msgid "" "object in a sane state." msgstr "" -#: ../../c-api/typeobj.rst:2080 +#: ../../c-api/typeobj.rst:2082 msgid "" ":c:member:`~PyTypeObject.tp_finalize` should not mutate the current " "exception status; therefore, a recommended way to write a non-trivial " "finalizer is::" msgstr "" -#: ../../c-api/typeobj.rst:2097 +#: ../../c-api/typeobj.rst:2099 msgid "" "Also, note that, in a garbage collected Python, :c:member:`~PyTypeObject." "tp_dealloc` may be called from any Python thread, not just the thread which " @@ -3012,18 +3018,18 @@ msgid "" "which called tp_dealloc will not violate any assumptions of the library." msgstr "" -#: ../../c-api/typeobj.rst:2116 +#: ../../c-api/typeobj.rst:2118 msgid "" -"Before version 3.8 it was necessary to set the :const:" +"Before version 3.8 it was necessary to set the :c:macro:" "`Py_TPFLAGS_HAVE_FINALIZE` flags bit in order for this field to be used. " "This is no longer required." msgstr "" -#: ../../c-api/typeobj.rst:2120 +#: ../../c-api/typeobj.rst:2122 msgid "\"Safe object finalization\" (:pep:`442`)" msgstr "" -#: ../../c-api/typeobj.rst:2125 +#: ../../c-api/typeobj.rst:2127 msgid "" "Vectorcall function to use for calls of this type object. In other words, it " "is used to implement :ref:`vectorcall ` for ``type.__call__``. " @@ -3031,95 +3037,95 @@ msgid "" "attr:`__new__` and :attr:`__init__` is used." msgstr "" -#: ../../c-api/typeobj.rst:2133 +#: ../../c-api/typeobj.rst:2135 msgid "This field is never inherited." msgstr "" -#: ../../c-api/typeobj.rst:2135 +#: ../../c-api/typeobj.rst:2137 msgid "(the field exists since 3.8 but it's only used since 3.9)" msgstr "" -#: ../../c-api/typeobj.rst:2140 +#: ../../c-api/typeobj.rst:2142 msgid "Internal. Do not use." msgstr "" -#: ../../c-api/typeobj.rst:2148 +#: ../../c-api/typeobj.rst:2150 msgid "Static Types" msgstr "" -#: ../../c-api/typeobj.rst:2150 +#: ../../c-api/typeobj.rst:2152 msgid "" "Traditionally, types defined in C code are *static*, that is, a static :c:" "type:`PyTypeObject` structure is defined directly in code and initialized " "using :c:func:`PyType_Ready`." msgstr "" -#: ../../c-api/typeobj.rst:2154 +#: ../../c-api/typeobj.rst:2156 msgid "" "This results in types that are limited relative to types defined in Python:" msgstr "" -#: ../../c-api/typeobj.rst:2156 +#: ../../c-api/typeobj.rst:2158 msgid "" "Static types are limited to one base, i.e. they cannot use multiple " "inheritance." msgstr "" -#: ../../c-api/typeobj.rst:2158 +#: ../../c-api/typeobj.rst:2160 msgid "" "Static type objects (but not necessarily their instances) are immutable. It " "is not possible to add or modify the type object's attributes from Python." msgstr "" -#: ../../c-api/typeobj.rst:2160 +#: ../../c-api/typeobj.rst:2162 msgid "" "Static type objects are shared across :ref:`sub-interpreters `, so they should not include any subinterpreter-" "specific state." msgstr "" -#: ../../c-api/typeobj.rst:2164 +#: ../../c-api/typeobj.rst:2166 msgid "" "Also, since :c:type:`PyTypeObject` is only part of the :ref:`Limited API " "` as an opaque struct, any extension modules using static " "types must be compiled for a specific Python minor version." msgstr "" -#: ../../c-api/typeobj.rst:2172 +#: ../../c-api/typeobj.rst:2174 msgid "Heap Types" msgstr "" -#: ../../c-api/typeobj.rst:2174 +#: ../../c-api/typeobj.rst:2176 msgid "" "An alternative to :ref:`static types ` is *heap-allocated " "types*, or *heap types* for short, which correspond closely to classes " -"created by Python's ``class`` statement. Heap types have the :const:" +"created by Python's ``class`` statement. Heap types have the :c:macro:" "`Py_TPFLAGS_HEAPTYPE` flag set." msgstr "" -#: ../../c-api/typeobj.rst:2179 +#: ../../c-api/typeobj.rst:2181 msgid "" "This is done by filling a :c:type:`PyType_Spec` structure and calling :c:" "func:`PyType_FromSpec`, :c:func:`PyType_FromSpecWithBases`, :c:func:" "`PyType_FromModuleAndSpec`, or :c:func:`PyType_FromMetaclass`." msgstr "" -#: ../../c-api/typeobj.rst:2187 +#: ../../c-api/typeobj.rst:2189 msgid "Number Object Structures" msgstr "" -#: ../../c-api/typeobj.rst:2194 +#: ../../c-api/typeobj.rst:2196 msgid "" "This structure holds pointers to the functions which an object uses to " "implement the number protocol. Each function is used by the function of " "similar name documented in the :ref:`number` section." msgstr "" -#: ../../c-api/typeobj.rst:2200 ../../c-api/typeobj.rst:2524 +#: ../../c-api/typeobj.rst:2202 ../../c-api/typeobj.rst:2526 msgid "Here is the structure definition::" msgstr "" -#: ../../c-api/typeobj.rst:2247 +#: ../../c-api/typeobj.rst:2249 msgid "" "Binary and ternary functions must check the type of all their operands, and " "implement the necessary conversions (at least one of the operands is an " @@ -3129,30 +3135,30 @@ msgid "" "and set an exception." msgstr "" -#: ../../c-api/typeobj.rst:2256 +#: ../../c-api/typeobj.rst:2258 msgid "" "The :c:data:`nb_reserved` field should always be ``NULL``. It was " "previously called :c:data:`nb_long`, and was renamed in Python 3.0.1." msgstr "" -#: ../../c-api/typeobj.rst:2301 +#: ../../c-api/typeobj.rst:2303 msgid "Mapping Object Structures" msgstr "" -#: ../../c-api/typeobj.rst:2308 +#: ../../c-api/typeobj.rst:2310 msgid "" "This structure holds pointers to the functions which an object uses to " "implement the mapping protocol. It has three members:" msgstr "" -#: ../../c-api/typeobj.rst:2313 +#: ../../c-api/typeobj.rst:2315 msgid "" "This function is used by :c:func:`PyMapping_Size` and :c:func:" "`PyObject_Size`, and has the same signature. This slot may be set to " "``NULL`` if the object has no defined length." msgstr "" -#: ../../c-api/typeobj.rst:2319 +#: ../../c-api/typeobj.rst:2321 msgid "" "This function is used by :c:func:`PyObject_GetItem` and :c:func:" "`PySequence_GetSlice`, and has the same signature as :c:func:`!" @@ -3160,7 +3166,7 @@ msgid "" "`PyMapping_Check` function to return ``1``, it can be ``NULL`` otherwise." msgstr "" -#: ../../c-api/typeobj.rst:2327 +#: ../../c-api/typeobj.rst:2329 msgid "" "This function is used by :c:func:`PyObject_SetItem`, :c:func:" "`PyObject_DelItem`, :c:func:`PyObject_SetSlice` and :c:func:" @@ -3170,17 +3176,17 @@ msgid "" "deletion." msgstr "" -#: ../../c-api/typeobj.rst:2338 +#: ../../c-api/typeobj.rst:2340 msgid "Sequence Object Structures" msgstr "" -#: ../../c-api/typeobj.rst:2345 +#: ../../c-api/typeobj.rst:2347 msgid "" "This structure holds pointers to the functions which an object uses to " "implement the sequence protocol." msgstr "" -#: ../../c-api/typeobj.rst:2350 +#: ../../c-api/typeobj.rst:2352 msgid "" "This function is used by :c:func:`PySequence_Size` and :c:func:" "`PyObject_Size`, and has the same signature. It is also used for handling " @@ -3188,21 +3194,21 @@ msgid "" "member:`~PySequenceMethods.sq_ass_item` slots." msgstr "" -#: ../../c-api/typeobj.rst:2357 +#: ../../c-api/typeobj.rst:2359 msgid "" "This function is used by :c:func:`PySequence_Concat` and has the same " "signature. It is also used by the ``+`` operator, after trying the numeric " "addition via the :c:member:`~PyNumberMethods.nb_add` slot." msgstr "" -#: ../../c-api/typeobj.rst:2363 +#: ../../c-api/typeobj.rst:2365 msgid "" "This function is used by :c:func:`PySequence_Repeat` and has the same " "signature. It is also used by the ``*`` operator, after trying numeric " "multiplication via the :c:member:`~PyNumberMethods.nb_multiply` slot." msgstr "" -#: ../../c-api/typeobj.rst:2369 +#: ../../c-api/typeobj.rst:2371 msgid "" "This function is used by :c:func:`PySequence_GetItem` and has the same " "signature. It is also used by :c:func:`PyObject_GetItem`, after trying the " @@ -3211,7 +3217,7 @@ msgid "" "``1``, it can be ``NULL`` otherwise." msgstr "" -#: ../../c-api/typeobj.rst:2375 +#: ../../c-api/typeobj.rst:2377 msgid "" "Negative indexes are handled as follows: if the :attr:`sq_length` slot is " "filled, it is called and the sequence length is used to compute a positive " @@ -3219,7 +3225,7 @@ msgid "" "the index is passed as is to the function." msgstr "" -#: ../../c-api/typeobj.rst:2382 +#: ../../c-api/typeobj.rst:2384 msgid "" "This function is used by :c:func:`PySequence_SetItem` and has the same " "signature. It is also used by :c:func:`PyObject_SetItem` and :c:func:" @@ -3228,14 +3234,14 @@ msgid "" "``NULL`` if the object does not support item assignment and deletion." msgstr "" -#: ../../c-api/typeobj.rst:2391 +#: ../../c-api/typeobj.rst:2393 msgid "" "This function may be used by :c:func:`PySequence_Contains` and has the same " "signature. This slot may be left to ``NULL``, in this case :c:func:`!" "PySequence_Contains` simply traverses the sequence until it finds a match." msgstr "" -#: ../../c-api/typeobj.rst:2398 +#: ../../c-api/typeobj.rst:2400 msgid "" "This function is used by :c:func:`PySequence_InPlaceConcat` and has the same " "signature. It should modify its first operand, and return it. This slot " @@ -3245,7 +3251,7 @@ msgid "" "c:member:`~PyNumberMethods.nb_inplace_add` slot." msgstr "" -#: ../../c-api/typeobj.rst:2407 +#: ../../c-api/typeobj.rst:2409 msgid "" "This function is used by :c:func:`PySequence_InPlaceRepeat` and has the same " "signature. It should modify its first operand, and return it. This slot " @@ -3255,72 +3261,72 @@ msgid "" "via the :c:member:`~PyNumberMethods.nb_inplace_multiply` slot." msgstr "" -#: ../../c-api/typeobj.rst:2418 +#: ../../c-api/typeobj.rst:2420 msgid "Buffer Object Structures" msgstr "" -#: ../../c-api/typeobj.rst:2426 +#: ../../c-api/typeobj.rst:2428 msgid "" "This structure holds pointers to the functions required by the :ref:`Buffer " "protocol `. The protocol defines how an exporter object can " "expose its internal data to consumer objects." msgstr "" -#: ../../c-api/typeobj.rst:2432 ../../c-api/typeobj.rst:2481 -#: ../../c-api/typeobj.rst:2535 ../../c-api/typeobj.rst:2546 -#: ../../c-api/typeobj.rst:2558 ../../c-api/typeobj.rst:2567 +#: ../../c-api/typeobj.rst:2434 ../../c-api/typeobj.rst:2483 +#: ../../c-api/typeobj.rst:2537 ../../c-api/typeobj.rst:2548 +#: ../../c-api/typeobj.rst:2560 ../../c-api/typeobj.rst:2569 msgid "The signature of this function is::" msgstr "" -#: ../../c-api/typeobj.rst:2436 +#: ../../c-api/typeobj.rst:2438 msgid "" "Handle a request to *exporter* to fill in *view* as specified by *flags*. " "Except for point (3), an implementation of this function MUST take these " "steps:" msgstr "" -#: ../../c-api/typeobj.rst:2440 +#: ../../c-api/typeobj.rst:2442 msgid "" "Check if the request can be met. If not, raise :c:data:`PyExc_BufferError`, " "set :c:expr:`view->obj` to ``NULL`` and return ``-1``." msgstr "" -#: ../../c-api/typeobj.rst:2443 +#: ../../c-api/typeobj.rst:2445 msgid "Fill in the requested fields." msgstr "" -#: ../../c-api/typeobj.rst:2445 +#: ../../c-api/typeobj.rst:2447 msgid "Increment an internal counter for the number of exports." msgstr "" -#: ../../c-api/typeobj.rst:2447 +#: ../../c-api/typeobj.rst:2449 msgid "" "Set :c:expr:`view->obj` to *exporter* and increment :c:expr:`view->obj`." msgstr "" -#: ../../c-api/typeobj.rst:2449 +#: ../../c-api/typeobj.rst:2451 msgid "Return ``0``." msgstr "" -#: ../../c-api/typeobj.rst:2451 +#: ../../c-api/typeobj.rst:2453 msgid "" "If *exporter* is part of a chain or tree of buffer providers, two main " "schemes can be used:" msgstr "" -#: ../../c-api/typeobj.rst:2454 +#: ../../c-api/typeobj.rst:2456 msgid "" "Re-export: Each member of the tree acts as the exporting object and sets :c:" "expr:`view->obj` to a new reference to itself." msgstr "" -#: ../../c-api/typeobj.rst:2457 +#: ../../c-api/typeobj.rst:2459 msgid "" "Redirect: The buffer request is redirected to the root object of the tree. " "Here, :c:expr:`view->obj` will be a new reference to the root object." msgstr "" -#: ../../c-api/typeobj.rst:2461 +#: ../../c-api/typeobj.rst:2463 msgid "" "The individual fields of *view* are described in section :ref:`Buffer " "structure `, the rules how an exporter must react to " @@ -3328,7 +3334,7 @@ msgid "" "types>`." msgstr "" -#: ../../c-api/typeobj.rst:2466 +#: ../../c-api/typeobj.rst:2468 msgid "" "All memory pointed to in the :c:type:`Py_buffer` structure belongs to the " "exporter and must remain valid until there are no consumers left. :c:member:" @@ -3337,19 +3343,19 @@ msgid "" "internal` are read-only for the consumer." msgstr "" -#: ../../c-api/typeobj.rst:2473 +#: ../../c-api/typeobj.rst:2475 msgid "" ":c:func:`PyBuffer_FillInfo` provides an easy way of exposing a simple bytes " "buffer while dealing correctly with all request types." msgstr "" -#: ../../c-api/typeobj.rst:2476 +#: ../../c-api/typeobj.rst:2478 msgid "" ":c:func:`PyObject_GetBuffer` is the interface for the consumer that wraps " "this function." msgstr "" -#: ../../c-api/typeobj.rst:2485 +#: ../../c-api/typeobj.rst:2487 msgid "" "Handle a request to release the resources of the buffer. If no resources " "need to be released, :c:member:`PyBufferProcs.bf_releasebuffer` may be " @@ -3357,15 +3363,15 @@ msgid "" "these optional steps:" msgstr "" -#: ../../c-api/typeobj.rst:2490 +#: ../../c-api/typeobj.rst:2492 msgid "Decrement an internal counter for the number of exports." msgstr "" -#: ../../c-api/typeobj.rst:2492 +#: ../../c-api/typeobj.rst:2494 msgid "If the counter is ``0``, free all memory associated with *view*." msgstr "" -#: ../../c-api/typeobj.rst:2494 +#: ../../c-api/typeobj.rst:2496 msgid "" "The exporter MUST use the :c:member:`~Py_buffer.internal` field to keep " "track of buffer-specific resources. This field is guaranteed to remain " @@ -3373,68 +3379,68 @@ msgid "" "*view* argument." msgstr "" -#: ../../c-api/typeobj.rst:2500 +#: ../../c-api/typeobj.rst:2502 msgid "" "This function MUST NOT decrement :c:expr:`view->obj`, since that is done " "automatically in :c:func:`PyBuffer_Release` (this scheme is useful for " "breaking reference cycles)." msgstr "" -#: ../../c-api/typeobj.rst:2505 +#: ../../c-api/typeobj.rst:2507 msgid "" ":c:func:`PyBuffer_Release` is the interface for the consumer that wraps this " "function." msgstr "" -#: ../../c-api/typeobj.rst:2513 +#: ../../c-api/typeobj.rst:2515 msgid "Async Object Structures" msgstr "" -#: ../../c-api/typeobj.rst:2521 +#: ../../c-api/typeobj.rst:2523 msgid "" "This structure holds pointers to the functions required to implement :term:" "`awaitable` and :term:`asynchronous iterator` objects." msgstr "" -#: ../../c-api/typeobj.rst:2539 +#: ../../c-api/typeobj.rst:2541 msgid "" "The returned object must be an :term:`iterator`, i.e. :c:func:`PyIter_Check` " "must return ``1`` for it." msgstr "" -#: ../../c-api/typeobj.rst:2542 +#: ../../c-api/typeobj.rst:2544 msgid "" "This slot may be set to ``NULL`` if an object is not an :term:`awaitable`." msgstr "" -#: ../../c-api/typeobj.rst:2550 +#: ../../c-api/typeobj.rst:2552 msgid "" "Must return an :term:`asynchronous iterator` object. See :meth:`__anext__` " "for details." msgstr "" -#: ../../c-api/typeobj.rst:2553 +#: ../../c-api/typeobj.rst:2555 msgid "" "This slot may be set to ``NULL`` if an object does not implement " "asynchronous iteration protocol." msgstr "" -#: ../../c-api/typeobj.rst:2562 +#: ../../c-api/typeobj.rst:2564 msgid "" "Must return an :term:`awaitable` object. See :meth:`__anext__` for details. " "This slot may be set to ``NULL``." msgstr "" -#: ../../c-api/typeobj.rst:2571 +#: ../../c-api/typeobj.rst:2573 msgid "" "See :c:func:`PyIter_Send` for details. This slot may be set to ``NULL``." msgstr "" -#: ../../c-api/typeobj.rst:2580 +#: ../../c-api/typeobj.rst:2582 msgid "Slot Type typedefs" msgstr "" -#: ../../c-api/typeobj.rst:2584 +#: ../../c-api/typeobj.rst:2586 msgid "" "The purpose of this function is to separate memory allocation from memory " "initialization. It should return a pointer to a block of memory of adequate " @@ -3448,80 +3454,80 @@ msgid "" "member:`~PyTypeObject.tp_basicsize`." msgstr "" -#: ../../c-api/typeobj.rst:2594 +#: ../../c-api/typeobj.rst:2596 msgid "" "This function should not do any other instance initialization, not even to " "allocate additional memory; that should be done by :c:member:`~PyTypeObject." "tp_new`." msgstr "" -#: ../../c-api/typeobj.rst:2601 +#: ../../c-api/typeobj.rst:2603 msgid "See :c:member:`~PyTypeObject.tp_free`." msgstr "請見 :c:member:`~PyTypeObject.tp_free`。" -#: ../../c-api/typeobj.rst:2605 +#: ../../c-api/typeobj.rst:2607 msgid "See :c:member:`~PyTypeObject.tp_new`." msgstr "請見 :c:member:`~PyTypeObject.tp_new`。" -#: ../../c-api/typeobj.rst:2609 +#: ../../c-api/typeobj.rst:2611 msgid "See :c:member:`~PyTypeObject.tp_init`." msgstr "請見 :c:member:`~PyTypeObject.tp_init`。" -#: ../../c-api/typeobj.rst:2613 +#: ../../c-api/typeobj.rst:2615 msgid "See :c:member:`~PyTypeObject.tp_repr`." msgstr "請見 :c:member:`~PyTypeObject.tp_repr`。" -#: ../../c-api/typeobj.rst:2617 ../../c-api/typeobj.rst:2626 +#: ../../c-api/typeobj.rst:2619 ../../c-api/typeobj.rst:2628 msgid "Return the value of the named attribute for the object." msgstr "" -#: ../../c-api/typeobj.rst:2621 ../../c-api/typeobj.rst:2632 +#: ../../c-api/typeobj.rst:2623 ../../c-api/typeobj.rst:2634 msgid "" "Set the value of the named attribute for the object. The value argument is " "set to ``NULL`` to delete the attribute." msgstr "" -#: ../../c-api/typeobj.rst:2628 +#: ../../c-api/typeobj.rst:2630 msgid "See :c:member:`~PyTypeObject.tp_getattro`." msgstr "請見 :c:member:`~PyTypeObject.tp_getattro`。" -#: ../../c-api/typeobj.rst:2635 +#: ../../c-api/typeobj.rst:2637 msgid "See :c:member:`~PyTypeObject.tp_setattro`." msgstr "請見 :c:member:`~PyTypeObject.tp_setattro`。" -#: ../../c-api/typeobj.rst:2639 +#: ../../c-api/typeobj.rst:2641 msgid "See :c:member:`~PyTypeObject.tp_descr_get`." msgstr "請見 :c:member:`~PyTypeObject.tp_descr_get`。" -#: ../../c-api/typeobj.rst:2643 +#: ../../c-api/typeobj.rst:2645 msgid "See :c:member:`~PyTypeObject.tp_descr_set`." msgstr "請見 :c:member:`~PyTypeObject.tp_descr_set`。" -#: ../../c-api/typeobj.rst:2647 +#: ../../c-api/typeobj.rst:2649 msgid "See :c:member:`~PyTypeObject.tp_hash`." msgstr "請見 :c:member:`~PyTypeObject.tp_hash`。" -#: ../../c-api/typeobj.rst:2651 +#: ../../c-api/typeobj.rst:2653 msgid "See :c:member:`~PyTypeObject.tp_richcompare`." msgstr "請見 :c:member:`~PyTypeObject.tp_richcompare`。" -#: ../../c-api/typeobj.rst:2655 +#: ../../c-api/typeobj.rst:2657 msgid "See :c:member:`~PyTypeObject.tp_iter`." msgstr "請見 :c:member:`~PyTypeObject.tp_iter`。" -#: ../../c-api/typeobj.rst:2659 +#: ../../c-api/typeobj.rst:2661 msgid "See :c:member:`~PyTypeObject.tp_iternext`." msgstr "請見 :c:member:`~PyTypeObject.tp_iternext`。" -#: ../../c-api/typeobj.rst:2673 +#: ../../c-api/typeobj.rst:2675 msgid "See :c:member:`~PyAsyncMethods.am_send`." msgstr "請見 :c:member:`~PyAsyncMethods.am_send`。" -#: ../../c-api/typeobj.rst:2689 +#: ../../c-api/typeobj.rst:2691 msgid "Examples" msgstr "範例" -#: ../../c-api/typeobj.rst:2691 +#: ../../c-api/typeobj.rst:2693 msgid "" "The following are simple examples of Python type definitions. They include " "common usage you may encounter. Some demonstrate tricky corner cases. For " @@ -3529,33 +3535,33 @@ msgid "" "and :ref:`new-types-topics`." msgstr "" -#: ../../c-api/typeobj.rst:2696 +#: ../../c-api/typeobj.rst:2698 msgid "A basic :ref:`static type `::" msgstr "" -#: ../../c-api/typeobj.rst:2713 +#: ../../c-api/typeobj.rst:2715 msgid "" "You may also find older code (especially in the CPython code base) with a " "more verbose initializer::" msgstr "" -#: ../../c-api/typeobj.rst:2757 +#: ../../c-api/typeobj.rst:2759 msgid "A type that supports weakrefs, instance dicts, and hashing::" msgstr "" -#: ../../c-api/typeobj.rst:2782 +#: ../../c-api/typeobj.rst:2784 msgid "" "A str subclass that cannot be subclassed and cannot be called to create " -"instances (e.g. uses a separate factory func) using :c:data:" +"instances (e.g. uses a separate factory func) using :c:macro:" "`Py_TPFLAGS_DISALLOW_INSTANTIATION` flag::" msgstr "" -#: ../../c-api/typeobj.rst:2801 +#: ../../c-api/typeobj.rst:2803 msgid "" "The simplest :ref:`static type ` with fixed-length instances::" msgstr "" -#: ../../c-api/typeobj.rst:2812 +#: ../../c-api/typeobj.rst:2814 msgid "" "The simplest :ref:`static type ` with variable-length " "instances::" diff --git a/c-api/unicode.po b/c-api/unicode.po index 2f70e80c16..876e3c2879 100644 --- a/c-api/unicode.po +++ b/c-api/unicode.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-17 17:39+0800\n" +"POT-Creation-Date: 2023-07-22 00:04+0000\n" "PO-Revision-Date: 2018-05-23 14:08+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -1538,7 +1538,7 @@ msgstr "" msgid "" "Encode the Unicode object using the specified code page and return a Python " "bytes object. Return ``NULL`` if an exception was raised by the codec. Use :" -"c:data:`CP_ACP` code page to get the MBCS encoder." +"c:macro:`CP_ACP` code page to get the MBCS encoder." msgstr "" #: ../../c-api/unicode.rst:1308 @@ -1661,17 +1661,17 @@ msgid "``NULL`` in case an exception was raised" msgstr "" #: ../../c-api/unicode.rst:1421 -msgid ":const:`Py_True` or :const:`Py_False` for successful comparisons" +msgid ":c:data:`Py_True` or :c:data:`Py_False` for successful comparisons" msgstr "" #: ../../c-api/unicode.rst:1422 -msgid ":const:`Py_NotImplemented` in case the type combination is unknown" +msgid ":c:data:`Py_NotImplemented` in case the type combination is unknown" msgstr "" #: ../../c-api/unicode.rst:1424 msgid "" -"Possible values for *op* are :const:`Py_GT`, :const:`Py_GE`, :const:" -"`Py_EQ`, :const:`Py_NE`, :const:`Py_LT`, and :const:`Py_LE`." +"Possible values for *op* are :c:macro:`Py_GT`, :c:macro:`Py_GE`, :c:macro:" +"`Py_EQ`, :c:macro:`Py_NE`, :c:macro:`Py_LT`, and :c:macro:`Py_LE`." msgstr "" #: ../../c-api/unicode.rst:1430 diff --git a/c-api/veryhigh.po b/c-api/veryhigh.po index c8d6b710f8..f78f02235e 100644 --- a/c-api/veryhigh.po +++ b/c-api/veryhigh.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-17 17:39+0800\n" +"POT-Creation-Date: 2023-07-22 00:04+0000\n" "PO-Revision-Date: 2018-05-23 14:08+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -32,8 +32,8 @@ msgstr "" #: ../../c-api/veryhigh.rst:14 msgid "" "Several of these functions accept a start symbol from the grammar as a " -"parameter. The available start symbols are :const:`Py_eval_input`, :const:" -"`Py_file_input`, and :const:`Py_single_input`. These are described " +"parameter. The available start symbols are :c:data:`Py_eval_input`, :c:data:" +"`Py_file_input`, and :c:data:`Py_single_input`. These are described " "following the functions which accept them as parameters." msgstr "" @@ -293,8 +293,8 @@ msgstr "" msgid "" "Parse and compile the Python source code in *str*, returning the resulting " "code object. The start token is given by *start*; this can be used to " -"constrain the code which can be compiled and should be :const:" -"`Py_eval_input`, :const:`Py_file_input`, or :const:`Py_single_input`. The " +"constrain the code which can be compiled and should be :c:data:" +"`Py_eval_input`, :c:data:`Py_file_input`, or :c:data:`Py_single_input`. The " "filename specified by *filename* is used to construct the code object and " "may appear in tracebacks or :exc:`SyntaxError` exception messages. This " "returns ``NULL`` if the code cannot be parsed or compiled." diff --git a/extending/extending.po b/extending/extending.po index 72c4cc5d2d..7d67bc61c1 100644 --- a/extending/extending.po +++ b/extending/extending.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-05-09 00:15+0000\n" +"POT-Creation-Date: 2023-07-22 00:04+0000\n" "PO-Revision-Date: 2018-05-23 14:34+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -399,7 +399,7 @@ msgstr "" #: ../../extending/extending.rst:338 msgid "" -"The :const:`METH_KEYWORDS` bit may be set in the third field if keyword " +"The :c:macro:`METH_KEYWORDS` bit may be set in the third field if keyword " "arguments should be passed to the function. In this case, the C function " "should accept a third ``PyObject *`` parameter which will be a dictionary of " "keywords. Use :c:func:`PyArg_ParseTupleAndKeywords` to parse the arguments " @@ -547,7 +547,7 @@ msgstr "" #: ../../extending/extending.rst:529 msgid "" -"This function must be registered with the interpreter using the :const:" +"This function must be registered with the interpreter using the :c:macro:" "`METH_VARARGS` flag; this is described in section :ref:`methodtable`. The :" "c:func:`PyArg_ParseTuple` function and its arguments are documented in " "section :ref:`parsetuple`." diff --git a/extending/newtypes_tutorial.po b/extending/newtypes_tutorial.po index e1b0bc549d..b1cbf67407 100644 --- a/extending/newtypes_tutorial.po +++ b/extending/newtypes_tutorial.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-17 17:39+0800\n" +"POT-Creation-Date: 2023-07-22 00:04+0000\n" "PO-Revision-Date: 2018-07-15 18:56+0800\n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" "tw)\n" @@ -184,7 +184,7 @@ msgid "" msgstr "" #: ../../extending/newtypes_tutorial.rst:154 -msgid "We set the class flags to :const:`Py_TPFLAGS_DEFAULT`. ::" +msgid "We set the class flags to :c:macro:`Py_TPFLAGS_DEFAULT`. ::" msgstr "" #: ../../extending/newtypes_tutorial.rst:158 @@ -516,8 +516,8 @@ msgstr "" #: ../../extending/newtypes_tutorial.rst:501 msgid "" -"(note that we used the :const:`METH_NOARGS` flag to indicate that the method " -"is expecting no arguments other than *self*)" +"(note that we used the :c:macro:`METH_NOARGS` flag to indicate that the " +"method is expecting no arguments other than *self*)" msgstr "" #: ../../extending/newtypes_tutorial.rst:504 @@ -529,7 +529,7 @@ msgid "" "Finally, we'll make our type usable as a base class for subclassing. We've " "written our methods carefully so far so that they don't make any assumptions " "about the type of the object being created or used, so all we need to do is " -"to add the :const:`Py_TPFLAGS_BASETYPE` to our class flag definition::" +"to add the :c:macro:`Py_TPFLAGS_BASETYPE` to our class flag definition::" msgstr "" #: ../../extending/newtypes_tutorial.rst:515 @@ -726,7 +726,7 @@ msgstr "" #: ../../extending/newtypes_tutorial.rst:777 msgid "" -"Finally, we add the :const:`Py_TPFLAGS_HAVE_GC` flag to the class flags::" +"Finally, we add the :c:macro:`Py_TPFLAGS_HAVE_GC` flag to the class flags::" msgstr "" #: ../../extending/newtypes_tutorial.rst:781 diff --git a/howto/isolating-extensions.po b/howto/isolating-extensions.po index 994589742c..b6db6023dd 100644 --- a/howto/isolating-extensions.po +++ b/howto/isolating-extensions.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-15 20:43+0000\n" +"POT-Creation-Date: 2023-07-22 00:04+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -381,14 +381,14 @@ msgstr "" #: ../../howto/isolating-extensions.rst:300 msgid "" "Unlike static types, heap type objects are mutable by default. Use the :c:" -"data:`Py_TPFLAGS_IMMUTABLETYPE` flag to prevent mutability." +"macro:`Py_TPFLAGS_IMMUTABLETYPE` flag to prevent mutability." msgstr "" #: ../../howto/isolating-extensions.rst:302 msgid "" "Heap types inherit :c:member:`~PyTypeObject.tp_new` by default, so it may " "become possible to instantiate them from Python code. You can prevent this " -"with the :c:data:`Py_TPFLAGS_DISALLOW_INSTANTIATION` flag." +"with the :c:macro:`Py_TPFLAGS_DISALLOW_INSTANTIATION` flag." msgstr "" #: ../../howto/isolating-extensions.rst:308 @@ -433,7 +433,7 @@ msgid "" msgstr "" #: ../../howto/isolating-extensions.rst:336 -msgid "Have the :c:data:`Py_TPFLAGS_HAVE_GC` flag." +msgid "Have the :c:macro:`Py_TPFLAGS_HAVE_GC` flag." msgstr "" #: ../../howto/isolating-extensions.rst:337 @@ -444,7 +444,7 @@ msgstr "" #: ../../howto/isolating-extensions.rst:340 msgid "" -"Please refer to the :ref:`the documentation ` of :c:data:" +"Please refer to the :ref:`the documentation ` of :c:macro:" "`Py_TPFLAGS_HAVE_GC` and :c:member:`~PyTypeObject.tp_traverse` for " "additional considerations." msgstr "" @@ -521,9 +521,10 @@ msgstr "" #: ../../howto/isolating-extensions.rst:413 msgid "" -"For a method to get its \"defining class\", it must use the :data:" -"`METH_METHOD | METH_FASTCALL | METH_KEYWORDS` :c:type:`calling convention " -"` and the corresponding :c:type:`PyCMethod` signature::" +"For a method to get its \"defining class\", it must use the :ref:" +"`METH_METHOD | METH_FASTCALL | METH_KEYWORDS ` :c:type:`calling convention ` and the " +"corresponding :c:type:`PyCMethod` signature::" msgstr "" #: ../../howto/isolating-extensions.rst:425 diff --git a/install/index.po b/install/index.po index f357a5a15b..ee720a6ebc 100644 --- a/install/index.po +++ b/install/index.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-17 17:39+0800\n" +"POT-Creation-Date: 2023-07-22 00:04+0000\n" "PO-Revision-Date: 2018-05-23 14:37+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -432,9 +432,9 @@ msgstr "" #: ../../install/index.rst:316 msgid "" -"Files will be installed into subdirectories of :data:`site.USER_BASE` " +"Files will be installed into subdirectories of :const:`site.USER_BASE` " "(written as :file:`{userbase}` hereafter). This scheme installs pure Python " -"modules and extension modules in the same location (also known as :data:" +"modules and extension modules in the same location (also known as :const:" "`site.USER_SITE`). Here are the values for UNIX, including macOS:" msgstr "" diff --git a/library/__main__.po b/library/__main__.po index c0dbfd168c..c369e52fc2 100644 --- a/library/__main__.po +++ b/library/__main__.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-17 17:39+0800\n" +"POT-Creation-Date: 2023-07-22 00:04+0000\n" "PO-Revision-Date: 2015-12-09 17:51+0000\n" "Last-Translator: Liang-Bo Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -336,12 +336,12 @@ msgstr "" #: ../../library/__main__.rst:339 msgid "" -"Python inserts an empty ``__main__`` module in :attr:`sys.modules` at " +"Python inserts an empty ``__main__`` module in :data:`sys.modules` at " "interpreter startup, and populates it by running top-level code. In our " "example this is the ``start`` module which runs line by line and imports " "``namely``. In turn, ``namely`` imports ``__main__`` (which is really " "``start``). That's an import cycle! Fortunately, since the partially " -"populated ``__main__`` module is present in :attr:`sys.modules`, Python " +"populated ``__main__`` module is present in :data:`sys.modules`, Python " "passes that to ``namely``. See :ref:`Special considerations for __main__ " "` in the import system's reference for details on how " "this works." diff --git a/library/_thread.po b/library/_thread.po index 7ef4909d31..0d60f4b515 100644 --- a/library/_thread.po +++ b/library/_thread.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-17 17:39+0800\n" +"POT-Creation-Date: 2023-07-22 00:04+0000\n" "PO-Revision-Date: 2015-12-09 17:51+0000\n" "Last-Translator: Liang-Bo Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -97,13 +97,13 @@ msgstr "" #: ../../library/_thread.rst:72 msgid "" "If given, *signum* is the number of the signal to simulate. If *signum* is " -"not given, :data:`signal.SIGINT` is simulated." +"not given, :const:`signal.SIGINT` is simulated." msgstr "" #: ../../library/_thread.rst:75 msgid "" -"If the given signal isn't handled by Python (it was set to :data:`signal." -"SIG_DFL` or :data:`signal.SIG_IGN`), this function does nothing." +"If the given signal isn't handled by Python (it was set to :const:`signal." +"SIG_DFL` or :const:`signal.SIG_IGN`), this function does nothing." msgstr "" #: ../../library/_thread.rst:79 @@ -150,7 +150,9 @@ msgstr "" msgid "" ":ref:`Availability `: Windows, FreeBSD, Linux, macOS, OpenBSD, " "NetBSD, AIX, DragonFlyBSD." -msgstr ":ref:`適用 `:Windows、FreeBSD、Linux、macOS、OpenBSD、NetBSD、AIX、DragonFlyBSD。" +msgstr "" +":ref:`適用 `:Windows、FreeBSD、Linux、macOS、OpenBSD、NetBSD、" +"AIX、DragonFlyBSD。" #: ../../library/_thread.rst:130 msgid "" diff --git a/library/asyncio-dev.po b/library/asyncio-dev.po index 974fc0041d..cf87ea1b7a 100644 --- a/library/asyncio-dev.po +++ b/library/asyncio-dev.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-15 20:43+0000\n" +"POT-Creation-Date: 2023-07-22 00:04+0000\n" "PO-Revision-Date: 2023-02-18 14:17+0800\n" "Last-Translator: Matt Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -74,9 +74,10 @@ msgid "In addition to enabling the debug mode, consider also:" msgstr "除了啟用除錯模式外,還要考慮:" #: ../../library/asyncio-dev.rst:36 +#, fuzzy msgid "" "setting the log level of the :ref:`asyncio logger ` to :py:" -"data:`logging.DEBUG`, for example the following snippet of code can be run " +"const:`logging.DEBUG`, for example the following snippet of code can be run " "at startup of the application::" msgstr "" "將 :ref:`asyncio logger(日誌記錄器) `\\ 的日誌級别設置為 :" @@ -259,8 +260,9 @@ msgstr "" "logger 執行的。" #: ../../library/asyncio-dev.rst:145 +#, fuzzy msgid "" -"The default log level is :py:data:`logging.INFO`, which can be easily " +"The default log level is :py:const:`logging.INFO`, which can be easily " "adjusted::" msgstr "" "日誌級別被預設為 :py:data:`logging.INFO`,它可以很容易地被調整:\n" diff --git a/library/asyncio-eventloop.po b/library/asyncio-eventloop.po index e8f2803f41..611e7918fa 100644 --- a/library/asyncio-eventloop.po +++ b/library/asyncio-eventloop.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-20 00:03+0000\n" +"POT-Creation-Date: 2023-07-22 00:04+0000\n" "PO-Revision-Date: 2022-02-20 12:36+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -530,13 +530,13 @@ msgstr "" #: ../../library/asyncio-eventloop.rst:406 msgid "" -"The socket family can be either :py:data:`~socket.AF_INET` or :py:data:" +"The socket family can be either :py:const:`~socket.AF_INET` or :py:const:" "`~socket.AF_INET6` depending on *host* (or the *family* argument, if " "provided)." msgstr "" #: ../../library/asyncio-eventloop.rst:410 -msgid "The socket type will be :py:data:`~socket.SOCK_STREAM`." +msgid "The socket type will be :py:const:`~socket.SOCK_STREAM`." msgstr "" #: ../../library/asyncio-eventloop.rst:412 @@ -701,7 +701,7 @@ msgstr "" #: ../../library/asyncio-eventloop.rst:512 msgid "" -"The socket option :py:data:`~socket.TCP_NODELAY` is set by default for all " +"The socket option :py:const:`~socket.TCP_NODELAY` is set by default for all " "TCP connections." msgstr "" @@ -755,13 +755,13 @@ msgstr "" #: ../../library/asyncio-eventloop.rst:555 msgid "" -"The socket family can be either :py:data:`~socket.AF_INET`, :py:data:" -"`~socket.AF_INET6`, or :py:data:`~socket.AF_UNIX`, depending on *host* (or " +"The socket family can be either :py:const:`~socket.AF_INET`, :py:const:" +"`~socket.AF_INET6`, or :py:const:`~socket.AF_UNIX`, depending on *host* (or " "the *family* argument, if provided)." msgstr "" #: ../../library/asyncio-eventloop.rst:559 -msgid "The socket type will be :py:data:`~socket.SOCK_DGRAM`." +msgid "The socket type will be :py:const:`~socket.SOCK_DGRAM`." msgstr "" #: ../../library/asyncio-eventloop.rst:561 @@ -804,7 +804,7 @@ msgid "" "*reuse_port* tells the kernel to allow this endpoint to be bound to the same " "port as other existing endpoints are bound to, so long as they all set this " "flag when being created. This option is not supported on Windows and some " -"Unixes. If the :py:data:`~socket.SO_REUSEPORT` constant is not defined then " +"Unixes. If the :py:const:`~socket.SO_REUSEPORT` constant is not defined then " "this capability is unsupported." msgstr "" @@ -836,7 +836,7 @@ msgstr "" #: ../../library/asyncio-eventloop.rst:608 msgid "" -"The *reuse_address* parameter is no longer supported, as using :py:data:" +"The *reuse_address* parameter is no longer supported, as using :py:const:" "`~sockets.SO_REUSEADDR` poses a significant security concern for UDP. " "Explicitly passing ``reuse_address=True`` will raise an exception." msgstr "" @@ -851,7 +851,7 @@ msgstr "" #: ../../library/asyncio-eventloop.rst:617 msgid "" "For supported platforms, *reuse_port* can be used as a replacement for " -"similar functionality. With *reuse_port*, :py:data:`~sockets.SO_REUSEPORT` " +"similar functionality. With *reuse_port*, :py:const:`~sockets.SO_REUSEPORT` " "is used instead, which specifically prevents processes with differing UIDs " "from assigning sockets to the same socket address." msgstr "" @@ -872,8 +872,8 @@ msgstr "" #: ../../library/asyncio-eventloop.rst:637 msgid "" -"The socket family will be :py:data:`~socket.AF_UNIX`; socket type will be :" -"py:data:`~socket.SOCK_STREAM`." +"The socket family will be :py:const:`~socket.AF_UNIX`; socket type will be :" +"py:const:`~socket.SOCK_STREAM`." msgstr "" #: ../../library/asyncio-eventloop.rst:642 @@ -907,7 +907,7 @@ msgstr "" #: ../../library/asyncio-eventloop.rst:674 msgid "" -"Create a TCP server (socket type :data:`~socket.SOCK_STREAM`) listening on " +"Create a TCP server (socket type :const:`~socket.SOCK_STREAM`) listening on " "*port* of the *host* address." msgstr "" @@ -954,9 +954,9 @@ msgstr "" #: ../../library/asyncio-eventloop.rst:702 msgid "" -"*family* can be set to either :data:`socket.AF_INET` or :data:`~socket." +"*family* can be set to either :const:`socket.AF_INET` or :const:`~socket." "AF_INET6` to force the socket to use IPv4 or IPv6. If not set, the *family* " -"will be determined from host name (defaults to :data:`~socket.AF_UNSPEC`)." +"will be determined from host name (defaults to :const:`~socket.AF_UNSPEC`)." msgstr "" #: ../../library/asyncio-eventloop.rst:707 @@ -1021,11 +1021,14 @@ msgid "The *host* parameter can be a sequence of strings." msgstr "" #: ../../library/asyncio-eventloop.rst:758 +#, fuzzy msgid "" "Added *ssl_handshake_timeout* and *start_serving* parameters. The socket " -"option :py:data:`~socket.TCP_NODELAY` is set by default for all TCP " +"option :py:const:`~socket.TCP_NODELAY` is set by default for all TCP " "connections." msgstr "" +"新增 *ssl_handshake_timeout* 與 *start_serving* 參數。\\ *path* 參數現在可為" +"一個 :class:`~pathlib.Path` 物件。" #: ../../library/asyncio-eventloop.rst:768 msgid "" @@ -1036,7 +1039,7 @@ msgstr "" #: ../../library/asyncio-eventloop.rst:779 msgid "" -"Similar to :meth:`loop.create_server` but works with the :py:data:`~socket." +"Similar to :meth:`loop.create_server` but works with the :py:const:`~socket." "AF_UNIX` socket family." msgstr "" diff --git a/library/asyncio-platforms.po b/library/asyncio-platforms.po index af6269e8ce..ffcffcbae3 100644 --- a/library/asyncio-platforms.po +++ b/library/asyncio-platforms.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-15 20:43+0000\n" +"POT-Creation-Date: 2023-07-22 00:04+0000\n" "PO-Revision-Date: 2022-01-17 11:37+0800\n" "Last-Translator: Matt Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -66,19 +66,22 @@ msgid "All event loops on Windows do not support the following methods:" msgstr "Windows 上的所有事件迴圈都不支援以下 method(方法):" #: ../../library/asyncio-platforms.rst:38 +#, fuzzy msgid "" ":meth:`loop.create_unix_connection` and :meth:`loop.create_unix_server` are " -"not supported. The :data:`socket.AF_UNIX` socket family is specific to Unix." +"not supported. The :const:`socket.AF_UNIX` socket family is specific to Unix." msgstr "" -"不支援 :meth:`loop.create_unix_connection` 和 :meth:`loop.create_unix_server`" -"。:data:`socket.AF_UNIX` socket 系列常數僅限於 Unix 上使用。" +"不支援 :meth:`loop.create_unix_connection` 和 :meth:`loop." +"create_unix_server`。:data:`socket.AF_UNIX` socket 系列常數僅限於 Unix 上使" +"用。" #: ../../library/asyncio-platforms.rst:42 msgid "" ":meth:`loop.add_signal_handler` and :meth:`loop.remove_signal_handler` are " "not supported." msgstr "" -"不支援 :meth:`loop.add_signal_handler` 和 :meth:`loop.remove_signal_handler`。" +"不支援 :meth:`loop.add_signal_handler` 和 :meth:`loop." +"remove_signal_handler`。" #: ../../library/asyncio-platforms.rst:45 msgid ":class:`SelectorEventLoop` has the following limitations:" diff --git a/library/asyncio-subprocess.po b/library/asyncio-subprocess.po index ae024f1c76..fc8767f5fe 100644 --- a/library/asyncio-subprocess.po +++ b/library/asyncio-subprocess.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-17 17:39+0800\n" +"POT-Creation-Date: 2023-07-22 00:04+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-" @@ -71,7 +71,7 @@ msgstr "" #: ../../library/asyncio-subprocess.rst:87 msgid "" "The *limit* argument sets the buffer limit for :class:`StreamReader` " -"wrappers for :attr:`Process.stdout` and :attr:`Process.stderr` (if :attr:" +"wrappers for :attr:`Process.stdout` and :attr:`Process.stderr` (if :const:" "`subprocess.PIPE` is passed to *stdout* and *stderr* arguments)." msgstr "" @@ -308,7 +308,7 @@ msgstr "" #: ../../library/asyncio-subprocess.rst:252 msgid "" -"On POSIX systems this method sends :py:data:`signal.SIGTERM` to the child " +"On POSIX systems this method sends :py:const:`signal.SIGTERM` to the child " "process." msgstr "" diff --git a/library/compileall.po b/library/compileall.po index d5c5d2582a..de1910b149 100644 --- a/library/compileall.po +++ b/library/compileall.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-02-13 00:17+0000\n" +"POT-Creation-Date: 2023-07-22 00:04+0000\n" "PO-Revision-Date: 2018-05-23 14:41+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -190,9 +190,9 @@ msgstr "" #: ../../library/compileall.rst:144 msgid "" -"Similarly, the :func:`compile` function respects the :attr:`sys." +"Similarly, the :func:`compile` function respects the :data:`sys." "pycache_prefix` setting. The generated bytecode cache will only be useful " -"if :func:`compile` is run with the same :attr:`sys.pycache_prefix` (if any) " +"if :func:`compile` is run with the same :data:`sys.pycache_prefix` (if any) " "that will be used at runtime." msgstr "" diff --git a/library/devmode.po b/library/devmode.po index f0348677ba..afd4426b90 100644 --- a/library/devmode.po +++ b/library/devmode.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-10-26 16:47+0000\n" +"POT-Creation-Date: 2023-07-22 00:04+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-" @@ -177,7 +177,7 @@ msgstr "" #: ../../library/devmode.rst:84 msgid "" -"Set the :attr:`~sys.flags.dev_mode` attribute of :attr:`sys.flags` to " +"Set the :attr:`~sys.flags.dev_mode` attribute of :data:`sys.flags` to " "``True``." msgstr "" diff --git a/library/dis.po b/library/dis.po index a032f7294f..73254c868c 100644 --- a/library/dis.po +++ b/library/dis.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-17 17:39+0800\n" +"POT-Creation-Date: 2023-07-22 00:04+0000\n" "PO-Revision-Date: 2018-07-27 16:55+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -776,8 +776,8 @@ msgstr "" #: ../../library/dis.rst:820 msgid "" "If ``STACK[-1]`` is an instance of :class:`collections.abc.Mapping` (or, " -"more technically: if it has the :const:`Py_TPFLAGS_MAPPING` flag set in its :" -"c:member:`~PyTypeObject.tp_flags`), push ``True`` onto the stack. " +"more technically: if it has the :c:macro:`Py_TPFLAGS_MAPPING` flag set in " +"its :c:member:`~PyTypeObject.tp_flags`), push ``True`` onto the stack. " "Otherwise, push ``False``." msgstr "" @@ -785,7 +785,7 @@ msgstr "" msgid "" "If ``STACK[-1]`` is an instance of :class:`collections.abc.Sequence` and is " "*not* an instance of :class:`str`/:class:`bytes`/:class:`bytearray` (or, " -"more technically: if it has the :const:`Py_TPFLAGS_SEQUENCE` flag set in " +"more technically: if it has the :c:macro:`Py_TPFLAGS_SEQUENCE` flag set in " "its :c:member:`~PyTypeObject.tp_flags`), push ``True`` onto the stack. " "Otherwise, push ``False``." msgstr "" diff --git a/library/exceptions.po b/library/exceptions.po index 97ba6b680b..ffbb21c128 100644 --- a/library/exceptions.po +++ b/library/exceptions.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-06 16:53+0000\n" +"POT-Creation-Date: 2023-07-22 00:04+0000\n" "PO-Revision-Date: 2018-05-23 16:01+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -762,9 +762,9 @@ msgstr "" #: ../../library/exceptions.rst:660 msgid "" "Raised when an operation would block on an object (e.g. socket) set for non-" -"blocking operation. Corresponds to :c:data:`errno` :py:data:`~errno." -"EAGAIN`, :py:data:`~errno.EALREADY`, :py:data:`~errno.EWOULDBLOCK` and :py:" -"data:`~errno.EINPROGRESS`." +"blocking operation. Corresponds to :c:data:`errno` :py:const:`~errno." +"EAGAIN`, :py:const:`~errno.EALREADY`, :py:const:`~errno.EWOULDBLOCK` and :py:" +"const:`~errno.EINPROGRESS`." msgstr "" #: ../../library/exceptions.rst:665 @@ -783,7 +783,7 @@ msgstr "" #: ../../library/exceptions.rst:676 msgid "" "Raised when an operation on a child process failed. Corresponds to :c:data:" -"`errno` :py:data:`~errno.ECHILD`." +"`errno` :py:const:`~errno.ECHILD`." msgstr "" #: ../../library/exceptions.rst:681 @@ -800,46 +800,46 @@ msgstr "" msgid "" "A subclass of :exc:`ConnectionError`, raised when trying to write on a pipe " "while the other end has been closed, or trying to write on a socket which " -"has been shutdown for writing. Corresponds to :c:data:`errno` :py:data:" -"`~errno.EPIPE` and :py:data:`~errno.ESHUTDOWN`." +"has been shutdown for writing. Corresponds to :c:data:`errno` :py:const:" +"`~errno.EPIPE` and :py:const:`~errno.ESHUTDOWN`." msgstr "" #: ../../library/exceptions.rst:695 msgid "" "A subclass of :exc:`ConnectionError`, raised when a connection attempt is " -"aborted by the peer. Corresponds to :c:data:`errno` :py:data:`~errno." +"aborted by the peer. Corresponds to :c:data:`errno` :py:const:`~errno." "ECONNABORTED`." msgstr "" #: ../../library/exceptions.rst:701 msgid "" "A subclass of :exc:`ConnectionError`, raised when a connection attempt is " -"refused by the peer. Corresponds to :c:data:`errno` :py:data:`~errno." +"refused by the peer. Corresponds to :c:data:`errno` :py:const:`~errno." "ECONNREFUSED`." msgstr "" #: ../../library/exceptions.rst:707 msgid "" "A subclass of :exc:`ConnectionError`, raised when a connection is reset by " -"the peer. Corresponds to :c:data:`errno` :py:data:`~errno.ECONNRESET`." +"the peer. Corresponds to :c:data:`errno` :py:const:`~errno.ECONNRESET`." msgstr "" #: ../../library/exceptions.rst:713 msgid "" "Raised when trying to create a file or directory which already exists. " -"Corresponds to :c:data:`errno` :py:data:`~errno.EEXIST`." +"Corresponds to :c:data:`errno` :py:const:`~errno.EEXIST`." msgstr "" #: ../../library/exceptions.rst:718 msgid "" "Raised when a file or directory is requested but doesn't exist. Corresponds " -"to :c:data:`errno` :py:data:`~errno.ENOENT`." +"to :c:data:`errno` :py:const:`~errno.ENOENT`." msgstr "" #: ../../library/exceptions.rst:723 msgid "" "Raised when a system call is interrupted by an incoming signal. Corresponds " -"to :c:data:`errno` :py:data:`~errno.EINTR`." +"to :c:data:`errno` :py:const:`~errno.EINTR`." msgstr "" #: ../../library/exceptions.rst:726 @@ -852,7 +852,7 @@ msgstr "" #: ../../library/exceptions.rst:733 msgid "" "Raised when a file operation (such as :func:`os.remove`) is requested on a " -"directory. Corresponds to :c:data:`errno` :py:data:`~errno.EISDIR`." +"directory. Corresponds to :c:data:`errno` :py:const:`~errno.EISDIR`." msgstr "" #: ../../library/exceptions.rst:739 @@ -860,32 +860,34 @@ msgid "" "Raised when a directory operation (such as :func:`os.listdir`) is requested " "on something which is not a directory. On most POSIX platforms, it may also " "be raised if an operation attempts to open or traverse a non-directory file " -"as if it were a directory. Corresponds to :c:data:`errno` :py:data:`~errno." +"as if it were a directory. Corresponds to :c:data:`errno` :py:const:`~errno." "ENOTDIR`." msgstr "" #: ../../library/exceptions.rst:747 msgid "" "Raised when trying to run an operation without the adequate access rights - " -"for example filesystem permissions. Corresponds to :c:data:`errno` :py:data:" -"`~errno.EACCES`, :py:data:`~errno.EPERM`, and :py:data:`~errno.ENOTCAPABLE`." +"for example filesystem permissions. Corresponds to :c:data:`errno` :py:const:" +"`~errno.EACCES`, :py:const:`~errno.EPERM`, and :py:const:`~errno." +"ENOTCAPABLE`." msgstr "" #: ../../library/exceptions.rst:752 msgid "" -"WASI's :py:data:`~errno.ENOTCAPABLE` is now mapped to :exc:`PermissionError`." +"WASI's :py:const:`~errno.ENOTCAPABLE` is now mapped to :exc:" +"`PermissionError`." msgstr "" #: ../../library/exceptions.rst:758 msgid "" "Raised when a given process doesn't exist. Corresponds to :c:data:`errno` :" -"py:data:`~errno.ESRCH`." +"py:const:`~errno.ESRCH`." msgstr "" #: ../../library/exceptions.rst:763 msgid "" "Raised when a system function timed out at the system level. Corresponds to :" -"c:data:`errno` :py:data:`~errno.ETIMEDOUT`." +"c:data:`errno` :py:const:`~errno.ETIMEDOUT`." msgstr "" #: ../../library/exceptions.rst:766 diff --git a/library/fcntl.po b/library/fcntl.po index ceb8def68d..2265fdcd2c 100644 --- a/library/fcntl.po +++ b/library/fcntl.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-17 17:39+0800\n" +"POT-Creation-Date: 2023-07-22 00:04+0000\n" "PO-Revision-Date: 2017-09-22 18:26+0000\n" "Last-Translator: Liang-Bo Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -259,16 +259,16 @@ msgid "" msgstr "" #: ../../library/fcntl.rst:175 -msgid ":const:`0` -- relative to the start of the file (:data:`os.SEEK_SET`)" +msgid ":const:`0` -- relative to the start of the file (:const:`os.SEEK_SET`)" msgstr "" #: ../../library/fcntl.rst:176 msgid "" -":const:`1` -- relative to the current buffer position (:data:`os.SEEK_CUR`)" +":const:`1` -- relative to the current buffer position (:const:`os.SEEK_CUR`)" msgstr "" #: ../../library/fcntl.rst:177 -msgid ":const:`2` -- relative to the end of the file (:data:`os.SEEK_END`)" +msgid ":const:`2` -- relative to the end of the file (:const:`os.SEEK_END`)" msgstr "" #: ../../library/fcntl.rst:179 @@ -304,7 +304,7 @@ msgstr ":mod:`os` 模組" #: ../../library/fcntl.rst:204 msgid "" -"If the locking flags :data:`~os.O_SHLOCK` and :data:`~os.O_EXLOCK` are " +"If the locking flags :const:`~os.O_SHLOCK` and :const:`~os.O_EXLOCK` are " "present in the :mod:`os` module (on BSD only), the :func:`os.open` function " "provides an alternative to the :func:`lockf` and :func:`flock` functions." msgstr "" diff --git a/library/filecmp.po b/library/filecmp.po index 1bafdd047c..3c06eb4bb2 100644 --- a/library/filecmp.po +++ b/library/filecmp.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-10-26 16:47+0000\n" +"POT-Creation-Date: 2023-07-22 00:04+0000\n" "PO-Revision-Date: 2015-12-09 17:51+0000\n" "Last-Translator: Liang-Bo Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -112,7 +112,7 @@ msgstr "" #: ../../library/filecmp.rst:75 msgid "" "Construct a new directory comparison object, to compare the directories *a* " -"and *b*. *ignore* is a list of names to ignore, and defaults to :attr:" +"and *b*. *ignore* is a list of names to ignore, and defaults to :const:" "`filecmp.DEFAULT_IGNORES`. *hide* is a list of names to hide, and defaults " "to ``[os.curdir, os.pardir]``." msgstr "" diff --git a/library/ftplib.po b/library/ftplib.po index e2b5ae2e73..3a311e7405 100644 --- a/library/ftplib.po +++ b/library/ftplib.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-17 17:39+0800\n" +"POT-Creation-Date: 2023-07-22 00:04+0000\n" "PO-Revision-Date: 2023-04-26 19:44+0800\n" "Last-Translator: Matt Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -127,9 +127,10 @@ msgstr "" "的)結構中。最佳實踐請參閱 :ref:`ssl-security`。" #: ../../library/ftplib.rst:105 +#, fuzzy msgid "" "The class now supports hostname check with :attr:`ssl.SSLContext." -"check_hostname` and *Server Name Indication* (see :data:`ssl.HAS_SNI`)." +"check_hostname` and *Server Name Indication* (see :const:`ssl.HAS_SNI`)." msgstr "" "該類別現在支援使用 :attr:`ssl.SSLContext.check_hostname` 和 *Server Name " "Indication* 進行主機名 (hostname) 檢查(參見 :data:`ssl.HAS_SNI`)。" @@ -551,7 +552,8 @@ msgid "" msgstr ":class:`FTP_TLS` 類別繼承自 :class:`FTP`,並另外定義了這些的物件:" #: ../../library/ftplib.rst:434 -msgid "The SSL version to use (defaults to :attr:`ssl.PROTOCOL_SSLv23`)." +#, fuzzy +msgid "The SSL version to use (defaults to :data:`ssl.PROTOCOL_SSLv23`)." msgstr "要使用的 SSL 版本(預設為 :attr:`ssl.PROTOCOL_SSLv23`)。" #: ../../library/ftplib.rst:438 @@ -562,9 +564,10 @@ msgstr "" "根據 :attr:`ssl_version` 屬性中指定的內容,使用 TLS 或 SSL 設定安全控制連線。" #: ../../library/ftplib.rst:441 +#, fuzzy msgid "" "The method now supports hostname check with :attr:`ssl.SSLContext." -"check_hostname` and *Server Name Indication* (see :data:`ssl.HAS_SNI`)." +"check_hostname` and *Server Name Indication* (see :const:`ssl.HAS_SNI`)." msgstr "" "該方法現在支援使用 :attr:`ssl.SSLContext.check_hostname` 和 *Server Name " "Indication* 進行主機名檢查(參見 :data:`ssl.HAS_SNI`)。" diff --git a/library/functions.po b/library/functions.po index 7f2d0316c4..855f6a80f4 100644 --- a/library/functions.po +++ b/library/functions.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-09 00:21+0000\n" +"POT-Creation-Date: 2023-07-22 00:04+0000\n" "PO-Revision-Date: 2023-07-02 22:53+0800\n" "Last-Translator: Matt Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -2107,8 +2107,8 @@ msgstr "" 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 " -"size\" and falling back on :attr:`io.DEFAULT_BUFFER_SIZE`. On many systems, " -"the buffer will typically be 4096 or 8192 bytes long." +"size\" and falling back on :const:`io.DEFAULT_BUFFER_SIZE`. On many " +"systems, the buffer will typically be 4096 or 8192 bytes long." msgstr "" #: ../../library/functions.rst:1237 diff --git a/library/gc.po b/library/gc.po index 9686a08b20..4f9145d56e 100644 --- a/library/gc.po +++ b/library/gc.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-17 17:39+0800\n" +"POT-Creation-Date: 2023-07-22 00:04+0000\n" "PO-Revision-Date: 2023-04-24 21:25+0800\n" "Last-Translator: Matt Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -365,12 +365,13 @@ msgstr "" "`DEBUG_UNCOLLECTABLE`,所有無法被回收的物件會被印出。" #: ../../library/gc.rst:261 +#, fuzzy msgid "" "Following :pep:`442`, objects with a :meth:`~object.__del__` method don't " -"end up in :attr:`gc.garbage` anymore." +"end up in :data:`gc.garbage` anymore." msgstr "" -"根據 :pep:`442`,帶有 :meth:`~object.__del__` method 的物件最終不會在 :attr:`gc." -"garbage` 內。" +"根據 :pep:`442`,帶有 :meth:`~object.__del__` method 的物件最終不會在 :attr:" +"`gc.garbage` 內。" #: ../../library/gc.rst:267 msgid "" diff --git a/library/gzip.po b/library/gzip.po index f9a8fa3e00..80a6709760 100644 --- a/library/gzip.po +++ b/library/gzip.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-17 17:39+0800\n" +"POT-Creation-Date: 2023-07-22 00:04+0000\n" "PO-Revision-Date: 2018-05-23 16:03+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -358,7 +358,7 @@ msgid "Command line options" msgstr "" #: ../../library/gzip.rst:271 -msgid "If *file* is not specified, read from :attr:`sys.stdin`." +msgid "If *file* is not specified, read from :data:`sys.stdin`." msgstr "" #: ../../library/gzip.rst:275 diff --git a/library/http.client.po b/library/http.client.po index 4824089cc6..145e6f5ac7 100644 --- a/library/http.client.po +++ b/library/http.client.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-17 17:39+0800\n" +"POT-Creation-Date: 2023-07-22 00:04+0000\n" "PO-Revision-Date: 2018-05-23 16:03+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -112,7 +112,7 @@ msgstr "新增 *source_address*\\ 、\\ *context* 與 *check_hostname*\\ 。" #: ../../library/http.client.rst:84 msgid "" -"This class now supports HTTPS virtual hosts if possible (that is, if :data:" +"This class now supports HTTPS virtual hosts if possible (that is, if :const:" "`ssl.HAS_SNI` is true)." msgstr "" diff --git a/library/imaplib.po b/library/imaplib.po index 2c06a0a901..c4cd78ee53 100644 --- a/library/imaplib.po +++ b/library/imaplib.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-17 17:39+0800\n" +"POT-Creation-Date: 2023-07-22 00:04+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-" @@ -133,7 +133,7 @@ msgstr "新增 *ssl_context* 參數。" #: ../../library/imaplib.rst:106 msgid "" "The class now supports hostname check with :attr:`ssl.SSLContext." -"check_hostname` and *Server Name Indication* (see :data:`ssl.HAS_SNI`)." +"check_hostname` and *Server Name Indication* (see :const:`ssl.HAS_SNI`)." msgstr "" #: ../../library/imaplib.rst:114 @@ -563,7 +563,7 @@ msgstr "" #: ../../library/imaplib.rst:503 msgid "" "The method now supports hostname check with :attr:`ssl.SSLContext." -"check_hostname` and *Server Name Indication* (see :data:`ssl.HAS_SNI`)." +"check_hostname` and *Server Name Indication* (see :const:`ssl.HAS_SNI`)." msgstr "" #: ../../library/imaplib.rst:511 diff --git a/library/importlib.po b/library/importlib.po index ba9020799b..0d8ed9706a 100644 --- a/library/importlib.po +++ b/library/importlib.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-17 17:39+0800\n" +"POT-Creation-Date: 2023-07-22 00:04+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-" @@ -531,7 +531,7 @@ msgstr ":attr:`__path__`" msgid "" "The list of locations where the package's submodules will be found. Most of " "the time this is a single directory. The import system passes this attribute " -"to ``__import__()`` and to finders in the same way as :attr:`sys.path` but " +"to ``__import__()`` and to finders in the same way as :data:`sys.path` but " "just for the package. It is not set on non-package modules so it can be used " "as an indicator that the module is a package." msgstr "" @@ -817,7 +817,7 @@ msgstr "" #: ../../library/importlib.rst:611 msgid "" -"When writing to the path fails because the path is read-only (:attr:`errno." +"When writing to the path fails because the path is read-only (:const:`errno." "EACCES`/:exc:`PermissionError`), do not propagate the exception." msgstr "" @@ -1050,7 +1050,7 @@ msgstr "" #: ../../library/importlib.rst:846 msgid "" -"A class method which returns a closure for use on :attr:`sys.path_hooks`. An " +"A class method which returns a closure for use on :data:`sys.path_hooks`. An " "instance of :class:`FileFinder` is returned by the closure using the path " "argument given to the closure directly and *loader_details* indirectly." msgstr "" @@ -1391,10 +1391,10 @@ msgstr "" #: ../../library/importlib.rst:1186 msgid "" "Find the :term:`spec ` for a module, optionally relative to the " -"specified **package** name. If the module is in :attr:`sys.modules`, then " +"specified **package** name. If the module is in :data:`sys.modules`, then " "``sys.modules[name].__spec__`` is returned (unless the spec would be " "``None`` or is not set, in which case :exc:`ValueError` is raised). " -"Otherwise a search using :attr:`sys.meta_path` is done. ``None`` is returned " +"Otherwise a search using :data:`sys.meta_path` is done. ``None`` is returned " "if no spec is found." msgstr "" @@ -1473,7 +1473,7 @@ msgid "" "is required. For those same reasons, the loader's :meth:`~importlib.abc." "Loader.create_module` method must return ``None`` or a type for which its " "``__class__`` attribute can be mutated along with not using :term:`slots " -"<__slots__>`. Finally, modules which substitute the object placed into :attr:" +"<__slots__>`. Finally, modules which substitute the object placed into :data:" "`sys.modules` will not work as there is no way to properly replace the " "module references throughout the interpreter safely; :exc:`ValueError` is " "raised if such a substitution is detected." @@ -1557,9 +1557,9 @@ msgid "" "`importer`. This means managing both the :term:`finder` and :term:`loader` " "side of things. For finders there are two flavours to choose from depending " "on your needs: a :term:`meta path finder` or a :term:`path entry finder`. " -"The former is what you would put on :attr:`sys.meta_path` while the latter " -"is what you create using a :term:`path entry hook` on :attr:`sys.path_hooks` " -"which works with :attr:`sys.path` entries to potentially create a finder. " +"The former is what you would put on :data:`sys.meta_path` while the latter " +"is what you create using a :term:`path entry hook` on :data:`sys.path_hooks` " +"which works with :data:`sys.path` entries to potentially create a finder. " "This example will show you how to register your own importers so that import " "will use them (for creating an importer for yourself, read the documentation " "for the appropriate classes defined within this package)::" diff --git a/library/importlib.resources.abc.po b/library/importlib.resources.abc.po index 887ad7dcb9..46767be528 100644 --- a/library/importlib.resources.abc.po +++ b/library/importlib.resources.abc.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-17 17:39+0800\n" +"POT-Creation-Date: 2023-07-22 00:04+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -163,7 +163,7 @@ msgstr "" #: ../../library/importlib.resources.abc.rst:132 msgid "" "When opening as text, accepts encoding parameters such as those accepted by :" -"attr:`io.TextIOWrapper`." +"class:`io.TextIOWrapper`." msgstr "" #: ../../library/importlib.resources.abc.rst:137 diff --git a/library/io.po b/library/io.po index 6f0fba9984..af2af9bdd0 100644 --- a/library/io.po +++ b/library/io.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-05-09 00:15+0000\n" +"POT-Creation-Date: 2023-07-22 00:04+0000\n" "PO-Revision-Date: 2023-07-17 17:38+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -631,9 +631,9 @@ msgstr "" #: ../../library/io.rst:424 msgid "" -"Some operating systems could support additional values, like :data:`os." -"SEEK_HOLE` or :data:`os.SEEK_DATA`. The valid values for a file could depend " -"on it being open in text or binary mode." +"Some operating systems could support additional values, like :const:`os." +"SEEK_HOLE` or :const:`os.SEEK_DATA`. The valid values for a file could " +"depend on it being open in text or binary mode." msgstr "" #: ../../library/io.rst:431 diff --git a/library/json.po b/library/json.po index c883f53a92..9871a67314 100644 --- a/library/json.po +++ b/library/json.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-15 20:43+0000\n" +"POT-Creation-Date: 2023-07-22 00:04+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-" @@ -773,7 +773,7 @@ msgstr "" #: ../../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:" +"data:`sys.stdin` and :data:`sys.stdout` will be used respectively:" msgstr "" #: ../../library/json.rst:697 @@ -791,13 +791,13 @@ msgid "The JSON file to be validated or pretty-printed:" msgstr "" #: ../../library/json.rst:724 -msgid "If *infile* is not specified, read from :attr:`sys.stdin`." +msgid "If *infile* is not specified, read from :data:`sys.stdin`." msgstr "" #: ../../library/json.rst:728 msgid "" "Write the output of the *infile* to the given *outfile*. Otherwise, write it " -"to :attr:`sys.stdout`." +"to :data:`sys.stdout`." msgstr "" #: ../../library/json.rst:733 diff --git a/library/logging.handlers.po b/library/logging.handlers.po index ad5fc3e568..0af0fee3a5 100644 --- a/library/logging.handlers.po +++ b/library/logging.handlers.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-17 17:39+0800\n" +"POT-Creation-Date: 2023-07-22 00:04+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-" @@ -1451,8 +1451,8 @@ msgid "" "Enqueues the result of preparing the LogRecord. Should an exception occur (e." "g. because a bounded queue has filled up), the :meth:`~logging.Handler." "handleError` method is called to handle the error. This can result in the " -"record silently being dropped (if :attr:`logging.raiseExceptions` is " -"``False``) or a message printed to ``sys.stderr`` (if :attr:`logging." +"record silently being dropped (if :data:`logging.raiseExceptions` is " +"``False``) or a message printed to ``sys.stderr`` (if :data:`logging." "raiseExceptions` is ``True``)." msgstr "" diff --git a/library/multiprocessing.po b/library/multiprocessing.po index 23b73504cb..9bdd32f856 100644 --- a/library/multiprocessing.po +++ b/library/multiprocessing.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-17 17:39+0800\n" +"POT-Creation-Date: 2023-07-22 00:04+0000\n" "PO-Revision-Date: 2018-05-23 16:06+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -2950,7 +2950,7 @@ msgstr "" #: ../../library/multiprocessing.rst:2710 msgid "" -"When first created the logger has level :data:`logging.NOTSET` and no " +"When first created the logger has level :const:`logging.NOTSET` and no " "default handler. Messages sent to this logger will not by default propagate " "to the root logger." msgstr "" diff --git a/library/optparse.po b/library/optparse.po index 8cc4650e80..6fb9346cbf 100644 --- a/library/optparse.po +++ b/library/optparse.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-17 17:39+0800\n" +"POT-Creation-Date: 2023-07-22 00:04+0000\n" "PO-Revision-Date: 2018-05-23 16:07+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -922,7 +922,7 @@ msgid "" "help option. When :mod:`optparse` prints the usage string, it expands " "``%prog`` to ``os.path.basename(sys.argv[0])`` (or to ``prog`` if you passed " "that keyword argument). To suppress a usage message, pass the special " -"value :data:`optparse.SUPPRESS_USAGE`." +"value :const:`optparse.SUPPRESS_USAGE`." msgstr "" #: ../../library/optparse.rst:822 @@ -1299,7 +1299,7 @@ msgid "" "Help text to print for this option when listing all available options after " "the user supplies a :attr:`~Option.help` option (such as ``--help``). If no " "help text is supplied, the option will be listed without help text. To hide " -"this option, use the special value :data:`optparse.SUPPRESS_HELP`." +"this option, use the special value :const:`optparse.SUPPRESS_HELP`." msgstr "" #: ../../library/optparse.rst:1087 @@ -1508,7 +1508,7 @@ msgstr "" msgid "" "If no :attr:`~Option.help` string is supplied for an option, it will still " "be listed in the help message. To omit an option entirely, use the special " -"value :data:`optparse.SUPPRESS_HELP`." +"value :const:`optparse.SUPPRESS_HELP`." msgstr "" #: ../../library/optparse.rst:1255 @@ -1845,7 +1845,7 @@ msgstr "" msgid "" "Set the usage string according to the rules described above for the " "``usage`` constructor keyword argument. Passing ``None`` sets the default " -"usage string; use :data:`optparse.SUPPRESS_USAGE` to suppress a usage " +"usage string; use :const:`optparse.SUPPRESS_USAGE` to suppress a usage " "message." msgstr "" diff --git a/library/os.path.po b/library/os.path.po index bf37ceefeb..4d6f79978c 100644 --- a/library/os.path.po +++ b/library/os.path.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-17 17:39+0800\n" +"POT-Creation-Date: 2023-07-22 00:04+0000\n" "PO-Revision-Date: 2023-07-13 14:06+0800\n" "Last-Translator: Po-Chuan Chen \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -471,7 +471,7 @@ msgid "" msgstr "" #: ../../library/os.path.rst:413 -msgid "*start* defaults to :attr:`os.curdir`." +msgid "*start* defaults to :data:`os.curdir`." msgstr "" #: ../../library/os.path.rst:423 diff --git a/library/os.po b/library/os.po index ed4cde5b00..67b3d7363a 100644 --- a/library/os.po +++ b/library/os.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-17 17:39+0800\n" +"POT-Creation-Date: 2023-07-22 00:04+0000\n" "PO-Revision-Date: 2022-10-16 08:11+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -99,7 +99,7 @@ msgstr "" #: ../../library/os.rst:63 msgid "" -":attr:`sys.platform` has a finer granularity. :func:`os.uname` gives system-" +":data:`sys.platform` has a finer granularity. :func:`os.uname` gives system-" "dependent version information." msgstr "" @@ -397,7 +397,7 @@ msgstr "" #: ../../library/os.rst:236 msgid "" -":data:`environb` is only available if :data:`supports_bytes_environ` is " +":data:`environb` is only available if :const:`supports_bytes_environ` is " "``True``." msgstr "" @@ -496,7 +496,7 @@ msgstr "" #: ../../library/os.rst:334 msgid "" -":func:`getenvb` is only available if :data:`supports_bytes_environ` is " +":func:`getenvb` is only available if :const:`supports_bytes_environ` is " "``True``." msgstr "" @@ -1020,7 +1020,7 @@ msgstr "" msgid "" "In Linux kernel older than 5.3, the files pointed by *src* and *dst* must " "reside in the same filesystem, otherwise an :exc:`OSError` is raised with :" -"attr:`~OSError.errno` set to :data:`errno.EXDEV`." +"attr:`~OSError.errno` set to :const:`errno.EXDEV`." msgstr "" #: ../../library/os.rst:928 @@ -1306,8 +1306,8 @@ msgstr "" #: ../../library/os.rst:1182 msgid "" -"Some operating systems could support additional values, like :data:`os." -"SEEK_HOLE` or :data:`os.SEEK_DATA`." +"Some operating systems could support additional values, like :const:`os." +"SEEK_HOLE` or :const:`os.SEEK_DATA`." msgstr "" #: ../../library/os.rst:1189 @@ -1555,7 +1555,7 @@ msgstr "" #: ../../library/os.rst:1423 msgid "" "If some data was successfully read, it will return the number of bytes read. " -"If no bytes were read, it will return ``-1`` and set errno to :data:`errno." +"If no bytes were read, it will return ``-1`` and set errno to :const:`errno." "EAGAIN`." msgstr "" @@ -1749,7 +1749,7 @@ msgid "" "*offset_dst*. The offset associated to the file descriptor that refers to a " "pipe must be ``None``. The files pointed by *src* and *dst* must reside in " "the same filesystem, otherwise an :exc:`OSError` is raised with :attr:" -"`~OSError.errno` set to :data:`errno.EXDEV`." +"`~OSError.errno` set to :const:`errno.EXDEV`." msgstr "" #: ../../library/os.rst:1632 @@ -2091,51 +2091,63 @@ msgid "" msgstr "" #: ../../library/os.rst:1963 -msgid ":data:`stat.UF_NODUMP`" +#, fuzzy +msgid ":const:`stat.UF_NODUMP`" msgstr ":data:`stat.UF_NODUMP`" #: ../../library/os.rst:1964 -msgid ":data:`stat.UF_IMMUTABLE`" +#, fuzzy +msgid ":const:`stat.UF_IMMUTABLE`" msgstr ":data:`stat.UF_IMMUTABLE`" #: ../../library/os.rst:1965 -msgid ":data:`stat.UF_APPEND`" +#, fuzzy +msgid ":const:`stat.UF_APPEND`" msgstr ":data:`stat.UF_APPEND`" #: ../../library/os.rst:1966 -msgid ":data:`stat.UF_OPAQUE`" +#, fuzzy +msgid ":const:`stat.UF_OPAQUE`" msgstr ":data:`stat.UF_OPAQUE`" #: ../../library/os.rst:1967 -msgid ":data:`stat.UF_NOUNLINK`" +#, fuzzy +msgid ":const:`stat.UF_NOUNLINK`" msgstr ":data:`stat.UF_NOUNLINK`" #: ../../library/os.rst:1968 -msgid ":data:`stat.UF_COMPRESSED`" +#, fuzzy +msgid ":const:`stat.UF_COMPRESSED`" msgstr ":data:`stat.UF_COMPRESSED`" #: ../../library/os.rst:1969 -msgid ":data:`stat.UF_HIDDEN`" +#, fuzzy +msgid ":const:`stat.UF_HIDDEN`" msgstr ":data:`stat.UF_HIDDEN`" #: ../../library/os.rst:1970 -msgid ":data:`stat.SF_ARCHIVED`" +#, fuzzy +msgid ":const:`stat.SF_ARCHIVED`" msgstr ":data:`stat.SF_ARCHIVED`" #: ../../library/os.rst:1971 -msgid ":data:`stat.SF_IMMUTABLE`" +#, fuzzy +msgid ":const:`stat.SF_IMMUTABLE`" msgstr ":data:`stat.SF_IMMUTABLE`" #: ../../library/os.rst:1972 -msgid ":data:`stat.SF_APPEND`" +#, fuzzy +msgid ":const:`stat.SF_APPEND`" msgstr ":data:`stat.SF_APPEND`" #: ../../library/os.rst:1973 -msgid ":data:`stat.SF_NOUNLINK`" +#, fuzzy +msgid ":const:`stat.SF_NOUNLINK`" msgstr ":data:`stat.SF_NOUNLINK`" #: ../../library/os.rst:1974 -msgid ":data:`stat.SF_SNAPSHOT`" +#, fuzzy +msgid ":const:`stat.SF_SNAPSHOT`" msgstr ":data:`stat.SF_SNAPSHOT`" #: ../../library/os.rst:1976 @@ -2163,79 +2175,98 @@ msgid "" msgstr "" #: ../../library/os.rst:1995 -msgid ":data:`stat.S_ISUID`" +#, fuzzy +msgid ":const:`stat.S_ISUID`" msgstr ":data:`stat.S_ISUID`" #: ../../library/os.rst:1996 -msgid ":data:`stat.S_ISGID`" +#, fuzzy +msgid ":const:`stat.S_ISGID`" msgstr ":data:`stat.S_ISGID`" #: ../../library/os.rst:1997 -msgid ":data:`stat.S_ENFMT`" +#, fuzzy +msgid ":const:`stat.S_ENFMT`" msgstr ":data:`stat.S_ENFMT`" #: ../../library/os.rst:1998 -msgid ":data:`stat.S_ISVTX`" +#, fuzzy +msgid ":const:`stat.S_ISVTX`" msgstr ":data:`stat.S_ISVTX`" #: ../../library/os.rst:1999 -msgid ":data:`stat.S_IREAD`" +#, fuzzy +msgid ":const:`stat.S_IREAD`" msgstr ":data:`stat.S_IREAD`" #: ../../library/os.rst:2000 -msgid ":data:`stat.S_IWRITE`" +#, fuzzy +msgid ":const:`stat.S_IWRITE`" msgstr ":data:`stat.S_IWRITE`" #: ../../library/os.rst:2001 -msgid ":data:`stat.S_IEXEC`" +#, fuzzy +msgid ":const:`stat.S_IEXEC`" msgstr ":data:`stat.S_IEXEC`" #: ../../library/os.rst:2002 -msgid ":data:`stat.S_IRWXU`" +#, fuzzy +msgid ":const:`stat.S_IRWXU`" msgstr ":data:`stat.S_IRWXU`" #: ../../library/os.rst:2003 -msgid ":data:`stat.S_IRUSR`" +#, fuzzy +msgid ":const:`stat.S_IRUSR`" msgstr ":data:`stat.S_IRUSR`" #: ../../library/os.rst:2004 -msgid ":data:`stat.S_IWUSR`" +#, fuzzy +msgid ":const:`stat.S_IWUSR`" msgstr ":data:`stat.S_IWUSR`" #: ../../library/os.rst:2005 -msgid ":data:`stat.S_IXUSR`" +#, fuzzy +msgid ":const:`stat.S_IXUSR`" msgstr ":data:`stat.S_IXUSR`" #: ../../library/os.rst:2006 -msgid ":data:`stat.S_IRWXG`" +#, fuzzy +msgid ":const:`stat.S_IRWXG`" msgstr ":data:`stat.S_IRWXG`" #: ../../library/os.rst:2007 -msgid ":data:`stat.S_IRGRP`" +#, fuzzy +msgid ":const:`stat.S_IRGRP`" msgstr ":data:`stat.S_IRGRP`" #: ../../library/os.rst:2008 -msgid ":data:`stat.S_IWGRP`" +#, fuzzy +msgid ":const:`stat.S_IWGRP`" msgstr ":data:`stat.S_IWGRP`" #: ../../library/os.rst:2009 -msgid ":data:`stat.S_IXGRP`" +#, fuzzy +msgid ":const:`stat.S_IXGRP`" msgstr ":data:`stat.S_IXGRP`" #: ../../library/os.rst:2010 -msgid ":data:`stat.S_IRWXO`" +#, fuzzy +msgid ":const:`stat.S_IRWXO`" msgstr ":data:`stat.S_IRWXO`" #: ../../library/os.rst:2011 -msgid ":data:`stat.S_IROTH`" +#, fuzzy +msgid ":const:`stat.S_IROTH`" msgstr ":data:`stat.S_IROTH`" #: ../../library/os.rst:2012 -msgid ":data:`stat.S_IWOTH`" +#, fuzzy +msgid ":const:`stat.S_IWOTH`" msgstr ":data:`stat.S_IWOTH`" #: ../../library/os.rst:2013 -msgid ":data:`stat.S_IXOTH`" +#, fuzzy +msgid ":const:`stat.S_IXOTH`" msgstr ":data:`stat.S_IXOTH`" #: ../../library/os.rst:2015 ../../library/os.rst:2043 @@ -2460,7 +2491,8 @@ msgid "" "Raises an :ref:`auditing event ` ``os.listmounts`` with argument " "``volume``." msgstr "" -"引發一個附帶引數 ``volume`` 的\\ :ref:`稽核事件 ` ``os.listmounts``。" +"引發一個附帶引數 ``volume`` 的\\ :ref:`稽核事件 ` ``os." +"listmounts``。" #: ../../library/os.rst:2247 msgid "Return a list containing the volumes in the system." @@ -4485,12 +4517,13 @@ msgstr "" #: ../../library/os.rst:4154 msgid "" -"Windows: The :data:`signal.CTRL_C_EVENT` and :data:`signal.CTRL_BREAK_EVENT` " -"signals are special signals which can only be sent to console processes " -"which share a common console window, e.g., some subprocesses. Any other " -"value for *sig* will cause the process to be unconditionally killed by the " -"TerminateProcess API, and the exit code will be set to *sig*. The Windows " -"version of :func:`kill` additionally takes process handles to be killed." +"Windows: The :const:`signal.CTRL_C_EVENT` and :const:`signal." +"CTRL_BREAK_EVENT` signals are special signals which can only be sent to " +"console processes which share a common console window, e.g., some " +"subprocesses. Any other value for *sig* will cause the process to be " +"unconditionally killed by the TerminateProcess API, and the exit code will " +"be set to *sig*. The Windows version of :func:`kill` additionally takes " +"process handles to be killed." msgstr "" #: ../../library/os.rst:4162 @@ -4546,7 +4579,7 @@ msgid "" "This flag indicates that the file descriptor will be non-blocking. If the " "process referred to by the file descriptor has not yet terminated, then an " "attempt to wait on the file descriptor using :manpage:`waitid(2)` will " -"immediately return the error :data:`~errno.EAGAIN` rather than blocking." +"immediately return the error :const:`~errno.EAGAIN` rather than blocking." msgstr "" #: ../../library/os.rst:4210 @@ -4682,7 +4715,7 @@ msgid "" "value specified. If the value specified is 0, the child's process group ID " "will be made the same as its process ID. If the value of *setpgroup* is not " "set, the child will inherit the parent's process group ID. This argument " -"corresponds to the C library :c:data:`POSIX_SPAWN_SETPGROUP` flag." +"corresponds to the C library :c:macro:`POSIX_SPAWN_SETPGROUP` flag." msgstr "" #: ../../library/os.rst:4313 @@ -4693,13 +4726,13 @@ msgid "" "the parent. In either case, if the set-user-ID and set-group-ID permission " "bits are enabled on the executable file, their effect will override the " "setting of the effective UID and GID. This argument corresponds to the C " -"library :c:data:`POSIX_SPAWN_RESETIDS` flag." +"library :c:macro:`POSIX_SPAWN_RESETIDS` flag." msgstr "" #: ../../library/os.rst:4321 msgid "" "If the *setsid* argument is ``True``, it will create a new session ID for " -"``posix_spawn``. *setsid* requires :c:data:`POSIX_SPAWN_SETSID` or :c:data:" +"``posix_spawn``. *setsid* requires :c:macro:`POSIX_SPAWN_SETSID` or :c:macro:" "`POSIX_SPAWN_SETSID_NP` flag. Otherwise, :exc:`NotImplementedError` is " "raised." msgstr "" @@ -4708,14 +4741,14 @@ msgstr "" msgid "" "The *setsigmask* argument will set the signal mask to the signal set " "specified. If the parameter is not used, then the child inherits the " -"parent's signal mask. This argument corresponds to the C library :c:data:" +"parent's signal mask. This argument corresponds to the C library :c:macro:" "`POSIX_SPAWN_SETSIGMASK` flag." msgstr "" #: ../../library/os.rst:4331 msgid "" "The *sigdef* argument will reset the disposition of all signals in the set " -"specified. This argument corresponds to the C library :c:data:" +"specified. This argument corresponds to the C library :c:macro:" "`POSIX_SPAWN_SETSIGDEF` flag." msgstr "" @@ -4725,7 +4758,7 @@ msgid "" "policy and an instance of :class:`sched_param` with the scheduler " "parameters. A value of ``None`` in the place of the scheduler policy " "indicates that is not being provided. This argument is a combination of the " -"C library :c:data:`POSIX_SPAWN_SETSCHEDPARAM` and :c:data:" +"C library :c:macro:`POSIX_SPAWN_SETSCHEDPARAM` and :c:macro:" "`POSIX_SPAWN_SETSCHEDULER` flags." msgstr "" @@ -5148,7 +5181,7 @@ msgid ":attr:`!si_uid` (real user ID of the child)" msgstr "" #: ../../library/os.rst:4657 -msgid ":attr:`!si_signo` (always :data:`~signal.SIGCHLD`)" +msgid ":attr:`!si_signo` (always :const:`~signal.SIGCHLD`)" msgstr "" #: ../../library/os.rst:4658 @@ -5396,7 +5429,7 @@ msgstr "" #: ../../library/os.rst:4894 msgid "" -"Return ``True`` if a stopped child has been resumed by delivery of :data:" +"Return ``True`` if a stopped child has been resumed by delivery of :const:" "`~signal.SIGCONT` (if the process has been continued from a job control " "stop), otherwise return ``False``." msgstr "" @@ -5764,7 +5797,7 @@ msgstr "" #: ../../library/os.rst:5266 msgid "" "The flags argument is a bit mask that can contain zero or more of the " -"following values ORed together: :py:data:`os.GRND_RANDOM` and :py:data:" +"following values ORed together: :py:const:`os.GRND_RANDOM` and :py:data:" "`GRND_NONBLOCK`." msgstr "" diff --git a/library/platform.po b/library/platform.po index 66906e9a9f..f124d800e8 100644 --- a/library/platform.po +++ b/library/platform.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-17 17:39+0800\n" +"POT-Creation-Date: 2023-07-22 00:04+0000\n" "PO-Revision-Date: 2022-06-11 14:03+0800\n" "Last-Translator: Matt Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -84,9 +84,10 @@ msgstr "" "在 macOS(也許還有其他平臺)上,可執行檔案可能是包含多種架構的通用檔案。" #: ../../library/platform.rst:48 +#, fuzzy msgid "" "To get at the \"64-bitness\" of the current interpreter, it is more reliable " -"to query the :attr:`sys.maxsize` attribute::" +"to query the :data:`sys.maxsize` attribute::" msgstr "" "要獲取當前直譯器的 \"64 位元性 (64-bitness)\",更可靠的做法是查詢 :attr:`sys." "maxsize` 屬性:\n" diff --git a/library/poplib.po b/library/poplib.po index 715710a7de..845e4604cc 100644 --- a/library/poplib.po +++ b/library/poplib.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-17 17:39+0800\n" +"POT-Creation-Date: 2023-07-22 00:04+0000\n" "PO-Revision-Date: 2018-05-23 16:08+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -124,7 +124,7 @@ msgstr "" #: ../../library/poplib.rst:77 msgid "" "The class now supports hostname check with :attr:`ssl.SSLContext." -"check_hostname` and *Server Name Indication* (see :data:`ssl.HAS_SNI`)." +"check_hostname` and *Server Name Indication* (see :const:`ssl.HAS_SNI`)." msgstr "" #: ../../library/poplib.rst:86 @@ -301,7 +301,7 @@ msgstr "" #: ../../library/poplib.rst:241 msgid "" "This method supports hostname checking via :attr:`ssl.SSLContext." -"check_hostname` and *Server Name Indication* (see :data:`ssl.HAS_SNI`)." +"check_hostname` and *Server Name Indication* (see :const:`ssl.HAS_SNI`)." msgstr "" #: ../../library/poplib.rst:248 diff --git a/library/shelve.po b/library/shelve.po index c89f78d767..b669a8f6f7 100644 --- a/library/shelve.po +++ b/library/shelve.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-05-09 00:15+0000\n" +"POT-Creation-Date: 2023-07-22 00:04+0000\n" "PO-Revision-Date: 2018-05-23 16:09+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -48,9 +48,9 @@ msgstr "" #: ../../library/shelve.rst:28 msgid "" -"By default, pickles created with :data:`pickle.DEFAULT_PROTOCOL` are used to " -"serialize values. The version of the pickle protocol can be specified with " -"the *protocol* parameter." +"By default, pickles created with :const:`pickle.DEFAULT_PROTOCOL` are used " +"to serialize values. The version of the pickle protocol can be specified " +"with the *protocol* parameter." msgstr "" #: ../../library/shelve.rst:32 @@ -70,7 +70,7 @@ msgstr "" #: ../../library/shelve.rst:44 ../../library/shelve.rst:145 msgid "" -":data:`pickle.DEFAULT_PROTOCOL` is now used as the default pickle protocol." +":const:`pickle.DEFAULT_PROTOCOL` is now used as the default pickle protocol." msgstr "" #: ../../library/shelve.rst:48 @@ -157,9 +157,9 @@ msgstr "" #: ../../library/shelve.rst:122 msgid "" -"By default, pickles created with :data:`pickle.DEFAULT_PROTOCOL` are used to " -"serialize values. The version of the pickle protocol can be specified with " -"the *protocol* parameter. See the :mod:`pickle` documentation for a " +"By default, pickles created with :const:`pickle.DEFAULT_PROTOCOL` are used " +"to serialize values. The version of the pickle protocol can be specified " +"with the *protocol* parameter. See the :mod:`pickle` documentation for a " "discussion of the pickle protocols." msgstr "" diff --git a/library/shutil.po b/library/shutil.po index 7d9d2a7dcb..7b098f1281 100644 --- a/library/shutil.po +++ b/library/shutil.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-17 17:39+0800\n" +"POT-Creation-Date: 2023-07-22 00:04+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-" @@ -565,7 +565,7 @@ msgstr "" #: ../../library/shutil.rst:433 msgid "" "When no *path* is specified, the results of :func:`os.environ` are used, " -"returning either the \"PATH\" value or a fallback of :attr:`os.defpath`." +"returning either the \"PATH\" value or a fallback of :data:`os.defpath`." msgstr "" #: ../../library/shutil.rst:436 diff --git a/library/smtplib.po b/library/smtplib.po index 80d8fcea19..90f0ed257d 100644 --- a/library/smtplib.po +++ b/library/smtplib.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-17 17:39+0800\n" +"POT-Creation-Date: 2023-07-22 00:04+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-" @@ -139,7 +139,7 @@ msgstr "新增 source_address 引數。" #: ../../library/smtplib.rst:98 msgid "" "The class now supports hostname check with :attr:`ssl.SSLContext." -"check_hostname` and *Server Name Indication* (see :data:`ssl.HAS_SNI`)." +"check_hostname` and *Server Name Indication* (see :const:`ssl.HAS_SNI`)." msgstr "" #: ../../library/smtplib.rst:103 @@ -543,7 +543,7 @@ msgstr "" #: ../../library/smtplib.rst:418 msgid "" "The method now supports hostname check with :attr:`SSLContext." -"check_hostname` and *Server Name Indicator* (see :data:`~ssl.HAS_SNI`)." +"check_hostname` and *Server Name Indicator* (see :const:`~ssl.HAS_SNI`)." msgstr "" #: ../../library/smtplib.rst:423 diff --git a/library/socket.po b/library/socket.po index eaacda1a31..7bc624ab87 100644 --- a/library/socket.po +++ b/library/socket.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-17 17:39+0800\n" +"POT-Creation-Date: 2023-07-22 00:04+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-" @@ -2354,7 +2354,7 @@ msgstr "" #: ../../library/socket.rst:2254 msgid "" -"There is a :mod:`socket` flag to set, in order to prevent this, :data:" +"There is a :mod:`socket` flag to set, in order to prevent this, :const:" "`socket.SO_REUSEADDR`::" msgstr "" diff --git a/library/sqlite3.po b/library/sqlite3.po index bb167120b2..d2781b6b84 100644 --- a/library/sqlite3.po +++ b/library/sqlite3.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-19 00:54+0800\n" +"POT-Creation-Date: 2023-07-22 00:04+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-" @@ -299,8 +299,8 @@ msgid "" "isolation_level` and :ref:`sqlite3-transaction-control-isolation-level` for " "more information. Can be ``\"DEFERRED\"`` (default), ``\"EXCLUSIVE\"`` or " "``\"IMMEDIATE\"``; or ``None`` to disable opening transactions implicitly. " -"Has no effect unless :attr:`Connection.autocommit` is set to :data:`~sqlite3." -"LEGACY_TRANSACTION_CONTROL` (the default)." +"Has no effect unless :attr:`Connection.autocommit` is set to :const:" +"`~sqlite3.LEGACY_TRANSACTION_CONTROL` (the default)." msgstr "" #: ../../library/sqlite3.rst:305 @@ -337,7 +337,7 @@ msgstr "" msgid "" "Control :pep:`249` transaction handling behaviour. See :attr:`Connection." "autocommit` and :ref:`sqlite3-transaction-control-autocommit` for more " -"information. *autocommit* currently defaults to :data:`~sqlite3." +"information. *autocommit* currently defaults to :const:`~sqlite3." "LEGACY_TRANSACTION_CONTROL`. The default will change to ``False`` in a " "future Python release." msgstr "" @@ -1710,9 +1710,9 @@ msgstr "" #: ../../library/sqlite3.rst:1823 msgid "" "Set the current access position of the blob to *offset*. The *origin* " -"argument defaults to :data:`os.SEEK_SET` (absolute blob positioning). Other " -"values for *origin* are :data:`os.SEEK_CUR` (seek relative to the current " -"position) and :data:`os.SEEK_END` (seek relative to the blob’s end)." +"argument defaults to :const:`os.SEEK_SET` (absolute blob positioning). Other " +"values for *origin* are :const:`os.SEEK_CUR` (seek relative to the current " +"position) and :const:`os.SEEK_END` (seek relative to the blob’s end)." msgstr "" #: ../../library/sqlite3.rst:1831 diff --git a/library/ssl.po b/library/ssl.po index 2f978b200b..ed227ef89e 100644 --- a/library/ssl.po +++ b/library/ssl.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-17 17:39+0800\n" +"POT-Creation-Date: 2023-07-22 00:04+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-" @@ -165,7 +165,7 @@ msgid "" "The settings are: :data:`PROTOCOL_TLS_CLIENT` or :data:" "`PROTOCOL_TLS_SERVER`, :data:`OP_NO_SSLv2`, and :data:`OP_NO_SSLv3` with " "high encryption cipher suites without RC4 and without unauthenticated cipher " -"suites. Passing :data:`~Purpose.SERVER_AUTH` as *purpose* sets :data:" +"suites. Passing :const:`~Purpose.SERVER_AUTH` as *purpose* sets :data:" "`~SSLContext.verify_mode` to :data:`CERT_REQUIRED` and either loads CA " "certificates (when at least one of *cafile*, *capath* or *cadata* is given) " "or uses :meth:`SSLContext.load_default_certs` to load default CA " @@ -1680,9 +1680,9 @@ msgstr "" #: ../../library/ssl.rst:1486 msgid "" "The *purpose* flag specifies what kind of CA certificates are loaded. The " -"default settings :data:`Purpose.SERVER_AUTH` loads certificates, that are " +"default settings :const:`Purpose.SERVER_AUTH` loads certificates, that are " "flagged and trusted for TLS web server authentication (client side " -"sockets). :data:`Purpose.CLIENT_AUTH` loads CA certificates for client " +"sockets). :const:`Purpose.CLIENT_AUTH` loads CA certificates for client " "certificate verification on the server side." msgstr "" @@ -1945,7 +1945,7 @@ msgid "" "Wrap an existing Python socket *sock* and return an instance of :attr:" "`SSLContext.sslsocket_class` (default :class:`SSLSocket`). The returned SSL " "socket is tied to the context, its settings and certificates. *sock* must be " -"a :data:`~socket.SOCK_STREAM` socket; other socket types are unsupported." +"a :const:`~socket.SOCK_STREAM` socket; other socket types are unsupported." msgstr "" #: ../../library/ssl.rst:1735 diff --git a/library/subprocess.po b/library/subprocess.po index 53c1babf03..30fab2a5d1 100644 --- a/library/subprocess.po +++ b/library/subprocess.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-17 17:39+0800\n" +"POT-Creation-Date: 2023-07-22 00:04+0000\n" "PO-Revision-Date: 2018-05-23 16:11+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -1790,7 +1790,7 @@ msgstr "" #: ../../library/subprocess.rst:1611 msgid "" "If you ever encounter a presumed highly unusual situation where you need to " -"prevent ``vfork()`` from being used by Python, you can set the :attr:" +"prevent ``vfork()`` from being used by Python, you can set the :const:" "`subprocess._USE_VFORK` attribute to a false value." msgstr "" @@ -1798,7 +1798,7 @@ msgstr "" msgid "" "Setting this has no impact on use of ``posix_spawn()`` which could use " "``vfork()`` internally within its libc implementation. There is a similar :" -"attr:`subprocess._USE_POSIX_SPAWN` attribute if you need to prevent use of " +"const:`subprocess._USE_POSIX_SPAWN` attribute if you need to prevent use of " "that." msgstr "" diff --git a/library/sys.po b/library/sys.po index ed432cdea5..6f279f7bf3 100644 --- a/library/sys.po +++ b/library/sys.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-17 17:39+0800\n" +"POT-Creation-Date: 2023-07-22 00:04+0000\n" "PO-Revision-Date: 2023-04-26 02:54+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -224,7 +224,8 @@ msgid "" msgstr "" #: ../../library/sys.rst:169 -msgid "See also the :attr:`sys.stdlib_module_names` list." +#, fuzzy +msgid "See also the :data:`sys.stdlib_module_names` list." msgstr "另請參閱 :attr:`sys.stdlib_module_names` 清單。" #: ../../library/sys.rst:174 @@ -1073,7 +1074,7 @@ msgstr "" 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`)." +"module (``RTLD_xxx`` constants, e.g. :const:`os.RTLD_LAZY`)." msgstr "" #: ../../library/sys.rst:702 ../../library/sys.rst:1373 @@ -1232,7 +1233,8 @@ msgid "" "Raises an :ref:`auditing event ` ``sys._getframemodulename`` with " "argument ``depth``." msgstr "" -"引發一個附帶引數 ``depth`` 的\\ :ref:`稽核事件 ` ``sys._getframemodulename``。" +"引發一個附帶引數 ``depth`` 的\\ :ref:`稽核事件 ` ``sys." +"_getframemodulename``。" #: ../../library/sys.rst:844 msgid "Get the profiler function as set by :func:`setprofile`." @@ -1867,7 +1869,7 @@ msgstr "``'darwin'``" #: ../../library/sys.rst:1289 msgid "" -"On Linux, :attr:`sys.platform` doesn't contain the major version anymore. It " +"On Linux, :data:`sys.platform` doesn't contain the major version anymore. It " "is always ``'linux'``, instead of ``'linux2'`` or ``'linux3'``. Since older " "Python versions include the version number, it is recommended to always use " "the ``startswith`` idiom presented above." @@ -1875,7 +1877,7 @@ msgstr "" #: ../../library/sys.rst:1295 msgid "" -"On AIX, :attr:`sys.platform` doesn't contain the major version anymore. It " +"On AIX, :data:`sys.platform` doesn't contain the major version anymore. It " "is always ``'aix'``, instead of ``'aix5'`` or ``'aix7'``. Since older " "Python versions include the version number, it is recommended to always use " "the ``startswith`` idiom presented above." @@ -1883,7 +1885,7 @@ msgstr "" #: ../../library/sys.rst:1303 msgid "" -":attr:`os.name` has a coarser granularity. :func:`os.uname` gives system-" +":data:`os.name` has a coarser granularity. :func:`os.uname` gives system-" "dependent version information." msgstr "" @@ -1965,7 +1967,7 @@ msgid "" "``sys.setdlopenflags(0)``. To share symbols across extension modules, call " "as ``sys.setdlopenflags(os.RTLD_GLOBAL)``. Symbolic names for the flag " "values can be found in the :mod:`os` module (``RTLD_xxx`` constants, e.g. :" -"data:`os.RTLD_LAZY`)." +"const:`os.RTLD_LAZY`)." msgstr "" #: ../../library/sys.rst:1377 @@ -2475,7 +2477,8 @@ msgid "" msgstr "" #: ../../library/sys.rst:1746 -msgid "See also the :attr:`sys.builtin_module_names` list." +#, fuzzy +msgid "See also the :data:`sys.builtin_module_names` list." msgstr "另請參閱 :attr:`sys.builtin_module_names` 清單。" #: ../../library/sys.rst:1753 diff --git a/library/tarfile.po b/library/tarfile.po index ca63d3d5f3..b355c6558f 100644 --- a/library/tarfile.po +++ b/library/tarfile.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-17 17:39+0800\n" +"POT-Creation-Date: 2023-07-22 00:04+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-" @@ -1218,7 +1218,7 @@ msgid "Implements the ``'tar'`` filter." msgstr "" #: ../../library/tarfile.rst:936 -msgid "Strip leading slashes (``/`` and :attr:`os.sep`) from filenames." +msgid "Strip leading slashes (``/`` and :data:`os.sep`) from filenames." msgstr "" #: ../../library/tarfile.rst:937 @@ -1238,7 +1238,7 @@ msgstr "" #: ../../library/tarfile.rst:944 msgid "" "Clear high mode bits (setuid, setgid, sticky) and group/other write bits (:" -"attr:`~stat.S_IWGRP`|:attr:`~stat.S_IWOTH`)." +"const:`~stat.S_IWGRP`|:const:`~stat.S_IWOTH`)." msgstr "" #: ../../library/tarfile.rst:947 ../../library/tarfile.rst:980 @@ -1280,14 +1280,14 @@ msgstr "" #: ../../library/tarfile.rst:969 msgid "" -"Set the owner read and write permissions (:attr:`~stat.S_IRUSR`|:attr:`~stat." -"S_IWUSR`)." +"Set the owner read and write permissions (:const:`~stat.S_IRUSR`|:const:" +"`~stat.S_IWUSR`)." msgstr "" #: ../../library/tarfile.rst:971 msgid "" -"Remove the group & other executable permission (:attr:`~stat.S_IXGRP`|:attr:" -"`~stat.S_IXOTH`) if the owner doesn’t have it (:attr:`~stat.S_IXUSR`)." +"Remove the group & other executable permission (:const:`~stat.S_IXGRP`|:" +"const:`~stat.S_IXOTH`) if the owner doesn’t have it (:const:`~stat.S_IXUSR`)." msgstr "" #: ../../library/tarfile.rst:975 diff --git a/library/tempfile.po b/library/tempfile.po index 024733ad45..f2723977c3 100644 --- a/library/tempfile.po +++ b/library/tempfile.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-17 17:39+0800\n" +"POT-Creation-Date: 2023-07-22 00:04+0000\n" "PO-Revision-Date: 2022-06-12 15:17+0800\n" "Last-Translator: Matt Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -120,9 +120,10 @@ msgstr "" "object,它的 :attr:`!file` 屬性為底層的真實檔案物件。" #: ../../library/tempfile.rst:62 +#, fuzzy msgid "" -"The :py:data:`os.O_TMPFILE` flag is used if it is available and works (Linux-" -"specific, requires Linux kernel 3.11 or later)." +"The :py:const:`os.O_TMPFILE` flag is used if it is available and works " +"(Linux-specific, requires Linux kernel 3.11 or later)." msgstr "" "如果可用且可運作,則使用 :py:data:`os.O_TMPFILE` 旗標(僅限於 Linux,需要 " "3.11 版本以上的核心)。" @@ -144,7 +145,8 @@ msgstr "" "`。" #: ../../library/tempfile.rst:72 -msgid "The :py:data:`os.O_TMPFILE` flag is now used if available." +#, fuzzy +msgid "The :py:const:`os.O_TMPFILE` flag is now used if available." msgstr "如果可用,自此開始使用 :py:data:`os.O_TMPFILE` 旗標。" #: ../../library/tempfile.rst:74 ../../library/tempfile.rst:139 diff --git a/library/test.po b/library/test.po index 11dc75c124..a645b8a761 100644 --- a/library/test.po +++ b/library/test.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-17 17:39+0800\n" +"POT-Creation-Date: 2023-07-22 00:04+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-" @@ -529,7 +529,7 @@ msgid "Return ``True`` if Python was not built with ``-O0`` or ``-Og``." msgstr "" #: ../../library/test.rst:475 -msgid "Return :data:`_testcapi.WITH_PYMALLOC`." +msgid "Return :const:`_testcapi.WITH_PYMALLOC`." msgstr "" #: ../../library/test.rst:480 @@ -1064,7 +1064,7 @@ msgstr "" #: ../../library/test.rst:1042 msgid "" -"On UNIX, :func:`resource.setrlimit` is used to set :attr:`resource." +"On UNIX, :func:`resource.setrlimit` is used to set :const:`resource." "RLIMIT_CORE`'s soft limit to 0 to prevent coredump file creation." msgstr "" diff --git a/library/tkinter.po b/library/tkinter.po index 14653776cd..8e14e38bc9 100644 --- a/library/tkinter.po +++ b/library/tkinter.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-05-09 00:15+0000\n" +"POT-Creation-Date: 2023-07-22 00:04+0000\n" "PO-Revision-Date: 2018-05-23 16:13+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -329,7 +329,7 @@ msgid "" "tcl` and :file:`.{baseName}.tcl`, into the Tcl interpreter and calls :func:" "`exec` on the contents of :file:`.{className}.py` and :file:`.{baseName}." "py`. The path for the profile files is the :envvar:`HOME` environment " -"variable or, if that isn't defined, then :attr:`os.curdir`." +"variable or, if that isn't defined, then :data:`os.curdir`." msgstr "" #: ../../library/tkinter.rst:170 diff --git a/library/unittest.mock.po b/library/unittest.mock.po index c847263e26..7a74c0c444 100644 --- a/library/unittest.mock.po +++ b/library/unittest.mock.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-17 17:39+0800\n" +"POT-Creation-Date: 2023-07-22 00:04+0000\n" "PO-Revision-Date: 2018-05-23 16:14+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -2085,7 +2085,7 @@ msgstr "" msgid "" "Alternatively you can just use ``vars(my_mock)`` (instance members) and " "``dir(type(my_mock))`` (type members) to bypass the filtering irrespective " -"of :data:`mock.FILTER_DIR`." +"of :const:`mock.FILTER_DIR`." msgstr "" #: ../../library/unittest.mock.rst:2445 diff --git a/library/unittest.po b/library/unittest.po index d5217d9c62..f01c6aabbf 100644 --- a/library/unittest.po +++ b/library/unittest.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-17 17:39+0800\n" +"POT-Creation-Date: 2023-07-22 00:04+0000\n" "PO-Revision-Date: 2022-10-16 06:03+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -1415,8 +1415,8 @@ msgstr "" #: ../../library/unittest.rst:1135 ../../library/unittest.rst:1176 msgid "" "If given, *level* should be either a numeric logging level or its string " -"equivalent (for example either ``\"ERROR\"`` or :attr:`logging.ERROR`). The " -"default is :attr:`logging.INFO`." +"equivalent (for example either ``\"ERROR\"`` or :const:`logging.ERROR`). " +"The default is :const:`logging.INFO`." msgstr "" #: ../../library/unittest.rst:1139 diff --git a/library/urllib.request.po b/library/urllib.request.po index f56cb246a9..f9394dbe42 100644 --- a/library/urllib.request.po +++ b/library/urllib.request.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-05-10 00:15+0000\n" +"POT-Creation-Date: 2023-07-22 00:04+0000\n" "PO-Revision-Date: 2022-04-21 17:59+0800\n" "Last-Translator: Jordan Su \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -65,7 +65,9 @@ msgstr ":mod:`urllib.request` module 定義下列函式:" msgid "" "Open *url*, which can be either a string containing a valid, properly " "encoded URL, or a :class:`Request` object." -msgstr "打開 *url*,其值可以是一個包含有效且適當編碼 URL 的字串或是一個 :class:`Request` 物件。" +msgstr "" +"打開 *url*,其值可以是一個包含有效且適當編碼 URL 的字串或是一個 :class:" +"`Request` 物件。" #: ../../library/urllib.request.rst:34 msgid "" @@ -216,8 +218,9 @@ msgid "*cafile* and *capath* were added." msgstr "新增 *cafile* 與 *capath*。" #: ../../library/urllib.request.rst:100 +#, fuzzy msgid "" -"HTTPS virtual hosts are now supported if possible (that is, if :data:`ssl." +"HTTPS virtual hosts are now supported if possible (that is, if :const:`ssl." "HAS_SNI` is true)." msgstr "" "HTTPS 虛擬主機 (virtual hosts) 現已支援,只要 :data:`ssl.HAS_SNI` 的值為 " diff --git a/library/xml.po b/library/xml.po index 74d112e540..d0e4a72d2d 100644 --- a/library/xml.po +++ b/library/xml.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-07-06 00:17+0000\n" +"POT-Creation-Date: 2023-07-22 00:04+0000\n" "PO-Revision-Date: 2018-05-23 16:16+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -177,7 +177,7 @@ msgstr "" msgid "" "Expat 2.4.1 and newer is not vulnerable to the \"billion laughs\" and " "\"quadratic blowup\" vulnerabilities. Items still listed as vulnerable due " -"to potential reliance on system-provided libraries. Check :data:`pyexpat." +"to potential reliance on system-provided libraries. Check :const:`pyexpat." "EXPAT_VERSION`." msgstr "" diff --git a/reference/compound_stmts.po b/reference/compound_stmts.po index cff2aabb19..ceedd48bd8 100644 --- a/reference/compound_stmts.po +++ b/reference/compound_stmts.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-17 17:39+0800\n" +"POT-Creation-Date: 2023-07-22 00:04+0000\n" "PO-Revision-Date: 2018-05-23 16:17+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -1971,7 +1971,7 @@ msgstr "" #: ../../reference/compound_stmts.rst:1843 msgid "" -"a builtin class that has its (CPython) :data:`Py_TPFLAGS_SEQUENCE` bit set" +"a builtin class that has its (CPython) :c:macro:`Py_TPFLAGS_SEQUENCE` bit set" msgstr "" #: ../../reference/compound_stmts.rst:1844 @@ -2020,7 +2020,7 @@ msgstr "" #: ../../reference/compound_stmts.rst:1862 msgid "" -"a builtin class that has its (CPython) :data:`Py_TPFLAGS_MAPPING` bit set" +"a builtin class that has its (CPython) :c:macro:`Py_TPFLAGS_MAPPING` bit set" msgstr "" #: ../../reference/compound_stmts.rst:1865 diff --git a/reference/datamodel.po b/reference/datamodel.po index 6ed88a3876..2b6ac3d721 100644 --- a/reference/datamodel.po +++ b/reference/datamodel.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-17 17:39+0800\n" +"POT-Creation-Date: 2023-07-22 00:04+0000\n" "PO-Revision-Date: 2018-05-23 16:17+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -2971,8 +2971,8 @@ msgstr "" #: ../../reference/datamodel.rst:2502 msgid "" -"In CPython, the length is required to be at most :attr:`sys.maxsize`. If the " -"length is larger than :attr:`!sys.maxsize` some features (such as :func:" +"In CPython, the length is required to be at most :data:`sys.maxsize`. If the " +"length is larger than :data:`!sys.maxsize` some features (such as :func:" "`len`) may raise :exc:`OverflowError`. To prevent raising :exc:`!" "OverflowError` by truth value testing, an object must define a :meth:" "`__bool__` method." diff --git a/using/cmdline.po b/using/cmdline.po index 93c7ea1621..fe3c4326c9 100644 --- a/using/cmdline.po +++ b/using/cmdline.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-17 17:39+0800\n" +"POT-Creation-Date: 2023-07-22 00:04+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-" @@ -1127,15 +1127,15 @@ msgstr "" #: ../../using/cmdline.rst:899 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:" +"domains (:c:macro:`PYMEM_DOMAIN_RAW`, :c:macro:`PYMEM_DOMAIN_MEM`, :c:macro:" "`PYMEM_DOMAIN_OBJ`)." msgstr "" #: ../../using/cmdline.rst:902 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." +"``pymalloc``: use the :ref:`pymalloc allocator ` for :c:macro:" +"`PYMEM_DOMAIN_MEM` and :c:macro:`PYMEM_DOMAIN_OBJ` domains and use the :c:" +"func:`malloc` function for the :c:macro:`PYMEM_DOMAIN_RAW` domain." msgstr "" #: ../../using/cmdline.rst:906 diff --git a/using/configure.po b/using/configure.po index f3d411598c..27c4a13987 100644 --- a/using/configure.po +++ b/using/configure.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-17 17:39+0800\n" +"POT-Creation-Date: 2023-07-22 00:04+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-" @@ -158,7 +158,7 @@ msgstr "" #: ../../using/configure.rst:100 msgid "" -"Select the default time zone search path for :data:`zoneinfo.TZPATH`. See " +"Select the default time zone search path for :const:`zoneinfo.TZPATH`. See " "the :ref:`Compile-time configuration ` of " "the :mod:`zoneinfo` module." msgstr "" @@ -180,7 +180,7 @@ msgid "" msgstr "" #: ../../using/configure.rst:115 -msgid "See :data:`decimal.HAVE_CONTEXTVAR` and the :mod:`contextvars` module." +msgid "See :const:`decimal.HAVE_CONTEXTVAR` and the :mod:`contextvars` module." msgstr "" #: ../../using/configure.rst:121 diff --git a/using/windows.po b/using/windows.po index e1a214f851..a0ab02d8eb 100644 --- a/using/windows.po +++ b/using/windows.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-17 17:39+0800\n" +"POT-Creation-Date: 2023-07-22 00:04+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-" @@ -1974,7 +1974,7 @@ msgid "" "Modules specified in the registry under ``Modules`` (not ``PythonPath``) may " "be imported by :class:`importlib.machinery.WindowsRegistryFinder`. This " "finder is enabled on Windows in 3.6.0 and earlier, but may need to be " -"explicitly added to :attr:`sys.meta_path` in the future." +"explicitly added to :data:`sys.meta_path` in the future." msgstr "" #: ../../using/windows.rst:1207 diff --git a/whatsnew/2.2.po b/whatsnew/2.2.po index 30a564b02f..f96663c5b7 100644 --- a/whatsnew/2.2.po +++ b/whatsnew/2.2.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-05-03 00:17+0000\n" +"POT-Creation-Date: 2023-07-22 00:04+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-" @@ -1315,11 +1315,11 @@ msgstr "" #: ../../whatsnew/2.2.rst:1108 msgid "" -"Two new flags :const:`METH_NOARGS` and :const:`METH_O` are available in " +"Two new flags :c:macro:`METH_NOARGS` and :c:macro:`METH_O` are available in " "method definition tables to simplify implementation of methods with no " "arguments or a single untyped argument. Calling such methods is more " -"efficient than calling a corresponding method that uses :const:" -"`METH_VARARGS`. Also, the old :const:`METH_OLDARGS` style of writing C " +"efficient than calling a corresponding method that uses :c:macro:" +"`METH_VARARGS`. Also, the old :c:macro:`METH_OLDARGS` style of writing C " "methods is now officially deprecated." msgstr "" diff --git a/whatsnew/2.3.po b/whatsnew/2.3.po index f1c4771d15..e0ace5f079 100644 --- a/whatsnew/2.3.po +++ b/whatsnew/2.3.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-17 17:39+0800\n" +"POT-Creation-Date: 2023-07-22 00:04+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-" @@ -1639,7 +1639,7 @@ msgstr "" #: ../../whatsnew/2.3.rst:1477 msgid "" -"The value of the C :const:`PYTHON_API_VERSION` macro is now exposed at the " +"The value of the C :c:macro:`PYTHON_API_VERSION` macro is now exposed at the " "Python level as ``sys.api_version``. The current exception can be cleared " "by calling the new :func:`sys.exc_clear` function." msgstr "" @@ -2085,11 +2085,11 @@ msgstr "" msgid "" "The :c:func:`PyArg_NoArgs` macro is now deprecated, and code that uses it " "should be changed. For Python 2.2 and later, the method definition table " -"can specify the :const:`METH_NOARGS` flag, signalling that there are no " +"can specify the :c:macro:`METH_NOARGS` flag, signalling that there are no " "arguments, and the argument checking can then be removed. If compatibility " "with pre-2.2 versions of Python is important, the code could use " "``PyArg_ParseTuple(args, \"\")`` instead, but this will be slower than " -"using :const:`METH_NOARGS`." +"using :c:macro:`METH_NOARGS`." msgstr "" #: ../../whatsnew/2.3.rst:1907 @@ -2117,8 +2117,8 @@ msgstr "" #: ../../whatsnew/2.3.rst:1920 msgid "" "It's now possible to define class and static methods for a C extension type " -"by setting either the :const:`METH_CLASS` or :const:`METH_STATIC` flags in a " -"method's :c:type:`PyMethodDef` structure." +"by setting either the :c:macro:`METH_CLASS` or :c:macro:`METH_STATIC` flags " +"in a method's :c:type:`PyMethodDef` structure." msgstr "" #: ../../whatsnew/2.3.rst:1924 diff --git a/whatsnew/2.4.po b/whatsnew/2.4.po index 24df76b1b2..64d2ceea80 100644 --- a/whatsnew/2.4.po +++ b/whatsnew/2.4.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-05-09 00:15+0000\n" +"POT-Creation-Date: 2023-07-22 00:04+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-" @@ -1682,7 +1682,7 @@ msgstr "" #: ../../whatsnew/2.4.rst:1479 msgid "" -"A new method flag, :const:`METH_COEXISTS`, allows a function defined in " +"A new method flag, :c:macro:`METH_COEXISTS`, allows a function defined in " "slots to co-exist with a :c:type:`PyCFunction` having the same name. This " "can halve the access time for a method such as :meth:`set.__contains__`. " "(Contributed by Raymond Hettinger.)" diff --git a/whatsnew/2.5.po b/whatsnew/2.5.po index 280d2215b6..6c31bbe5f3 100644 --- a/whatsnew/2.5.po +++ b/whatsnew/2.5.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-05-09 00:15+0000\n" +"POT-Creation-Date: 2023-07-22 00:04+0000\n" "PO-Revision-Date: 2018-05-23 16:20+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -1692,9 +1692,9 @@ msgstr "" #: ../../whatsnew/2.5.rst:1451 msgid "" -"Constants named :attr:`os.SEEK_SET`, :attr:`os.SEEK_CUR`, and :attr:`os." +"Constants named :const:`os.SEEK_SET`, :const:`os.SEEK_CUR`, and :const:`os." "SEEK_END` have been added; these are the parameters to the :func:`os.lseek` " -"function. Two new constants for locking are :attr:`os.O_SHLOCK` and :attr:" +"function. Two new constants for locking are :const:`os.O_SHLOCK` and :const:" "`os.O_EXLOCK`." msgstr "" @@ -1912,7 +1912,7 @@ msgstr "" msgid "" "The :mod:`unicodedata` module has been updated to use version 4.1.0 of the " "Unicode character database. Version 3.2.0 is required by some " -"specifications, so it's still available as :attr:`unicodedata.ucd_3_2_0`." +"specifications, so it's still available as :data:`unicodedata.ucd_3_2_0`." msgstr "" #: ../../whatsnew/2.5.rst:1607 diff --git a/whatsnew/2.6.po b/whatsnew/2.6.po index 13c0bdb9c6..4f2e1ecf15 100644 --- a/whatsnew/2.6.po +++ b/whatsnew/2.6.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-05-09 00:15+0000\n" +"POT-Creation-Date: 2023-07-22 00:04+0000\n" "PO-Revision-Date: 2018-05-23 16:20+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -1269,17 +1269,17 @@ msgid "" msgstr "" #: ../../whatsnew/2.6.rst:1141 -msgid ":const:`PyBUF_WRITABLE` indicates that the memory must be writable." +msgid ":c:macro:`PyBUF_WRITABLE` indicates that the memory must be writable." msgstr "" #: ../../whatsnew/2.6.rst:1143 msgid "" -":const:`PyBUF_LOCK` requests a read-only or exclusive lock on the memory." +":c:macro:`PyBUF_LOCK` requests a read-only or exclusive lock on the memory." msgstr "" #: ../../whatsnew/2.6.rst:1145 msgid "" -":const:`PyBUF_C_CONTIGUOUS` and :const:`PyBUF_F_CONTIGUOUS` requests a C-" +":c:macro:`PyBUF_C_CONTIGUOUS` and :c:macro:`PyBUF_F_CONTIGUOUS` requests a C-" "contiguous (last dimension varies the fastest) or Fortran-contiguous (first " "dimension varies the fastest) array layout." msgstr "" diff --git a/whatsnew/2.7.po b/whatsnew/2.7.po index 544d6d6604..5acaae329c 100644 --- a/whatsnew/2.7.po +++ b/whatsnew/2.7.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-17 17:39+0800\n" +"POT-Creation-Date: 2023-07-22 00:04+0000\n" "PO-Revision-Date: 2018-05-23 16:20+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -1739,8 +1739,8 @@ msgstr "" #: ../../whatsnew/2.7.rst:1558 msgid "" "The version of OpenSSL being used is now available as the module attributes :" -"data:`ssl.OPENSSL_VERSION` (a string), :data:`ssl.OPENSSL_VERSION_INFO` (a 5-" -"tuple), and :data:`ssl.OPENSSL_VERSION_NUMBER` (an integer). (Added by " +"const:`ssl.OPENSSL_VERSION` (a string), :const:`ssl.OPENSSL_VERSION_INFO` (a " +"5-tuple), and :const:`ssl.OPENSSL_VERSION_NUMBER` (an integer). (Added by " "Antoine Pitrou; :issue:`8321`.)" msgstr "" @@ -2614,7 +2614,7 @@ msgstr "" #: ../../whatsnew/2.7.rst:2232 msgid "" "When using the :c:type:`PyMemberDef` structure to define attributes of a " -"type, Python will no longer let you try to delete or set a :const:" +"type, Python will no longer let you try to delete or set a :c:macro:" "`T_STRING_INPLACE` attribute." msgstr "" diff --git a/whatsnew/3.1.po b/whatsnew/3.1.po index c5163c63e0..74bd83bd96 100644 --- a/whatsnew/3.1.po +++ b/whatsnew/3.1.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-09-26 00:21+0000\n" +"POT-Creation-Date: 2023-07-22 00:04+0000\n" "PO-Revision-Date: 2018-05-23 16:20+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -438,7 +438,7 @@ msgid "" msgstr "" #: ../../whatsnew/3.1.rst:373 -msgid "The :attr:`sys.version_info` tuple is now a named tuple::" +msgid "The :data:`sys.version_info` tuple is now a named tuple::" msgstr "" #: ../../whatsnew/3.1.rst:378 @@ -613,7 +613,7 @@ msgstr "" msgid "" "Apart from the performance improvements this change should be invisible to " "end users, with one exception: for testing and debugging purposes there's a " -"new :attr:`sys.int_info` that provides information about the internal " +"new :data:`sys.int_info` that provides information about the internal " "format, giving the number of bits per digit and the size in bytes of the C " "type used to store each digit::" msgstr "" diff --git a/whatsnew/3.10.po b/whatsnew/3.10.po index 3a1ebe876f..92de6a244f 100644 --- a/whatsnew/3.10.po +++ b/whatsnew/3.10.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-17 17:39+0800\n" +"POT-Creation-Date: 2023-07-22 00:04+0000\n" "PO-Revision-Date: 2023-06-26 03:02+0800\n" "Last-Translator: Matt Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -1795,13 +1795,10 @@ msgstr "" #: ../../whatsnew/3.10.rst:1256 msgid "" -"Add :data:`~os.O_EVTONLY`, :data:`~os.O_FSYNC`, :data:`~os.O_SYMLINK` and :" -"data:`~os.O_NOFOLLOW_ANY` for macOS. (Contributed by Dong-hee Na in :issue:" -"`43106`.)" +"Add :const:`~os.O_EVTONLY`, :const:`~os.O_FSYNC`, :const:`~os.O_SYMLINK` " +"and :const:`~os.O_NOFOLLOW_ANY` for macOS. (Contributed by Dong-hee Na in :" +"issue:`43106`.)" msgstr "" -"為 macOS 新增 :data:`~os.O_EVTONLY`、:data:`~os.O_FSYNC`、:data:`~os." -"O_SYMLINK` 和 :data:`~os.O_NOFOLLOW_ANY`。(由 Dong-hee Na 在 :issue:`43106` " -"中貢獻。)" #: ../../whatsnew/3.10.rst:1261 msgid "os.path" @@ -1928,13 +1925,10 @@ msgstr "shelve" #: ../../whatsnew/3.10.rst:1322 msgid "" -"The :mod:`shelve` module now uses :data:`pickle.DEFAULT_PROTOCOL` by default " -"instead of :mod:`pickle` protocol ``3`` when creating shelves. (Contributed " -"by Zackery Spytz in :issue:`34204`.)" +"The :mod:`shelve` module now uses :const:`pickle.DEFAULT_PROTOCOL` by " +"default instead of :mod:`pickle` protocol ``3`` when creating shelves. " +"(Contributed by Zackery Spytz in :issue:`34204`.)" msgstr "" -"現在,:mod:`shelve` 模組在建立 shelve 時預設使用 :data:`pickle." -"DEFAULT_PROTOCOL`,而不是 :mod:`pickle` 的協議 ``3``。(由 Zackery Spytz 在 :" -"issue:`34204` 中貢獻。)" #: ../../whatsnew/3.10.rst:1327 msgid "statistics" @@ -1997,14 +1991,10 @@ msgstr "" #: ../../whatsnew/3.10.rst:1358 msgid "" "The ssl module has preliminary support for OpenSSL 3.0.0 and new option :" -"data:`~ssl.OP_IGNORE_UNEXPECTED_EOF`. (Contributed by Christian Heimes in :" +"const:`~ssl.OP_IGNORE_UNEXPECTED_EOF`. (Contributed by Christian Heimes in :" "issue:`38820`, :issue:`43794`, :issue:`43788`, :issue:`43791`, :issue:" "`43799`, :issue:`43920`, :issue:`43789`, and :issue:`43811`.)" msgstr "" -"ssl 模組初步支援 OpenSSL 3.0.0 和新選項 :data:`~ssl." -"OP_IGNORE_UNEXPECTED_EOF`。(由 Christian Heimes 於 :issue:`38820`、:issue:" -"`43794`、:issue:`43788`、:issue:`43791`、:issue:`43799`、:issue:`43920`、:" -"issue:`43789` 和 :issue:`43811` 貢獻。)" #: ../../whatsnew/3.10.rst:1364 msgid "" @@ -2064,11 +2054,9 @@ msgstr "" #: ../../whatsnew/3.10.rst:1390 msgid "" -"A new verify flag :data:`~ssl.VERIFY_X509_PARTIAL_CHAIN` has been added. " +"A new verify flag :const:`~ssl.VERIFY_X509_PARTIAL_CHAIN` has been added. " "(Contributed by l0x in :issue:`40849`.)" msgstr "" -"新增驗證旗標 :data:`~ssl.VERIFY_X509_PARTIAL_CHAIN`。(由 l0x 在 :issue:" -"`40849` 中貢獻。)" #: ../../whatsnew/3.10.rst:1394 msgid "sqlite3" @@ -2112,12 +2100,9 @@ msgstr "_thread" #: ../../whatsnew/3.10.rst:1415 msgid "" ":func:`_thread.interrupt_main` now takes an optional signal number to " -"simulate (the default is still :data:`signal.SIGINT`). (Contributed by " +"simulate (the default is still :const:`signal.SIGINT`). (Contributed by " "Antoine Pitrou in :issue:`43356`.)" msgstr "" -":func:`_thread.interrupt_main` 現在需要一個可選的信號編號來進行模擬(預設值仍" -"然是 :data:`signal.SIGINT`)。 (由 Antoine Pitrou 在 :issue:`43356` 中貢" -"獻。)" #: ../../whatsnew/3.10.rst:1420 msgid "threading" @@ -2737,15 +2722,10 @@ msgstr "" msgid "" ":data:`~ssl.PROTOCOL_SSLv2`, :data:`~ssl.PROTOCOL_SSLv3`, :data:`~ssl." "PROTOCOL_SSLv23`, :data:`~ssl.PROTOCOL_TLSv1`, :data:`~ssl." -"PROTOCOL_TLSv1_1`, :data:`~ssl.PROTOCOL_TLSv1_2`, and :data:`~ssl." -"PROTOCOL_TLS` are deprecated in favor of :data:`~ssl.PROTOCOL_TLS_CLIENT` " -"and :data:`~ssl.PROTOCOL_TLS_SERVER`" +"PROTOCOL_TLSv1_1`, :data:`~ssl.PROTOCOL_TLSv1_2`, and :const:`~ssl." +"PROTOCOL_TLS` are deprecated in favor of :const:`~ssl.PROTOCOL_TLS_CLIENT` " +"and :const:`~ssl.PROTOCOL_TLS_SERVER`" msgstr "" -":data:`~ssl.PROTOCOL_SSLv2`、:data:`~ssl.PROTOCOL_SSLv3`、:data:`~ssl." -"PROTOCOL_SSLv23`、:data:`~ssl.PROTOCOL_TLSv1`、:data:`~ssl." -"PROTOCOL_TLSv1_1`、:data:`~ssl.PROTOCOL_TLSv1_2` 和 :data:`~ssl." -"PROTOCOL_TLS` 已棄用,取而代之的是 :data:`~ssl.PROTOCOL_TLS_CLIENT` 和 :data:" -"`~ssl.PROTOCOL_TLS_SERVER`" #: ../../whatsnew/3.10.rst:1763 msgid "" @@ -3467,21 +3447,16 @@ msgstr "" #: ../../whatsnew/3.10.rst:2127 msgid "" -"Add a new :c:data:`Py_TPFLAGS_DISALLOW_INSTANTIATION` type flag to disallow " +"Add a new :c:macro:`Py_TPFLAGS_DISALLOW_INSTANTIATION` type flag to disallow " "creating type instances. (Contributed by Victor Stinner in :issue:`43916`.)" msgstr "" -"新增 :c:data:`Py_TPFLAGS_DISALLOW_INSTANTIATION` 型別旗標以禁止建立型別實例。" -"(由 Victor Stinner 在 :issue:`43916` 中貢獻。)" #: ../../whatsnew/3.10.rst:2131 msgid "" -"Add a new :c:data:`Py_TPFLAGS_IMMUTABLETYPE` type flag for creating " +"Add a new :c:macro:`Py_TPFLAGS_IMMUTABLETYPE` type flag for creating " "immutable type objects: type attributes cannot be set nor deleted. " "(Contributed by Victor Stinner and Erlend E. Aasland in :issue:`43908`.)" msgstr "" -"新增 :c:data:`Py_TPFLAGS_IMMUTABLETYPE` 型別旗標用於建立不可變型別物件:無法" -"設定或刪除型別屬性。(由 Victor Stinner 和 Erlend E. Aasland 在 43908 號中貢" -"獻。)" #: ../../whatsnew/3.10.rst:2138 msgid "" @@ -3591,16 +3566,12 @@ msgstr "" #: ../../whatsnew/3.10.rst:2190 msgid "" -"Use the :c:data:`Py_TPFLAGS_IMMUTABLETYPE` type flag to create immutable " -"type objects. Do not rely on :c:data:`Py_TPFLAGS_HEAPTYPE` to decide if a " -"type object is mutable or not; check if :c:data:`Py_TPFLAGS_IMMUTABLETYPE` " +"Use the :c:macro:`Py_TPFLAGS_IMMUTABLETYPE` type flag to create immutable " +"type objects. Do not rely on :c:macro:`Py_TPFLAGS_HEAPTYPE` to decide if a " +"type object is mutable or not; check if :c:macro:`Py_TPFLAGS_IMMUTABLETYPE` " "is set instead. (Contributed by Victor Stinner and Erlend E. Aasland in :" "issue:`43908`.)" msgstr "" -"使用 :c:data:`Py_TPFLAGS_IMMUTABLETYPE` 型別旗標來建立不可變型別物件。不要依" -"賴 :c:data:`Py_TPFLAGS_HEAPTYPE` 來決定型別物件是否可變;應改為檢查是否設定" -"了 :c:data:`Py_TPFLAGS_IMMUTABLETYPE`。(由 Victor Stinner 和 Erlend E. " -"Aasland 在 :issue:`35134` 中貢獻。)" #: ../../whatsnew/3.10.rst:2196 msgid "" @@ -3901,6 +3872,93 @@ msgstr "" "為了 Python 最佳化,已刪除 ``PyThreadState.use_tracing`` 成員。(由 Mark " "Shannon 在 :issue:`43760` 中貢獻。)" +#~ msgid "" +#~ "Add :data:`~os.O_EVTONLY`, :data:`~os.O_FSYNC`, :data:`~os.O_SYMLINK` " +#~ "and :data:`~os.O_NOFOLLOW_ANY` for macOS. (Contributed by Dong-hee Na in :" +#~ "issue:`43106`.)" +#~ msgstr "" +#~ "為 macOS 新增 :data:`~os.O_EVTONLY`、:data:`~os.O_FSYNC`、:data:`~os." +#~ "O_SYMLINK` 和 :data:`~os.O_NOFOLLOW_ANY`。(由 Dong-hee Na 在 :issue:" +#~ "`43106` 中貢獻。)" + +#~ msgid "" +#~ "The :mod:`shelve` module now uses :data:`pickle.DEFAULT_PROTOCOL` by " +#~ "default instead of :mod:`pickle` protocol ``3`` when creating shelves. " +#~ "(Contributed by Zackery Spytz in :issue:`34204`.)" +#~ msgstr "" +#~ "現在,:mod:`shelve` 模組在建立 shelve 時預設使用 :data:`pickle." +#~ "DEFAULT_PROTOCOL`,而不是 :mod:`pickle` 的協議 ``3``。(由 Zackery Spytz " +#~ "在 :issue:`34204` 中貢獻。)" + +#~ msgid "" +#~ "The ssl module has preliminary support for OpenSSL 3.0.0 and new option :" +#~ "data:`~ssl.OP_IGNORE_UNEXPECTED_EOF`. (Contributed by Christian Heimes " +#~ "in :issue:`38820`, :issue:`43794`, :issue:`43788`, :issue:`43791`, :issue:" +#~ "`43799`, :issue:`43920`, :issue:`43789`, and :issue:`43811`.)" +#~ msgstr "" +#~ "ssl 模組初步支援 OpenSSL 3.0.0 和新選項 :data:`~ssl." +#~ "OP_IGNORE_UNEXPECTED_EOF`。(由 Christian Heimes 於 :issue:`38820`、:" +#~ "issue:`43794`、:issue:`43788`、:issue:`43791`、:issue:`43799`、:issue:" +#~ "`43920`、:issue:`43789` 和 :issue:`43811` 貢獻。)" + +#~ msgid "" +#~ "A new verify flag :data:`~ssl.VERIFY_X509_PARTIAL_CHAIN` has been added. " +#~ "(Contributed by l0x in :issue:`40849`.)" +#~ msgstr "" +#~ "新增驗證旗標 :data:`~ssl.VERIFY_X509_PARTIAL_CHAIN`。(由 l0x 在 :issue:" +#~ "`40849` 中貢獻。)" + +#~ msgid "" +#~ ":func:`_thread.interrupt_main` now takes an optional signal number to " +#~ "simulate (the default is still :data:`signal.SIGINT`). (Contributed by " +#~ "Antoine Pitrou in :issue:`43356`.)" +#~ msgstr "" +#~ ":func:`_thread.interrupt_main` 現在需要一個可選的信號編號來進行模擬(預設" +#~ "值仍然是 :data:`signal.SIGINT`)。 (由 Antoine Pitrou 在 :issue:`43356` " +#~ "中貢獻。)" + +#~ msgid "" +#~ ":data:`~ssl.PROTOCOL_SSLv2`, :data:`~ssl.PROTOCOL_SSLv3`, :data:`~ssl." +#~ "PROTOCOL_SSLv23`, :data:`~ssl.PROTOCOL_TLSv1`, :data:`~ssl." +#~ "PROTOCOL_TLSv1_1`, :data:`~ssl.PROTOCOL_TLSv1_2`, and :data:`~ssl." +#~ "PROTOCOL_TLS` are deprecated in favor of :data:`~ssl.PROTOCOL_TLS_CLIENT` " +#~ "and :data:`~ssl.PROTOCOL_TLS_SERVER`" +#~ msgstr "" +#~ ":data:`~ssl.PROTOCOL_SSLv2`、:data:`~ssl.PROTOCOL_SSLv3`、:data:`~ssl." +#~ "PROTOCOL_SSLv23`、:data:`~ssl.PROTOCOL_TLSv1`、:data:`~ssl." +#~ "PROTOCOL_TLSv1_1`、:data:`~ssl.PROTOCOL_TLSv1_2` 和 :data:`~ssl." +#~ "PROTOCOL_TLS` 已棄用,取而代之的是 :data:`~ssl.PROTOCOL_TLS_CLIENT` 和 :" +#~ "data:`~ssl.PROTOCOL_TLS_SERVER`" + +#~ msgid "" +#~ "Add a new :c:data:`Py_TPFLAGS_DISALLOW_INSTANTIATION` type flag to " +#~ "disallow creating type instances. (Contributed by Victor Stinner in :" +#~ "issue:`43916`.)" +#~ msgstr "" +#~ "新增 :c:data:`Py_TPFLAGS_DISALLOW_INSTANTIATION` 型別旗標以禁止建立型別實" +#~ "例。(由 Victor Stinner 在 :issue:`43916` 中貢獻。)" + +#~ msgid "" +#~ "Add a new :c:data:`Py_TPFLAGS_IMMUTABLETYPE` type flag for creating " +#~ "immutable type objects: type attributes cannot be set nor deleted. " +#~ "(Contributed by Victor Stinner and Erlend E. Aasland in :issue:`43908`.)" +#~ msgstr "" +#~ "新增 :c:data:`Py_TPFLAGS_IMMUTABLETYPE` 型別旗標用於建立不可變型別物件:無" +#~ "法設定或刪除型別屬性。(由 Victor Stinner 和 Erlend E. Aasland 在 43908 號" +#~ "中貢獻。)" + +#~ msgid "" +#~ "Use the :c:data:`Py_TPFLAGS_IMMUTABLETYPE` type flag to create immutable " +#~ "type objects. Do not rely on :c:data:`Py_TPFLAGS_HEAPTYPE` to decide if a " +#~ "type object is mutable or not; check if :c:data:" +#~ "`Py_TPFLAGS_IMMUTABLETYPE` is set instead. (Contributed by Victor Stinner " +#~ "and Erlend E. Aasland in :issue:`43908`.)" +#~ msgstr "" +#~ "使用 :c:data:`Py_TPFLAGS_IMMUTABLETYPE` 型別旗標來建立不可變型別物件。不要" +#~ "依賴 :c:data:`Py_TPFLAGS_HEAPTYPE` 來決定型別物件是否可變;應改為檢查是否" +#~ "設定了 :c:data:`Py_TPFLAGS_IMMUTABLETYPE`。(由 Victor Stinner 和 Erlend " +#~ "E. Aasland 在 :issue:`35134` 中貢獻。)" + #~ msgid "" #~ "Starting in this release, there will be a concerted effort to begin " #~ "cleaning up old import semantics that were kept for Python 2.7 " diff --git a/whatsnew/3.11.po b/whatsnew/3.11.po index 4c78387594..427107075d 100644 --- a/whatsnew/3.11.po +++ b/whatsnew/3.11.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-17 17:39+0800\n" +"POT-Creation-Date: 2023-07-22 00:04+0000\n" "PO-Revision-Date: 2023-05-28 18:21+0800\n" "Last-Translator: Matt Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -924,11 +924,9 @@ msgstr "datetime" #: ../../whatsnew/3.11.rst:643 msgid "" -"Add :attr:`datetime.UTC`, a convenience alias for :attr:`datetime.timezone." +"Add :const:`datetime.UTC`, a convenience alias for :attr:`datetime.timezone." "utc`. (Contributed by Kabir Kwatra in :gh:`91973`.)" msgstr "" -"新增 :attr:`datetime.UTC`,一個 :attr:`datetime.timezone.utc` 的方便別名。" -"(由 Kabir Kwatra 於 :gh:`91973` 所貢獻。)" #: ../../whatsnew/3.11.rst:646 msgid "" @@ -1025,13 +1023,9 @@ msgid "" "Added the :func:`~enum.global_enum` enum decorator, which adjusts :meth:" "`~object.__repr__` and :meth:`~object.__str__` to show values as members of " "their module rather than the enum class. For example, ``'re.ASCII'`` for " -"the :data:`~re.ASCII` member of :class:`re.RegexFlag` rather than " +"the :const:`~re.ASCII` member of :class:`re.RegexFlag` rather than " "``'RegexFlag.ASCII'``." msgstr "" -"新增 :func:`~enum.global_enum` 列舉裝飾器,用來調整 :meth:`~object.__repr__` " -"和 :meth:`~object.__str__` 以模組成員形式而非列舉類別來顯示值。例如,:class:" -"`re.RegexFlag` 的 :data:`~re.ASCII` 成員的 ``'re.ASCII'``,而非 ``'RegexFlag." -"ASCII'``。" #: ../../whatsnew/3.11.rst:696 msgid "" @@ -1617,16 +1611,11 @@ msgstr "threading" msgid "" "On Unix, if the ``sem_clockwait()`` function is available in the C library " "(glibc 2.30 and newer), the :meth:`threading.Lock.acquire` method now uses " -"the monotonic clock (:data:`time.CLOCK_MONOTONIC`) for the timeout, rather " -"than using the system clock (:data:`time.CLOCK_REALTIME`), to not be " +"the monotonic clock (:const:`time.CLOCK_MONOTONIC`) for the timeout, rather " +"than using the system clock (:const:`time.CLOCK_REALTIME`), to not be " "affected by system clock changes. (Contributed by Victor Stinner in :issue:" "`41710`.)" msgstr "" -"在 Unix 上,如果 ``sem_clockwait()`` 函式在 C 函式庫(glibc 2.30 與其更新的版" -"本)中可被使用,則 :meth:`threading.Lock.acquire` 方法現在會使用單調時鐘 (:" -"data:`time. CLOCK_MONOTONIC`) 用於超時 (timeout),而不是使用系統時鐘 (:data:" -"`time.CLOCK_REALTIME`),以免受系統時鐘變化的影響。 由 Victor Stinner 在 :" -"issue:`41710` 中貢獻。)" #: ../../whatsnew/3.11.rst:1075 msgid "time" @@ -3241,15 +3230,11 @@ msgstr "" #: ../../whatsnew/3.11.rst:1814 msgid "" "In the :mod:`re` module, the :func:`!re.template` function and the " -"corresponding :data:`!re.TEMPLATE` and :data:`!re.T` flags are deprecated, " +"corresponding :const:`!re.TEMPLATE` and :const:`!re.T` flags are deprecated, " "as they were undocumented and lacked an obvious purpose. They will be " "removed in Python 3.13. (Contributed by Serhiy Storchaka and Miro Hrončok " "in :gh:`92728`.)" msgstr "" -"在 :mod:`re` 模組中,:func:`!re.template` 函式和相應的 :data:`!re.TEMPLATE` " -"和 :data:`!re.T` 旗標被棄用,因為它們沒被記錄於文件中並且缺乏明顯的目的。它們" -"將在 Python 3.13 中被刪除。(由 Serhiy Storchaka 和 Miro Hrončok 在 :gh:" -"`92728` 中貢獻。)" #: ../../whatsnew/3.11.rst:1820 msgid "" @@ -4430,25 +4415,18 @@ msgstr "" #: ../../whatsnew/3.11.rst:2349 msgid "" "The :c:func:`PyType_Ready` function now raises an error if a type is defined " -"with the :const:`Py_TPFLAGS_HAVE_GC` flag set but has no traverse function (:" -"c:member:`PyTypeObject.tp_traverse`). (Contributed by Victor Stinner in :" +"with the :c:macro:`Py_TPFLAGS_HAVE_GC` flag set but has no traverse function " +"(:c:member:`PyTypeObject.tp_traverse`). (Contributed by Victor Stinner in :" "issue:`44263`.)" msgstr "" -"如果一個型別是以 :const:`Py_TPFLAGS_HAVE_GC` 旗標來定義,但卻沒有遍歷函式 " -"(traverse function) (:c:member:`PyTypeObject.tp_traverse`),那 :c:func:" -"`PyType_Ready` 函式現在會引發一個錯誤。(由 Victor Stinner 於 :issue:`44263` " -"中貢獻。)" #: ../../whatsnew/3.11.rst:2354 msgid "" -"Heap types with the :const:`Py_TPFLAGS_IMMUTABLETYPE` flag can now inherit " +"Heap types with the :c:macro:`Py_TPFLAGS_IMMUTABLETYPE` flag can now inherit " "the :pep:`590` vectorcall protocol. Previously, this was only possible for :" "ref:`static types `. (Contributed by Erlend E. Aasland in :" "issue:`43908`)" msgstr "" -"帶有 :const:`Py_TPFLAGS_IMMUTABLETYPE` 旗標的堆積型別現在可以繼承 :pep:`590` " -"向量呼叫協定 (vectorcall protocol)。以前這僅適用於 :ref:`static types " -"`。(由 Erlend E. Aasland 在 :issue:`43908` 中貢獻)。" #: ../../whatsnew/3.11.rst:2359 msgid "" @@ -5152,6 +5130,72 @@ msgstr "" "詳情請見 :pep:`624` 與\\ :pep:`搬遷指南 <624#alternative-apis>`。(由 Inada " "Naoki 於 :issue:`44029` 中所貢獻。)" +#~ msgid "" +#~ "Add :attr:`datetime.UTC`, a convenience alias for :attr:`datetime." +#~ "timezone.utc`. (Contributed by Kabir Kwatra in :gh:`91973`.)" +#~ msgstr "" +#~ "新增 :attr:`datetime.UTC`,一個 :attr:`datetime.timezone.utc` 的方便別名。" +#~ "(由 Kabir Kwatra 於 :gh:`91973` 所貢獻。)" + +#~ msgid "" +#~ "Added the :func:`~enum.global_enum` enum decorator, which adjusts :meth:" +#~ "`~object.__repr__` and :meth:`~object.__str__` to show values as members " +#~ "of their module rather than the enum class. For example, ``'re.ASCII'`` " +#~ "for the :data:`~re.ASCII` member of :class:`re.RegexFlag` rather than " +#~ "``'RegexFlag.ASCII'``." +#~ msgstr "" +#~ "新增 :func:`~enum.global_enum` 列舉裝飾器,用來調整 :meth:`~object." +#~ "__repr__` 和 :meth:`~object.__str__` 以模組成員形式而非列舉類別來顯示值。" +#~ "例如,:class:`re.RegexFlag` 的 :data:`~re.ASCII` 成員的 ``'re.ASCII'``,而" +#~ "非 ``'RegexFlag.ASCII'``。" + +#~ msgid "" +#~ "On Unix, if the ``sem_clockwait()`` function is available in the C " +#~ "library (glibc 2.30 and newer), the :meth:`threading.Lock.acquire` method " +#~ "now uses the monotonic clock (:data:`time.CLOCK_MONOTONIC`) for the " +#~ "timeout, rather than using the system clock (:data:`time." +#~ "CLOCK_REALTIME`), to not be affected by system clock changes. " +#~ "(Contributed by Victor Stinner in :issue:`41710`.)" +#~ msgstr "" +#~ "在 Unix 上,如果 ``sem_clockwait()`` 函式在 C 函式庫(glibc 2.30 與其更新" +#~ "的版本)中可被使用,則 :meth:`threading.Lock.acquire` 方法現在會使用單調時" +#~ "鐘 (:data:`time. CLOCK_MONOTONIC`) 用於超時 (timeout),而不是使用系統時鐘 " +#~ "(:data:`time.CLOCK_REALTIME`),以免受系統時鐘變化的影響。 由 Victor " +#~ "Stinner 在 :issue:`41710` 中貢獻。)" + +#~ msgid "" +#~ "In the :mod:`re` module, the :func:`!re.template` function and the " +#~ "corresponding :data:`!re.TEMPLATE` and :data:`!re.T` flags are " +#~ "deprecated, as they were undocumented and lacked an obvious purpose. They " +#~ "will be removed in Python 3.13. (Contributed by Serhiy Storchaka and Miro " +#~ "Hrončok in :gh:`92728`.)" +#~ msgstr "" +#~ "在 :mod:`re` 模組中,:func:`!re.template` 函式和相應的 :data:`!re." +#~ "TEMPLATE` 和 :data:`!re.T` 旗標被棄用,因為它們沒被記錄於文件中並且缺乏明" +#~ "顯的目的。它們將在 Python 3.13 中被刪除。(由 Serhiy Storchaka 和 Miro " +#~ "Hrončok 在 :gh:`92728` 中貢獻。)" + +#~ msgid "" +#~ "The :c:func:`PyType_Ready` function now raises an error if a type is " +#~ "defined with the :const:`Py_TPFLAGS_HAVE_GC` flag set but has no traverse " +#~ "function (:c:member:`PyTypeObject.tp_traverse`). (Contributed by Victor " +#~ "Stinner in :issue:`44263`.)" +#~ msgstr "" +#~ "如果一個型別是以 :const:`Py_TPFLAGS_HAVE_GC` 旗標來定義,但卻沒有遍歷函式 " +#~ "(traverse function) (:c:member:`PyTypeObject.tp_traverse`),那 :c:func:" +#~ "`PyType_Ready` 函式現在會引發一個錯誤。(由 Victor Stinner 於 :issue:" +#~ "`44263` 中貢獻。)" + +#~ msgid "" +#~ "Heap types with the :const:`Py_TPFLAGS_IMMUTABLETYPE` flag can now " +#~ "inherit the :pep:`590` vectorcall protocol. Previously, this was only " +#~ "possible for :ref:`static types `. (Contributed by Erlend " +#~ "E. Aasland in :issue:`43908`)" +#~ msgstr "" +#~ "帶有 :const:`Py_TPFLAGS_IMMUTABLETYPE` 旗標的堆積型別現在可以繼承 :pep:" +#~ "`590` 向量呼叫協定 (vectorcall protocol)。以前這僅適用於 :ref:`static " +#~ "types `。(由 Erlend E. Aasland 在 :issue:`43908` 中貢獻)。" + #~ msgid "Release" #~ msgstr "發行版本" diff --git a/whatsnew/3.12.po b/whatsnew/3.12.po index 30df79131f..c2e3ab4de0 100644 --- a/whatsnew/3.12.po +++ b/whatsnew/3.12.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-21 09:32+0000\n" +"POT-Creation-Date: 2023-07-22 00:04+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -651,7 +651,7 @@ msgstr "csv" #: ../../whatsnew/3.12.rst:558 msgid "" -"Add :data:`~csv.QUOTE_NOTNULL` and :data:`~csv.QUOTE_STRINGS` flags to " +"Add :const:`~csv.QUOTE_NOTNULL` and :const:`~csv.QUOTE_STRINGS` flags to " "provide finer grained control of ``None`` and empty strings by :class:`~csv." "writer` objects." msgstr "" @@ -739,7 +739,7 @@ msgstr "os" #: ../../whatsnew/3.12.rst:615 msgid "" -"Add :data:`os.PIDFD_NONBLOCK` to open a file descriptor for a process with :" +"Add :const:`os.PIDFD_NONBLOCK` to open a file descriptor for a process with :" "func:`os.pidfd_open` in non-blocking mode. (Contributed by Kumar Aditya in :" "gh:`93312`.)" msgstr "" @@ -1348,7 +1348,7 @@ msgid "" "`~datetime.datetime.utcfromtimestamp` are deprecated and will be removed in " "a future version. Instead, use timezone-aware objects to represent datetimes " "in UTC: respectively, call :meth:`~datetime.datetime.now` and :meth:" -"`~datetime.datetime.fromtimestamp` with the *tz* parameter set to :attr:" +"`~datetime.datetime.fromtimestamp` with the *tz* parameter set to :const:" "`datetime.UTC`. (Contributed by Paul Ganssle in :gh:`103857`.)" msgstr "" @@ -1536,7 +1536,7 @@ msgstr "" #: ../../whatsnew/3.12.rst:1113 msgid "" -"Creating immutable types (:data:`Py_TPFLAGS_IMMUTABLETYPE`) with mutable " +"Creating immutable types (:c:macro:`Py_TPFLAGS_IMMUTABLETYPE`) with mutable " "bases using the C API." msgstr "" @@ -2510,8 +2510,8 @@ msgstr "" #: ../../whatsnew/3.12.rst:1624 msgid "" -":const:`Py_TPFLAGS_ITEMS_AT_END` and :c:func:`PyObject_GetItemData` added to " -"allow safely extending certain variable-sized types, including :c:var:" +":c:macro:`Py_TPFLAGS_ITEMS_AT_END` and :c:func:`PyObject_GetItemData` added " +"to allow safely extending certain variable-sized types, including :c:var:" "`PyType_Type`." msgstr "" @@ -2540,8 +2540,8 @@ msgid "" msgstr "" #: ../../whatsnew/3.12.rst:1641 -msgid ":const:`Py_TPFLAGS_HAVE_VECTORCALL`" -msgstr ":const:`Py_TPFLAGS_HAVE_VECTORCALL`" +msgid ":c:macro:`Py_TPFLAGS_HAVE_VECTORCALL`" +msgstr "" #: ../../whatsnew/3.12.rst:1642 msgid ":c:func:`PyVectorcall_NARGS`" @@ -2557,10 +2557,10 @@ msgstr ":c:type:`vectorcallfunc`" #: ../../whatsnew/3.12.rst:1646 msgid "" -"The :const:`Py_TPFLAGS_HAVE_VECTORCALL` flag is now removed from a class " +"The :c:macro:`Py_TPFLAGS_HAVE_VECTORCALL` flag is now removed from a class " "when the class's :py:meth:`~object.__call__` method is reassigned. This " "makes vectorcall safe to use with mutable types (i.e. heap types without the " -"immutable flag, :const:`Py_TPFLAGS_IMMUTABLETYPE`). Mutable types that do " +"immutable flag, :c:macro:`Py_TPFLAGS_IMMUTABLETYPE`). Mutable types that do " "not override :c:member:`~PyTypeObject.tp_call` now inherit the " "``Py_TPFLAGS_HAVE_VECTORCALL`` flag. (Contributed by Petr Viktorin in :gh:" "`93274`.)" @@ -2568,10 +2568,10 @@ msgstr "" #: ../../whatsnew/3.12.rst:1654 msgid "" -"The :const:`Py_TPFLAGS_MANAGED_DICT` and :const:`Py_TPFLAGS_MANAGED_WEAKREF` " -"flags have been added. This allows extensions classes to support object " -"``__dict__`` and weakrefs with less bookkeeping, using less memory and with " -"faster access." +"The :c:macro:`Py_TPFLAGS_MANAGED_DICT` and :c:macro:" +"`Py_TPFLAGS_MANAGED_WEAKREF` flags have been added. This allows extensions " +"classes to support object ``__dict__`` and weakrefs with less bookkeeping, " +"using less memory and with faster access." msgstr "" #: ../../whatsnew/3.12.rst:1659 @@ -2589,8 +2589,8 @@ msgid ":c:func:`PyObject_VectorcallMethod`" msgstr ":c:func:`PyObject_VectorcallMethod`" #: ../../whatsnew/3.12.rst:1665 -msgid ":const:`PY_VECTORCALL_ARGUMENTS_OFFSET`" -msgstr ":const:`PY_VECTORCALL_ARGUMENTS_OFFSET`" +msgid ":c:macro:`PY_VECTORCALL_ARGUMENTS_OFFSET`" +msgstr "" #: ../../whatsnew/3.12.rst:1667 msgid "" @@ -2802,12 +2802,12 @@ msgstr "" #: ../../whatsnew/3.12.rst:1786 msgid "" "Extension classes wanting to add a ``__dict__`` or weak reference slot " -"should use :const:`Py_TPFLAGS_MANAGED_DICT` and :const:" +"should use :c:macro:`Py_TPFLAGS_MANAGED_DICT` and :c:macro:" "`Py_TPFLAGS_MANAGED_WEAKREF` instead of ``tp_dictoffset`` and " "``tp_weaklistoffset``, respectively. The use of ``tp_dictoffset`` and " "``tp_weaklistoffset`` is still supported, but does not fully support " "multiple inheritance (:gh:`95589`), and performance may be worse. Classes " -"declaring :const:`Py_TPFLAGS_MANAGED_DICT` should call :c:func:`!" +"declaring :c:macro:`Py_TPFLAGS_MANAGED_DICT` should call :c:func:`!" "_PyObject_VisitManagedDict` and :c:func:`!_PyObject_ClearManagedDict` to " "traverse and clear their instance's dictionaries. To clear weakrefs, call :c:" "func:`PyObject_ClearWeakRefs`, as before." @@ -2900,8 +2900,9 @@ msgstr "" #: ../../whatsnew/3.12.rst:1845 msgid "" "If the metaclass doesn't need to be instantiated from Python, set its " -"``tp_new`` to ``NULL`` using the :const:`Py_TPFLAGS_DISALLOW_INSTANTIATION` " -"flag. This makes it acceptable for ``PyType_From*`` functions." +"``tp_new`` to ``NULL`` using the :c:macro:" +"`Py_TPFLAGS_DISALLOW_INSTANTIATION` flag. This makes it acceptable for " +"``PyType_From*`` functions." msgstr "" #: ../../whatsnew/3.12.rst:1850 @@ -3046,7 +3047,7 @@ msgstr "" #: ../../whatsnew/3.12.rst:1898 msgid "" -"Creating immutable types (:const:`Py_TPFLAGS_IMMUTABLETYPE`) with mutable " +"Creating immutable types (:c:macro:`Py_TPFLAGS_IMMUTABLETYPE`) with mutable " "bases is deprecated and will be disabled in Python 3.14." msgstr "" @@ -3212,5 +3213,11 @@ msgid "" "`ctypes` module. (Contributed by Nikita Sobolev in :gh:`99285`.)" msgstr "" +#~ msgid ":const:`Py_TPFLAGS_HAVE_VECTORCALL`" +#~ msgstr ":const:`Py_TPFLAGS_HAVE_VECTORCALL`" + +#~ msgid ":const:`PY_VECTORCALL_ARGUMENTS_OFFSET`" +#~ msgstr ":const:`PY_VECTORCALL_ARGUMENTS_OFFSET`" + #~ msgid "email" #~ msgstr "email" diff --git a/whatsnew/3.2.po b/whatsnew/3.2.po index 2c1fe8586e..bf152464dd 100644 --- a/whatsnew/3.2.po +++ b/whatsnew/3.2.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-17 17:39+0800\n" +"POT-Creation-Date: 2023-07-22 00:04+0000\n" "PO-Revision-Date: 2018-05-23 16:20+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -425,7 +425,7 @@ msgid "" "strings even though the underlying platform may have a different " "convention. To bridge this gap, the :mod:`wsgiref` module has a new " "function, :func:`wsgiref.handlers.read_environ` for transcoding CGI " -"variables from :attr:`os.environ` into native strings and returning a new " +"variables from :data:`os.environ` into native strings and returning a new " "dictionary." msgstr "" @@ -482,7 +482,7 @@ msgstr "" msgid "" "The interpreter can now be started with a quiet option, ``-q``, to prevent " "the copyright and version information from being displayed in the " -"interactive mode. The option can be introspected using the :attr:`sys." +"interactive mode. The option can be introspected using the :data:`sys." "flags` attribute:" msgstr "" @@ -551,7 +551,7 @@ msgstr "(請見 :issue:`4617`\\ 。)" msgid "" "The internal :c:type:`structsequence` tool now creates subclasses of tuple. " "This means that C structures like those returned by :func:`os.stat`, :func:" -"`time.gmtime`, and :attr:`sys.version_info` now work like a :term:`named " +"`time.gmtime`, and :data:`sys.version_info` now work like a :term:`named " "tuple` and now work with functions and methods that expect a tuple as an " "argument. This is a big step forward in making the C structures as flexible " "as their pure Python counterparts:" @@ -587,8 +587,8 @@ msgstr "" #: ../../whatsnew/3.2.rst:600 msgid "" "A :exc:`ResourceWarning` is issued at interpreter shutdown if the :data:`gc." -"garbage` list isn't empty, and if :attr:`gc.DEBUG_UNCOLLECTABLE` is set, all " -"uncollectable objects are printed. This is meant to make the programmer " +"garbage` list isn't empty, and if :const:`gc.DEBUG_UNCOLLECTABLE` is set, " +"all uncollectable objects are printed. This is meant to make the programmer " "aware that their code contains object finalization issues." msgstr "" @@ -614,7 +614,7 @@ msgid "" "of an effort to make more objects fully implement the :class:`collections." "Sequence` :term:`abstract base class`. As a result, the language will have " "a more uniform API. In addition, :class:`range` objects now support slicing " -"and negative indices, even with values larger than :attr:`sys.maxsize`. " +"and negative indices, even with values larger than :data:`sys.maxsize`. " "This makes *range* more interoperable with lists::" msgstr "" @@ -1097,7 +1097,7 @@ msgstr "" #: ../../whatsnew/3.2.rst:1009 msgid "" "Whenever a two-digit year is used in a time tuple, the interpretation has " -"been governed by :attr:`time.accept2dyear`. The default is ``True`` which " +"been governed by :data:`time.accept2dyear`. The default is ``True`` which " "means that for a two-digit year, the century is guessed according to the " "POSIX rules governing the ``%y`` strptime format." msgstr "" @@ -1105,14 +1105,14 @@ msgstr "" #: ../../whatsnew/3.2.rst:1014 msgid "" "Starting with Py3.2, use of the century guessing heuristic will emit a :exc:" -"`DeprecationWarning`. Instead, it is recommended that :attr:`time." +"`DeprecationWarning`. Instead, it is recommended that :data:`time." "accept2dyear` be set to ``False`` so that large date ranges can be used " "without guesswork::" msgstr "" #: ../../whatsnew/3.2.rst:1033 msgid "" -"Several functions now have significantly expanded date ranges. When :attr:" +"Several functions now have significantly expanded date ranges. When :data:" "`time.accept2dyear` is false, the :func:`time.asctime` function will accept " "any year that fits in a C int, while the :func:`time.mktime` and :func:`time." "strftime` functions will accept the full range supported by the " @@ -1263,10 +1263,10 @@ msgstr "" msgid "" "If no configuration is set-up before a logging event occurs, there is now a " "default configuration using a :class:`~logging.StreamHandler` directed to :" -"attr:`sys.stderr` for events of ``WARNING`` level or higher. Formerly, an " +"data:`sys.stderr` for events of ``WARNING`` level or higher. Formerly, an " "event occurring before a configuration was set-up would either raise an " -"exception or silently drop the event depending on the value of :attr:" -"`logging.raiseExceptions`. The new default handler is stored in :attr:" +"exception or silently drop the event depending on the value of :data:" +"`logging.raiseExceptions`. The new default handler is stored in :data:" "`logging.lastResort`." msgstr "" @@ -1384,7 +1384,7 @@ msgstr "" #: ../../whatsnew/3.2.rst:1302 msgid "" -"Some of the hashing details are exposed through a new attribute, :attr:`sys." +"Some of the hashing details are exposed through a new attribute, :data:`sys." "hash_info`, which describes the bit width of the hash value, the prime " "modulus, the hash values for *infinity* and *nan*, and the multiplier used " "for the imaginary part of a number:" @@ -1492,7 +1492,7 @@ msgstr "select" #: ../../whatsnew/3.2.rst:1390 msgid "" -"The :mod:`select` module now exposes a new, constant attribute, :attr:" +"The :mod:`select` module now exposes a new, constant attribute, :const:" "`~select.PIPE_BUF`, which gives the minimum number of bytes which are " "guaranteed not to block when :func:`select.select` says a pipe is ready for " "writing." @@ -1617,7 +1617,7 @@ msgstr "" #: ../../whatsnew/3.2.rst:1531 msgid "" "Some operating systems allow direct access to encoded bytes in the " -"environment. If so, the :attr:`os.supports_bytes_environ` constant will be " +"environment. If so, the :const:`os.supports_bytes_environ` constant will be " "true." msgstr "" @@ -1795,8 +1795,8 @@ msgstr "" #: ../../whatsnew/3.2.rst:1668 msgid "" "The version of OpenSSL being used is now accessible using the module " -"attributes :data:`ssl.OPENSSL_VERSION` (a string), :data:`ssl." -"OPENSSL_VERSION_INFO` (a 5-tuple), and :data:`ssl.OPENSSL_VERSION_NUMBER` " +"attributes :const:`ssl.OPENSSL_VERSION` (a string), :const:`ssl." +"OPENSSL_VERSION_INFO` (a 5-tuple), and :const:`ssl.OPENSSL_VERSION_NUMBER` " "(an integer)." msgstr "" @@ -2528,7 +2528,7 @@ msgstr "turtledemo" msgid "" "The demonstration code for the :mod:`turtle` module was moved from the " "*Demo* directory to main library. It includes over a dozen sample scripts " -"with lively displays. Being on :attr:`sys.path`, it can now be run directly " +"with lively displays. Being on :data:`sys.path`, it can now be run directly " "from the command-line:" msgstr "" @@ -2951,7 +2951,7 @@ msgstr "" #: ../../whatsnew/3.2.rst:2568 msgid "" "A new C API function :c:func:`PySys_SetArgvEx` allows an embedded " -"interpreter to set :attr:`sys.argv` without also modifying :attr:`sys.path` " +"interpreter to set :data:`sys.argv` without also modifying :data:`sys.path` " "(:issue:`5753`)." msgstr "" diff --git a/whatsnew/3.3.po b/whatsnew/3.3.po index 53235d6191..533cde0905 100644 --- a/whatsnew/3.3.po +++ b/whatsnew/3.3.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-17 17:39+0800\n" +"POT-Creation-Date: 2023-07-22 00:04+0000\n" "PO-Revision-Date: 2018-05-23 16:20+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -801,7 +801,7 @@ msgstr "" msgid "" "A new attribute on the :mod:`sys` module exposes details specific to the " "implementation of the currently running interpreter. The initial set of " -"attributes on :attr:`sys.implementation` are ``name``, ``version``, " +"attributes on :data:`sys.implementation` are ``name``, ``version``, " "``hexversion``, and ``cache_tag``." msgstr "" @@ -904,7 +904,7 @@ msgstr "" msgid "" "In terms of finders, :class:`importlib.machinery.FileFinder` exposes the " "mechanism used to search for source and bytecode files of a module. " -"Previously this class was an implicit member of :attr:`sys.path_hooks`." +"Previously this class was an implicit member of :data:`sys.path_hooks`." msgstr "" #: ../../whatsnew/3.3.rst:724 @@ -928,7 +928,7 @@ msgstr "" #: ../../whatsnew/3.3.rst:737 msgid "" "The :func:`importlib.invalidate_caches` function will now call the method " -"with the same name on all finders cached in :attr:`sys.path_importer_cache` " +"with the same name on all finders cached in :data:`sys.path_importer_cache` " "to help clean up any stored state as necessary." msgstr "" @@ -945,8 +945,8 @@ msgstr "" #: ../../whatsnew/3.3.rst:747 msgid "" "Beyond the expanse of what :mod:`importlib` now exposes, there are other " -"visible changes to import. The biggest is that :attr:`sys.meta_path` and :" -"attr:`sys.path_hooks` now store all of the meta path finders and path entry " +"visible changes to import. The biggest is that :data:`sys.meta_path` and :" +"data:`sys.path_hooks` now store all of the meta path finders and path entry " "hooks used by import. Previously the finders were implicit and hidden " "within the C code of import instead of being directly exposed. This means " "that one can now easily remove or change the order of the various finders to " @@ -972,9 +972,9 @@ msgstr "" #: ../../whatsnew/3.3.rst:764 msgid "" -"``None`` is now inserted into :attr:`sys.path_importer_cache` when no finder " -"can be found on :attr:`sys.path_hooks`. Since :class:`!imp.NullImporter` is " -"not directly exposed on :attr:`sys.path_hooks` it could no longer be relied " +"``None`` is now inserted into :data:`sys.path_importer_cache` when no finder " +"can be found on :data:`sys.path_hooks`. Since :class:`!imp.NullImporter` is " +"not directly exposed on :data:`sys.path_hooks` it could no longer be relied " "upon to always be available to use as a value representing no finder found." msgstr "" @@ -1107,7 +1107,7 @@ msgstr "" msgid "" ":func:`open` gets a new *opener* parameter: the underlying file descriptor " "for the file object is then obtained by calling *opener* with (*file*, " -"*flags*). It can be used to use custom flags like :data:`os.O_CLOEXEC` for " +"*flags*). It can be used to use custom flags like :const:`os.O_CLOEXEC` for " "example. The ``'x'`` mode was added: open for exclusive creation, failing if " "the file already exists." msgstr "" @@ -1600,7 +1600,7 @@ msgstr "" msgid "" "If Python is compiled without threads, the C version automatically disables " "the expensive thread local context machinery. In this case, the variable :" -"data:`~decimal.HAVE_THREADS` is set to ``False``." +"const:`~decimal.HAVE_THREADS` is set to ``False``." msgstr "" #: ../../whatsnew/3.3.rst:1135 @@ -2217,7 +2217,7 @@ msgstr "os" #: ../../whatsnew/3.3.rst:1578 msgid "" "The :mod:`os` module has a new :func:`~os.pipe2` function that makes it " -"possible to create a pipe with :data:`~os.O_CLOEXEC` or :data:`~os." +"possible to create a pipe with :const:`~os.O_CLOEXEC` or :const:`~os." "O_NONBLOCK` flags set atomically. This is especially useful to avoid race " "conditions in multi-threaded programs." msgstr "" @@ -2425,10 +2425,10 @@ msgstr "" #: ../../whatsnew/3.3.rst:1694 msgid "" -"New constants :data:`~os.RTLD_LAZY`, :data:`~os.RTLD_NOW`, :data:`~os." -"RTLD_GLOBAL`, :data:`~os.RTLD_LOCAL`, :data:`~os.RTLD_NODELETE`, :data:`~os." -"RTLD_NOLOAD`, and :data:`~os.RTLD_DEEPBIND` are available on platforms that " -"support them. These are for use with the :func:`sys.setdlopenflags` " +"New constants :const:`~os.RTLD_LAZY`, :const:`~os.RTLD_NOW`, :const:`~os." +"RTLD_GLOBAL`, :const:`~os.RTLD_LOCAL`, :const:`~os.RTLD_NODELETE`, :const:" +"`~os.RTLD_NOLOAD`, and :const:`~os.RTLD_DEEPBIND` are available on platforms " +"that support them. These are for use with the :func:`sys.setdlopenflags` " "function, and supersede the similar constants defined in :mod:`ctypes` and :" "mod:`DLFCN`. (Contributed by Victor Stinner in :issue:`13226`.)" msgstr "" @@ -2852,7 +2852,7 @@ msgstr "" #: ../../whatsnew/3.3.rst:1953 msgid "" "You can query the SSL compression algorithm used by an SSL socket, thanks to " -"its new :meth:`~ssl.SSLSocket.compression` method. The new attribute :attr:" +"its new :meth:`~ssl.SSLSocket.compression` method. The new attribute :const:" "`~ssl.OP_NO_COMPRESSION` can be used to disable compression. (Contributed by " "Antoine Pitrou in :issue:`13634`.)" msgstr "" @@ -2879,7 +2879,7 @@ msgstr "" #: ../../whatsnew/3.3.rst:1969 msgid "" -"New attribute :attr:`~ssl.OP_CIPHER_SERVER_PREFERENCE` allows setting SSLv3 " +"New attribute :const:`~ssl.OP_CIPHER_SERVER_PREFERENCE` allows setting SSLv3 " "server sockets to use the server's cipher ordering preference rather than " "the client's (:issue:`13635`)." msgstr "" @@ -2922,7 +2922,7 @@ msgstr "" #: ../../whatsnew/3.3.rst:1998 msgid "" -"A new constant :data:`~subprocess.DEVNULL` allows suppressing output in a " +"A new constant :const:`~subprocess.DEVNULL` allows suppressing output in a " "platform-independent fashion. (Contributed by Ross Lagerwall in :issue:" "`5870`.)" msgstr "" @@ -3139,7 +3139,7 @@ msgstr "" #: ../../whatsnew/3.3.rst:2144 msgid "" -"New attribute :attr:`zlib.ZLIB_RUNTIME_VERSION` reports the version string " +"New attribute :const:`zlib.ZLIB_RUNTIME_VERSION` reports the version string " "of the underlying ``zlib`` library that is loaded at runtime. (Contributed " "by Torsten Landschoff in :issue:`12306`.)" msgstr "" @@ -3638,19 +3638,19 @@ msgstr "" #: ../../whatsnew/3.3.rst:2381 msgid "" -"Because :attr:`sys.meta_path` and :attr:`sys.path_hooks` now have finders on " +"Because :data:`sys.meta_path` and :data:`sys.path_hooks` now have finders on " "them by default, you will most likely want to use :meth:`list.insert` " "instead of :meth:`list.append` to add to those lists." msgstr "" #: ../../whatsnew/3.3.rst:2385 msgid "" -"Because ``None`` is now inserted into :attr:`sys.path_importer_cache`, if " +"Because ``None`` is now inserted into :data:`sys.path_importer_cache`, if " "you are clearing out entries in the dictionary of paths that do not have a " "finder, you will need to remove keys paired with values of ``None`` **and** :" "class:`!imp.NullImporter` to be backwards-compatible. This will lead to " "extra overhead on older versions of Python that re-insert ``None`` into :" -"attr:`sys.path_importer_cache` where it represents the use of implicit " +"data:`sys.path_importer_cache` where it represents the use of implicit " "finders, but semantically it should not change anything." msgstr "" @@ -3743,7 +3743,7 @@ msgstr "" #: ../../whatsnew/3.3.rst:2447 msgid "" "The ``ast.__version__`` constant has been removed. If you need to make " -"decisions affected by the AST version, use :attr:`sys.version_info` to make " +"decisions affected by the AST version, use :data:`sys.version_info` to make " "the decision." msgstr "" diff --git a/whatsnew/3.4.po b/whatsnew/3.4.po index 5806982517..0d3eefaa6b 100644 --- a/whatsnew/3.4.po +++ b/whatsnew/3.4.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-17 17:39+0800\n" +"POT-Creation-Date: 2023-07-22 00:04+0000\n" "PO-Revision-Date: 2018-05-23 16:20+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -1031,7 +1031,7 @@ msgstr "doctest" #: ../../whatsnew/3.4.rst:778 msgid "" -"A new :ref:`option flag `, :data:`~doctest.FAIL_FAST`, " +"A new :ref:`option flag `, :const:`~doctest.FAIL_FAST`, " "halts test running as soon as the first failure is detected. (Contributed " "by R. David Murray and Daniel Urban in :issue:`16522`.)" msgstr "" @@ -1120,7 +1120,7 @@ msgstr "" #: ../../whatsnew/3.4.rst:844 msgid "" -"New module attribute :data:`~filecmp.DEFAULT_IGNORES` provides the list of " +"New module attribute :const:`~filecmp.DEFAULT_IGNORES` provides the list of " "directories that are used as the default value for the *ignore* parameter of " "the :func:`~filecmp.dircmp` function. (Contributed by Eli Bendersky in :" "issue:`15442`.)" @@ -1609,11 +1609,12 @@ msgstr "" #: ../../whatsnew/3.4.rst:1191 msgid "" -":func:`os.open` supports two new flags on platforms that provide them, :data:" -"`~os.O_PATH` (un-opened file descriptor), and :data:`~os.O_TMPFILE` (unnamed " -"temporary file; as of 3.4.0 release available only on Linux systems with a " -"kernel version of 3.11 or newer that have uapi headers). (Contributed by " -"Christian Heimes in :issue:`18673` and Benjamin Peterson, respectively.)" +":func:`os.open` supports two new flags on platforms that provide them, :" +"const:`~os.O_PATH` (un-opened file descriptor), and :const:`~os.O_TMPFILE` " +"(unnamed temporary file; as of 3.4.0 release available only on Linux systems " +"with a kernel version of 3.11 or newer that have uapi headers). " +"(Contributed by Christian Heimes in :issue:`18673` and Benjamin Peterson, " +"respectively.)" msgstr "" #: ../../whatsnew/3.4.rst:1199 @@ -1673,9 +1674,9 @@ msgid "" "stdlib serialization protocols, with new :func:`~plistlib.load`, :func:" "`~plistlib.dump`, :func:`~plistlib.loads`, and :func:`~plistlib.dumps` " "functions. (The older API is now deprecated.) In addition to the already " -"supported XML plist format (:data:`~plistlib.FMT_XML`), it also now supports " -"the binary plist format (:data:`~plistlib.FMT_BINARY`). (Contributed by " -"Ronald Oussoren and others in :issue:`14455`.)" +"supported XML plist format (:const:`~plistlib.FMT_XML`), it also now " +"supports the binary plist format (:const:`~plistlib.FMT_BINARY`). " +"(Contributed by Ronald Oussoren and others in :issue:`14455`.)" msgstr "" #: ../../whatsnew/3.4.rst:1247 @@ -1793,16 +1794,16 @@ msgstr "" #: ../../whatsnew/3.4.rst:1325 msgid "" "On Linux kernel version 2.6.36 or later, there are also some new Linux " -"specific constants: :attr:`~resource.RLIMIT_MSGQUEUE`, :attr:`~resource." -"RLIMIT_NICE`, :attr:`~resource.RLIMIT_RTPRIO`, :attr:`~resource." -"RLIMIT_RTTIME`, and :attr:`~resource.RLIMIT_SIGPENDING`. (Contributed by " +"specific constants: :const:`~resource.RLIMIT_MSGQUEUE`, :const:`~resource." +"RLIMIT_NICE`, :const:`~resource.RLIMIT_RTPRIO`, :const:`~resource." +"RLIMIT_RTTIME`, and :const:`~resource.RLIMIT_SIGPENDING`. (Contributed by " "Christian Heimes in :issue:`19324`.)" msgstr "" #: ../../whatsnew/3.4.rst:1331 msgid "" "On FreeBSD version 9 and later, there some new FreeBSD specific constants: :" -"attr:`~resource.RLIMIT_SBSIZE`, :attr:`~resource.RLIMIT_SWAP`, and :attr:" +"const:`~resource.RLIMIT_SBSIZE`, :const:`~resource.RLIMIT_SWAP`, and :const:" "`~resource.RLIMIT_NPTS`. (Contributed by Claudiu Popa in :issue:`19343`.)" msgstr "" @@ -1880,7 +1881,7 @@ msgstr "socket" #: ../../whatsnew/3.4.rst:1391 msgid "" -"The socket module now supports the :data:`~socket.CAN_BCM` protocol on " +"The socket module now supports the :const:`~socket.CAN_BCM` protocol on " "platforms that support it. (Contributed by Brian Thorne in :issue:`15359`.)" msgstr "" @@ -1899,7 +1900,7 @@ msgid "" msgstr "" #: ../../whatsnew/3.4.rst:1402 -msgid "The :data:`~socket.AF_LINK` constant is now available on BSD and OSX." +msgid "The :const:`~socket.AF_LINK` constant is now available on BSD and OSX." msgstr "" #: ../../whatsnew/3.4.rst:1404 @@ -1978,10 +1979,10 @@ msgid "" "If OpenSSL 0.9.8 or later is available, :class:`~ssl.SSLContext` has a new " "attribute :attr:`~ssl.SSLContext.verify_flags` that can be used to control " "the certificate verification process by setting it to some combination of " -"the new constants :data:`~ssl.VERIFY_DEFAULT`, :data:`~ssl." -"VERIFY_CRL_CHECK_LEAF`, :data:`~ssl.VERIFY_CRL_CHECK_CHAIN`, or :data:`~ssl." -"VERIFY_X509_STRICT`. OpenSSL does not do any CRL verification by default. " -"(Contributed by Christien Heimes in :issue:`8813`.)" +"the new constants :const:`~ssl.VERIFY_DEFAULT`, :const:`~ssl." +"VERIFY_CRL_CHECK_LEAF`, :const:`~ssl.VERIFY_CRL_CHECK_CHAIN`, or :const:" +"`~ssl.VERIFY_X509_STRICT`. OpenSSL does not do any CRL verification by " +"default. (Contributed by Christien Heimes in :issue:`8813`.)" msgstr "" #: ../../whatsnew/3.4.rst:1468 @@ -2033,8 +2034,8 @@ msgstr "" #: ../../whatsnew/3.4.rst:1502 msgid "" "The module supports new :mod:`~stat.ST_MODE` flags, :mod:`~stat.S_IFDOOR`, :" -"attr:`~stat.S_IFPORT`, and :attr:`~stat.S_IFWHT`. (Contributed by Christian " -"Hiemes in :issue:`11016`.)" +"const:`~stat.S_IFPORT`, and :const:`~stat.S_IFWHT`. (Contributed by " +"Christian Hiemes in :issue:`11016`.)" msgstr "" #: ../../whatsnew/3.4.rst:1508 @@ -2505,7 +2506,7 @@ msgstr "" #: ../../whatsnew/3.4.rst:1852 msgid "" -"The PEP adds additional fields to the :attr:`sys.hash_info` named tuple to " +"The PEP adds additional fields to the :data:`sys.hash_info` named tuple to " "describe the hash algorithm in use by the currently executing binary. " "Otherwise, the PEP does not alter any existing CPython APIs." msgstr "" diff --git a/whatsnew/3.5.po b/whatsnew/3.5.po index 5718070f14..fb407f0473 100644 --- a/whatsnew/3.5.po +++ b/whatsnew/3.5.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-17 17:39+0800\n" +"POT-Creation-Date: 2023-07-22 00:04+0000\n" "PO-Revision-Date: 2018-05-23 16:20+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -531,7 +531,7 @@ msgstr "" #: ../../whatsnew/3.5.rst:481 msgid "" -"An :py:data:`errno.EINTR` error code is returned whenever a system call, " +"An :py:const:`errno.EINTR` error code is returned whenever a system call, " "that is waiting for I/O, is interrupted by a signal. Previously, Python " "would raise :exc:`InterruptedError` in such cases. This meant that, when " "writing a Python application, the developer had two choices:" @@ -598,7 +598,7 @@ msgstr "" #: ../../whatsnew/3.5.rst:529 msgid "" -"special cases: :func:`os.close` and :func:`os.dup2` now ignore :py:data:" +"special cases: :func:`os.close` and :func:`os.dup2` now ignore :py:const:" "`~errno.EINTR` errors; the syscall is not retried (see the PEP for the " "rationale);" msgstr "" @@ -1822,7 +1822,7 @@ msgstr "" #: ../../whatsnew/3.5.rst:1500 msgid "" "New :func:`~os.get_blocking` and :func:`~os.set_blocking` functions allow " -"getting and setting a file descriptor's blocking mode (:data:`~os." +"getting and setting a file descriptor's blocking mode (:const:`~os." "O_NONBLOCK`.) (Contributed by Victor Stinner in :issue:`22054`.)" msgstr "" @@ -2196,8 +2196,8 @@ msgstr "" msgid "" "The new :meth:`SSLSocket.selected_alpn_protocol() ` returns the protocol that was selected during the " -"TLS handshake. The :data:`~ssl.HAS_ALPN` flag indicates whether ALPN support " -"is present." +"TLS handshake. The :const:`~ssl.HAS_ALPN` flag indicates whether ALPN " +"support is present." msgstr "" #: ../../whatsnew/3.5.rst:1790 @@ -3224,7 +3224,7 @@ msgstr "" #: ../../whatsnew/3.5.rst:2479 msgid "" -"The :mod:`socket` module now exports the :data:`~socket.CAN_RAW_FD_FRAMES` " +"The :mod:`socket` module now exports the :const:`~socket.CAN_RAW_FD_FRAMES` " "constant on linux 3.6 and greater." msgstr "" diff --git a/whatsnew/3.6.po b/whatsnew/3.6.po index 43056d52d7..343925f93d 100644 --- a/whatsnew/3.6.po +++ b/whatsnew/3.6.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-17 17:39+0800\n" +"POT-Creation-Date: 2023-07-22 00:04+0000\n" "PO-Revision-Date: 2018-07-15 18:56+0800\n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" "tw)\n" @@ -754,8 +754,9 @@ msgstr "" #: ../../whatsnew/3.6.rst:652 msgid "" "Check that the :term:`GIL ` is held when allocator " -"functions of :c:data:`PYMEM_DOMAIN_OBJ` (ex: :c:func:`PyObject_Malloc`) and :" -"c:data:`PYMEM_DOMAIN_MEM` (ex: :c:func:`PyMem_Malloc`) domains are called." +"functions of :c:macro:`PYMEM_DOMAIN_OBJ` (ex: :c:func:`PyObject_Malloc`) " +"and :c:macro:`PYMEM_DOMAIN_MEM` (ex: :c:func:`PyMem_Malloc`) domains are " +"called." msgstr "" #: ../../whatsnew/3.6.rst:656 @@ -1767,7 +1768,7 @@ msgstr "site" #: ../../whatsnew/3.6.rst:1391 msgid "" -"When specifying paths to add to :attr:`sys.path` in a ``.pth`` file, you may " +"When specifying paths to add to :data:`sys.path` in a ``.pth`` file, you may " "now specify file paths on top of directories (e.g. zip files). (Contributed " "by Wolfgang Langner in :issue:`26587`)." msgstr "" @@ -1788,7 +1789,7 @@ msgstr "socket" #: ../../whatsnew/3.6.rst:1406 msgid "" -"The :func:`~socket.socket.ioctl` function now supports the :data:`~socket." +"The :func:`~socket.socket.ioctl` function now supports the :const:`~socket." "SIO_LOOPBACK_FAST_PATH` control code. (Contributed by Daniel Stokes in :" "issue:`26536`.)" msgstr "" @@ -1809,7 +1810,7 @@ msgstr "" #: ../../whatsnew/3.6.rst:1418 msgid "" -"The socket module now supports the address family :data:`~socket.AF_ALG` to " +"The socket module now supports the address family :const:`~socket.AF_ALG` to " "interface with Linux Kernel crypto API. ``ALG_*``, ``SOL_ALG`` and :meth:" "`~socket.socket.sendmsg_afalg` were added. (Contributed by Christian Heimes " "in :issue:`27744` with support from Victor Stinner.)" @@ -2355,7 +2356,7 @@ msgstr "" #: ../../whatsnew/3.6.rst:1824 msgid "" -"Allocator functions of the :c:func:`PyMem_Malloc` domain (:c:data:" +"Allocator functions of the :c:func:`PyMem_Malloc` domain (:c:macro:" "`PYMEM_DOMAIN_MEM`) now use the :ref:`pymalloc memory allocator ` " "instead of :c:func:`malloc` function of the C library. The pymalloc " "allocator is optimized for objects smaller or equal to 512 bytes with a " @@ -2438,8 +2439,9 @@ msgstr "" #: ../../whatsnew/3.6.rst:1876 msgid "" "The :term:`GIL ` must now be held when allocator " -"functions of :c:data:`PYMEM_DOMAIN_OBJ` (ex: :c:func:`PyObject_Malloc`) and :" -"c:data:`PYMEM_DOMAIN_MEM` (ex: :c:func:`PyMem_Malloc`) domains are called." +"functions of :c:macro:`PYMEM_DOMAIN_OBJ` (ex: :c:func:`PyObject_Malloc`) " +"and :c:macro:`PYMEM_DOMAIN_MEM` (ex: :c:func:`PyMem_Malloc`) domains are " +"called." msgstr "" #: ../../whatsnew/3.6.rst:1880 @@ -2618,7 +2620,7 @@ msgstr "" #: ../../whatsnew/3.6.rst:2012 msgid "" "The :class:`importlib.machinery.WindowsRegistryFinder` class is now " -"deprecated. As of 3.6.0, it is still added to :attr:`sys.meta_path` by " +"deprecated. As of 3.6.0, it is still added to :data:`sys.meta_path` by " "default (on Windows), but this may change in future releases." msgstr "" diff --git a/whatsnew/3.7.po b/whatsnew/3.7.po index b864b988b1..27c812d576 100644 --- a/whatsnew/3.7.po +++ b/whatsnew/3.7.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-17 17:39+0800\n" +"POT-Creation-Date: 2023-07-22 00:04+0000\n" "PO-Revision-Date: 2018-07-15 18:56+0800\n" "Last-Translator: \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -1801,15 +1801,15 @@ msgstr "" #: ../../whatsnew/3.7.rst:1283 msgid "" -"The :mod:`socket` module now exposes the :data:`socket.TCP_CONGESTION` " -"(Linux 2.6.13), :data:`socket.TCP_USER_TIMEOUT` (Linux 2.6.37), and :data:" +"The :mod:`socket` module now exposes the :const:`socket.TCP_CONGESTION` " +"(Linux 2.6.13), :const:`socket.TCP_USER_TIMEOUT` (Linux 2.6.37), and :const:" "`socket.TCP_NOTSENT_LOWAT` (Linux 3.12) constants. (Contributed by Omar " "Sandoval in :issue:`26273` and Nathaniel J. Smith in :issue:`29728`.)" msgstr "" #: ../../whatsnew/3.7.rst:1289 msgid "" -"Support for :data:`socket.AF_VSOCK` sockets has been added to allow " +"Support for :const:`socket.AF_VSOCK` sockets has been added to allow " "communication between virtual machines and their hosts. (Contributed by " "Cathy Avery in :issue:`27584`.)" msgstr "" @@ -1962,7 +1962,7 @@ msgstr "subprocess" msgid "" "The :func:`subprocess.run` function accepts the new *capture_output* keyword " "argument. When true, stdout and stderr will be captured. This is equivalent " -"to passing :data:`subprocess.PIPE` as *stdout* and *stderr* arguments. " +"to passing :const:`subprocess.PIPE` as *stdout* and *stderr* arguments. " "(Contributed by Bo Bayles in :issue:`32102`.)" msgstr "" @@ -2034,20 +2034,20 @@ msgstr "" #: ../../whatsnew/3.7.rst:1456 msgid "" -":data:`time.CLOCK_BOOTTIME` (Linux): Identical to :data:`time." +":const:`time.CLOCK_BOOTTIME` (Linux): Identical to :const:`time." "CLOCK_MONOTONIC`, except it also includes any time that the system is " "suspended." msgstr "" #: ../../whatsnew/3.7.rst:1459 msgid "" -":data:`time.CLOCK_PROF` (FreeBSD, NetBSD and OpenBSD): High-resolution per-" +":const:`time.CLOCK_PROF` (FreeBSD, NetBSD and OpenBSD): High-resolution per-" "process CPU timer." msgstr "" #: ../../whatsnew/3.7.rst:1461 msgid "" -":data:`time.CLOCK_UPTIME` (FreeBSD, OpenBSD): Time whose absolute value is " +":const:`time.CLOCK_UPTIME` (FreeBSD, OpenBSD): Time whose absolute value is " "the time the system has been running and not suspended, providing accurate " "uptime measurement." msgstr "" diff --git a/whatsnew/3.8.po b/whatsnew/3.8.po index 016912ff1d..aedd30d9c2 100644 --- a/whatsnew/3.8.po +++ b/whatsnew/3.8.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-17 17:39+0800\n" +"POT-Creation-Date: 2023-07-22 00:04+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-" @@ -1596,8 +1596,8 @@ msgstr "time" #: ../../whatsnew/3.8.rst:1308 msgid "" -"Added new clock :data:`~time.CLOCK_UPTIME_RAW` for macOS 10.12. (Contributed " -"by Joannah Nanjekye in :issue:`35702`.)" +"Added new clock :const:`~time.CLOCK_UPTIME_RAW` for macOS 10.12. " +"(Contributed by Joannah Nanjekye in :issue:`35702`.)" msgstr "" #: ../../whatsnew/3.8.rst:1313 @@ -2393,7 +2393,7 @@ msgstr "" #: ../../whatsnew/3.8.rst:1842 msgid "" -"On AIX, :attr:`sys.platform` doesn't contain the major version anymore. It " +"On AIX, :data:`sys.platform` doesn't contain the major version anymore. It " "is always ``'aix'``, instead of ``'aix3'`` .. ``'aix7'``. Since older " "Python versions include the version number, so it is recommended to always " "use ``sys.platform.startswith('aix')``. (Contributed by M. Felt in :issue:" @@ -2730,7 +2730,7 @@ msgid "" "extension types across feature releases, anymore. A :c:type:`PyTypeObject` " "exported by a third-party extension module is supposed to have all the slots " "expected in the current Python version, including :c:member:`~PyTypeObject." -"tp_finalize` (:const:`Py_TPFLAGS_HAVE_FINALIZE` is not checked anymore " +"tp_finalize` (:c:macro:`Py_TPFLAGS_HAVE_FINALIZE` is not checked anymore " "before reading :c:member:`~PyTypeObject.tp_finalize`)." msgstr "" diff --git a/whatsnew/3.9.po b/whatsnew/3.9.po index 9368151b06..afddb424b6 100644 --- a/whatsnew/3.9.po +++ b/whatsnew/3.9.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-05-03 00:17+0000\n" +"POT-Creation-Date: 2023-07-22 00:04+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-" @@ -599,8 +599,9 @@ msgstr "fcntl" #: ../../whatsnew/3.9.rst:430 msgid "" -"Added constants :data:`~fcntl.F_OFD_GETLK`, :data:`~fcntl.F_OFD_SETLK` and :" -"data:`~fcntl.F_OFD_SETLKW`. (Contributed by Dong-hee Na in :issue:`38602`.)" +"Added constants :const:`~fcntl.F_OFD_GETLK`, :const:`~fcntl.F_OFD_SETLK` " +"and :const:`~fcntl.F_OFD_SETLKW`. (Contributed by Dong-hee Na in :issue:" +"`38602`.)" msgstr "" #: ../../whatsnew/3.9.rst:435 @@ -868,13 +869,13 @@ msgstr "os" #: ../../whatsnew/3.9.rst:596 msgid "" -"Added :data:`~os.CLD_KILLED` and :data:`~os.CLD_STOPPED` for :attr:" +"Added :const:`~os.CLD_KILLED` and :const:`~os.CLD_STOPPED` for :attr:" "`si_code`. (Contributed by Dong-hee Na in :issue:`38493`.)" msgstr "" #: ../../whatsnew/3.9.rst:599 msgid "" -"Exposed the Linux-specific :func:`os.pidfd_open` (:issue:`38692`) and :data:" +"Exposed the Linux-specific :func:`os.pidfd_open` (:issue:`38692`) and :const:" "`os.P_PIDFD` (:issue:`38713`) for process management with file descriptors." msgstr "" @@ -994,14 +995,14 @@ msgstr "socket" #: ../../whatsnew/3.9.rst:672 msgid "" -"The :mod:`socket` module now exports the :data:`~socket." +"The :mod:`socket` module now exports the :const:`~socket." "CAN_RAW_JOIN_FILTERS` constant on Linux 4.1 and greater. (Contributed by " "Stefan Tatschner and Zackery Spytz in :issue:`25780`.)" msgstr "" #: ../../whatsnew/3.9.rst:676 msgid "" -"The socket module now supports the :data:`~socket.CAN_J1939` protocol on " +"The socket module now supports the :const:`~socket.CAN_J1939` protocol on " "platforms that support it. (Contributed by Karl Ding in :issue:`40291`.)" msgstr "" @@ -1030,7 +1031,7 @@ msgstr "sys" #: ../../whatsnew/3.9.rst:695 msgid "" -"Added a new :attr:`sys.platlibdir` attribute: name of the platform-specific " +"Added a new :data:`sys.platlibdir` attribute: name of the platform-specific " "library directory. It is used to build the path of standard library and the " "paths of installed extension modules. It is equal to ``\"lib\"`` on most " "platforms. On Fedora and SuSE, it is equal to ``\"lib64\"`` on 64-bit " @@ -1040,7 +1041,7 @@ msgstr "" #: ../../whatsnew/3.9.rst:701 msgid "" -"Previously, :attr:`sys.stderr` was block-buffered when non-interactive. Now " +"Previously, :data:`sys.stderr` was block-buffered when non-interactive. Now " "``stderr`` defaults to always being line-buffered. (Contributed by Jendrik " "Seipp in :issue:`13601`.)" msgstr "" @@ -1568,7 +1569,7 @@ msgstr "" #: ../../whatsnew/3.9.rst:1086 msgid "" -"The :meth:`select.epoll.unregister` method no longer ignores the :data:" +"The :meth:`select.epoll.unregister` method no longer ignores the :const:" "`~errno.EBADF` error. (Contributed by Victor Stinner in :issue:`39239`.)" msgstr "" @@ -1751,8 +1752,8 @@ msgstr "" #: ../../whatsnew/3.9.rst:1228 msgid "" "Added ``--with-platlibdir`` option to the ``configure`` script: name of the " -"platform-specific library directory, stored in the new :attr:`sys." -"platlibdir` attribute. See :attr:`sys.platlibdir` attribute for more " +"platform-specific library directory, stored in the new :data:`sys." +"platlibdir` attribute. See :data:`sys.platlibdir` attribute for more " "information. (Contributed by Jan Matějek, Matěj Cepl, Charalampos Stratakis " "and Victor Stinner in :issue:`1294959`.)" msgstr "" @@ -1817,7 +1818,7 @@ msgstr "" msgid "" ":pep:`573`: Added :c:func:`PyType_FromModuleAndSpec` to associate a module " "with a class; :c:func:`PyType_GetModule` and :c:func:`PyType_GetModuleState` " -"to retrieve the module and its state; and :c:data:`PyCMethod` and :c:data:" +"to retrieve the module and its state; and :c:data:`PyCMethod` and :c:macro:" "`METH_METHOD` to allow a method to access the class it was defined in. " "(Contributed by Marcel Plch and Petr Viktorin in :issue:`38787`.)" msgstr "" From 4641002e2bbe9ed2ccd8aa998f5aeec84ef42efb Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 22 Jul 2023 11:11:03 +0000 Subject: [PATCH 06/10] sync with cpython 76fd98a6 --- whatsnew/3.12.po | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/whatsnew/3.12.po b/whatsnew/3.12.po index c2e3ab4de0..706df84a29 100644 --- a/whatsnew/3.12.po +++ b/whatsnew/3.12.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-22 00:04+0000\n" +"POT-Creation-Date: 2023-07-22 11:09+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -2254,7 +2254,7 @@ msgid "" "Removed ``randrange()`` functionality deprecated since Python 3.10. " "Formerly, ``randrange(10.0)`` losslessly converted to ``randrange(10)``. " "Now, it raises a :exc:`TypeError`. Also, the exception raised for non-" -"integral values such as ``randrange(10.5)`` or ``randrange('10')`` has been " +"integer values such as ``randrange(10.5)`` or ``randrange('10')`` has been " "changed from :exc:`ValueError` to :exc:`TypeError`. This also prevents bugs " "where ``randrange(1e25)`` would silently select from a larger range than " "``randrange(10**25)``. (Originally suggested by Serhiy Storchaka :gh:" From 256b3ebeef42c3d13860d15ac7e730e3a1402a34 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 22 Jul 2023 13:44:56 +0000 Subject: [PATCH 07/10] sync with cpython beb5e4fb --- tutorial/errors.po | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tutorial/errors.po b/tutorial/errors.po index 6b9aa8b3f9..03f2b2aea4 100644 --- a/tutorial/errors.po +++ b/tutorial/errors.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-06 16:53+0000\n" +"POT-Creation-Date: 2023-07-22 13:42+0000\n" "PO-Revision-Date: 2022-10-24 14:54+0800\n" "Last-Translator: Steven Hsu \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -647,7 +647,7 @@ msgstr "" "\n" "::" -#: ../../tutorial/errors.rst:564 +#: ../../tutorial/errors.rst:573 msgid "" "Note that the exceptions nested in an exception group must be instances, not " "types. This is because in practice the exceptions would typically be ones " @@ -659,11 +659,11 @@ msgstr "" "\n" "::" -#: ../../tutorial/errors.rst:584 +#: ../../tutorial/errors.rst:593 msgid "Enriching Exceptions with Notes" msgstr "用註解使例外更詳細" -#: ../../tutorial/errors.rst:586 +#: ../../tutorial/errors.rst:595 msgid "" "When an exception is created in order to be raised, it is usually " "initialized with information that describes the error that has occurred. " @@ -681,7 +681,7 @@ msgstr "" "\n" "::" -#: ../../tutorial/errors.rst:607 +#: ../../tutorial/errors.rst:616 msgid "" "For example, when collecting exceptions into an exception group, we may want " "to add context information for the individual errors. In the following each " From 7215e8d6672a95abb37112d7074eeda129a6560f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 23 Jul 2023 00:06:23 +0000 Subject: [PATCH 08/10] sync with cpython d87d67b9 --- library/curses.po | 794 ++++++++++++++++++------------------ library/logging.handlers.po | 110 ++--- library/re.po | 501 ++++++++++++----------- library/shutil.po | 195 ++++----- library/ssl.po | 4 +- library/sys.po | 707 ++++++++++++++++---------------- whatsnew/3.5.po | 9 +- 7 files changed, 1189 insertions(+), 1131 deletions(-) diff --git a/library/curses.po b/library/curses.po index 3bb2803ad8..e3453377ee 100644 --- a/library/curses.po +++ b/library/curses.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-17 17:39+0800\n" +"POT-Creation-Date: 2023-07-23 00:04+0000\n" "PO-Revision-Date: 2018-05-23 14:42+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -263,7 +263,7 @@ msgid "" "const:`BUTTON_ALT`." msgstr "" -#: ../../library/curses.rst:213 ../../library/curses.rst:1754 +#: ../../library/curses.rst:213 ../../library/curses.rst:1772 msgid "" "The ``BUTTON5_*`` constants are now exposed if they are provided by the " "underlying curses library." @@ -711,25 +711,25 @@ msgstr "" #: ../../library/curses.rst:644 msgid "" -"Update :envvar:`LINES` and :envvar:`COLS`. Useful for detecting manual " -"screen resize." +"Update the :const:`LINES` and :const:`COLS` module variables. Useful for " +"detecting manual screen resize." msgstr "" -#: ../../library/curses.rst:651 +#: ../../library/curses.rst:652 msgid "Push *ch* so the next :meth:`~window.get_wch` will return it." msgstr "" -#: ../../library/curses.rst:655 +#: ../../library/curses.rst:656 msgid "Only one *ch* can be pushed before :meth:`!get_wch` is called." msgstr "" -#: ../../library/curses.rst:662 +#: ../../library/curses.rst:663 msgid "" "Push a :const:`KEY_MOUSE` event onto the input queue, associating the given " "state data with it." msgstr "" -#: ../../library/curses.rst:668 +#: ../../library/curses.rst:669 msgid "" "If used, this function should be called before :func:`initscr` or newterm " "are called. When *flag* is ``False``, the values of lines and columns " @@ -739,7 +739,7 @@ msgid "" "to use the window size if :envvar:`LINES` and :envvar:`COLUMNS` are not set)." msgstr "" -#: ../../library/curses.rst:678 +#: ../../library/curses.rst:679 msgid "" "Allow use of default values for colors on terminals supporting this feature. " "Use this to support transparency in your application. The default color is " @@ -748,7 +748,7 @@ msgid "" "*x* to a red foreground color on the default background." msgstr "" -#: ../../library/curses.rst:687 +#: ../../library/curses.rst:688 msgid "" "Initialize curses and call another callable object, *func*, which should be " "the rest of your curses-using application. If the application raises an " @@ -762,50 +762,50 @@ msgid "" "echo, and disables the terminal keypad." msgstr "" -#: ../../library/curses.rst:701 +#: ../../library/curses.rst:702 msgid "Window Objects" msgstr "" -#: ../../library/curses.rst:703 +#: ../../library/curses.rst:704 msgid "" "Window objects, as returned by :func:`initscr` and :func:`newwin` above, " "have the following methods and attributes:" msgstr "" -#: ../../library/curses.rst:710 +#: ../../library/curses.rst:711 msgid "" "Paint character *ch* at ``(y, x)`` with attributes *attr*, overwriting any " "character previously painted at that location. By default, the character " "position and attributes are the current settings for the window object." msgstr "" -#: ../../library/curses.rst:716 +#: ../../library/curses.rst:717 msgid "" "Writing outside the window, subwindow, or pad raises a :exc:`curses.error`. " "Attempting to write to the lower right corner of a window, subwindow, or pad " "will cause an exception to be raised after the character is printed." msgstr "" -#: ../../library/curses.rst:724 +#: ../../library/curses.rst:725 msgid "" "Paint at most *n* characters of the character string *str* at ``(y, x)`` " "with attributes *attr*, overwriting anything previously on the display." msgstr "" -#: ../../library/curses.rst:732 +#: ../../library/curses.rst:733 msgid "" "Paint the character string *str* at ``(y, x)`` with attributes *attr*, " "overwriting anything previously on the display." msgstr "" -#: ../../library/curses.rst:737 +#: ../../library/curses.rst:738 msgid "" "Writing outside the window, subwindow, or pad raises :exc:`curses.error`. " "Attempting to write to the lower right corner of a window, subwindow, or pad " "will cause an exception to be raised after the string is printed." msgstr "" -#: ../../library/curses.rst:741 +#: ../../library/curses.rst:742 msgid "" "A `bug in ncurses `_, the backend for " "this Python module, can cause SegFaults when resizing windows. This is fixed " @@ -815,44 +815,44 @@ msgid "" "line." msgstr "" -#: ../../library/curses.rst:751 +#: ../../library/curses.rst:752 msgid "" "Remove attribute *attr* from the \"background\" set applied to all writes to " "the current window." msgstr "" -#: ../../library/curses.rst:757 +#: ../../library/curses.rst:758 msgid "" "Add attribute *attr* from the \"background\" set applied to all writes to " "the current window." msgstr "" -#: ../../library/curses.rst:763 +#: ../../library/curses.rst:764 msgid "" "Set the \"background\" set of attributes to *attr*. This set is initially " "``0`` (no attributes)." msgstr "" -#: ../../library/curses.rst:769 +#: ../../library/curses.rst:770 msgid "" "Set the background property of the window to the character *ch*, with " "attributes *attr*. The change is then applied to every character position " "in that window:" msgstr "" -#: ../../library/curses.rst:773 +#: ../../library/curses.rst:774 msgid "" "The attribute of every character in the window is changed to the new " "background attribute." msgstr "" -#: ../../library/curses.rst:776 +#: ../../library/curses.rst:777 msgid "" "Wherever the former background character appears, it is changed to the new " "background character." msgstr "" -#: ../../library/curses.rst:782 +#: ../../library/curses.rst:783 msgid "" "Set the window's background. A window's background consists of a character " "and any combination of attributes. The attribute part of the background is " @@ -863,128 +863,128 @@ msgid "" "delete line/character operations." msgstr "" -#: ../../library/curses.rst:792 +#: ../../library/curses.rst:793 msgid "" "Draw a border around the edges of the window. Each parameter specifies the " "character to use for a specific part of the border; see the table below for " "more details." msgstr "" -#: ../../library/curses.rst:798 +#: ../../library/curses.rst:799 msgid "" "A ``0`` value for any parameter will cause the default character to be used " "for that parameter. Keyword parameters can *not* be used. The defaults are " "listed in this table:" msgstr "" -#: ../../library/curses.rst:803 +#: ../../library/curses.rst:804 msgid "Parameter" msgstr "參數" -#: ../../library/curses.rst:803 +#: ../../library/curses.rst:804 msgid "Description" msgstr "描述" -#: ../../library/curses.rst:803 +#: ../../library/curses.rst:804 msgid "Default value" msgstr "" -#: ../../library/curses.rst:805 +#: ../../library/curses.rst:806 msgid "*ls*" msgstr "*ls*" -#: ../../library/curses.rst:805 +#: ../../library/curses.rst:806 msgid "Left side" msgstr "" -#: ../../library/curses.rst:805 ../../library/curses.rst:807 +#: ../../library/curses.rst:806 ../../library/curses.rst:808 msgid ":const:`ACS_VLINE`" msgstr ":const:`ACS_VLINE`" -#: ../../library/curses.rst:807 +#: ../../library/curses.rst:808 msgid "*rs*" msgstr "*rs*" -#: ../../library/curses.rst:807 +#: ../../library/curses.rst:808 msgid "Right side" msgstr "" -#: ../../library/curses.rst:809 +#: ../../library/curses.rst:810 msgid "*ts*" msgstr "*ts*" -#: ../../library/curses.rst:809 +#: ../../library/curses.rst:810 msgid "Top" msgstr "" -#: ../../library/curses.rst:809 ../../library/curses.rst:811 +#: ../../library/curses.rst:810 ../../library/curses.rst:812 msgid ":const:`ACS_HLINE`" msgstr ":const:`ACS_HLINE`" -#: ../../library/curses.rst:811 +#: ../../library/curses.rst:812 msgid "*bs*" msgstr "*bs*" -#: ../../library/curses.rst:811 +#: ../../library/curses.rst:812 msgid "Bottom" msgstr "" -#: ../../library/curses.rst:813 +#: ../../library/curses.rst:814 msgid "*tl*" msgstr "*tl*" -#: ../../library/curses.rst:813 +#: ../../library/curses.rst:814 msgid "Upper-left corner" msgstr "" -#: ../../library/curses.rst:813 +#: ../../library/curses.rst:814 msgid ":const:`ACS_ULCORNER`" msgstr ":const:`ACS_ULCORNER`" -#: ../../library/curses.rst:815 +#: ../../library/curses.rst:816 msgid "*tr*" msgstr "*tr*" -#: ../../library/curses.rst:815 +#: ../../library/curses.rst:816 msgid "Upper-right corner" msgstr "" -#: ../../library/curses.rst:815 +#: ../../library/curses.rst:816 msgid ":const:`ACS_URCORNER`" msgstr ":const:`ACS_URCORNER`" -#: ../../library/curses.rst:817 +#: ../../library/curses.rst:818 msgid "*bl*" msgstr "*bl*" -#: ../../library/curses.rst:817 +#: ../../library/curses.rst:818 msgid "Bottom-left corner" msgstr "" -#: ../../library/curses.rst:817 +#: ../../library/curses.rst:818 msgid ":const:`ACS_LLCORNER`" msgstr ":const:`ACS_LLCORNER`" -#: ../../library/curses.rst:819 +#: ../../library/curses.rst:820 msgid "*br*" msgstr "*br*" -#: ../../library/curses.rst:819 +#: ../../library/curses.rst:820 msgid "Bottom-right corner" msgstr "" -#: ../../library/curses.rst:819 +#: ../../library/curses.rst:820 msgid ":const:`ACS_LRCORNER`" msgstr ":const:`ACS_LRCORNER`" -#: ../../library/curses.rst:825 +#: ../../library/curses.rst:826 msgid "" "Similar to :meth:`border`, but both *ls* and *rs* are *vertch* and both *ts* " "and *bs* are *horch*. The default corner characters are always used by this " "function." msgstr "" -#: ../../library/curses.rst:834 +#: ../../library/curses.rst:835 msgid "" "Set the attributes of *num* characters at the current cursor position, or at " "position ``(y, x)`` if supplied. If *num* is not given or is ``-1``, the " @@ -994,45 +994,45 @@ msgid "" "be redisplayed by the next window refresh." msgstr "" -#: ../../library/curses.rst:844 +#: ../../library/curses.rst:845 msgid "" "Like :meth:`erase`, but also cause the whole window to be repainted upon " "next call to :meth:`refresh`." msgstr "" -#: ../../library/curses.rst:850 +#: ../../library/curses.rst:851 msgid "" "If *flag* is ``True``, the next call to :meth:`refresh` will clear the " "window completely." msgstr "" -#: ../../library/curses.rst:856 +#: ../../library/curses.rst:857 msgid "" "Erase from cursor to the end of the window: all lines below the cursor are " "deleted, and then the equivalent of :meth:`clrtoeol` is performed." msgstr "" -#: ../../library/curses.rst:862 +#: ../../library/curses.rst:863 msgid "Erase from cursor to the end of the line." msgstr "" -#: ../../library/curses.rst:867 +#: ../../library/curses.rst:868 msgid "" "Update the current cursor position of all the ancestors of the window to " "reflect the current cursor position of the window." msgstr "" -#: ../../library/curses.rst:873 +#: ../../library/curses.rst:874 msgid "Delete any character at ``(y, x)``." msgstr "" -#: ../../library/curses.rst:878 +#: ../../library/curses.rst:879 msgid "" "Delete the line under the cursor. All following lines are moved up by one " "line." msgstr "" -#: ../../library/curses.rst:884 +#: ../../library/curses.rst:885 msgid "" "An abbreviation for \"derive window\", :meth:`derwin` is the same as " "calling :meth:`subwin`, except that *begin_y* and *begin_x* are relative to " @@ -1040,13 +1040,13 @@ msgid "" "a window object for the derived window." msgstr "" -#: ../../library/curses.rst:892 +#: ../../library/curses.rst:893 msgid "" "Add character *ch* with attribute *attr*, and immediately call :meth:" "`refresh` on the window." msgstr "" -#: ../../library/curses.rst:898 +#: ../../library/curses.rst:899 msgid "" "Test whether the given pair of screen-relative character-cell coordinates " "are enclosed by the given window, returning ``True`` or ``False``. It is " @@ -1054,11 +1054,11 @@ msgid "" "location of a mouse event." msgstr "" -#: ../../library/curses.rst:903 +#: ../../library/curses.rst:904 msgid "Previously it returned ``1`` or ``0`` instead of ``True`` or ``False``." msgstr "" -#: ../../library/curses.rst:909 +#: ../../library/curses.rst:910 msgid "" "Encoding used to encode method arguments (Unicode strings and characters). " "The encoding attribute is inherited from the parent window when a subwindow " @@ -1066,19 +1066,19 @@ msgid "" "locale encoding is used (see :func:`locale.getencoding`)." msgstr "" -#: ../../library/curses.rst:919 +#: ../../library/curses.rst:920 msgid "Clear the window." msgstr "" -#: ../../library/curses.rst:924 +#: ../../library/curses.rst:925 msgid "Return a tuple ``(y, x)`` of co-ordinates of upper-left corner." msgstr "" -#: ../../library/curses.rst:929 +#: ../../library/curses.rst:930 msgid "Return the given window's current background character/attribute pair." msgstr "" -#: ../../library/curses.rst:934 +#: ../../library/curses.rst:935 msgid "" "Get a character. Note that the integer returned does *not* have to be in " "ASCII range: function keys, keypad keys and so on are represented by numbers " @@ -1086,14 +1086,14 @@ msgid "" "otherwise wait until a key is pressed." msgstr "" -#: ../../library/curses.rst:942 +#: ../../library/curses.rst:943 msgid "" "Get a wide character. Return a character for most keys, or an integer for " "function keys, keypad keys, and other special keys. In no-delay mode, raise " "an exception if there is no input." msgstr "" -#: ../../library/curses.rst:951 +#: ../../library/curses.rst:952 msgid "" "Get a character, returning a string instead of an integer, as :meth:`getch` " "does. Function keys, keypad keys and other special keys return a multibyte " @@ -1101,35 +1101,35 @@ msgid "" "there is no input." msgstr "" -#: ../../library/curses.rst:959 +#: ../../library/curses.rst:960 msgid "Return a tuple ``(y, x)`` of the height and width of the window." msgstr "" -#: ../../library/curses.rst:964 +#: ../../library/curses.rst:965 msgid "" "Return the beginning coordinates of this window relative to its parent " "window as a tuple ``(y, x)``. Return ``(-1, -1)`` if this window has no " "parent." msgstr "" -#: ../../library/curses.rst:974 +#: ../../library/curses.rst:975 msgid "" "Read a bytes object from the user, with primitive line editing capacity." msgstr "" -#: ../../library/curses.rst:979 +#: ../../library/curses.rst:980 msgid "" "Return a tuple ``(y, x)`` of current cursor position relative to the " "window's upper-left corner." msgstr "" -#: ../../library/curses.rst:986 +#: ../../library/curses.rst:987 msgid "" "Display a horizontal line starting at ``(y, x)`` with length *n* consisting " "of the character *ch*." msgstr "" -#: ../../library/curses.rst:992 +#: ../../library/curses.rst:993 msgid "" "If *flag* is ``False``, curses no longer considers using the hardware insert/" "delete character feature of the terminal; if *flag* is ``True``, use of " @@ -1137,13 +1137,13 @@ msgid "" "initialized, use of character insert/delete is enabled by default." msgstr "" -#: ../../library/curses.rst:1000 +#: ../../library/curses.rst:1001 msgid "" "If *flag* is ``True``, :mod:`curses` will try and use hardware line editing " "facilities. Otherwise, line insertion/deletion are disabled." msgstr "" -#: ../../library/curses.rst:1006 +#: ../../library/curses.rst:1007 msgid "" "If *flag* is ``True``, any change in the window image automatically causes " "the window to be refreshed; you no longer have to call :meth:`refresh` " @@ -1151,19 +1151,19 @@ msgid "" "calls to wrefresh. This option is disabled by default." msgstr "" -#: ../../library/curses.rst:1014 +#: ../../library/curses.rst:1015 msgid "" "Return the character at the given position in the window. The bottom 8 bits " "are the character proper, and upper bits are the attributes." msgstr "" -#: ../../library/curses.rst:1021 +#: ../../library/curses.rst:1022 msgid "" "Paint character *ch* at ``(y, x)`` with attributes *attr*, moving the line " "from position *x* right by one character." msgstr "" -#: ../../library/curses.rst:1027 +#: ../../library/curses.rst:1028 msgid "" "Insert *nlines* lines into the specified window above the current line. The " "*nlines* bottom lines are lost. For negative *nlines*, delete *nlines* " @@ -1172,13 +1172,13 @@ msgid "" "remains the same." msgstr "" -#: ../../library/curses.rst:1036 +#: ../../library/curses.rst:1037 msgid "" "Insert a blank line under the cursor. All following lines are moved down by " "one line." msgstr "" -#: ../../library/curses.rst:1043 +#: ../../library/curses.rst:1044 msgid "" "Insert a character string (as many characters as will fit on the line) " "before the character under the cursor, up to *n* characters. If *n* is " @@ -1188,7 +1188,7 @@ msgid "" "if specified)." msgstr "" -#: ../../library/curses.rst:1053 +#: ../../library/curses.rst:1054 msgid "" "Insert a character string (as many characters as will fit on the line) " "before the character under the cursor. All characters to the right of the " @@ -1197,7 +1197,7 @@ msgid "" "specified)." msgstr "" -#: ../../library/curses.rst:1062 +#: ../../library/curses.rst:1063 msgid "" "Return a bytes object of characters, extracted from the window starting at " "the current cursor position, or at *y*, *x* if specified. Attributes are " @@ -1205,76 +1205,76 @@ msgid "" "string at most *n* characters long (exclusive of the trailing NUL)." msgstr "" -#: ../../library/curses.rst:1070 +#: ../../library/curses.rst:1071 msgid "" "Return ``True`` if the specified line was modified since the last call to :" "meth:`refresh`; otherwise return ``False``. Raise a :exc:`curses.error` " "exception if *line* is not valid for the given window." msgstr "" -#: ../../library/curses.rst:1077 +#: ../../library/curses.rst:1078 msgid "" "Return ``True`` if the specified window was modified since the last call to :" "meth:`refresh`; otherwise return ``False``." msgstr "" -#: ../../library/curses.rst:1083 +#: ../../library/curses.rst:1084 msgid "" "If *flag* is ``True``, escape sequences generated by some keys (keypad, " "function keys) will be interpreted by :mod:`curses`. If *flag* is ``False``, " "escape sequences will be left as is in the input stream." msgstr "" -#: ../../library/curses.rst:1090 +#: ../../library/curses.rst:1091 msgid "" "If *flag* is ``True``, cursor is left where it is on update, instead of " "being at \"cursor position.\" This reduces cursor movement where possible. " "If possible the cursor will be made invisible." msgstr "" -#: ../../library/curses.rst:1094 +#: ../../library/curses.rst:1095 msgid "" "If *flag* is ``False``, cursor will always be at \"cursor position\" after " "an update." msgstr "" -#: ../../library/curses.rst:1099 +#: ../../library/curses.rst:1100 msgid "Move cursor to ``(new_y, new_x)``." msgstr "" -#: ../../library/curses.rst:1104 +#: ../../library/curses.rst:1105 msgid "" "Move the window inside its parent window. The screen-relative parameters of " "the window are not changed. This routine is used to display different parts " "of the parent window at the same physical position on the screen." msgstr "" -#: ../../library/curses.rst:1111 +#: ../../library/curses.rst:1112 msgid "Move the window so its upper-left corner is at ``(new_y, new_x)``." msgstr "" -#: ../../library/curses.rst:1116 +#: ../../library/curses.rst:1117 msgid "If *flag* is ``True``, :meth:`getch` will be non-blocking." msgstr "" -#: ../../library/curses.rst:1121 +#: ../../library/curses.rst:1122 msgid "If *flag* is ``True``, escape sequences will not be timed out." msgstr "" -#: ../../library/curses.rst:1123 +#: ../../library/curses.rst:1124 msgid "" "If *flag* is ``False``, after a few milliseconds, an escape sequence will " "not be interpreted, and will be left in the input stream as is." msgstr "" -#: ../../library/curses.rst:1129 +#: ../../library/curses.rst:1130 msgid "" "Mark for refresh but wait. This function updates the data structure " "representing the desired state of the window, but does not force an update " "of the physical screen. To accomplish that, call :func:`doupdate`." msgstr "" -#: ../../library/curses.rst:1136 +#: ../../library/curses.rst:1137 msgid "" "Overlay the window on top of *destwin*. The windows need not be the same " "size, only the overlapping region is copied. This copy is non-destructive, " @@ -1282,7 +1282,7 @@ msgid "" "contents of *destwin*." msgstr "" -#: ../../library/curses.rst:1141 +#: ../../library/curses.rst:1142 msgid "" "To get fine-grained control over the copied region, the second form of :meth:" "`overlay` can be used. *sminrow* and *smincol* are the upper-left " @@ -1290,7 +1290,7 @@ msgid "" "in the destination window." msgstr "" -#: ../../library/curses.rst:1149 +#: ../../library/curses.rst:1150 msgid "" "Overwrite the window on top of *destwin*. The windows need not be the same " "size, in which case only the overlapping region is copied. This copy is " @@ -1298,7 +1298,7 @@ msgid "" "the old contents of *destwin*." msgstr "" -#: ../../library/curses.rst:1154 +#: ../../library/curses.rst:1155 msgid "" "To get fine-grained control over the copied region, the second form of :meth:" "`overwrite` can be used. *sminrow* and *smincol* are the upper-left " @@ -1306,31 +1306,31 @@ msgid "" "the destination window." msgstr "" -#: ../../library/curses.rst:1162 +#: ../../library/curses.rst:1163 msgid "" "Write all data associated with the window into the provided file object. " "This information can be later retrieved using the :func:`getwin` function." msgstr "" -#: ../../library/curses.rst:1168 +#: ../../library/curses.rst:1169 msgid "" "Indicate that the *num* screen lines, starting at line *beg*, are corrupted " "and should be completely redrawn on the next :meth:`refresh` call." msgstr "" -#: ../../library/curses.rst:1174 +#: ../../library/curses.rst:1175 msgid "" "Touch the entire window, causing it to be completely redrawn on the next :" "meth:`refresh` call." msgstr "" -#: ../../library/curses.rst:1180 +#: ../../library/curses.rst:1181 msgid "" "Update the display immediately (sync actual screen with previous drawing/" "deleting methods)." msgstr "" -#: ../../library/curses.rst:1183 +#: ../../library/curses.rst:1184 msgid "" "The 6 optional arguments can only be specified when the window is a pad " "created with :func:`newpad`. The additional parameters are needed to " @@ -1345,7 +1345,7 @@ msgid "" "*smincol* are treated as if they were zero." msgstr "" -#: ../../library/curses.rst:1197 +#: ../../library/curses.rst:1198 msgid "" "Reallocate storage for a curses window to adjust its dimensions to the " "specified values. If either dimension is larger than the current values, " @@ -1353,11 +1353,11 @@ msgid "" "rendition (as set by :meth:`bkgdset`) merged into them." msgstr "" -#: ../../library/curses.rst:1205 +#: ../../library/curses.rst:1206 msgid "Scroll the screen or scrolling region upward by *lines* lines." msgstr "" -#: ../../library/curses.rst:1210 +#: ../../library/curses.rst:1211 msgid "" "Control what happens when the cursor of a window is moved off the edge of " "the window or scrolling region, either as a result of a newline action on " @@ -1367,54 +1367,54 @@ msgid "" "scrolling effect on the terminal, it is also necessary to call :meth:`idlok`." msgstr "" -#: ../../library/curses.rst:1220 +#: ../../library/curses.rst:1221 msgid "" "Set the scrolling region from line *top* to line *bottom*. All scrolling " "actions will take place in this region." msgstr "" -#: ../../library/curses.rst:1226 +#: ../../library/curses.rst:1227 msgid "" "Turn off the standout attribute. On some terminals this has the side effect " "of turning off all attributes." msgstr "" -#: ../../library/curses.rst:1232 +#: ../../library/curses.rst:1233 msgid "Turn on attribute *A_STANDOUT*." msgstr "" -#: ../../library/curses.rst:1238 ../../library/curses.rst:1245 +#: ../../library/curses.rst:1239 ../../library/curses.rst:1246 msgid "" "Return a sub-window, whose upper-left corner is at ``(begin_y, begin_x)``, " "and whose width/height is *ncols*/*nlines*." msgstr "" -#: ../../library/curses.rst:1248 +#: ../../library/curses.rst:1249 msgid "" "By default, the sub-window will extend from the specified position to the " "lower right corner of the window." msgstr "" -#: ../../library/curses.rst:1254 +#: ../../library/curses.rst:1255 msgid "" "Touch each location in the window that has been touched in any of its " "ancestor windows. This routine is called by :meth:`refresh`, so it should " "almost never be necessary to call it manually." msgstr "" -#: ../../library/curses.rst:1261 +#: ../../library/curses.rst:1262 msgid "" "If *flag* is ``True``, then :meth:`syncup` is called automatically whenever " "there is a change in the window." msgstr "" -#: ../../library/curses.rst:1267 +#: ../../library/curses.rst:1268 msgid "" "Touch all locations in ancestors of the window that have been changed in " "the window." msgstr "" -#: ../../library/curses.rst:1273 +#: ../../library/curses.rst:1274 msgid "" "Set blocking or non-blocking read behavior for the window. If *delay* is " "negative, blocking read is used (which will wait indefinitely for input). " @@ -1424,7 +1424,7 @@ msgid "" "still no input at the end of that time." msgstr "" -#: ../../library/curses.rst:1283 +#: ../../library/curses.rst:1284 msgid "" "Pretend *count* lines have been changed, starting with line *start*. If " "*changed* is supplied, it specifies whether the affected lines are marked as " @@ -1432,49 +1432,49 @@ msgid "" "``=False``)." msgstr "" -#: ../../library/curses.rst:1290 +#: ../../library/curses.rst:1291 msgid "" "Pretend the whole window has been changed, for purposes of drawing " "optimizations." msgstr "" -#: ../../library/curses.rst:1296 +#: ../../library/curses.rst:1297 msgid "" "Mark all lines in the window as unchanged since the last call to :meth:" "`refresh`." msgstr "" -#: ../../library/curses.rst:1303 +#: ../../library/curses.rst:1304 msgid "" "Display a vertical line starting at ``(y, x)`` with length *n* consisting of " "the character *ch* with attributes *attr*." msgstr "" -#: ../../library/curses.rst:1308 +#: ../../library/curses.rst:1309 msgid "Constants" msgstr "" -#: ../../library/curses.rst:1310 +#: ../../library/curses.rst:1311 msgid "The :mod:`curses` module defines the following data members:" msgstr "" -#: ../../library/curses.rst:1315 +#: ../../library/curses.rst:1316 msgid "" "Some curses routines that return an integer, such as :meth:`~window." "getch`, return :const:`ERR` upon failure." msgstr "" -#: ../../library/curses.rst:1321 +#: ../../library/curses.rst:1322 msgid "" "Some curses routines that return an integer, such as :func:`napms`, " "return :const:`OK` upon success." msgstr "" -#: ../../library/curses.rst:1328 +#: ../../library/curses.rst:1329 msgid "A bytes object representing the current version of the module." msgstr "" -#: ../../library/curses.rst:1333 +#: ../../library/curses.rst:1334 msgid "" "A named tuple containing the three components of the ncurses library " "version: *major*, *minor*, and *patch*. All values are integers. The " @@ -1482,518 +1482,536 @@ msgid "" "is equivalent to ``curses.ncurses_version.major`` and so on." msgstr "" -#: ../../library/curses.rst:1338 +#: ../../library/curses.rst:1339 msgid "Availability: if the ncurses library is used." msgstr "" -#: ../../library/curses.rst:1344 -msgid "The maximum number of colors the terminal can support." +#: ../../library/curses.rst:1345 +msgid "" +"The maximum number of colors the terminal can support. It is defined only " +"after the call to :func:`start_color`." msgstr "" -#: ../../library/curses.rst:1348 -msgid "The maximum number of color pairs the terminal can support." +#: ../../library/curses.rst:1350 +msgid "" +"The maximum number of color pairs the terminal can support. It is defined " +"only after the call to :func:`start_color`." msgstr "" -#: ../../library/curses.rst:1350 +#: ../../library/curses.rst:1355 +msgid "" +"The width of the screen, i.e., the number of columns. It is defined only " +"after the call to :func:`initscr`. Updated by :func:`update_lines_cols`, :" +"func:`resizeterm` and :func:`resize_term`." +msgstr "" + +#: ../../library/curses.rst:1362 +msgid "" +"The height of the screen, i.e., the number of lines. It is defined only " +"after the call to :func:`initscr`. Updated by :func:`update_lines_cols`, :" +"func:`resizeterm` and :func:`resize_term`." +msgstr "" + +#: ../../library/curses.rst:1368 msgid "" "Some constants are available to specify character cell attributes. The exact " "constants available are system dependent." msgstr "" -#: ../../library/curses.rst:1354 +#: ../../library/curses.rst:1372 msgid "Attribute" msgstr "" -#: ../../library/curses.rst:1354 ../../library/curses.rst:1399 -#: ../../library/curses.rst:1643 ../../library/curses.rst:1735 +#: ../../library/curses.rst:1372 ../../library/curses.rst:1417 +#: ../../library/curses.rst:1661 ../../library/curses.rst:1753 msgid "Meaning" msgstr "" -#: ../../library/curses.rst:1356 +#: ../../library/curses.rst:1374 msgid "Alternate character set mode" msgstr "" -#: ../../library/curses.rst:1358 +#: ../../library/curses.rst:1376 msgid "Blink mode" msgstr "" -#: ../../library/curses.rst:1360 +#: ../../library/curses.rst:1378 msgid "Bold mode" msgstr "" -#: ../../library/curses.rst:1362 +#: ../../library/curses.rst:1380 msgid "Dim mode" msgstr "" -#: ../../library/curses.rst:1364 +#: ../../library/curses.rst:1382 msgid "Invisible or blank mode" msgstr "" -#: ../../library/curses.rst:1366 +#: ../../library/curses.rst:1384 msgid "Italic mode" msgstr "" -#: ../../library/curses.rst:1368 +#: ../../library/curses.rst:1386 msgid "Normal attribute" msgstr "" -#: ../../library/curses.rst:1370 +#: ../../library/curses.rst:1388 msgid "Protected mode" msgstr "" -#: ../../library/curses.rst:1372 +#: ../../library/curses.rst:1390 msgid "Reverse background and foreground colors" msgstr "" -#: ../../library/curses.rst:1375 +#: ../../library/curses.rst:1393 msgid "Standout mode" msgstr "" -#: ../../library/curses.rst:1377 +#: ../../library/curses.rst:1395 msgid "Underline mode" msgstr "" -#: ../../library/curses.rst:1379 +#: ../../library/curses.rst:1397 msgid "Horizontal highlight" msgstr "" -#: ../../library/curses.rst:1381 +#: ../../library/curses.rst:1399 msgid "Left highlight" msgstr "" -#: ../../library/curses.rst:1383 +#: ../../library/curses.rst:1401 msgid "Low highlight" msgstr "" -#: ../../library/curses.rst:1385 +#: ../../library/curses.rst:1403 msgid "Right highlight" msgstr "" -#: ../../library/curses.rst:1387 +#: ../../library/curses.rst:1405 msgid "Top highlight" msgstr "" -#: ../../library/curses.rst:1389 +#: ../../library/curses.rst:1407 msgid "Vertical highlight" msgstr "" -#: ../../library/curses.rst:1392 +#: ../../library/curses.rst:1410 msgid "``A_ITALIC`` was added." msgstr "" -#: ../../library/curses.rst:1395 +#: ../../library/curses.rst:1413 msgid "" "Several constants are available to extract corresponding attributes returned " "by some methods." msgstr "" -#: ../../library/curses.rst:1399 +#: ../../library/curses.rst:1417 msgid "Bit-mask" msgstr "" -#: ../../library/curses.rst:1401 +#: ../../library/curses.rst:1419 msgid "Bit-mask to extract attributes" msgstr "" -#: ../../library/curses.rst:1404 +#: ../../library/curses.rst:1422 msgid "Bit-mask to extract a character" msgstr "" -#: ../../library/curses.rst:1407 +#: ../../library/curses.rst:1425 msgid "Bit-mask to extract color-pair field information" msgstr "" -#: ../../library/curses.rst:1411 +#: ../../library/curses.rst:1429 msgid "" "Keys are referred to by integer constants with names starting with " "``KEY_``. The exact keycaps available are system dependent." msgstr "" -#: ../../library/curses.rst:1417 +#: ../../library/curses.rst:1435 msgid "Key constant" msgstr "" -#: ../../library/curses.rst:1417 +#: ../../library/curses.rst:1435 msgid "Key" msgstr "" -#: ../../library/curses.rst:1419 +#: ../../library/curses.rst:1437 msgid "Minimum key value" msgstr "" -#: ../../library/curses.rst:1421 +#: ../../library/curses.rst:1439 msgid "Break key (unreliable)" msgstr "" -#: ../../library/curses.rst:1423 +#: ../../library/curses.rst:1441 msgid "Down-arrow" msgstr "" -#: ../../library/curses.rst:1425 +#: ../../library/curses.rst:1443 msgid "Up-arrow" msgstr "" -#: ../../library/curses.rst:1427 +#: ../../library/curses.rst:1445 msgid "Left-arrow" msgstr "" -#: ../../library/curses.rst:1429 +#: ../../library/curses.rst:1447 msgid "Right-arrow" msgstr "" -#: ../../library/curses.rst:1431 +#: ../../library/curses.rst:1449 msgid "Home key (upward+left arrow)" msgstr "" -#: ../../library/curses.rst:1433 +#: ../../library/curses.rst:1451 msgid "Backspace (unreliable)" msgstr "" -#: ../../library/curses.rst:1435 +#: ../../library/curses.rst:1453 msgid "Function keys. Up to 64 function keys are supported." msgstr "" -#: ../../library/curses.rst:1438 +#: ../../library/curses.rst:1456 msgid "Value of function key *n*" msgstr "" -#: ../../library/curses.rst:1440 +#: ../../library/curses.rst:1458 msgid "Delete line" msgstr "" -#: ../../library/curses.rst:1442 +#: ../../library/curses.rst:1460 msgid "Insert line" msgstr "" -#: ../../library/curses.rst:1444 +#: ../../library/curses.rst:1462 msgid "Delete character" msgstr "" -#: ../../library/curses.rst:1446 +#: ../../library/curses.rst:1464 msgid "Insert char or enter insert mode" msgstr "" -#: ../../library/curses.rst:1448 +#: ../../library/curses.rst:1466 msgid "Exit insert char mode" msgstr "" -#: ../../library/curses.rst:1450 +#: ../../library/curses.rst:1468 msgid "Clear screen" msgstr "" -#: ../../library/curses.rst:1452 +#: ../../library/curses.rst:1470 msgid "Clear to end of screen" msgstr "" -#: ../../library/curses.rst:1454 +#: ../../library/curses.rst:1472 msgid "Clear to end of line" msgstr "" -#: ../../library/curses.rst:1456 +#: ../../library/curses.rst:1474 msgid "Scroll 1 line forward" msgstr "" -#: ../../library/curses.rst:1458 +#: ../../library/curses.rst:1476 msgid "Scroll 1 line backward (reverse)" msgstr "" -#: ../../library/curses.rst:1460 +#: ../../library/curses.rst:1478 msgid "Next page" msgstr "" -#: ../../library/curses.rst:1462 +#: ../../library/curses.rst:1480 msgid "Previous page" msgstr "" -#: ../../library/curses.rst:1464 +#: ../../library/curses.rst:1482 msgid "Set tab" msgstr "" -#: ../../library/curses.rst:1466 +#: ../../library/curses.rst:1484 msgid "Clear tab" msgstr "" -#: ../../library/curses.rst:1468 +#: ../../library/curses.rst:1486 msgid "Clear all tabs" msgstr "" -#: ../../library/curses.rst:1470 +#: ../../library/curses.rst:1488 msgid "Enter or send (unreliable)" msgstr "" -#: ../../library/curses.rst:1472 +#: ../../library/curses.rst:1490 msgid "Soft (partial) reset (unreliable)" msgstr "" -#: ../../library/curses.rst:1474 +#: ../../library/curses.rst:1492 msgid "Reset or hard reset (unreliable)" msgstr "" -#: ../../library/curses.rst:1476 +#: ../../library/curses.rst:1494 msgid "Print" msgstr "" -#: ../../library/curses.rst:1478 +#: ../../library/curses.rst:1496 msgid "Home down or bottom (lower left)" msgstr "" -#: ../../library/curses.rst:1480 +#: ../../library/curses.rst:1498 msgid "Upper left of keypad" msgstr "" -#: ../../library/curses.rst:1482 +#: ../../library/curses.rst:1500 msgid "Upper right of keypad" msgstr "" -#: ../../library/curses.rst:1484 +#: ../../library/curses.rst:1502 msgid "Center of keypad" msgstr "" -#: ../../library/curses.rst:1486 +#: ../../library/curses.rst:1504 msgid "Lower left of keypad" msgstr "" -#: ../../library/curses.rst:1488 +#: ../../library/curses.rst:1506 msgid "Lower right of keypad" msgstr "" -#: ../../library/curses.rst:1490 +#: ../../library/curses.rst:1508 msgid "Back tab" msgstr "" -#: ../../library/curses.rst:1492 +#: ../../library/curses.rst:1510 msgid "Beg (beginning)" msgstr "" -#: ../../library/curses.rst:1494 +#: ../../library/curses.rst:1512 msgid "Cancel" msgstr "" -#: ../../library/curses.rst:1496 +#: ../../library/curses.rst:1514 msgid "Close" msgstr "" -#: ../../library/curses.rst:1498 +#: ../../library/curses.rst:1516 msgid "Cmd (command)" msgstr "" -#: ../../library/curses.rst:1500 +#: ../../library/curses.rst:1518 msgid "Copy" msgstr "" -#: ../../library/curses.rst:1502 +#: ../../library/curses.rst:1520 msgid "Create" msgstr "" -#: ../../library/curses.rst:1504 +#: ../../library/curses.rst:1522 msgid "End" msgstr "" -#: ../../library/curses.rst:1506 +#: ../../library/curses.rst:1524 msgid "Exit" msgstr "" -#: ../../library/curses.rst:1508 +#: ../../library/curses.rst:1526 msgid "Find" msgstr "" -#: ../../library/curses.rst:1510 +#: ../../library/curses.rst:1528 msgid "Help" msgstr "" -#: ../../library/curses.rst:1512 +#: ../../library/curses.rst:1530 msgid "Mark" msgstr "" -#: ../../library/curses.rst:1514 +#: ../../library/curses.rst:1532 msgid "Message" msgstr "" -#: ../../library/curses.rst:1516 +#: ../../library/curses.rst:1534 msgid "Move" msgstr "" -#: ../../library/curses.rst:1518 +#: ../../library/curses.rst:1536 msgid "Next" msgstr "" -#: ../../library/curses.rst:1520 +#: ../../library/curses.rst:1538 msgid "Open" msgstr "" -#: ../../library/curses.rst:1522 +#: ../../library/curses.rst:1540 msgid "Options" msgstr "" -#: ../../library/curses.rst:1524 +#: ../../library/curses.rst:1542 msgid "Prev (previous)" msgstr "" -#: ../../library/curses.rst:1526 +#: ../../library/curses.rst:1544 msgid "Redo" msgstr "" -#: ../../library/curses.rst:1528 +#: ../../library/curses.rst:1546 msgid "Ref (reference)" msgstr "" -#: ../../library/curses.rst:1530 +#: ../../library/curses.rst:1548 msgid "Refresh" msgstr "" -#: ../../library/curses.rst:1532 +#: ../../library/curses.rst:1550 msgid "Replace" msgstr "" -#: ../../library/curses.rst:1534 +#: ../../library/curses.rst:1552 msgid "Restart" msgstr "" -#: ../../library/curses.rst:1536 +#: ../../library/curses.rst:1554 msgid "Resume" msgstr "" -#: ../../library/curses.rst:1538 +#: ../../library/curses.rst:1556 msgid "Save" msgstr "" -#: ../../library/curses.rst:1540 +#: ../../library/curses.rst:1558 msgid "Shifted Beg (beginning)" msgstr "" -#: ../../library/curses.rst:1542 +#: ../../library/curses.rst:1560 msgid "Shifted Cancel" msgstr "" -#: ../../library/curses.rst:1544 +#: ../../library/curses.rst:1562 msgid "Shifted Command" msgstr "" -#: ../../library/curses.rst:1546 +#: ../../library/curses.rst:1564 msgid "Shifted Copy" msgstr "" -#: ../../library/curses.rst:1548 +#: ../../library/curses.rst:1566 msgid "Shifted Create" msgstr "" -#: ../../library/curses.rst:1550 +#: ../../library/curses.rst:1568 msgid "Shifted Delete char" msgstr "" -#: ../../library/curses.rst:1552 +#: ../../library/curses.rst:1570 msgid "Shifted Delete line" msgstr "" -#: ../../library/curses.rst:1554 +#: ../../library/curses.rst:1572 msgid "Select" msgstr "" -#: ../../library/curses.rst:1556 +#: ../../library/curses.rst:1574 msgid "Shifted End" msgstr "" -#: ../../library/curses.rst:1558 +#: ../../library/curses.rst:1576 msgid "Shifted Clear line" msgstr "" -#: ../../library/curses.rst:1560 +#: ../../library/curses.rst:1578 msgid "Shifted Exit" msgstr "" -#: ../../library/curses.rst:1562 +#: ../../library/curses.rst:1580 msgid "Shifted Find" msgstr "" -#: ../../library/curses.rst:1564 +#: ../../library/curses.rst:1582 msgid "Shifted Help" msgstr "" -#: ../../library/curses.rst:1566 +#: ../../library/curses.rst:1584 msgid "Shifted Home" msgstr "" -#: ../../library/curses.rst:1568 +#: ../../library/curses.rst:1586 msgid "Shifted Input" msgstr "" -#: ../../library/curses.rst:1570 +#: ../../library/curses.rst:1588 msgid "Shifted Left arrow" msgstr "" -#: ../../library/curses.rst:1572 +#: ../../library/curses.rst:1590 msgid "Shifted Message" msgstr "" -#: ../../library/curses.rst:1574 +#: ../../library/curses.rst:1592 msgid "Shifted Move" msgstr "" -#: ../../library/curses.rst:1576 +#: ../../library/curses.rst:1594 msgid "Shifted Next" msgstr "" -#: ../../library/curses.rst:1578 +#: ../../library/curses.rst:1596 msgid "Shifted Options" msgstr "" -#: ../../library/curses.rst:1580 +#: ../../library/curses.rst:1598 msgid "Shifted Prev" msgstr "" -#: ../../library/curses.rst:1582 +#: ../../library/curses.rst:1600 msgid "Shifted Print" msgstr "" -#: ../../library/curses.rst:1584 +#: ../../library/curses.rst:1602 msgid "Shifted Redo" msgstr "" -#: ../../library/curses.rst:1586 +#: ../../library/curses.rst:1604 msgid "Shifted Replace" msgstr "" -#: ../../library/curses.rst:1588 +#: ../../library/curses.rst:1606 msgid "Shifted Right arrow" msgstr "" -#: ../../library/curses.rst:1590 +#: ../../library/curses.rst:1608 msgid "Shifted Resume" msgstr "" -#: ../../library/curses.rst:1592 +#: ../../library/curses.rst:1610 msgid "Shifted Save" msgstr "" -#: ../../library/curses.rst:1594 +#: ../../library/curses.rst:1612 msgid "Shifted Suspend" msgstr "" -#: ../../library/curses.rst:1596 +#: ../../library/curses.rst:1614 msgid "Shifted Undo" msgstr "" -#: ../../library/curses.rst:1598 +#: ../../library/curses.rst:1616 msgid "Suspend" msgstr "" -#: ../../library/curses.rst:1600 +#: ../../library/curses.rst:1618 msgid "Undo" msgstr "" -#: ../../library/curses.rst:1602 +#: ../../library/curses.rst:1620 msgid "Mouse event has occurred" msgstr "" -#: ../../library/curses.rst:1604 +#: ../../library/curses.rst:1622 msgid "Terminal resize event" msgstr "" -#: ../../library/curses.rst:1606 +#: ../../library/curses.rst:1624 msgid "Maximum key value" msgstr "" -#: ../../library/curses.rst:1609 +#: ../../library/curses.rst:1627 msgid "" "On VT100s and their software emulations, such as X terminal emulators, there " "are normally at least four function keys (:const:`KEY_F1 `, :const:" @@ -2005,64 +2023,64 @@ msgid "" "keypad mappings are standard:" msgstr "" -#: ../../library/curses.rst:1618 +#: ../../library/curses.rst:1636 msgid "Keycap" msgstr "" -#: ../../library/curses.rst:1618 ../../library/curses.rst:1761 -#: ../../library/curses.rst:1885 +#: ../../library/curses.rst:1636 ../../library/curses.rst:1779 +#: ../../library/curses.rst:1903 msgid "Constant" msgstr "" -#: ../../library/curses.rst:1620 +#: ../../library/curses.rst:1638 msgid ":kbd:`Insert`" msgstr ":kbd:`Insert`" -#: ../../library/curses.rst:1620 +#: ../../library/curses.rst:1638 msgid "KEY_IC" msgstr "KEY_IC" -#: ../../library/curses.rst:1622 +#: ../../library/curses.rst:1640 msgid ":kbd:`Delete`" msgstr ":kbd:`Delete`" -#: ../../library/curses.rst:1622 +#: ../../library/curses.rst:1640 msgid "KEY_DC" msgstr "KEY_DC" -#: ../../library/curses.rst:1624 +#: ../../library/curses.rst:1642 msgid ":kbd:`Home`" msgstr ":kbd:`Home`" -#: ../../library/curses.rst:1624 +#: ../../library/curses.rst:1642 msgid "KEY_HOME" msgstr "KEY_HOME" -#: ../../library/curses.rst:1626 +#: ../../library/curses.rst:1644 msgid ":kbd:`End`" msgstr ":kbd:`End`" -#: ../../library/curses.rst:1626 +#: ../../library/curses.rst:1644 msgid "KEY_END" msgstr "KEY_END" -#: ../../library/curses.rst:1628 +#: ../../library/curses.rst:1646 msgid ":kbd:`Page Up`" msgstr ":kbd:`Page Up`" -#: ../../library/curses.rst:1628 +#: ../../library/curses.rst:1646 msgid "KEY_PPAGE" msgstr "KEY_PPAGE" -#: ../../library/curses.rst:1630 +#: ../../library/curses.rst:1648 msgid ":kbd:`Page Down`" msgstr ":kbd:`Page Down`" -#: ../../library/curses.rst:1630 +#: ../../library/curses.rst:1648 msgid "KEY_NPAGE" msgstr "KEY_NPAGE" -#: ../../library/curses.rst:1633 +#: ../../library/curses.rst:1651 msgid "" "The following table lists characters from the alternate character set. These " "are inherited from the VT100 terminal, and will generally be available on " @@ -2070,268 +2088,268 @@ msgid "" "available, curses falls back on a crude printable ASCII approximation." msgstr "" -#: ../../library/curses.rst:1640 +#: ../../library/curses.rst:1658 msgid "These are available only after :func:`initscr` has been called." msgstr "" -#: ../../library/curses.rst:1643 +#: ../../library/curses.rst:1661 msgid "ACS code" msgstr "" -#: ../../library/curses.rst:1645 +#: ../../library/curses.rst:1663 msgid "alternate name for upper right corner" msgstr "" -#: ../../library/curses.rst:1647 +#: ../../library/curses.rst:1665 msgid "solid square block" msgstr "" -#: ../../library/curses.rst:1649 +#: ../../library/curses.rst:1667 msgid "board of squares" msgstr "" -#: ../../library/curses.rst:1651 +#: ../../library/curses.rst:1669 msgid "alternate name for horizontal line" msgstr "" -#: ../../library/curses.rst:1653 +#: ../../library/curses.rst:1671 msgid "alternate name for upper left corner" msgstr "" -#: ../../library/curses.rst:1655 +#: ../../library/curses.rst:1673 msgid "alternate name for top tee" msgstr "" -#: ../../library/curses.rst:1657 +#: ../../library/curses.rst:1675 msgid "bottom tee" msgstr "" -#: ../../library/curses.rst:1659 +#: ../../library/curses.rst:1677 msgid "bullet" msgstr "" -#: ../../library/curses.rst:1661 +#: ../../library/curses.rst:1679 msgid "checker board (stipple)" msgstr "" -#: ../../library/curses.rst:1663 +#: ../../library/curses.rst:1681 msgid "arrow pointing down" msgstr "" -#: ../../library/curses.rst:1665 +#: ../../library/curses.rst:1683 msgid "degree symbol" msgstr "" -#: ../../library/curses.rst:1667 +#: ../../library/curses.rst:1685 msgid "diamond" msgstr "" -#: ../../library/curses.rst:1669 +#: ../../library/curses.rst:1687 msgid "greater-than-or-equal-to" msgstr "" -#: ../../library/curses.rst:1671 +#: ../../library/curses.rst:1689 msgid "horizontal line" msgstr "" -#: ../../library/curses.rst:1673 +#: ../../library/curses.rst:1691 msgid "lantern symbol" msgstr "" -#: ../../library/curses.rst:1675 +#: ../../library/curses.rst:1693 msgid "left arrow" msgstr "" -#: ../../library/curses.rst:1677 +#: ../../library/curses.rst:1695 msgid "less-than-or-equal-to" msgstr "" -#: ../../library/curses.rst:1679 +#: ../../library/curses.rst:1697 msgid "lower left-hand corner" msgstr "" -#: ../../library/curses.rst:1681 +#: ../../library/curses.rst:1699 msgid "lower right-hand corner" msgstr "" -#: ../../library/curses.rst:1683 +#: ../../library/curses.rst:1701 msgid "left tee" msgstr "" -#: ../../library/curses.rst:1685 +#: ../../library/curses.rst:1703 msgid "not-equal sign" msgstr "" -#: ../../library/curses.rst:1687 +#: ../../library/curses.rst:1705 msgid "letter pi" msgstr "" -#: ../../library/curses.rst:1689 +#: ../../library/curses.rst:1707 msgid "plus-or-minus sign" msgstr "" -#: ../../library/curses.rst:1691 +#: ../../library/curses.rst:1709 msgid "big plus sign" msgstr "" -#: ../../library/curses.rst:1693 +#: ../../library/curses.rst:1711 msgid "right arrow" msgstr "" -#: ../../library/curses.rst:1695 +#: ../../library/curses.rst:1713 msgid "right tee" msgstr "" -#: ../../library/curses.rst:1697 +#: ../../library/curses.rst:1715 msgid "scan line 1" msgstr "" -#: ../../library/curses.rst:1699 +#: ../../library/curses.rst:1717 msgid "scan line 3" msgstr "" -#: ../../library/curses.rst:1701 +#: ../../library/curses.rst:1719 msgid "scan line 7" msgstr "" -#: ../../library/curses.rst:1703 +#: ../../library/curses.rst:1721 msgid "scan line 9" msgstr "" -#: ../../library/curses.rst:1705 +#: ../../library/curses.rst:1723 msgid "alternate name for lower right corner" msgstr "" -#: ../../library/curses.rst:1707 +#: ../../library/curses.rst:1725 msgid "alternate name for vertical line" msgstr "" -#: ../../library/curses.rst:1709 +#: ../../library/curses.rst:1727 msgid "alternate name for right tee" msgstr "" -#: ../../library/curses.rst:1711 +#: ../../library/curses.rst:1729 msgid "alternate name for lower left corner" msgstr "" -#: ../../library/curses.rst:1713 +#: ../../library/curses.rst:1731 msgid "alternate name for bottom tee" msgstr "" -#: ../../library/curses.rst:1715 +#: ../../library/curses.rst:1733 msgid "alternate name for left tee" msgstr "" -#: ../../library/curses.rst:1717 +#: ../../library/curses.rst:1735 msgid "alternate name for crossover or big plus" msgstr "" -#: ../../library/curses.rst:1719 +#: ../../library/curses.rst:1737 msgid "pound sterling" msgstr "" -#: ../../library/curses.rst:1721 +#: ../../library/curses.rst:1739 msgid "top tee" msgstr "" -#: ../../library/curses.rst:1723 +#: ../../library/curses.rst:1741 msgid "up arrow" msgstr "" -#: ../../library/curses.rst:1725 +#: ../../library/curses.rst:1743 msgid "upper left corner" msgstr "" -#: ../../library/curses.rst:1727 +#: ../../library/curses.rst:1745 msgid "upper right corner" msgstr "" -#: ../../library/curses.rst:1729 +#: ../../library/curses.rst:1747 msgid "vertical line" msgstr "" -#: ../../library/curses.rst:1732 +#: ../../library/curses.rst:1750 msgid "" "The following table lists mouse button constants used by :meth:`getmouse`:" msgstr "" -#: ../../library/curses.rst:1735 +#: ../../library/curses.rst:1753 msgid "Mouse button constant" msgstr "" -#: ../../library/curses.rst:1737 +#: ../../library/curses.rst:1755 msgid "Mouse button *n* pressed" msgstr "" -#: ../../library/curses.rst:1739 +#: ../../library/curses.rst:1757 msgid "Mouse button *n* released" msgstr "" -#: ../../library/curses.rst:1741 +#: ../../library/curses.rst:1759 msgid "Mouse button *n* clicked" msgstr "" -#: ../../library/curses.rst:1743 +#: ../../library/curses.rst:1761 msgid "Mouse button *n* double clicked" msgstr "" -#: ../../library/curses.rst:1745 +#: ../../library/curses.rst:1763 msgid "Mouse button *n* triple clicked" msgstr "" -#: ../../library/curses.rst:1747 +#: ../../library/curses.rst:1765 msgid "Shift was down during button state change" msgstr "" -#: ../../library/curses.rst:1749 ../../library/curses.rst:1751 +#: ../../library/curses.rst:1767 ../../library/curses.rst:1769 msgid "Control was down during button state change" msgstr "" -#: ../../library/curses.rst:1758 +#: ../../library/curses.rst:1776 msgid "The following table lists the predefined colors:" msgstr "" -#: ../../library/curses.rst:1761 +#: ../../library/curses.rst:1779 msgid "Color" msgstr "顏色" -#: ../../library/curses.rst:1763 +#: ../../library/curses.rst:1781 msgid "Black" msgstr "黑" -#: ../../library/curses.rst:1765 +#: ../../library/curses.rst:1783 msgid "Blue" msgstr "藍" -#: ../../library/curses.rst:1767 +#: ../../library/curses.rst:1785 msgid "Cyan (light greenish blue)" msgstr "" -#: ../../library/curses.rst:1769 +#: ../../library/curses.rst:1787 msgid "Green" msgstr "綠" -#: ../../library/curses.rst:1771 +#: ../../library/curses.rst:1789 msgid "Magenta (purplish red)" msgstr "" -#: ../../library/curses.rst:1773 +#: ../../library/curses.rst:1791 msgid "Red" msgstr "紅" -#: ../../library/curses.rst:1775 +#: ../../library/curses.rst:1793 msgid "White" msgstr "白" -#: ../../library/curses.rst:1777 +#: ../../library/curses.rst:1795 msgid "Yellow" msgstr "" -#: ../../library/curses.rst:1782 +#: ../../library/curses.rst:1800 msgid ":mod:`curses.textpad` --- Text input widget for curses programs" msgstr "" -#: ../../library/curses.rst:1790 +#: ../../library/curses.rst:1808 msgid "" "The :mod:`curses.textpad` module provides a :class:`Textbox` class that " "handles elementary text editing in a curses window, supporting a set of " @@ -2341,11 +2359,11 @@ msgid "" "purposes." msgstr "" -#: ../../library/curses.rst:1796 +#: ../../library/curses.rst:1814 msgid "The module :mod:`curses.textpad` defines the following function:" msgstr "" -#: ../../library/curses.rst:1801 +#: ../../library/curses.rst:1819 msgid "" "Draw a rectangle. The first argument must be a window object; the remaining " "arguments are coordinates relative to that window. The second and third " @@ -2357,15 +2375,15 @@ msgid "" "will be drawn with ASCII dashes, vertical bars, and plus signs." msgstr "" -#: ../../library/curses.rst:1814 +#: ../../library/curses.rst:1832 msgid "Textbox objects" msgstr "" -#: ../../library/curses.rst:1816 +#: ../../library/curses.rst:1834 msgid "You can instantiate a :class:`Textbox` object as follows:" msgstr "" -#: ../../library/curses.rst:1821 +#: ../../library/curses.rst:1839 msgid "" "Return a textbox widget object. The *win* argument should be a curses :ref:" "`window ` object in which the textbox is to be " @@ -2374,11 +2392,11 @@ msgid "" "instance's :attr:`stripspaces` flag is initially on." msgstr "" -#: ../../library/curses.rst:1827 +#: ../../library/curses.rst:1845 msgid ":class:`Textbox` objects have the following methods:" msgstr "" -#: ../../library/curses.rst:1832 +#: ../../library/curses.rst:1850 msgid "" "This is the entry point you will normally use. It accepts editing " "keystrokes until one of the termination keystrokes is entered. If " @@ -2389,167 +2407,167 @@ msgid "" "`stripspaces` attribute." msgstr "" -#: ../../library/curses.rst:1843 +#: ../../library/curses.rst:1861 msgid "" "Process a single command keystroke. Here are the supported special " "keystrokes:" msgstr "" -#: ../../library/curses.rst:1847 ../../library/curses.rst:1885 +#: ../../library/curses.rst:1865 ../../library/curses.rst:1903 msgid "Keystroke" msgstr "" -#: ../../library/curses.rst:1847 +#: ../../library/curses.rst:1865 msgid "Action" msgstr "" -#: ../../library/curses.rst:1849 +#: ../../library/curses.rst:1867 msgid ":kbd:`Control-A`" msgstr ":kbd:`Control-A`" -#: ../../library/curses.rst:1849 +#: ../../library/curses.rst:1867 msgid "Go to left edge of window." msgstr "" -#: ../../library/curses.rst:1851 ../../library/curses.rst:1887 +#: ../../library/curses.rst:1869 ../../library/curses.rst:1905 msgid ":kbd:`Control-B`" msgstr ":kbd:`Control-B`" -#: ../../library/curses.rst:1851 +#: ../../library/curses.rst:1869 msgid "Cursor left, wrapping to previous line if appropriate." msgstr "" -#: ../../library/curses.rst:1854 +#: ../../library/curses.rst:1872 msgid ":kbd:`Control-D`" msgstr ":kbd:`Control-D`" -#: ../../library/curses.rst:1854 +#: ../../library/curses.rst:1872 msgid "Delete character under cursor." msgstr "" -#: ../../library/curses.rst:1856 +#: ../../library/curses.rst:1874 msgid ":kbd:`Control-E`" msgstr ":kbd:`Control-E`" -#: ../../library/curses.rst:1856 +#: ../../library/curses.rst:1874 msgid "Go to right edge (stripspaces off) or end of line (stripspaces on)." msgstr "" -#: ../../library/curses.rst:1859 ../../library/curses.rst:1889 +#: ../../library/curses.rst:1877 ../../library/curses.rst:1907 msgid ":kbd:`Control-F`" msgstr ":kbd:`Control-F`" -#: ../../library/curses.rst:1859 +#: ../../library/curses.rst:1877 msgid "Cursor right, wrapping to next line when appropriate." msgstr "" -#: ../../library/curses.rst:1862 +#: ../../library/curses.rst:1880 msgid ":kbd:`Control-G`" msgstr ":kbd:`Control-G`" -#: ../../library/curses.rst:1862 +#: ../../library/curses.rst:1880 msgid "Terminate, returning the window contents." msgstr "" -#: ../../library/curses.rst:1864 +#: ../../library/curses.rst:1882 msgid ":kbd:`Control-H`" msgstr ":kbd:`Control-H`" -#: ../../library/curses.rst:1864 +#: ../../library/curses.rst:1882 msgid "Delete character backward." msgstr "" -#: ../../library/curses.rst:1866 +#: ../../library/curses.rst:1884 msgid ":kbd:`Control-J`" msgstr ":kbd:`Control-J`" -#: ../../library/curses.rst:1866 +#: ../../library/curses.rst:1884 msgid "Terminate if the window is 1 line, otherwise insert newline." msgstr "" -#: ../../library/curses.rst:1869 +#: ../../library/curses.rst:1887 msgid ":kbd:`Control-K`" msgstr ":kbd:`Control-K`" -#: ../../library/curses.rst:1869 +#: ../../library/curses.rst:1887 msgid "If line is blank, delete it, otherwise clear to end of line." msgstr "" -#: ../../library/curses.rst:1872 +#: ../../library/curses.rst:1890 msgid ":kbd:`Control-L`" msgstr ":kbd:`Control-L`" -#: ../../library/curses.rst:1872 +#: ../../library/curses.rst:1890 msgid "Refresh screen." msgstr "" -#: ../../library/curses.rst:1874 ../../library/curses.rst:1893 +#: ../../library/curses.rst:1892 ../../library/curses.rst:1911 msgid ":kbd:`Control-N`" msgstr ":kbd:`Control-N`" -#: ../../library/curses.rst:1874 +#: ../../library/curses.rst:1892 msgid "Cursor down; move down one line." msgstr "" -#: ../../library/curses.rst:1876 +#: ../../library/curses.rst:1894 msgid ":kbd:`Control-O`" msgstr ":kbd:`Control-O`" -#: ../../library/curses.rst:1876 +#: ../../library/curses.rst:1894 msgid "Insert a blank line at cursor location." msgstr "" -#: ../../library/curses.rst:1878 ../../library/curses.rst:1891 +#: ../../library/curses.rst:1896 ../../library/curses.rst:1909 msgid ":kbd:`Control-P`" msgstr ":kbd:`Control-P`" -#: ../../library/curses.rst:1878 +#: ../../library/curses.rst:1896 msgid "Cursor up; move up one line." msgstr "" -#: ../../library/curses.rst:1881 +#: ../../library/curses.rst:1899 msgid "" "Move operations do nothing if the cursor is at an edge where the movement is " "not possible. The following synonyms are supported where possible:" msgstr "" -#: ../../library/curses.rst:1887 +#: ../../library/curses.rst:1905 msgid ":const:`~curses.KEY_LEFT`" msgstr ":const:`~curses.KEY_LEFT`" -#: ../../library/curses.rst:1889 +#: ../../library/curses.rst:1907 msgid ":const:`~curses.KEY_RIGHT`" msgstr ":const:`~curses.KEY_RIGHT`" -#: ../../library/curses.rst:1891 +#: ../../library/curses.rst:1909 msgid ":const:`~curses.KEY_UP`" msgstr ":const:`~curses.KEY_UP`" -#: ../../library/curses.rst:1893 +#: ../../library/curses.rst:1911 msgid ":const:`~curses.KEY_DOWN`" msgstr ":const:`~curses.KEY_DOWN`" -#: ../../library/curses.rst:1895 +#: ../../library/curses.rst:1913 msgid ":const:`~curses.KEY_BACKSPACE`" msgstr ":const:`~curses.KEY_BACKSPACE`" -#: ../../library/curses.rst:1895 +#: ../../library/curses.rst:1913 msgid ":kbd:`Control-h`" msgstr ":kbd:`Control-h`" -#: ../../library/curses.rst:1898 +#: ../../library/curses.rst:1916 msgid "" "All other keystrokes are treated as a command to insert the given character " "and move right (with line wrapping)." msgstr "" -#: ../../library/curses.rst:1904 +#: ../../library/curses.rst:1922 msgid "" "Return the window contents as a string; whether blanks in the window are " "included is affected by the :attr:`stripspaces` member." msgstr "" -#: ../../library/curses.rst:1910 +#: ../../library/curses.rst:1928 msgid "" "This attribute is a flag which controls the interpretation of blanks in the " "window. When it is on, trailing blanks on each line are ignored; any cursor " diff --git a/library/logging.handlers.po b/library/logging.handlers.po index 0af0fee3a5..4849fe343f 100644 --- a/library/logging.handlers.po +++ b/library/logging.handlers.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-22 00:04+0000\n" +"POT-Creation-Date: 2023-07-23 00:04+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-" @@ -1308,17 +1308,18 @@ msgstr "" #: ../../library/logging.handlers.rst:920 msgid "" -"You can override this to implement custom flushing behavior. This version " -"just zaps the buffer to empty." +"For a :class:`BufferingHandler` instance, flushing means that it sets the " +"buffer to an empty list. This method can be overwritten to implement more " +"useful flushing behavior." msgstr "" -#: ../../library/logging.handlers.rst:926 +#: ../../library/logging.handlers.rst:927 msgid "" "Return ``True`` if the buffer is up to capacity. This method can be " "overridden to implement custom flushing strategies." msgstr "" -#: ../../library/logging.handlers.rst:932 +#: ../../library/logging.handlers.rst:933 msgid "" "Returns a new instance of the :class:`MemoryHandler` class. The instance is " "initialized with a buffer size of *capacity* (number of records buffered). " @@ -1330,41 +1331,42 @@ msgid "" "the buffer will occur when the handler is closed." msgstr "" -#: ../../library/logging.handlers.rst:941 +#: ../../library/logging.handlers.rst:942 msgid "The *flushOnClose* parameter was added." msgstr "新增 *flushOnClose* 參數。" -#: ../../library/logging.handlers.rst:947 +#: ../../library/logging.handlers.rst:948 msgid "Calls :meth:`flush`, sets the target to ``None`` and clears the buffer." msgstr "" -#: ../../library/logging.handlers.rst:953 +#: ../../library/logging.handlers.rst:954 msgid "" -"For a :class:`MemoryHandler`, flushing means just sending the buffered " -"records to the target, if there is one. The buffer is also cleared when this " -"happens. Override if you want different behavior." +"For a :class:`MemoryHandler` instance, flushing means just sending the " +"buffered records to the target, if there is one. The buffer is also cleared " +"when buffered records are sent to the target. Override if you want different " +"behavior." msgstr "" -#: ../../library/logging.handlers.rst:960 +#: ../../library/logging.handlers.rst:961 msgid "Sets the target handler for this handler." msgstr "" -#: ../../library/logging.handlers.rst:965 +#: ../../library/logging.handlers.rst:966 msgid "Checks for buffer full or a record at the *flushLevel* or higher." msgstr "" -#: ../../library/logging.handlers.rst:971 +#: ../../library/logging.handlers.rst:972 msgid "HTTPHandler" msgstr "HTTPHandler" -#: ../../library/logging.handlers.rst:973 +#: ../../library/logging.handlers.rst:974 msgid "" "The :class:`HTTPHandler` class, located in the :mod:`logging.handlers` " "module, supports sending logging messages to a web server, using either " "``GET`` or ``POST`` semantics." msgstr "" -#: ../../library/logging.handlers.rst:980 +#: ../../library/logging.handlers.rst:981 msgid "" "Returns a new instance of the :class:`HTTPHandler` class. The *host* can be " "of the form ``host:port``, should you need to use a specific port number. " @@ -1378,11 +1380,11 @@ msgid "" "cleartext across the wire." msgstr "" -#: ../../library/logging.handlers.rst:991 +#: ../../library/logging.handlers.rst:992 msgid "The *context* parameter was added." msgstr "新增 *context* 參數。" -#: ../../library/logging.handlers.rst:996 +#: ../../library/logging.handlers.rst:997 msgid "" "Provides a dictionary, based on ``record``, which is to be URL-encoded and " "sent to the web server. The default implementation just returns ``record." @@ -1391,14 +1393,14 @@ msgid "" "customization of what's sent to the server is required." msgstr "" -#: ../../library/logging.handlers.rst:1004 +#: ../../library/logging.handlers.rst:1005 msgid "" "Sends the record to the web server as a URL-encoded dictionary. The :meth:" "`mapLogRecord` method is used to convert the record to the dictionary to be " "sent." msgstr "" -#: ../../library/logging.handlers.rst:1008 +#: ../../library/logging.handlers.rst:1009 msgid "" "Since preparing a record for sending it to a web server is not the same as a " "generic formatting operation, using :meth:`~logging.Handler.setFormatter` to " @@ -1408,18 +1410,18 @@ msgid "" "the dictionary in a form suitable for sending to a web server." msgstr "" -#: ../../library/logging.handlers.rst:1021 +#: ../../library/logging.handlers.rst:1022 msgid "QueueHandler" msgstr "QueueHandler" -#: ../../library/logging.handlers.rst:1025 +#: ../../library/logging.handlers.rst:1026 msgid "" "The :class:`QueueHandler` class, located in the :mod:`logging.handlers` " "module, supports sending logging messages to a queue, such as those " "implemented in the :mod:`queue` or :mod:`multiprocessing` modules." msgstr "" -#: ../../library/logging.handlers.rst:1029 +#: ../../library/logging.handlers.rst:1030 msgid "" "Along with the :class:`QueueListener` class, :class:`QueueHandler` can be " "used to let handlers do their work on a separate thread from the one which " @@ -1429,7 +1431,7 @@ msgid "" "an email via :class:`SMTPHandler`) are done on a separate thread." msgstr "" -#: ../../library/logging.handlers.rst:1038 +#: ../../library/logging.handlers.rst:1039 msgid "" "Returns a new instance of the :class:`QueueHandler` class. The instance is " "initialized with the queue to send messages to. The *queue* can be any queue-" @@ -1439,14 +1441,14 @@ msgid "" "instances for *queue*." msgstr "" -#: ../../library/logging.handlers.rst:1045 -#: ../../library/logging.handlers.rst:1134 +#: ../../library/logging.handlers.rst:1046 +#: ../../library/logging.handlers.rst:1135 msgid "" "If you are using :mod:`multiprocessing`, you should avoid using :class:" "`~queue.SimpleQueue` and instead use :class:`multiprocessing.Queue`." msgstr "" -#: ../../library/logging.handlers.rst:1050 +#: ../../library/logging.handlers.rst:1051 msgid "" "Enqueues the result of preparing the LogRecord. Should an exception occur (e." "g. because a bounded queue has filled up), the :meth:`~logging.Handler." @@ -1456,13 +1458,13 @@ msgid "" "raiseExceptions` is ``True``)." msgstr "" -#: ../../library/logging.handlers.rst:1059 +#: ../../library/logging.handlers.rst:1060 msgid "" "Prepares a record for queuing. The object returned by this method is " "enqueued." msgstr "" -#: ../../library/logging.handlers.rst:1062 +#: ../../library/logging.handlers.rst:1063 msgid "" "The base implementation formats the record to merge the message, arguments, " "exception and stack information, if present. It also removes unpickleable " @@ -1472,14 +1474,14 @@ msgid "" "attr:`exc_info` and :attr:`exc_text` attributes to ``None``." msgstr "" -#: ../../library/logging.handlers.rst:1070 +#: ../../library/logging.handlers.rst:1071 msgid "" "You might want to override this method if you want to convert the record to " "a dict or JSON string, or send a modified copy of the record while leaving " "the original intact." msgstr "" -#: ../../library/logging.handlers.rst:1074 +#: ../../library/logging.handlers.rst:1075 msgid "" "The base implementation formats the message with arguments, sets the " "``message`` and ``msg`` attributes to the formatted message and sets the " @@ -1495,25 +1497,25 @@ msgid "" "libraries that you use.)" msgstr "" -#: ../../library/logging.handlers.rst:1090 +#: ../../library/logging.handlers.rst:1091 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:1096 +#: ../../library/logging.handlers.rst:1097 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:1105 +#: ../../library/logging.handlers.rst:1106 msgid "QueueListener" msgstr "QueueListener" -#: ../../library/logging.handlers.rst:1109 +#: ../../library/logging.handlers.rst:1110 msgid "" "The :class:`QueueListener` class, located in the :mod:`logging.handlers` " "module, supports receiving logging messages from a queue, such as those " @@ -1524,7 +1526,7 @@ msgid "" "works hand-in-hand with :class:`QueueHandler`." msgstr "" -#: ../../library/logging.handlers.rst:1117 +#: ../../library/logging.handlers.rst:1118 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 " @@ -1534,7 +1536,7 @@ msgid "" "an email via :class:`SMTPHandler`) are done on a separate thread." msgstr "" -#: ../../library/logging.handlers.rst:1126 +#: ../../library/logging.handlers.rst:1127 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 " @@ -1545,7 +1547,7 @@ msgid "" "class:`~queue.SimpleQueue` instances for *queue*." msgstr "" -#: ../../library/logging.handlers.rst:1137 +#: ../../library/logging.handlers.rst:1138 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 " @@ -1553,82 +1555,82 @@ msgid "" "versions - to always pass each message to each handler." msgstr "" -#: ../../library/logging.handlers.rst:1142 +#: ../../library/logging.handlers.rst:1143 msgid "The ``respect_handler_level`` argument was added." msgstr "新增 ``respect_handler_level`` 引數。" -#: ../../library/logging.handlers.rst:1147 +#: ../../library/logging.handlers.rst:1148 msgid "Dequeues a record and return it, optionally blocking." msgstr "" -#: ../../library/logging.handlers.rst:1149 +#: ../../library/logging.handlers.rst:1150 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:1155 +#: ../../library/logging.handlers.rst:1156 msgid "Prepare a record for handling." msgstr "" -#: ../../library/logging.handlers.rst:1157 +#: ../../library/logging.handlers.rst:1158 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:1163 +#: ../../library/logging.handlers.rst:1164 msgid "Handle a record." msgstr "" -#: ../../library/logging.handlers.rst:1165 +#: ../../library/logging.handlers.rst:1166 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:1171 +#: ../../library/logging.handlers.rst:1172 msgid "Starts the listener." msgstr "" -#: ../../library/logging.handlers.rst:1173 +#: ../../library/logging.handlers.rst:1174 msgid "" "This starts up a background thread to monitor the queue for LogRecords to " "process." msgstr "" -#: ../../library/logging.handlers.rst:1178 +#: ../../library/logging.handlers.rst:1179 msgid "Stops the listener." msgstr "" -#: ../../library/logging.handlers.rst:1180 +#: ../../library/logging.handlers.rst:1181 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:1186 +#: ../../library/logging.handlers.rst:1187 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:1197 +#: ../../library/logging.handlers.rst:1198 msgid "Module :mod:`logging`" msgstr ":mod:`logging` 模組" -#: ../../library/logging.handlers.rst:1197 +#: ../../library/logging.handlers.rst:1198 msgid "API reference for the logging module." msgstr "" -#: ../../library/logging.handlers.rst:1199 +#: ../../library/logging.handlers.rst:1200 msgid "Module :mod:`logging.config`" msgstr ":mod:`logging.config` 模組" -#: ../../library/logging.handlers.rst:1200 +#: ../../library/logging.handlers.rst:1201 msgid "Configuration API for the logging module." msgstr "" diff --git a/library/re.po b/library/re.po index e577102032..becbf3c2a8 100644 --- a/library/re.po +++ b/library/re.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-17 17:39+0800\n" +"POT-Creation-Date: 2023-07-23 00:04+0000\n" "PO-Revision-Date: 2023-05-20 13:44+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -147,7 +147,7 @@ msgstr "" msgid "The special characters are:" msgstr "" -#: ../../library/re.rst:104 ../../library/re.rst:1532 +#: ../../library/re.rst:104 ../../library/re.rst:1545 msgid "``.``" msgstr "``.``" @@ -702,7 +702,7 @@ msgid "" "*name* can only contain bytes in the ASCII range (``b'\\x00'``-``b'\\x7f'``)." msgstr "" -#: ../../library/re.rst:504 +#: ../../library/re.rst:506 msgid "" "The special sequences consist of ``'\\'`` and a character from the list " "below. If the ordinary character is not an ASCII digit or an ASCII letter, " @@ -710,11 +710,11 @@ msgid "" "matches the character ``'$'``." msgstr "" -#: ../../library/re.rst:519 +#: ../../library/re.rst:521 msgid "``\\number``" msgstr "``\\number``" -#: ../../library/re.rst:512 +#: ../../library/re.rst:514 msgid "" "Matches the contents of the group of the same number. Groups are numbered " "starting from 1. For example, ``(.+) \\1`` matches ``'the the'`` or ``'55 " @@ -726,19 +726,19 @@ msgid "" "escapes are treated as characters." msgstr "" -#: ../../library/re.rst:524 +#: ../../library/re.rst:526 msgid "``\\A``" msgstr "``\\A``" -#: ../../library/re.rst:524 +#: ../../library/re.rst:526 msgid "Matches only at the start of the string." msgstr "" -#: ../../library/re.rst:540 +#: ../../library/re.rst:542 msgid "``\\b``" msgstr "``\\b``" -#: ../../library/re.rst:529 +#: ../../library/re.rst:531 msgid "" "Matches the empty string, but only at the beginning or end of a word. A word " "is defined as a sequence of word characters. Note that formally, ``\\b`` is " @@ -748,7 +748,7 @@ msgid "" "baz'`` but not ``'foobar'`` or ``'foo3'``." msgstr "" -#: ../../library/re.rst:536 +#: ../../library/re.rst:538 msgid "" "By default Unicode alphanumerics are the ones used in Unicode patterns, but " "this can be changed by using the :const:`ASCII` flag. Word boundaries are " @@ -757,11 +757,11 @@ msgid "" "compatibility with Python's string literals." msgstr "" -#: ../../library/re.rst:551 +#: ../../library/re.rst:553 msgid "``\\B``" msgstr "``\\B``" -#: ../../library/re.rst:545 +#: ../../library/re.rst:547 msgid "" "Matches the empty string, but only when it is *not* at the beginning or end " "of a word. This means that ``r'py\\B'`` matches ``'python'``, ``'py3'``, " @@ -772,15 +772,15 @@ msgid "" "the :const:`LOCALE` flag is used." msgstr "" -#: ../../library/re.rst:563 +#: ../../library/re.rst:565 msgid "``\\d``" msgstr "``\\d``" -#: ../../library/re.rst:560 ../../library/re.rst:580 ../../library/re.rst:599 +#: ../../library/re.rst:562 ../../library/re.rst:582 ../../library/re.rst:601 msgid "For Unicode (str) patterns:" msgstr "" -#: ../../library/re.rst:557 +#: ../../library/re.rst:559 msgid "" "Matches any Unicode decimal digit (that is, any character in Unicode " "character category [Nd]). This includes ``[0-9]``, and also many other " @@ -788,30 +788,30 @@ msgid "" "matched." msgstr "" -#: ../../library/re.rst:563 ../../library/re.rst:584 ../../library/re.rst:605 +#: ../../library/re.rst:565 ../../library/re.rst:586 ../../library/re.rst:607 msgid "For 8-bit (bytes) patterns:" msgstr "" -#: ../../library/re.rst:563 +#: ../../library/re.rst:565 msgid "Matches any decimal digit; this is equivalent to ``[0-9]``." msgstr "" -#: ../../library/re.rst:570 +#: ../../library/re.rst:572 msgid "``\\D``" msgstr "``\\D``" -#: ../../library/re.rst:568 +#: ../../library/re.rst:570 msgid "" "Matches any character which is not a decimal digit. This is the opposite of " "``\\d``. If the :const:`ASCII` flag is used this becomes the equivalent of " "``[^0-9]``." msgstr "" -#: ../../library/re.rst:584 +#: ../../library/re.rst:586 msgid "``\\s``" msgstr "``\\s``" -#: ../../library/re.rst:576 +#: ../../library/re.rst:578 msgid "" "Matches Unicode whitespace characters (which includes " "``[ \\t\\n\\r\\f\\v]``, and also many other characters, for example the non-" @@ -819,35 +819,35 @@ msgid "" "const:`ASCII` flag is used, only ``[ \\t\\n\\r\\f\\v]`` is matched." msgstr "" -#: ../../library/re.rst:583 +#: ../../library/re.rst:585 msgid "" "Matches characters considered whitespace in the ASCII character set; this is " "equivalent to ``[ \\t\\n\\r\\f\\v]``." msgstr "" -#: ../../library/re.rst:591 +#: ../../library/re.rst:593 msgid "``\\S``" msgstr "``\\S``" -#: ../../library/re.rst:589 +#: ../../library/re.rst:591 msgid "" "Matches any character which is not a whitespace character. This is the " "opposite of ``\\s``. If the :const:`ASCII` flag is used this becomes the " "equivalent of ``[^ \\t\\n\\r\\f\\v]``." msgstr "" -#: ../../library/re.rst:605 +#: ../../library/re.rst:607 msgid "``\\w``" msgstr "``\\w``" -#: ../../library/re.rst:597 +#: ../../library/re.rst:599 msgid "" "Matches Unicode word characters; this includes alphanumeric characters (as " "defined by :meth:`str.isalnum`) as well as the underscore (``_``). If the :" "const:`ASCII` flag is used, only ``[a-zA-Z0-9_]`` is matched." msgstr "" -#: ../../library/re.rst:602 +#: ../../library/re.rst:604 msgid "" "Matches characters considered alphanumeric in the ASCII character set; this " "is equivalent to ``[a-zA-Z0-9_]``. If the :const:`LOCALE` flag is used, " @@ -855,11 +855,11 @@ msgid "" "underscore." msgstr "" -#: ../../library/re.rst:614 +#: ../../library/re.rst:616 msgid "``\\W``" msgstr "``\\W``" -#: ../../library/re.rst:610 +#: ../../library/re.rst:612 msgid "" "Matches any character which is not a word character. This is the opposite of " "``\\w``. If the :const:`ASCII` flag is used this becomes the equivalent of " @@ -867,34 +867,34 @@ msgid "" "which are neither alphanumeric in the current locale nor the underscore." msgstr "" -#: ../../library/re.rst:619 +#: ../../library/re.rst:621 msgid "``\\Z``" msgstr "``\\Z``" -#: ../../library/re.rst:619 +#: ../../library/re.rst:621 msgid "Matches only at the end of the string." msgstr "" -#: ../../library/re.rst:635 +#: ../../library/re.rst:637 msgid "" "Most of the standard escapes supported by Python string literals are also " "accepted by the regular expression parser::" msgstr "" -#: ../../library/re.rst:642 +#: ../../library/re.rst:644 msgid "" "(Note that ``\\b`` is used to represent word boundaries, and means " "\"backspace\" only inside character classes.)" msgstr "" -#: ../../library/re.rst:645 +#: ../../library/re.rst:647 msgid "" "``'\\u'``, ``'\\U'``, and ``'\\N'`` escape sequences are only recognized in " "Unicode patterns. In bytes patterns they are errors. Unknown escapes of " "ASCII letters are reserved for future use and treated as errors." msgstr "" -#: ../../library/re.rst:649 +#: ../../library/re.rst:651 msgid "" "Octal escapes are included in a limited form. If the first digit is a 0, or " "if there are three octal digits, it is considered an octal escape. " @@ -902,26 +902,26 @@ msgid "" "are always at most three digits in length." msgstr "" -#: ../../library/re.rst:654 +#: ../../library/re.rst:656 msgid "The ``'\\u'`` and ``'\\U'`` escape sequences have been added." msgstr "" -#: ../../library/re.rst:657 +#: ../../library/re.rst:659 msgid "" "Unknown escapes consisting of ``'\\'`` and an ASCII letter now are errors." msgstr "" -#: ../../library/re.rst:660 +#: ../../library/re.rst:662 msgid "" "The ``'\\N{name}'`` escape sequence has been added. As in string literals, " "it expands to the named Unicode character (e.g. ``'\\N{EM DASH}'``)." msgstr "" -#: ../../library/re.rst:668 +#: ../../library/re.rst:670 msgid "Module Contents" msgstr "模組內容" -#: ../../library/re.rst:670 +#: ../../library/re.rst:672 msgid "" "The module defines several functions, constants, and an exception. Some of " "the functions are simplified versions of the full featured methods for " @@ -929,26 +929,26 @@ msgid "" "compiled form." msgstr "" -#: ../../library/re.rst:677 +#: ../../library/re.rst:679 msgid "Flags" msgstr "" -#: ../../library/re.rst:679 +#: ../../library/re.rst:681 msgid "" "Flag constants are now instances of :class:`RegexFlag`, which is a subclass " "of :class:`enum.IntFlag`." msgstr "" -#: ../../library/re.rst:686 +#: ../../library/re.rst:688 msgid "" "An :class:`enum.IntFlag` class containing the regex options listed below." msgstr "" -#: ../../library/re.rst:688 +#: ../../library/re.rst:690 msgid "- added to ``__all__``" msgstr "" -#: ../../library/re.rst:693 +#: ../../library/re.rst:695 msgid "" "Make ``\\w``, ``\\W``, ``\\b``, ``\\B``, ``\\d``, ``\\D``, ``\\s`` and " "``\\S`` perform ASCII-only matching instead of full Unicode matching. This " @@ -956,7 +956,7 @@ msgid "" "Corresponds to the inline flag ``(?a)``." msgstr "" -#: ../../library/re.rst:698 +#: ../../library/re.rst:700 msgid "" "Note that for backward compatibility, the :const:`re.U` flag still exists " "(as well as its synonym :const:`re.UNICODE` and its embedded counterpart ``(?" @@ -964,13 +964,13 @@ msgid "" "default for strings (and Unicode matching isn't allowed for bytes)." msgstr "" -#: ../../library/re.rst:707 +#: ../../library/re.rst:709 msgid "" "Display debug information about compiled expression. No corresponding inline " "flag." msgstr "" -#: ../../library/re.rst:714 +#: ../../library/re.rst:716 msgid "" "Perform case-insensitive matching; expressions like ``[A-Z]`` will also " "match lowercase letters. Full Unicode matching (such as ``Ü`` matching " @@ -980,7 +980,7 @@ msgid "" "flag ``(?i)``." msgstr "" -#: ../../library/re.rst:721 +#: ../../library/re.rst:723 msgid "" "Note that when the Unicode patterns ``[a-z]`` or ``[A-Z]`` are used in " "combination with the :const:`IGNORECASE` flag, they will match the 52 ASCII " @@ -991,7 +991,7 @@ msgid "" "matched." msgstr "" -#: ../../library/re.rst:732 +#: ../../library/re.rst:734 msgid "" "Make ``\\w``, ``\\W``, ``\\b``, ``\\B`` and case-insensitive matching " "dependent on the current locale. This flag can be used only with bytes " @@ -1002,20 +1002,20 @@ msgid "" "locales/languages. Corresponds to the inline flag ``(?L)``." msgstr "" -#: ../../library/re.rst:741 +#: ../../library/re.rst:743 msgid "" ":const:`re.LOCALE` can be used only with bytes patterns and is not " "compatible with :const:`re.ASCII`." msgstr "" -#: ../../library/re.rst:745 +#: ../../library/re.rst:747 msgid "" "Compiled regular expression objects with the :const:`re.LOCALE` flag no " "longer depend on the locale at compile time. Only the locale at matching " "time affects the result of matching." msgstr "" -#: ../../library/re.rst:754 +#: ../../library/re.rst:756 msgid "" "When specified, the pattern character ``'^'`` matches at the beginning of " "the string and at the beginning of each line (immediately following each " @@ -1026,7 +1026,7 @@ msgid "" "the end of the string. Corresponds to the inline flag ``(?m)``." msgstr "" -#: ../../library/re.rst:764 +#: ../../library/re.rst:766 msgid "" "Indicates no flag being applied, the value is ``0``. This flag may be used " "as a default value for a function keyword argument or as a base value that " @@ -1034,7 +1034,7 @@ msgid "" "value::" msgstr "" -#: ../../library/re.rst:777 +#: ../../library/re.rst:779 msgid "" "Make the ``'.'`` special character match any character at all, including a " "newline; without this flag, ``'.'`` will match anything *except* a newline. " @@ -1043,6 +1043,21 @@ msgstr "" #: ../../library/re.rst:787 msgid "" +"In Python 2, this flag made :ref:`special sequences ` " +"include Unicode characters in matches. Since Python 3, Unicode characters " +"are matched by default." +msgstr "" + +#: ../../library/re.rst:791 +msgid "See :const:`A` for restricting matching on ASCII characters instead." +msgstr "" + +#: ../../library/re.rst:793 +msgid "This flag is only kept for backward compatibility." +msgstr "" + +#: ../../library/re.rst:800 +msgid "" "This flag allows you to write regular expressions that look nicer and are " "more readable by allowing you to visually separate logical sections of the " "pattern and add comments. Whitespace within the pattern is ignored, except " @@ -1054,53 +1069,53 @@ msgid "" "ignored." msgstr "" -#: ../../library/re.rst:797 +#: ../../library/re.rst:810 msgid "" "This means that the two following regular expression objects that match a " "decimal number are functionally equal::" msgstr "" -#: ../../library/re.rst:805 +#: ../../library/re.rst:818 msgid "Corresponds to the inline flag ``(?x)``." msgstr "" -#: ../../library/re.rst:809 +#: ../../library/re.rst:822 msgid "Functions" msgstr "" -#: ../../library/re.rst:813 +#: ../../library/re.rst:826 msgid "" "Compile a regular expression pattern into a :ref:`regular expression object " "`, which can be used for matching using its :func:`~Pattern." "match`, :func:`~Pattern.search` and other methods, described below." msgstr "" -#: ../../library/re.rst:818 +#: ../../library/re.rst:831 msgid "" "The expression's behaviour can be modified by specifying a *flags* value. " "Values can be any of the following variables, combined using bitwise OR (the " "``|`` operator)." msgstr "" -#: ../../library/re.rst:822 +#: ../../library/re.rst:835 msgid "The sequence ::" msgstr "" -#: ../../library/re.rst:827 +#: ../../library/re.rst:840 msgid "is equivalent to ::" msgstr "" "等價於:\n" "\n" "::" -#: ../../library/re.rst:831 +#: ../../library/re.rst:844 msgid "" "but using :func:`re.compile` and saving the resulting regular expression " "object for reuse is more efficient when the expression will be used several " "times in a single program." msgstr "" -#: ../../library/re.rst:837 +#: ../../library/re.rst:850 msgid "" "The compiled versions of the most recent patterns passed to :func:`re." "compile` and the module-level matching functions are cached, so programs " @@ -1108,7 +1123,7 @@ msgid "" "compiling regular expressions." msgstr "" -#: ../../library/re.rst:845 +#: ../../library/re.rst:858 msgid "" "Scan through *string* looking for the first location where the regular " "expression *pattern* produces a match, and return a corresponding :ref:" @@ -1117,7 +1132,7 @@ msgid "" "length match at some point in the string." msgstr "" -#: ../../library/re.rst:854 +#: ../../library/re.rst:867 msgid "" "If zero or more characters at the beginning of *string* match the regular " "expression *pattern*, return a corresponding :ref:`match object `. Return ``None`` if the " @@ -1145,7 +1160,7 @@ msgid "" "length match." msgstr "" -#: ../../library/re.rst:878 +#: ../../library/re.rst:891 msgid "" "Split *string* by the occurrences of *pattern*. If capturing parentheses " "are used in *pattern*, then the text of all groups in the pattern are also " @@ -1154,42 +1169,42 @@ msgid "" "final element of the list. ::" msgstr "" -#: ../../library/re.rst:893 +#: ../../library/re.rst:906 msgid "" "If there are capturing groups in the separator and it matches at the start " "of the string, the result will start with an empty string. The same holds " "for the end of the string::" msgstr "" -#: ../../library/re.rst:900 +#: ../../library/re.rst:913 msgid "" "That way, separator components are always found at the same relative indices " "within the result list." msgstr "" -#: ../../library/re.rst:903 +#: ../../library/re.rst:916 msgid "" "Empty matches for the pattern split the string only when not adjacent to a " "previous empty match." msgstr "" -#: ../../library/re.rst:913 ../../library/re.rst:1004 ../../library/re.rst:1033 +#: ../../library/re.rst:926 ../../library/re.rst:1017 ../../library/re.rst:1046 msgid "Added the optional flags argument." msgstr "" -#: ../../library/re.rst:916 +#: ../../library/re.rst:929 msgid "" "Added support of splitting on a pattern that could match an empty string." msgstr "" -#: ../../library/re.rst:922 +#: ../../library/re.rst:935 msgid "" "Return all non-overlapping matches of *pattern* in *string*, as a list of " "strings or tuples. The *string* is scanned left-to-right, and matches are " "returned in the order found. Empty matches are included in the result." msgstr "" -#: ../../library/re.rst:926 +#: ../../library/re.rst:939 msgid "" "The result depends on the number of capturing groups in the pattern. If " "there are no groups, return a list of strings matching the whole pattern. " @@ -1199,11 +1214,11 @@ msgid "" "result." msgstr "" -#: ../../library/re.rst:938 ../../library/re.rst:949 +#: ../../library/re.rst:951 ../../library/re.rst:962 msgid "Non-empty matches can now start just after a previous empty match." msgstr "" -#: ../../library/re.rst:944 +#: ../../library/re.rst:957 msgid "" "Return an :term:`iterator` yielding :ref:`match objects ` " "over all non-overlapping matches for the RE *pattern* in *string*. The " @@ -1211,7 +1226,7 @@ msgid "" "found. Empty matches are included in the result." msgstr "" -#: ../../library/re.rst:955 +#: ../../library/re.rst:968 msgid "" "Return the string obtained by replacing the leftmost non-overlapping " "occurrences of *pattern* in *string* by the replacement *repl*. If the " @@ -1225,18 +1240,18 @@ msgid "" "For example::" msgstr "" -#: ../../library/re.rst:971 +#: ../../library/re.rst:984 msgid "" "If *repl* is a function, it is called for every non-overlapping occurrence " "of *pattern*. The function takes a single :ref:`match object ` argument, and returns the replacement string. For example::" msgstr "" -#: ../../library/re.rst:984 +#: ../../library/re.rst:997 msgid "The pattern may be a string or a :ref:`pattern object `." msgstr "" -#: ../../library/re.rst:986 +#: ../../library/re.rst:999 msgid "" "The optional argument *count* is the maximum number of pattern occurrences " "to be replaced; *count* must be a non-negative integer. If omitted or zero, " @@ -1245,7 +1260,7 @@ msgid "" "'abxd')`` returns ``'-a-b--d-'``." msgstr "" -#: ../../library/re.rst:994 +#: ../../library/re.rst:1007 msgid "" "In string-type *repl* arguments, in addition to the character escapes and " "backreferences described above, ``\\g`` will use the substring matched " @@ -1258,60 +1273,60 @@ msgid "" "RE." msgstr "" -#: ../../library/re.rst:1007 ../../library/re.rst:1036 -#: ../../library/re.rst:1270 +#: ../../library/re.rst:1020 ../../library/re.rst:1049 +#: ../../library/re.rst:1283 msgid "Unmatched groups are replaced with an empty string." msgstr "" -#: ../../library/re.rst:1010 +#: ../../library/re.rst:1023 msgid "" "Unknown escapes in *pattern* consisting of ``'\\'`` and an ASCII letter now " "are errors." msgstr "" -#: ../../library/re.rst:1014 +#: ../../library/re.rst:1027 msgid "" "Unknown escapes in *repl* consisting of ``'\\'`` and an ASCII letter now are " "errors." msgstr "" -#: ../../library/re.rst:1018 +#: ../../library/re.rst:1031 msgid "" "Empty matches for the pattern are replaced when adjacent to a previous non-" "empty match." msgstr "" -#: ../../library/re.rst:1022 +#: ../../library/re.rst:1035 msgid "" "Group *id* can only contain ASCII digits. In :class:`bytes` replacement " "strings, group *name* can only contain bytes in the ASCII range " "(``b'\\x00'``-``b'\\x7f'``)." msgstr "" -#: ../../library/re.rst:1030 +#: ../../library/re.rst:1043 msgid "" "Perform the same operation as :func:`sub`, but return a tuple ``(new_string, " "number_of_subs_made)``." msgstr "" -#: ../../library/re.rst:1042 +#: ../../library/re.rst:1055 msgid "" "Escape special characters in *pattern*. This is useful if you want to match " "an arbitrary literal string that may have regular expression metacharacters " "in it. For example::" msgstr "" -#: ../../library/re.rst:1057 +#: ../../library/re.rst:1070 msgid "" "This function must not be used for the replacement string in :func:`sub` " "and :func:`subn`, only backslashes should be escaped. For example::" msgstr "" -#: ../../library/re.rst:1065 +#: ../../library/re.rst:1078 msgid "The ``'_'`` character is no longer escaped." msgstr "" -#: ../../library/re.rst:1068 +#: ../../library/re.rst:1081 msgid "" "Only characters that can have special meaning in a regular expression are " "escaped. As a result, ``'!'``, ``'\"'``, ``'%'``, ``\"'\"``, ``','``, " @@ -1319,15 +1334,15 @@ msgid "" "are no longer escaped." msgstr "" -#: ../../library/re.rst:1077 +#: ../../library/re.rst:1090 msgid "Clear the regular expression cache." msgstr "" -#: ../../library/re.rst:1081 +#: ../../library/re.rst:1094 msgid "Exceptions" msgstr "" -#: ../../library/re.rst:1085 +#: ../../library/re.rst:1098 msgid "" "Exception raised when a string passed to one of the functions here is not a " "valid regular expression (for example, it might contain unmatched " @@ -1336,41 +1351,41 @@ msgid "" "pattern. The error instance has the following additional attributes:" msgstr "" -#: ../../library/re.rst:1093 +#: ../../library/re.rst:1106 msgid "The unformatted error message." msgstr "" -#: ../../library/re.rst:1097 +#: ../../library/re.rst:1110 msgid "The regular expression pattern." msgstr "" -#: ../../library/re.rst:1101 +#: ../../library/re.rst:1114 msgid "The index in *pattern* where compilation failed (may be ``None``)." msgstr "" -#: ../../library/re.rst:1105 +#: ../../library/re.rst:1118 msgid "The line corresponding to *pos* (may be ``None``)." msgstr "" -#: ../../library/re.rst:1109 +#: ../../library/re.rst:1122 msgid "The column corresponding to *pos* (may be ``None``)." msgstr "" -#: ../../library/re.rst:1111 +#: ../../library/re.rst:1124 msgid "Added additional attributes." msgstr "新增額外屬性。" -#: ../../library/re.rst:1117 +#: ../../library/re.rst:1130 msgid "Regular Expression Objects" msgstr "" -#: ../../library/re.rst:1119 +#: ../../library/re.rst:1132 msgid "" "Compiled regular expression objects support the following methods and " "attributes:" msgstr "" -#: ../../library/re.rst:1124 +#: ../../library/re.rst:1137 msgid "" "Scan through *string* looking for the first location where this regular " "expression produces a match, and return a corresponding :ref:`match object " @@ -1379,7 +1394,7 @@ msgid "" "some point in the string." msgstr "" -#: ../../library/re.rst:1130 +#: ../../library/re.rst:1143 msgid "" "The optional second parameter *pos* gives an index in the string where the " "search is to start; it defaults to ``0``. This is not completely equivalent " @@ -1388,7 +1403,7 @@ msgid "" "necessarily at the index where the search is to start." msgstr "" -#: ../../library/re.rst:1136 +#: ../../library/re.rst:1149 msgid "" "The optional parameter *endpos* limits how far the string will be searched; " "it will be as if the string is *endpos* characters long, so only the " @@ -1398,7 +1413,7 @@ msgid "" "equivalent to ``rx.search(string[:50], 0)``. ::" msgstr "" -#: ../../library/re.rst:1151 +#: ../../library/re.rst:1164 msgid "" "If zero or more characters at the *beginning* of *string* match this regular " "expression, return a corresponding :ref:`match object `. " @@ -1406,19 +1421,19 @@ msgid "" "different from a zero-length match." msgstr "" -#: ../../library/re.rst:1156 ../../library/re.rst:1174 +#: ../../library/re.rst:1169 ../../library/re.rst:1187 msgid "" "The optional *pos* and *endpos* parameters have the same meaning as for the :" "meth:`~Pattern.search` method. ::" msgstr "" -#: ../../library/re.rst:1164 +#: ../../library/re.rst:1177 msgid "" "If you want to locate a match anywhere in *string*, use :meth:`~Pattern." "search` instead (see also :ref:`search-vs-match`)." msgstr "" -#: ../../library/re.rst:1170 +#: ../../library/re.rst:1183 msgid "" "If the whole *string* matches this regular expression, return a " "corresponding :ref:`match object `. Return ``None`` if the " @@ -1426,76 +1441,76 @@ msgid "" "length match." msgstr "" -#: ../../library/re.rst:1188 +#: ../../library/re.rst:1201 msgid "Identical to the :func:`split` function, using the compiled pattern." msgstr "" -#: ../../library/re.rst:1193 +#: ../../library/re.rst:1206 msgid "" "Similar to the :func:`findall` function, using the compiled pattern, but " "also accepts optional *pos* and *endpos* parameters that limit the search " "region like for :meth:`search`." msgstr "" -#: ../../library/re.rst:1200 +#: ../../library/re.rst:1213 msgid "" "Similar to the :func:`finditer` function, using the compiled pattern, but " "also accepts optional *pos* and *endpos* parameters that limit the search " "region like for :meth:`search`." msgstr "" -#: ../../library/re.rst:1207 +#: ../../library/re.rst:1220 msgid "Identical to the :func:`sub` function, using the compiled pattern." msgstr "" -#: ../../library/re.rst:1212 +#: ../../library/re.rst:1225 msgid "Identical to the :func:`subn` function, using the compiled pattern." msgstr "" -#: ../../library/re.rst:1217 +#: ../../library/re.rst:1230 msgid "" "The regex matching flags. This is a combination of the flags given to :func:" "`.compile`, any ``(?...)`` inline flags in the pattern, and implicit flags " "such as :data:`UNICODE` if the pattern is a Unicode string." msgstr "" -#: ../../library/re.rst:1224 +#: ../../library/re.rst:1237 msgid "The number of capturing groups in the pattern." msgstr "" -#: ../../library/re.rst:1229 +#: ../../library/re.rst:1242 msgid "" "A dictionary mapping any symbolic group names defined by ``(?P)`` to " "group numbers. The dictionary is empty if no symbolic groups were used in " "the pattern." msgstr "" -#: ../../library/re.rst:1236 +#: ../../library/re.rst:1249 msgid "The pattern string from which the pattern object was compiled." msgstr "" -#: ../../library/re.rst:1239 +#: ../../library/re.rst:1252 msgid "" "Added support of :func:`copy.copy` and :func:`copy.deepcopy`. Compiled " "regular expression objects are considered atomic." msgstr "" -#: ../../library/re.rst:1247 +#: ../../library/re.rst:1260 msgid "Match Objects" msgstr "" -#: ../../library/re.rst:1249 +#: ../../library/re.rst:1262 msgid "" "Match objects always have a boolean value of ``True``. Since :meth:`~Pattern." "match` and :meth:`~Pattern.search` return ``None`` when there is no match, " "you can test whether there was a match with a simple ``if`` statement::" msgstr "" -#: ../../library/re.rst:1258 +#: ../../library/re.rst:1271 msgid "Match objects support the following methods and attributes:" msgstr "" -#: ../../library/re.rst:1263 +#: ../../library/re.rst:1276 msgid "" "Return the string obtained by doing backslash substitution on the template " "string *template*, as done by the :meth:`~Pattern.sub` method. Escapes such " @@ -1504,7 +1519,7 @@ msgid "" "``\\g``) are replaced by the contents of the corresponding group." msgstr "" -#: ../../library/re.rst:1275 +#: ../../library/re.rst:1288 msgid "" "Returns one or more subgroups of the match. If there is a single argument, " "the result is a single string; if there are multiple arguments, the result " @@ -1519,7 +1534,7 @@ msgid "" "the pattern that matched multiple times, the last match is returned. ::" msgstr "" -#: ../../library/re.rst:1297 +#: ../../library/re.rst:1310 msgid "" "If the regular expression uses the ``(?P...)`` syntax, the *groupN* " "arguments may also be strings identifying groups by their group name. If a " @@ -1527,57 +1542,57 @@ msgid "" "`IndexError` exception is raised." msgstr "" -#: ../../library/re.rst:1302 +#: ../../library/re.rst:1315 msgid "A moderately complicated example::" msgstr "" -#: ../../library/re.rst:1310 +#: ../../library/re.rst:1323 msgid "Named groups can also be referred to by their index::" msgstr "" -#: ../../library/re.rst:1317 +#: ../../library/re.rst:1330 msgid "If a group matches multiple times, only the last match is accessible::" msgstr "" -#: ../../library/re.rst:1326 +#: ../../library/re.rst:1339 msgid "" "This is identical to ``m.group(g)``. This allows easier access to an " "individual group from a match::" msgstr "" -#: ../../library/re.rst:1337 +#: ../../library/re.rst:1350 msgid "Named groups are supported as well::" msgstr "" -#: ../../library/re.rst:1350 +#: ../../library/re.rst:1363 msgid "" "Return a tuple containing all the subgroups of the match, from 1 up to " "however many groups are in the pattern. The *default* argument is used for " "groups that did not participate in the match; it defaults to ``None``." msgstr "" -#: ../../library/re.rst:1354 ../../library/re.rst:1579 +#: ../../library/re.rst:1367 ../../library/re.rst:1592 msgid "For example::" msgstr "" "舉例來說:\n" "\n" "::" -#: ../../library/re.rst:1360 +#: ../../library/re.rst:1373 msgid "" "If we make the decimal place and everything after it optional, not all " "groups might participate in the match. These groups will default to " "``None`` unless the *default* argument is given::" msgstr "" -#: ../../library/re.rst:1373 +#: ../../library/re.rst:1386 msgid "" "Return a dictionary containing all the *named* subgroups of the match, keyed " "by the subgroup name. The *default* argument is used for groups that did " "not participate in the match; it defaults to ``None``. For example::" msgstr "" -#: ../../library/re.rst:1385 +#: ../../library/re.rst:1398 msgid "" "Return the indices of the start and end of the substring matched by *group*; " "*group* defaults to zero (meaning the whole matched substring). Return " @@ -1586,7 +1601,7 @@ msgid "" "matched by group *g* (equivalent to ``m.group(g)``) is ::" msgstr "" -#: ../../library/re.rst:1393 +#: ../../library/re.rst:1406 msgid "" "Note that ``m.start(group)`` will equal ``m.end(group)`` if *group* matched " "a null string. For example, after ``m = re.search('b(c?)', 'cba')``, ``m." @@ -1594,32 +1609,32 @@ msgid "" "2, and ``m.start(2)`` raises an :exc:`IndexError` exception." msgstr "" -#: ../../library/re.rst:1398 +#: ../../library/re.rst:1411 msgid "An example that will remove *remove_this* from email addresses::" msgstr "" -#: ../../library/re.rst:1408 +#: ../../library/re.rst:1421 msgid "" "For a match *m*, return the 2-tuple ``(m.start(group), m.end(group))``. Note " "that if *group* did not contribute to the match, this is ``(-1, -1)``. " "*group* defaults to zero, the entire match." msgstr "" -#: ../../library/re.rst:1415 +#: ../../library/re.rst:1428 msgid "" "The value of *pos* which was passed to the :meth:`~Pattern.search` or :meth:" "`~Pattern.match` method of a :ref:`regex object `. This is the " "index into the string at which the RE engine started looking for a match." msgstr "" -#: ../../library/re.rst:1422 +#: ../../library/re.rst:1435 msgid "" "The value of *endpos* which was passed to the :meth:`~Pattern.search` or :" "meth:`~Pattern.match` method of a :ref:`regex object `. This is " "the index into the string beyond which the RE engine will not go." msgstr "" -#: ../../library/re.rst:1429 +#: ../../library/re.rst:1442 msgid "" "The integer index of the last matched capturing group, or ``None`` if no " "group was matched at all. For example, the expressions ``(a)b``, ``((a)" @@ -1628,43 +1643,43 @@ msgid "" "applied to the same string." msgstr "" -#: ../../library/re.rst:1438 +#: ../../library/re.rst:1451 msgid "" "The name of the last matched capturing group, or ``None`` if the group " "didn't have a name, or if no group was matched at all." msgstr "" -#: ../../library/re.rst:1444 +#: ../../library/re.rst:1457 msgid "" "The :ref:`regular expression object ` whose :meth:`~Pattern." "match` or :meth:`~Pattern.search` method produced this match instance." msgstr "" -#: ../../library/re.rst:1450 +#: ../../library/re.rst:1463 msgid "The string passed to :meth:`~Pattern.match` or :meth:`~Pattern.search`." msgstr "" -#: ../../library/re.rst:1453 +#: ../../library/re.rst:1466 msgid "" "Added support of :func:`copy.copy` and :func:`copy.deepcopy`. Match objects " "are considered atomic." msgstr "" -#: ../../library/re.rst:1461 +#: ../../library/re.rst:1474 msgid "Regular Expression Examples" msgstr "" -#: ../../library/re.rst:1465 +#: ../../library/re.rst:1478 msgid "Checking for a Pair" msgstr "" -#: ../../library/re.rst:1467 +#: ../../library/re.rst:1480 msgid "" "In this example, we'll use the following helper function to display match " "objects a little more gracefully::" msgstr "" -#: ../../library/re.rst:1475 +#: ../../library/re.rst:1488 msgid "" "Suppose you are writing a poker program where a player's hand is represented " "as a 5-character string with each character representing a card, \"a\" for " @@ -1672,154 +1687,154 @@ msgid "" "\"2\" through \"9\" representing the card with that value." msgstr "" -#: ../../library/re.rst:1480 +#: ../../library/re.rst:1493 msgid "To see if a given string is a valid hand, one could do the following::" msgstr "" -#: ../../library/re.rst:1490 +#: ../../library/re.rst:1503 msgid "" "That last hand, ``\"727ak\"``, contained a pair, or two of the same valued " "cards. To match this with a regular expression, one could use backreferences " "as such::" msgstr "" -#: ../../library/re.rst:1500 +#: ../../library/re.rst:1513 msgid "" "To find out what card the pair consists of, one could use the :meth:`~Match." "group` method of the match object in the following manner::" msgstr "" -#: ../../library/re.rst:1519 +#: ../../library/re.rst:1532 msgid "Simulating scanf()" msgstr "" -#: ../../library/re.rst:1523 +#: ../../library/re.rst:1536 msgid "" -"Python does not currently have an equivalent to :c:func:`scanf`. Regular " +"Python does not currently have an equivalent to :c:func:`!scanf`. Regular " "expressions are generally more powerful, though also more verbose, than :c:" -"func:`scanf` format strings. The table below offers some more-or-less " -"equivalent mappings between :c:func:`scanf` format tokens and regular " +"func:`!scanf` format strings. The table below offers some more-or-less " +"equivalent mappings between :c:func:`!scanf` format tokens and regular " "expressions." msgstr "" -#: ../../library/re.rst:1530 -msgid ":c:func:`scanf` Token" +#: ../../library/re.rst:1543 +msgid ":c:func:`!scanf` Token" msgstr "" -#: ../../library/re.rst:1530 +#: ../../library/re.rst:1543 msgid "Regular Expression" msgstr "" -#: ../../library/re.rst:1532 +#: ../../library/re.rst:1545 msgid "``%c``" msgstr "``%c``" -#: ../../library/re.rst:1534 +#: ../../library/re.rst:1547 msgid "``%5c``" msgstr "``%5c``" -#: ../../library/re.rst:1534 +#: ../../library/re.rst:1547 msgid "``.{5}``" msgstr "``.{5}``" -#: ../../library/re.rst:1536 +#: ../../library/re.rst:1549 msgid "``%d``" msgstr "``%d``" -#: ../../library/re.rst:1536 +#: ../../library/re.rst:1549 msgid "``[-+]?\\d+``" msgstr "``[-+]?\\d+``" -#: ../../library/re.rst:1538 +#: ../../library/re.rst:1551 msgid "``%e``, ``%E``, ``%f``, ``%g``" msgstr "``%e``, ``%E``, ``%f``, ``%g``" -#: ../../library/re.rst:1538 +#: ../../library/re.rst:1551 msgid "``[-+]?(\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?``" msgstr "``[-+]?(\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?``" -#: ../../library/re.rst:1540 +#: ../../library/re.rst:1553 msgid "``%i``" msgstr "``%i``" -#: ../../library/re.rst:1540 +#: ../../library/re.rst:1553 msgid "``[-+]?(0[xX][\\dA-Fa-f]+|0[0-7]*|\\d+)``" msgstr "``[-+]?(0[xX][\\dA-Fa-f]+|0[0-7]*|\\d+)``" -#: ../../library/re.rst:1542 +#: ../../library/re.rst:1555 msgid "``%o``" msgstr "``%o``" -#: ../../library/re.rst:1542 +#: ../../library/re.rst:1555 msgid "``[-+]?[0-7]+``" msgstr "``[-+]?[0-7]+``" -#: ../../library/re.rst:1544 +#: ../../library/re.rst:1557 msgid "``%s``" msgstr "``%s``" -#: ../../library/re.rst:1544 +#: ../../library/re.rst:1557 msgid "``\\S+``" msgstr "``\\S+``" -#: ../../library/re.rst:1546 +#: ../../library/re.rst:1559 msgid "``%u``" msgstr "``%u``" -#: ../../library/re.rst:1546 +#: ../../library/re.rst:1559 msgid "``\\d+``" msgstr "``\\d+``" -#: ../../library/re.rst:1548 +#: ../../library/re.rst:1561 msgid "``%x``, ``%X``" msgstr "``%x``\\ 、\\ ``%X``" -#: ../../library/re.rst:1548 +#: ../../library/re.rst:1561 msgid "``[-+]?(0[xX])?[\\dA-Fa-f]+``" msgstr "``[-+]?(0[xX])?[\\dA-Fa-f]+``" -#: ../../library/re.rst:1551 +#: ../../library/re.rst:1564 msgid "To extract the filename and numbers from a string like ::" msgstr "" -#: ../../library/re.rst:1555 -msgid "you would use a :c:func:`scanf` format like ::" +#: ../../library/re.rst:1568 +msgid "you would use a :c:func:`!scanf` format like ::" msgstr "" -#: ../../library/re.rst:1559 +#: ../../library/re.rst:1572 msgid "The equivalent regular expression would be ::" msgstr "" -#: ../../library/re.rst:1567 +#: ../../library/re.rst:1580 msgid "search() vs. match()" msgstr "" -#: ../../library/re.rst:1571 +#: ../../library/re.rst:1584 msgid "" "Python offers different primitive operations based on regular expressions:" msgstr "" -#: ../../library/re.rst:1573 +#: ../../library/re.rst:1586 msgid ":func:`re.match` checks for a match only at the beginning of the string" msgstr "" -#: ../../library/re.rst:1574 +#: ../../library/re.rst:1587 msgid "" ":func:`re.search` checks for a match anywhere in the string (this is what " "Perl does by default)" msgstr "" -#: ../../library/re.rst:1576 +#: ../../library/re.rst:1589 msgid ":func:`re.fullmatch` checks for entire string to be a match" msgstr "" -#: ../../library/re.rst:1588 +#: ../../library/re.rst:1601 msgid "" "Regular expressions beginning with ``'^'`` can be used with :func:`search` " "to restrict the match at the beginning of the string::" msgstr "" -#: ../../library/re.rst:1596 +#: ../../library/re.rst:1609 msgid "" "Note however that in :const:`MULTILINE` mode :func:`match` only matches at " "the beginning of the string, whereas using :func:`search` with a regular " @@ -1827,11 +1842,11 @@ msgid "" "line. ::" msgstr "" -#: ../../library/re.rst:1606 +#: ../../library/re.rst:1619 msgid "Making a Phonebook" msgstr "" -#: ../../library/re.rst:1608 +#: ../../library/re.rst:1621 msgid "" ":func:`split` splits a string into a list delimited by the passed pattern. " "The method is invaluable for converting textual data into data structures " @@ -1839,37 +1854,37 @@ msgid "" "following example that creates a phonebook." msgstr "" -#: ../../library/re.rst:1613 +#: ../../library/re.rst:1626 msgid "" "First, here is the input. Normally it may come from a file, here we are " "using triple-quoted string syntax" msgstr "" -#: ../../library/re.rst:1626 +#: ../../library/re.rst:1639 msgid "" "The entries are separated by one or more newlines. Now we convert the string " "into a list with each nonempty line having its own entry:" msgstr "" -#: ../../library/re.rst:1639 +#: ../../library/re.rst:1652 msgid "" "Finally, split each entry into a list with first name, last name, telephone " "number, and address. We use the ``maxsplit`` parameter of :func:`split` " "because the address has spaces, our splitting pattern, in it:" msgstr "" -#: ../../library/re.rst:1652 +#: ../../library/re.rst:1665 msgid "" "The ``:?`` pattern matches the colon after the last name, so that it does " "not occur in the result list. With a ``maxsplit`` of ``4``, we could " "separate the house number from the street name:" msgstr "" -#: ../../library/re.rst:1667 +#: ../../library/re.rst:1680 msgid "Text Munging" msgstr "" -#: ../../library/re.rst:1669 +#: ../../library/re.rst:1682 msgid "" ":func:`sub` replaces every occurrence of a pattern with a string or the " "result of a function. This example demonstrates using :func:`sub` with a " @@ -1877,11 +1892,11 @@ msgid "" "each word of a sentence except for the first and last characters::" msgstr "" -#: ../../library/re.rst:1687 +#: ../../library/re.rst:1700 msgid "Finding all Adverbs" msgstr "" -#: ../../library/re.rst:1689 +#: ../../library/re.rst:1702 msgid "" ":func:`findall` matches *all* occurrences of a pattern, not just the first " "one as :func:`search` does. For example, if a writer wanted to find all of " @@ -1889,11 +1904,11 @@ msgid "" "manner::" msgstr "" -#: ../../library/re.rst:1700 +#: ../../library/re.rst:1713 msgid "Finding all Adverbs and their Positions" msgstr "" -#: ../../library/re.rst:1702 +#: ../../library/re.rst:1715 msgid "" "If one wants more information about all matches of a pattern than the " "matched text, :func:`finditer` is useful as it provides :ref:`match objects " @@ -1902,11 +1917,11 @@ msgid "" "text, they would use :func:`finditer` in the following manner::" msgstr "" -#: ../../library/re.rst:1716 +#: ../../library/re.rst:1729 msgid "Raw String Notation" msgstr "" -#: ../../library/re.rst:1718 +#: ../../library/re.rst:1731 msgid "" "Raw string notation (``r\"text\"``) keeps regular expressions sane. Without " "it, every backslash (``'\\'``) in a regular expression would have to be " @@ -1914,7 +1929,7 @@ msgid "" "lines of code are functionally identical::" msgstr "" -#: ../../library/re.rst:1728 +#: ../../library/re.rst:1741 msgid "" "When one wants to match a literal backslash, it must be escaped in the " "regular expression. With raw string notation, this means ``r\"\\\\\"``. " @@ -1922,29 +1937,29 @@ msgid "" "following lines of code functionally identical::" msgstr "" -#: ../../library/re.rst:1740 +#: ../../library/re.rst:1753 msgid "Writing a Tokenizer" msgstr "" -#: ../../library/re.rst:1742 +#: ../../library/re.rst:1755 msgid "" "A `tokenizer or scanner `_ " "analyzes a string to categorize groups of characters. This is a useful " "first step in writing a compiler or interpreter." msgstr "" -#: ../../library/re.rst:1746 +#: ../../library/re.rst:1759 msgid "" "The text categories are specified with regular expressions. The technique " "is to combine those into a single master regular expression and to loop over " "successive matches::" msgstr "" -#: ../../library/re.rst:1802 +#: ../../library/re.rst:1815 msgid "The tokenizer produces the following output::" msgstr "" -#: ../../library/re.rst:1825 +#: ../../library/re.rst:1838 msgid "" "Friedl, Jeffrey. Mastering Regular Expressions. 3rd ed., O'Reilly Media, " "2009. The third edition of the book no longer covers Python at all, but the " @@ -1964,12 +1979,12 @@ msgstr ". (點)" #: ../../library/re.rst:309 ../../library/re.rst:319 ../../library/re.rst:345 #: ../../library/re.rst:394 ../../library/re.rst:426 ../../library/re.rst:432 #: ../../library/re.rst:437 ../../library/re.rst:444 ../../library/re.rst:451 -#: ../../library/re.rst:478 ../../library/re.rst:488 ../../library/re.rst:509 -#: ../../library/re.rst:521 ../../library/re.rst:526 ../../library/re.rst:542 -#: ../../library/re.rst:553 ../../library/re.rst:565 ../../library/re.rst:572 -#: ../../library/re.rst:586 ../../library/re.rst:593 ../../library/re.rst:607 -#: ../../library/re.rst:616 ../../library/re.rst:621 ../../library/re.rst:785 -#: ../../library/re.rst:992 +#: ../../library/re.rst:478 ../../library/re.rst:488 ../../library/re.rst:511 +#: ../../library/re.rst:523 ../../library/re.rst:528 ../../library/re.rst:544 +#: ../../library/re.rst:555 ../../library/re.rst:567 ../../library/re.rst:574 +#: ../../library/re.rst:588 ../../library/re.rst:595 ../../library/re.rst:609 +#: ../../library/re.rst:618 ../../library/re.rst:623 ../../library/re.rst:798 +#: ../../library/re.rst:1005 msgid "in regular expressions" msgstr "於正規表示式中" @@ -2021,7 +2036,7 @@ msgstr "?+" msgid "{} (curly brackets)" msgstr "{} (花括號)" -#: ../../library/re.rst:220 ../../library/re.rst:257 ../../library/re.rst:509 +#: ../../library/re.rst:220 ../../library/re.rst:257 ../../library/re.rst:511 msgid "\\ (backslash)" msgstr "\\ (反斜線)" @@ -2081,98 +2096,98 @@ msgstr "(?\n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -517,28 +517,35 @@ msgid "" msgstr "" #: ../../library/shutil.rst:404 +msgid "" +"On Unix filesystems, *path* must point to a path within a **mounted** " +"filesystem partition. On those platforms, CPython doesn't attempt to " +"retrieve disk usage information from non-mounted filesystems." +msgstr "" + +#: ../../library/shutil.rst:410 msgid "On Windows, *path* can now be a file or directory." msgstr "" -#: ../../library/shutil.rst:407 +#: ../../library/shutil.rst:413 msgid ":ref:`Availability `: Unix, Windows." msgstr ":ref:`適用 `:Unix、Windows。" -#: ../../library/shutil.rst:411 +#: ../../library/shutil.rst:417 msgid "Change owner *user* and/or *group* of the given *path*." msgstr "" -#: ../../library/shutil.rst:413 +#: ../../library/shutil.rst:419 msgid "" "*user* can be a system user name or a uid; the same applies to *group*. At " "least one argument is required." msgstr "" -#: ../../library/shutil.rst:416 +#: ../../library/shutil.rst:422 msgid "See also :func:`os.chown`, the underlying function." msgstr "" -#: ../../library/shutil.rst:418 +#: ../../library/shutil.rst:424 msgid "" "Raises an :ref:`auditing event ` ``shutil.chown`` with arguments " "``path``, ``user``, ``group``." @@ -546,29 +553,29 @@ msgstr "" "引發一個附帶引數 ``path``、``user``、``group`` 的\\ :ref:`稽核事件 " "` ``shutil.chown``。" -#: ../../library/shutil.rst:420 +#: ../../library/shutil.rst:426 msgid ":ref:`Availability `: Unix." msgstr ":ref:`適用 `:Unix。" -#: ../../library/shutil.rst:427 +#: ../../library/shutil.rst:433 msgid "" "Return the path to an executable which would be run if the given *cmd* was " "called. If no *cmd* would be called, return ``None``." msgstr "" -#: ../../library/shutil.rst:430 +#: ../../library/shutil.rst:436 msgid "" "*mode* is a permission mask passed to :func:`os.access`, by default " "determining if the file exists and executable." msgstr "" -#: ../../library/shutil.rst:433 +#: ../../library/shutil.rst:439 msgid "" "When no *path* is specified, the results of :func:`os.environ` are used, " "returning either the \"PATH\" value or a fallback of :data:`os.defpath`." msgstr "" -#: ../../library/shutil.rst:436 +#: ../../library/shutil.rst:442 msgid "" "On Windows, the current directory is prepended to the *path* if *mode* does " "not include ``os.X_OK``. When the *mode* does include ``os.X_OK``, the " @@ -578,7 +585,7 @@ msgid "" "environment variable ``NoDefaultCurrentDirectoryInExePath``." msgstr "" -#: ../../library/shutil.rst:443 +#: ../../library/shutil.rst:449 msgid "" "Also on Windows, the ``PATHEXT`` variable is used to resolve commands that " "may not already include an extension. For example, if you call ``shutil." @@ -587,19 +594,19 @@ msgid "" "on Windows::" msgstr "" -#: ../../library/shutil.rst:452 +#: ../../library/shutil.rst:458 msgid "" "This is also applied when *cmd* is a path that contains a directory " "component::" msgstr "" -#: ../../library/shutil.rst:460 +#: ../../library/shutil.rst:466 msgid "" "The :class:`bytes` type is now accepted. If *cmd* type is :class:`bytes`, " "the result type is also :class:`bytes`." msgstr "" -#: ../../library/shutil.rst:464 +#: ../../library/shutil.rst:470 msgid "" "On Windows, the current directory is no longer prepended to the search path " "if *mode* includes ``os.X_OK`` and WinAPI " @@ -610,18 +617,18 @@ msgid "" "now be found." msgstr "" -#: ../../library/shutil.rst:475 +#: ../../library/shutil.rst:481 msgid "" "This exception collects exceptions that are raised during a multi-file " "operation. For :func:`copytree`, the exception argument is a list of 3-" "tuples (*srcname*, *dstname*, *exception*)." msgstr "" -#: ../../library/shutil.rst:482 +#: ../../library/shutil.rst:488 msgid "Platform-dependent efficient copy operations" msgstr "" -#: ../../library/shutil.rst:484 +#: ../../library/shutil.rst:490 msgid "" "Starting from Python 3.8, all functions involving a file copy (:func:" "`copyfile`, :func:`~shutil.copy`, :func:`copy2`, :func:`copytree`, and :func:" @@ -631,51 +638,51 @@ msgid "" "buffers in Python as in \"``outfd.write(infd.read())``\"." msgstr "" -#: ../../library/shutil.rst:492 +#: ../../library/shutil.rst:498 msgid "On macOS `fcopyfile`_ is used to copy the file content (not metadata)." msgstr "" -#: ../../library/shutil.rst:494 +#: ../../library/shutil.rst:500 msgid "On Linux :func:`os.sendfile` is used." msgstr "" -#: ../../library/shutil.rst:496 +#: ../../library/shutil.rst:502 msgid "" "On Windows :func:`shutil.copyfile` uses a bigger default buffer size (1 MiB " "instead of 64 KiB) and a :func:`memoryview`-based variant of :func:`shutil." "copyfileobj` is used." msgstr "" -#: ../../library/shutil.rst:500 +#: ../../library/shutil.rst:506 msgid "" "If the fast-copy operation fails and no data was written in the destination " "file then shutil will silently fallback on using less efficient :func:" "`copyfileobj` function internally." msgstr "" -#: ../../library/shutil.rst:509 +#: ../../library/shutil.rst:515 msgid "copytree example" msgstr "" -#: ../../library/shutil.rst:511 +#: ../../library/shutil.rst:517 msgid "An example that uses the :func:`ignore_patterns` helper::" msgstr "" -#: ../../library/shutil.rst:517 +#: ../../library/shutil.rst:523 msgid "" "This will copy everything except ``.pyc`` files and files or directories " "whose name starts with ``tmp``." msgstr "" -#: ../../library/shutil.rst:520 +#: ../../library/shutil.rst:526 msgid "Another example that uses the *ignore* argument to add a logging call::" msgstr "" -#: ../../library/shutil.rst:535 +#: ../../library/shutil.rst:541 msgid "rmtree example" msgstr "rmtree 範例" -#: ../../library/shutil.rst:537 +#: ../../library/shutil.rst:543 msgid "" "This example shows how to remove a directory tree on Windows where some of " "the files have their read-only bit set. It uses the onexc callback to clear " @@ -683,25 +690,25 @@ msgid "" "propagate. ::" msgstr "" -#: ../../library/shutil.rst:555 +#: ../../library/shutil.rst:561 msgid "Archiving operations" msgstr "" -#: ../../library/shutil.rst:559 +#: ../../library/shutil.rst:565 msgid "Added support for the *xztar* format." msgstr "新增 *xztar* 格式的支援。" -#: ../../library/shutil.rst:563 +#: ../../library/shutil.rst:569 msgid "" "High-level utilities to create and read compressed and archived files are " "also provided. They rely on the :mod:`zipfile` and :mod:`tarfile` modules." msgstr "" -#: ../../library/shutil.rst:568 +#: ../../library/shutil.rst:574 msgid "Create an archive file (such as zip or tar) and return its name." msgstr "" -#: ../../library/shutil.rst:570 +#: ../../library/shutil.rst:576 msgid "" "*base_name* is the name of the file to create, including the path, minus any " "format-specific extension. *format* is the archive format: one of " @@ -710,14 +717,14 @@ msgid "" "available), or \"xztar\" (if the :mod:`lzma` module is available)." msgstr "" -#: ../../library/shutil.rst:576 +#: ../../library/shutil.rst:582 msgid "" "*root_dir* is a directory that will be the root directory of the archive, " "all paths in the archive will be relative to it; for example, we typically " "chdir into *root_dir* before creating the archive." msgstr "" -#: ../../library/shutil.rst:580 +#: ../../library/shutil.rst:586 msgid "" "*base_dir* is the directory where we start archiving from; i.e. *base_dir* " "will be the common prefix of all files and directories in the archive. " @@ -725,33 +732,33 @@ msgid "" "example-with-basedir` for how to use *base_dir* and *root_dir* together." msgstr "" -#: ../../library/shutil.rst:586 +#: ../../library/shutil.rst:592 msgid "*root_dir* and *base_dir* both default to the current directory." msgstr "" -#: ../../library/shutil.rst:588 +#: ../../library/shutil.rst:594 msgid "" "If *dry_run* is true, no archive is created, but the operations that would " "be executed are logged to *logger*." msgstr "" -#: ../../library/shutil.rst:591 +#: ../../library/shutil.rst:597 msgid "" "*owner* and *group* are used when creating a tar archive. By default, uses " "the current owner and group." msgstr "" -#: ../../library/shutil.rst:594 +#: ../../library/shutil.rst:600 msgid "" "*logger* must be an object compatible with :pep:`282`, usually an instance " "of :class:`logging.Logger`." msgstr "" -#: ../../library/shutil.rst:597 +#: ../../library/shutil.rst:603 msgid "The *verbose* argument is unused and deprecated." msgstr "" -#: ../../library/shutil.rst:599 +#: ../../library/shutil.rst:605 msgid "" "Raises an :ref:`auditing event ` ``shutil.make_archive`` with " "arguments ``base_name``, ``format``, ``root_dir``, ``base_dir``." @@ -759,7 +766,7 @@ msgstr "" "引發一個附帶引數 ``base_name``、``format``、``root_dir``、``base_dir`` 的\\ :" "ref:`稽核事件 ` ``shutil.make_archive``。" -#: ../../library/shutil.rst:603 +#: ../../library/shutil.rst:609 msgid "" "This function is not thread-safe when custom archivers registered with :func:" "`register_archive_format` do not support the *root_dir* argument. In this " @@ -767,60 +774,60 @@ msgid "" "*root_dir* to perform archiving." msgstr "" -#: ../../library/shutil.rst:609 +#: ../../library/shutil.rst:615 msgid "" "The modern pax (POSIX.1-2001) format is now used instead of the legacy GNU " "format for archives created with ``format=\"tar\"``." msgstr "" -#: ../../library/shutil.rst:613 +#: ../../library/shutil.rst:619 msgid "" "This function is now made thread-safe during creation of standard ``.zip`` " "and tar archives." msgstr "" -#: ../../library/shutil.rst:619 +#: ../../library/shutil.rst:625 msgid "" "Return a list of supported formats for archiving. Each element of the " "returned sequence is a tuple ``(name, description)``." msgstr "" -#: ../../library/shutil.rst:622 ../../library/shutil.rst:733 +#: ../../library/shutil.rst:628 ../../library/shutil.rst:739 msgid "By default :mod:`shutil` provides these formats:" msgstr "" -#: ../../library/shutil.rst:624 +#: ../../library/shutil.rst:630 msgid "*zip*: ZIP file (if the :mod:`zlib` module is available)." msgstr "" -#: ../../library/shutil.rst:625 +#: ../../library/shutil.rst:631 msgid "" "*tar*: Uncompressed tar file. Uses POSIX.1-2001 pax format for new archives." msgstr "" -#: ../../library/shutil.rst:626 ../../library/shutil.rst:738 +#: ../../library/shutil.rst:632 ../../library/shutil.rst:744 msgid "*gztar*: gzip'ed tar-file (if the :mod:`zlib` module is available)." msgstr "" -#: ../../library/shutil.rst:627 ../../library/shutil.rst:739 +#: ../../library/shutil.rst:633 ../../library/shutil.rst:745 msgid "*bztar*: bzip2'ed tar-file (if the :mod:`bz2` module is available)." msgstr "" -#: ../../library/shutil.rst:628 ../../library/shutil.rst:740 +#: ../../library/shutil.rst:634 ../../library/shutil.rst:746 msgid "*xztar*: xz'ed tar-file (if the :mod:`lzma` module is available)." msgstr "" -#: ../../library/shutil.rst:630 +#: ../../library/shutil.rst:636 msgid "" "You can register new formats or provide your own archiver for any existing " "formats, by using :func:`register_archive_format`." msgstr "" -#: ../../library/shutil.rst:636 +#: ../../library/shutil.rst:642 msgid "Register an archiver for the format *name*." msgstr "" -#: ../../library/shutil.rst:638 +#: ../../library/shutil.rst:644 msgid "" "*function* is the callable that will be used to unpack archives. The " "callable will receive the *base_name* of the file to create, followed by the " @@ -829,7 +836,7 @@ msgid "" "*dry_run* and *logger* (as passed in :func:`make_archive`)." msgstr "" -#: ../../library/shutil.rst:644 +#: ../../library/shutil.rst:650 msgid "" "If *function* has the custom attribute ``function.supports_root_dir`` set to " "``True``, the *root_dir* argument is passed as a keyword argument. Otherwise " @@ -838,37 +845,37 @@ msgid "" "not thread-safe." msgstr "" -#: ../../library/shutil.rst:650 +#: ../../library/shutil.rst:656 msgid "" "If given, *extra_args* is a sequence of ``(name, value)`` pairs that will be " "used as extra keywords arguments when the archiver callable is used." msgstr "" -#: ../../library/shutil.rst:653 +#: ../../library/shutil.rst:659 msgid "" "*description* is used by :func:`get_archive_formats` which returns the list " "of archivers. Defaults to an empty string." msgstr "" -#: ../../library/shutil.rst:656 +#: ../../library/shutil.rst:662 msgid "Added support for functions supporting the *root_dir* argument." msgstr "" -#: ../../library/shutil.rst:662 +#: ../../library/shutil.rst:668 msgid "Remove the archive format *name* from the list of supported formats." msgstr "" -#: ../../library/shutil.rst:667 +#: ../../library/shutil.rst:673 msgid "Unpack an archive. *filename* is the full path of the archive." msgstr "" -#: ../../library/shutil.rst:669 +#: ../../library/shutil.rst:675 msgid "" "*extract_dir* is the name of the target directory where the archive is " "unpacked. If not provided, the current working directory is used." msgstr "" -#: ../../library/shutil.rst:672 +#: ../../library/shutil.rst:678 msgid "" "*format* is the archive format: one of \"zip\", \"tar\", \"gztar\", " "\"bztar\", or \"xztar\". Or any other format registered with :func:" @@ -877,7 +884,7 @@ msgid "" "that extension. In case none is found, a :exc:`ValueError` is raised." msgstr "" -#: ../../library/shutil.rst:679 +#: ../../library/shutil.rst:685 msgid "" "The keyword-only *filter* argument is passed to the underlying unpacking " "function. For zip files, *filter* is not accepted. For tar files, it is " @@ -887,7 +894,7 @@ msgid "" "Python 3.14." msgstr "" -#: ../../library/shutil.rst:687 +#: ../../library/shutil.rst:693 msgid "" "Raises an :ref:`auditing event ` ``shutil.unpack_archive`` with " "arguments ``filename``, ``extract_dir``, ``format``." @@ -895,7 +902,7 @@ msgstr "" "引發一個附帶引數 ``filename``、``extract_dir``、``format`` 的\\ :ref:`稽核事" "件 ` ``shutil.unpack_archive``。" -#: ../../library/shutil.rst:691 +#: ../../library/shutil.rst:697 msgid "" "Never extract archives from untrusted sources without prior inspection. It " "is possible that files are created outside of the path specified in the " @@ -903,138 +910,138 @@ msgid "" "with \"/\" or filenames with two dots \"..\"." msgstr "" -#: ../../library/shutil.rst:696 +#: ../../library/shutil.rst:702 msgid "Accepts a :term:`path-like object` for *filename* and *extract_dir*." msgstr "" -#: ../../library/shutil.rst:699 +#: ../../library/shutil.rst:705 msgid "Added the *filter* argument." msgstr "新增 *filter* 引數。" -#: ../../library/shutil.rst:704 +#: ../../library/shutil.rst:710 msgid "" "Registers an unpack format. *name* is the name of the format and " "*extensions* is a list of extensions corresponding to the format, like ``." "zip`` for Zip files." msgstr "" -#: ../../library/shutil.rst:708 +#: ../../library/shutil.rst:714 msgid "" "*function* is the callable that will be used to unpack archives. The " "callable will receive:" msgstr "" -#: ../../library/shutil.rst:711 +#: ../../library/shutil.rst:717 msgid "the path of the archive, as a positional argument;" msgstr "" -#: ../../library/shutil.rst:712 +#: ../../library/shutil.rst:718 msgid "" "the directory the archive must be extracted to, as a positional argument;" msgstr "" -#: ../../library/shutil.rst:713 +#: ../../library/shutil.rst:719 msgid "" "possibly a *filter* keyword argument, if it was given to :func:" "`unpack_archive`;" msgstr "" -#: ../../library/shutil.rst:715 +#: ../../library/shutil.rst:721 msgid "" "additional keyword arguments, specified by *extra_args* as a sequence of " "``(name, value)`` tuples." msgstr "" -#: ../../library/shutil.rst:718 +#: ../../library/shutil.rst:724 msgid "" "*description* can be provided to describe the format, and will be returned " "by the :func:`get_unpack_formats` function." msgstr "" -#: ../../library/shutil.rst:724 +#: ../../library/shutil.rst:730 msgid "Unregister an unpack format. *name* is the name of the format." msgstr "" -#: ../../library/shutil.rst:729 +#: ../../library/shutil.rst:735 msgid "" "Return a list of all registered formats for unpacking. Each element of the " "returned sequence is a tuple ``(name, extensions, description)``." msgstr "" -#: ../../library/shutil.rst:735 +#: ../../library/shutil.rst:741 msgid "" "*zip*: ZIP file (unpacking compressed files works only if the corresponding " "module is available)." msgstr "" -#: ../../library/shutil.rst:737 +#: ../../library/shutil.rst:743 msgid "*tar*: uncompressed tar file." msgstr "" -#: ../../library/shutil.rst:742 +#: ../../library/shutil.rst:748 msgid "" "You can register new formats or provide your own unpacker for any existing " "formats, by using :func:`register_unpack_format`." msgstr "" -#: ../../library/shutil.rst:749 +#: ../../library/shutil.rst:755 msgid "Archiving example" msgstr "" -#: ../../library/shutil.rst:751 +#: ../../library/shutil.rst:757 msgid "" "In this example, we create a gzip'ed tar-file archive containing all files " "found in the :file:`.ssh` directory of the user::" msgstr "" -#: ../../library/shutil.rst:761 +#: ../../library/shutil.rst:767 msgid "The resulting archive contains:" msgstr "" -#: ../../library/shutil.rst:779 +#: ../../library/shutil.rst:785 msgid "Archiving example with *base_dir*" msgstr "" -#: ../../library/shutil.rst:781 +#: ../../library/shutil.rst:787 msgid "" "In this example, similar to the `one above `_, we " "show how to use :func:`make_archive`, but this time with the usage of " "*base_dir*. We now have the following directory structure:" msgstr "" -#: ../../library/shutil.rst:795 +#: ../../library/shutil.rst:801 msgid "" "In the final archive, :file:`please_add.txt` should be included, but :file:" "`do_not_add.txt` should not. Therefore we use the following::" msgstr "" -#: ../../library/shutil.rst:809 +#: ../../library/shutil.rst:815 msgid "Listing the files in the resulting archive gives us:" msgstr "" -#: ../../library/shutil.rst:819 +#: ../../library/shutil.rst:825 msgid "Querying the size of the output terminal" msgstr "" -#: ../../library/shutil.rst:823 +#: ../../library/shutil.rst:829 msgid "Get the size of the terminal window." msgstr "" -#: ../../library/shutil.rst:825 +#: ../../library/shutil.rst:831 msgid "" "For each of the two dimensions, the environment variable, ``COLUMNS`` and " "``LINES`` respectively, is checked. If the variable is defined and the value " "is a positive integer, it is used." msgstr "" -#: ../../library/shutil.rst:829 +#: ../../library/shutil.rst:835 msgid "" "When ``COLUMNS`` or ``LINES`` is not defined, which is the common case, the " "terminal connected to :data:`sys.__stdout__` is queried by invoking :func:" "`os.get_terminal_size`." msgstr "" -#: ../../library/shutil.rst:833 +#: ../../library/shutil.rst:839 msgid "" "If the terminal size cannot be successfully queried, either because the " "system doesn't support querying, or because we are not connected to a " @@ -1043,17 +1050,17 @@ msgid "" "emulators." msgstr "" -#: ../../library/shutil.rst:839 +#: ../../library/shutil.rst:845 msgid "The value returned is a named tuple of type :class:`os.terminal_size`." msgstr "" -#: ../../library/shutil.rst:841 +#: ../../library/shutil.rst:847 msgid "" "See also: The Single UNIX Specification, Version 2, `Other Environment " "Variables`_." msgstr "" -#: ../../library/shutil.rst:846 +#: ../../library/shutil.rst:852 msgid "" "The ``fallback`` values are also used if :func:`os.get_terminal_size` " "returns zeroes." diff --git a/library/ssl.po b/library/ssl.po index ed227ef89e..7cc942f17c 100644 --- a/library/ssl.po +++ b/library/ssl.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-22 00:04+0000\n" +"POT-Creation-Date: 2023-07-23 00:04+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-" @@ -2852,7 +2852,7 @@ msgstr "" #: ../../library/ssl.rst:2595 msgid "" -"The SSL context created above will only allow TLSv1.2 and later (if " +"The SSL context created above will only allow TLSv1.3 and later (if " "supported by your system) connections to a server. :const:" "`PROTOCOL_TLS_CLIENT` implies certificate validation and hostname checks by " "default. You have to load certificates into the context." diff --git a/library/sys.po b/library/sys.po index 6f279f7bf3..5d2229b245 100644 --- a/library/sys.po +++ b/library/sys.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-22 00:04+0000\n" +"POT-Creation-Date: 2023-07-23 00:04+0000\n" "PO-Revision-Date: 2023-04-26 02:54+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -369,8 +369,8 @@ msgstr "" msgid "Integer specifying the handle of the Python DLL." msgstr "" -#: ../../library/sys.rst:282 ../../library/sys.rst:906 -#: ../../library/sys.rst:1643 ../../library/sys.rst:1876 +#: ../../library/sys.rst:282 ../../library/sys.rst:910 +#: ../../library/sys.rst:1647 ../../library/sys.rst:1880 msgid ":ref:`Availability `: Windows." msgstr ":ref:`適用 `:Windows。" @@ -415,13 +415,13 @@ msgid "" "in the future." msgstr "" -#: ../../library/sys.rst:339 ../../library/sys.rst:1053 -#: ../../library/sys.rst:1759 +#: ../../library/sys.rst:339 ../../library/sys.rst:1057 +#: ../../library/sys.rst:1763 msgid "Attribute" msgstr "屬性" -#: ../../library/sys.rst:339 ../../library/sys.rst:1053 -#: ../../library/sys.rst:1759 +#: ../../library/sys.rst:339 ../../library/sys.rst:1057 +#: ../../library/sys.rst:1763 msgid "Explanation" msgstr "解釋" @@ -658,8 +658,8 @@ msgid "" "The attributes are read only." msgstr "" -#: ../../library/sys.rst:519 ../../library/sys.rst:576 -#: ../../library/sys.rst:952 +#: ../../library/sys.rst:519 ../../library/sys.rst:580 +#: ../../library/sys.rst:956 msgid "attribute" msgstr "屬性" @@ -801,38 +801,55 @@ msgid "" "limitation `)" msgstr "" -#: ../../library/sys.rst:540 +#: ../../library/sys.rst:538 +#, fuzzy +msgid ":const:`warn_default_encoding`" +msgstr ":const:`default_max_str_digits`" + +#: ../../library/sys.rst:538 +#, fuzzy +msgid ":option:`-X warn_default_encoding <-X>`" +msgstr ":option:`-X utf8 <-X>`" + +#: ../../library/sys.rst:541 msgid "Added ``quiet`` attribute for the new :option:`-q` flag." msgstr "新增 ``quiet`` 屬性,用於新的 :option:`-q` 旗標。" -#: ../../library/sys.rst:543 +#: ../../library/sys.rst:544 msgid "The ``hash_randomization`` attribute." msgstr "``hash_randomization`` 屬性。" -#: ../../library/sys.rst:546 +#: ../../library/sys.rst:547 msgid "Removed obsolete ``division_warning`` attribute." msgstr "移除過時的 ``division_warning`` 屬性。" -#: ../../library/sys.rst:549 +#: ../../library/sys.rst:550 msgid "Added ``isolated`` attribute for :option:`-I` ``isolated`` flag." msgstr "新增 ``isolated`` 屬性,用於 :option:`-I` ``isolated`` 旗標。" -#: ../../library/sys.rst:552 +#: ../../library/sys.rst:553 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:557 +#: ../../library/sys.rst:558 +#, fuzzy +msgid "" +"Added ``warn_default_encoding`` attribute for :option:`-X` " +"``warn_default_encoding`` flag." +msgstr "新增 ``isolated`` 屬性,用於 :option:`-I` ``isolated`` 旗標。" + +#: ../../library/sys.rst:561 msgid "Added the ``safe_path`` attribute for :option:`-P` option." msgstr "新增 ``safe_path`` 屬性,用於 :option:`-P` 選項。" -#: ../../library/sys.rst:560 +#: ../../library/sys.rst:564 msgid "Added the ``int_max_str_digits`` attribute." msgstr "新增 ``int_max_str_digits`` 屬性。" -#: ../../library/sys.rst:566 +#: ../../library/sys.rst:570 msgid "" "A :term:`named tuple` holding information about the float type. It contains " "low level information about the precision and internal representation. The " @@ -842,163 +859,163 @@ msgid "" "floating types', for details." msgstr "" -#: ../../library/sys.rst:576 +#: ../../library/sys.rst:580 msgid "float.h macro" msgstr "float.h macro" -#: ../../library/sys.rst:576 ../../library/sys.rst:952 +#: ../../library/sys.rst:580 ../../library/sys.rst:956 msgid "explanation" msgstr "解釋" -#: ../../library/sys.rst:578 +#: ../../library/sys.rst:582 msgid "``epsilon``" msgstr "``epsilon``" -#: ../../library/sys.rst:578 +#: ../../library/sys.rst:582 msgid "``DBL_EPSILON``" msgstr "``DBL_EPSILON``" -#: ../../library/sys.rst:578 +#: ../../library/sys.rst:582 msgid "" "difference between 1.0 and the least value greater than 1.0 that is " "representable as a float" msgstr "" -#: ../../library/sys.rst:581 +#: ../../library/sys.rst:585 msgid "See also :func:`math.ulp`." msgstr "另請參閱 :func:`math.ulp`\\ 。" -#: ../../library/sys.rst:583 +#: ../../library/sys.rst:587 msgid "``dig``" msgstr "``dig``" -#: ../../library/sys.rst:583 +#: ../../library/sys.rst:587 msgid "``DBL_DIG``" msgstr "``DBL_DIG``" -#: ../../library/sys.rst:583 +#: ../../library/sys.rst:587 msgid "" "maximum number of decimal digits that can be faithfully represented in a " "float; see below" msgstr "" -#: ../../library/sys.rst:586 +#: ../../library/sys.rst:590 msgid "``mant_dig``" msgstr "``mant_dig``" -#: ../../library/sys.rst:586 +#: ../../library/sys.rst:590 msgid "``DBL_MANT_DIG``" msgstr "``DBL_MANT_DIG``" -#: ../../library/sys.rst:586 +#: ../../library/sys.rst:590 msgid "" "float precision: the number of base-``radix`` digits in the significand of a " "float" msgstr "" -#: ../../library/sys.rst:589 +#: ../../library/sys.rst:593 msgid "``max``" msgstr "``max``" -#: ../../library/sys.rst:589 +#: ../../library/sys.rst:593 msgid "``DBL_MAX``" msgstr "``DBL_MAX``" -#: ../../library/sys.rst:589 +#: ../../library/sys.rst:593 msgid "maximum representable positive finite float" msgstr "" -#: ../../library/sys.rst:591 +#: ../../library/sys.rst:595 msgid "``max_exp``" msgstr "``max_exp``" -#: ../../library/sys.rst:591 +#: ../../library/sys.rst:595 msgid "``DBL_MAX_EXP``" msgstr "``DBL_MAX_EXP``" -#: ../../library/sys.rst:591 +#: ../../library/sys.rst:595 msgid "" "maximum integer *e* such that ``radix**(e-1)`` is a representable finite " "float" msgstr "" -#: ../../library/sys.rst:594 +#: ../../library/sys.rst:598 msgid "``max_10_exp``" msgstr "``max_10_exp``" -#: ../../library/sys.rst:594 +#: ../../library/sys.rst:598 msgid "``DBL_MAX_10_EXP``" msgstr "``DBL_MAX_10_EXP``" -#: ../../library/sys.rst:594 +#: ../../library/sys.rst:598 msgid "" "maximum integer *e* such that ``10**e`` is in the range of representable " "finite floats" msgstr "" -#: ../../library/sys.rst:597 +#: ../../library/sys.rst:601 msgid "``min``" msgstr "``min``" -#: ../../library/sys.rst:597 +#: ../../library/sys.rst:601 msgid "``DBL_MIN``" msgstr "``DBL_MIN``" -#: ../../library/sys.rst:597 +#: ../../library/sys.rst:601 msgid "minimum representable positive *normalized* float" msgstr "" -#: ../../library/sys.rst:599 +#: ../../library/sys.rst:603 msgid "" "Use :func:`math.ulp(0.0) ` to get the smallest positive " "*denormalized* representable float." msgstr "" -#: ../../library/sys.rst:603 +#: ../../library/sys.rst:607 msgid "``min_exp``" msgstr "``min_exp``" -#: ../../library/sys.rst:603 +#: ../../library/sys.rst:607 msgid "``DBL_MIN_EXP``" msgstr "``DBL_MIN_EXP``" -#: ../../library/sys.rst:603 +#: ../../library/sys.rst:607 msgid "minimum integer *e* such that ``radix**(e-1)`` is a normalized float" msgstr "" -#: ../../library/sys.rst:606 +#: ../../library/sys.rst:610 msgid "``min_10_exp``" msgstr "``min_10_exp``" -#: ../../library/sys.rst:606 +#: ../../library/sys.rst:610 msgid "``DBL_MIN_10_EXP``" msgstr "``DBL_MIN_10_EXP``" -#: ../../library/sys.rst:606 +#: ../../library/sys.rst:610 msgid "minimum integer *e* such that ``10**e`` is a normalized float" msgstr "" -#: ../../library/sys.rst:609 +#: ../../library/sys.rst:613 msgid "``radix``" msgstr "``radix``" -#: ../../library/sys.rst:609 +#: ../../library/sys.rst:613 msgid "``FLT_RADIX``" msgstr "``FLT_RADIX``" -#: ../../library/sys.rst:609 +#: ../../library/sys.rst:613 msgid "radix of exponent representation" msgstr "" -#: ../../library/sys.rst:611 +#: ../../library/sys.rst:615 msgid "``rounds``" msgstr "``rounds``" -#: ../../library/sys.rst:611 +#: ../../library/sys.rst:615 msgid "``FLT_ROUNDS``" msgstr "``FLT_ROUNDS``" -#: ../../library/sys.rst:611 +#: ../../library/sys.rst:615 msgid "" "integer representing the rounding mode for floating-point arithmetic. This " "reflects the value of the system ``FLT_ROUNDS`` macro at interpreter startup " @@ -1006,13 +1023,13 @@ msgid "" "toward positive infinity, ``3`` toward negative infinity" msgstr "" -#: ../../library/sys.rst:621 +#: ../../library/sys.rst:625 msgid "" "All other values for ``FLT_ROUNDS`` characterize implementation-defined " "rounding behavior." msgstr "" -#: ../../library/sys.rst:625 +#: ../../library/sys.rst:629 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." @@ -1020,13 +1037,13 @@ msgid "" "back again will recover a string representing the same decimal value::" msgstr "" -#: ../../library/sys.rst:638 +#: ../../library/sys.rst:642 msgid "" "But for strings with more than :attr:`sys.float_info.dig` significant " "digits, this isn't always true::" msgstr "" -#: ../../library/sys.rst:647 +#: ../../library/sys.rst:651 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)`` " @@ -1036,7 +1053,7 @@ msgid "" "same way as it did in versions of Python prior to 3.1." msgstr "" -#: ../../library/sys.rst:660 +#: ../../library/sys.rst:664 msgid "" "Return the number of memory blocks currently allocated by the interpreter, " "regardless of their size. This function is mainly useful for tracking and " @@ -1046,42 +1063,42 @@ msgid "" "results." msgstr "" -#: ../../library/sys.rst:667 +#: ../../library/sys.rst:671 msgid "" "If a Python build or implementation cannot reasonably compute this " "information, :func:`getallocatedblocks()` is allowed to return 0 instead." msgstr "" -#: ../../library/sys.rst:675 +#: ../../library/sys.rst:679 msgid "Return the number of unicode objects that have been interned." msgstr "" -#: ../../library/sys.rst:682 +#: ../../library/sys.rst:686 msgid "Return the build time API version of Android as an integer." msgstr "" -#: ../../library/sys.rst:684 +#: ../../library/sys.rst:688 msgid ":ref:`Availability `: Android." msgstr ":ref:`適用 `:Android。" -#: ../../library/sys.rst:691 +#: ../../library/sys.rst:695 msgid "" "Return the name of the current default string encoding used by the Unicode " "implementation." msgstr "" -#: ../../library/sys.rst:697 +#: ../../library/sys.rst:701 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. :const:`os.RTLD_LAZY`)." msgstr "" -#: ../../library/sys.rst:702 ../../library/sys.rst:1373 +#: ../../library/sys.rst:706 ../../library/sys.rst:1377 msgid ":ref:`Availability `: Unix." msgstr ":ref:`適用 `:Unix。" -#: ../../library/sys.rst:707 +#: ../../library/sys.rst:711 msgid "" "Get the :term:`filesystem encoding `: " "the encoding used with the :term:`filesystem error handler ` is enabled." msgstr "" -#: ../../library/sys.rst:740 +#: ../../library/sys.rst:744 msgid "" "Get the :term:`filesystem error handler `: the error handler used with the :term:`filesystem encoding " @@ -1136,20 +1153,20 @@ msgid "" "func:`getfilesystemencoding`." msgstr "" -#: ../../library/sys.rst:758 +#: ../../library/sys.rst:762 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:765 +#: ../../library/sys.rst:769 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:772 +#: ../../library/sys.rst:776 msgid "" "Return the current value of the recursion limit, the maximum depth of the " "Python interpreter stack. This limit prevents infinite recursion from " @@ -1157,46 +1174,46 @@ msgid "" "func:`setrecursionlimit`." msgstr "" -#: ../../library/sys.rst:780 +#: ../../library/sys.rst:784 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:785 +#: ../../library/sys.rst:789 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:788 +#: ../../library/sys.rst:792 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:791 +#: ../../library/sys.rst:795 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:795 +#: ../../library/sys.rst:799 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:801 +#: ../../library/sys.rst:805 msgid "" "Return the interpreter's \"thread switch interval\"; see :func:" "`setswitchinterval`." msgstr "" -#: ../../library/sys.rst:809 +#: ../../library/sys.rst:813 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. " @@ -1205,7 +1222,7 @@ msgid "" "stack." msgstr "" -#: ../../library/sys.rst:814 +#: ../../library/sys.rst:818 msgid "" "Raises an :ref:`auditing event ` ``sys._getframe`` with argument " "``frame``." @@ -1213,13 +1230,13 @@ msgstr "" "引發一個附帶引數 ``frame`` 的\\ :ref:`稽核事件 ` ``sys." "_getframe``。" -#: ../../library/sys.rst:818 ../../library/sys.rst:834 +#: ../../library/sys.rst:822 ../../library/sys.rst:838 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:824 +#: ../../library/sys.rst:828 msgid "" "Return the name of a module from the call stack. If optional integer " "*depth* is given, return the module that many calls below the top of the " @@ -1228,7 +1245,7 @@ msgid "" "returning the module at the top of the call stack." msgstr "" -#: ../../library/sys.rst:830 +#: ../../library/sys.rst:834 msgid "" "Raises an :ref:`auditing event ` ``sys._getframemodulename`` with " "argument ``depth``." @@ -1236,15 +1253,15 @@ msgstr "" "引發一個附帶引數 ``depth`` 的\\ :ref:`稽核事件 ` ``sys." "_getframemodulename``。" -#: ../../library/sys.rst:844 +#: ../../library/sys.rst:848 msgid "Get the profiler function as set by :func:`setprofile`." msgstr "" -#: ../../library/sys.rst:853 +#: ../../library/sys.rst:857 msgid "Get the trace function as set by :func:`settrace`." msgstr "" -#: ../../library/sys.rst:857 +#: ../../library/sys.rst:861 msgid "" "The :func:`gettrace` function is intended only for implementing debuggers, " "profilers, coverage tools and the like. Its behavior is part of the " @@ -1252,7 +1269,7 @@ msgid "" "thus may not be available in all Python implementations." msgstr "" -#: ../../library/sys.rst:865 +#: ../../library/sys.rst:869 msgid "" "Return a named tuple describing the Windows version currently running. The " "named elements are *major*, *minor*, *build*, *platform*, *service_pack*, " @@ -1264,54 +1281,54 @@ msgid "" "first 5 elements are retrievable by indexing." msgstr "" -#: ../../library/sys.rst:876 +#: ../../library/sys.rst:880 msgid "*platform* will be :const:`2 (VER_PLATFORM_WIN32_NT)`." msgstr "" -#: ../../library/sys.rst:878 +#: ../../library/sys.rst:882 msgid "*product_type* may be one of the following values:" msgstr "" -#: ../../library/sys.rst:881 +#: ../../library/sys.rst:885 msgid "Constant" msgstr "" -#: ../../library/sys.rst:881 +#: ../../library/sys.rst:885 msgid "Meaning" msgstr "" -#: ../../library/sys.rst:883 +#: ../../library/sys.rst:887 msgid ":const:`1 (VER_NT_WORKSTATION)`" msgstr ":const:`1 (VER_NT_WORKSTATION)`" -#: ../../library/sys.rst:883 +#: ../../library/sys.rst:887 msgid "The system is a workstation." msgstr "" -#: ../../library/sys.rst:885 +#: ../../library/sys.rst:889 msgid ":const:`2 (VER_NT_DOMAIN_CONTROLLER)`" msgstr ":const:`2 (VER_NT_DOMAIN_CONTROLLER)`" -#: ../../library/sys.rst:885 +#: ../../library/sys.rst:889 msgid "The system is a domain controller." msgstr "" -#: ../../library/sys.rst:888 +#: ../../library/sys.rst:892 msgid ":const:`3 (VER_NT_SERVER)`" msgstr ":const:`3 (VER_NT_SERVER)`" -#: ../../library/sys.rst:888 +#: ../../library/sys.rst:892 msgid "The system is a server, but not a domain controller." msgstr "" -#: ../../library/sys.rst:892 +#: ../../library/sys.rst:896 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:896 +#: ../../library/sys.rst:900 msgid "" "*platform_version* returns the major version, minor version and build number " "of the current operating system, rather than the version that is being " @@ -1319,24 +1336,24 @@ msgid "" "feature detection." msgstr "" -#: ../../library/sys.rst:902 +#: ../../library/sys.rst:906 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:908 +#: ../../library/sys.rst:912 msgid "" "Changed to a named tuple and added *service_pack_minor*, " "*service_pack_major*, *suite_mask*, and *product_type*." msgstr "" -#: ../../library/sys.rst:912 +#: ../../library/sys.rst:916 msgid "Added *platform_version*" msgstr "新增 *platform_version*" -#: ../../library/sys.rst:918 +#: ../../library/sys.rst:922 msgid "" "Returns an *asyncgen_hooks* object, which is similar to a :class:" "`~collections.namedtuple` of the form ``(firstiter, finalizer)``, where " @@ -1346,103 +1363,103 @@ msgid "" "loop." msgstr "" -#: ../../library/sys.rst:925 +#: ../../library/sys.rst:929 msgid "See :pep:`525` for more details." msgstr "更多細節請見 :pep:`525`\\ 。" -#: ../../library/sys.rst:929 ../../library/sys.rst:1575 +#: ../../library/sys.rst:933 ../../library/sys.rst:1579 msgid "" "This function has been added on a provisional basis (see :pep:`411` for " "details.)" msgstr "" -#: ../../library/sys.rst:935 +#: ../../library/sys.rst:939 msgid "" "Get the current coroutine origin tracking depth, as set by :func:" "`set_coroutine_origin_tracking_depth`." msgstr "" -#: ../../library/sys.rst:941 ../../library/sys.rst:1596 +#: ../../library/sys.rst:945 ../../library/sys.rst:1600 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:947 +#: ../../library/sys.rst:951 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:954 +#: ../../library/sys.rst:958 msgid ":const:`width`" msgstr ":const:`width`" -#: ../../library/sys.rst:954 +#: ../../library/sys.rst:958 msgid "width in bits used for hash values" msgstr "" -#: ../../library/sys.rst:956 +#: ../../library/sys.rst:960 msgid ":const:`modulus`" msgstr ":const:`modulus`" -#: ../../library/sys.rst:956 +#: ../../library/sys.rst:960 msgid "prime modulus P used for numeric hash scheme" msgstr "" -#: ../../library/sys.rst:958 +#: ../../library/sys.rst:962 msgid ":const:`inf`" msgstr ":const:`inf`" -#: ../../library/sys.rst:958 +#: ../../library/sys.rst:962 msgid "hash value returned for a positive infinity" msgstr "" -#: ../../library/sys.rst:960 +#: ../../library/sys.rst:964 msgid ":const:`nan`" msgstr ":const:`nan`" -#: ../../library/sys.rst:960 +#: ../../library/sys.rst:964 msgid "(this attribute is no longer used)" msgstr "" -#: ../../library/sys.rst:962 +#: ../../library/sys.rst:966 msgid ":const:`imag`" msgstr ":const:`imag`" -#: ../../library/sys.rst:962 +#: ../../library/sys.rst:966 msgid "multiplier used for the imaginary part of a complex number" msgstr "" -#: ../../library/sys.rst:965 +#: ../../library/sys.rst:969 msgid ":const:`algorithm`" msgstr ":const:`algorithm`" -#: ../../library/sys.rst:965 +#: ../../library/sys.rst:969 msgid "name of the algorithm for hashing of str, bytes, and memoryview" msgstr "" -#: ../../library/sys.rst:968 +#: ../../library/sys.rst:972 msgid ":const:`hash_bits`" msgstr ":const:`hash_bits`" -#: ../../library/sys.rst:968 +#: ../../library/sys.rst:972 msgid "internal output size of the hash algorithm" msgstr "" -#: ../../library/sys.rst:970 +#: ../../library/sys.rst:974 msgid ":const:`seed_bits`" msgstr ":const:`seed_bits`" -#: ../../library/sys.rst:970 +#: ../../library/sys.rst:974 msgid "size of the seed key of the hash algorithm" msgstr "" -#: ../../library/sys.rst:976 +#: ../../library/sys.rst:980 msgid "Added *algorithm*, *hash_bits* and *seed_bits*" msgstr "新增 *algorithm*\\ 、\\ *hash_bits* 與 *seed_bits*" -#: ../../library/sys.rst:982 +#: ../../library/sys.rst:986 msgid "" "The version number encoded as a single integer. This is guaranteed to " "increase with each version, including proper support for non-production " @@ -1450,7 +1467,7 @@ msgid "" "version 1.5.2, use::" msgstr "" -#: ../../library/sys.rst:993 +#: ../../library/sys.rst:997 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. " @@ -1458,25 +1475,25 @@ msgid "" "human-friendly encoding of the same information." msgstr "" -#: ../../library/sys.rst:998 +#: ../../library/sys.rst:1002 msgid "More details of ``hexversion`` can be found at :ref:`apiabiversion`." msgstr "" -#: ../../library/sys.rst:1003 +#: ../../library/sys.rst:1007 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:1007 +#: ../../library/sys.rst:1011 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:1011 +#: ../../library/sys.rst:1015 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 " @@ -1488,13 +1505,13 @@ msgid "" "the same value, since it is the reference implementation." msgstr "" -#: ../../library/sys.rst:1021 +#: ../../library/sys.rst:1025 msgid "" "*hexversion* is the implementation version in hexadecimal format, like :data:" "`sys.hexversion`." msgstr "" -#: ../../library/sys.rst:1024 +#: ../../library/sys.rst:1028 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 " @@ -1503,7 +1520,7 @@ msgid "" "set to ``None``, it indicates that module caching should be disabled." msgstr "" -#: ../../library/sys.rst:1031 +#: ../../library/sys.rst:1035 msgid "" ":data:`sys.implementation` may contain additional attributes specific to the " "Python implementation. These non-standard attributes must start with an " @@ -1513,61 +1530,61 @@ msgid "" "versions, however.) See :pep:`421` for more information." msgstr "" -#: ../../library/sys.rst:1042 +#: ../../library/sys.rst:1046 msgid "" "The addition of new required attributes must go through the normal PEP " "process. See :pep:`421` for more information." msgstr "" -#: ../../library/sys.rst:1047 +#: ../../library/sys.rst:1051 msgid "" "A :term:`named tuple` that holds information about Python's internal " "representation of integers. The attributes are read only." msgstr "" -#: ../../library/sys.rst:1055 +#: ../../library/sys.rst:1059 msgid ":const:`bits_per_digit`" msgstr ":const:`bits_per_digit`" -#: ../../library/sys.rst:1055 +#: ../../library/sys.rst:1059 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:1059 +#: ../../library/sys.rst:1063 msgid ":const:`sizeof_digit`" msgstr ":const:`sizeof_digit`" -#: ../../library/sys.rst:1059 +#: ../../library/sys.rst:1063 msgid "size in bytes of the C type used to represent a digit" msgstr "" -#: ../../library/sys.rst:1062 +#: ../../library/sys.rst:1066 msgid ":const:`default_max_str_digits`" msgstr ":const:`default_max_str_digits`" -#: ../../library/sys.rst:1062 +#: ../../library/sys.rst:1066 msgid "" "default value for :func:`sys.get_int_max_str_digits` when it is not " "otherwise explicitly configured." msgstr "" -#: ../../library/sys.rst:1066 +#: ../../library/sys.rst:1070 msgid ":const:`str_digits_check_threshold`" msgstr ":const:`str_digits_check_threshold`" -#: ../../library/sys.rst:1066 +#: ../../library/sys.rst:1070 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:1074 +#: ../../library/sys.rst:1078 msgid "Added ``default_max_str_digits`` and ``str_digits_check_threshold``." msgstr "新增 ``default_max_str_digits`` 和 ``str_digits_check_threshold``。" -#: ../../library/sys.rst:1080 +#: ../../library/sys.rst:1084 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:1086 +#: ../../library/sys.rst:1090 msgid "" "Raises an :ref:`auditing event ` ``cpython.run_interactivehook`` " "with argument ``hook``." @@ -1584,13 +1601,13 @@ msgstr "" "引發一個附帶引數 ``hook`` 的\\ :ref:`稽核事件 ` ``cpython." "run_interactivehook``。" -#: ../../library/sys.rst:1088 +#: ../../library/sys.rst:1092 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:1097 +#: ../../library/sys.rst:1101 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 " @@ -1602,19 +1619,19 @@ msgid "" "attributes have interned keys." msgstr "" -#: ../../library/sys.rst:1105 +#: ../../library/sys.rst:1109 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:1111 +#: ../../library/sys.rst:1115 msgid "" "Return :const:`True` if the Python interpreter is :term:`shutting down " "`, :const:`False` otherwise." msgstr "" -#: ../../library/sys.rst:1118 +#: ../../library/sys.rst:1122 msgid "" "This variable is not always defined; it is set to the exception instance " "when an exception is not handled and the interpreter prints an error message " @@ -1625,34 +1642,34 @@ msgid "" "more information.)" msgstr "" -#: ../../library/sys.rst:1132 +#: ../../library/sys.rst:1136 msgid "" "These three variables are deprecated; use :data:`sys.last_exc` instead. They " "hold the legacy representation of ``sys.last_exc``, as returned from :func:" "`exc_info` above." msgstr "" -#: ../../library/sys.rst:1138 +#: ../../library/sys.rst:1142 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:1145 +#: ../../library/sys.rst:1149 msgid "" "An integer giving the value of the largest Unicode code point, i.e. " "``1114111`` (``0x10FFFF`` in hexadecimal)." msgstr "" -#: ../../library/sys.rst:1148 +#: ../../library/sys.rst:1152 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:1156 +#: ../../library/sys.rst:1160 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 " @@ -1665,27 +1682,27 @@ msgid "" "if the module cannot be found." msgstr "" -#: ../../library/sys.rst:1169 +#: ../../library/sys.rst:1173 msgid ":class:`importlib.abc.MetaPathFinder`" msgstr ":class:`importlib.abc.MetaPathFinder`" -#: ../../library/sys.rst:1169 +#: ../../library/sys.rst:1173 msgid "" "The abstract base class defining the interface of finder objects on :data:" "`meta_path`." msgstr "" -#: ../../library/sys.rst:1173 +#: ../../library/sys.rst:1177 msgid ":class:`importlib.machinery.ModuleSpec`" msgstr ":class:`importlib.machinery.ModuleSpec`" -#: ../../library/sys.rst:1172 +#: ../../library/sys.rst:1176 msgid "" "The concrete class which :meth:`~importlib.abc.MetaPathFinder.find_spec` " "should return instances of." msgstr "" -#: ../../library/sys.rst:1178 +#: ../../library/sys.rst:1182 msgid "" ":term:`Module specs ` were introduced in Python 3.4, by :pep:" "`451`. Earlier versions of Python looked for a method called :meth:`!" @@ -1693,7 +1710,7 @@ msgid "" "entry doesn't have a :meth:`~importlib.abc.MetaPathFinder.find_spec` method." msgstr "" -#: ../../library/sys.rst:1186 +#: ../../library/sys.rst:1190 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 " @@ -1705,78 +1722,78 @@ msgid "" "other threads." msgstr "" -#: ../../library/sys.rst:1198 +#: ../../library/sys.rst:1202 msgid "" "The list of the original command line arguments passed to the Python " "executable." msgstr "" -#: ../../library/sys.rst:1201 +#: ../../library/sys.rst:1205 msgid "See also :data:`sys.argv`." msgstr "另請參閱 :data:`sys.argv`\\ 。" -#: ../../library/sys.rst:1210 +#: ../../library/sys.rst:1214 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:1214 +#: ../../library/sys.rst:1218 msgid "" "By default, as initialized upon program startup, a potentially unsafe path " "is prepended to :data:`sys.path` (*before* the entries inserted as a result " "of :envvar:`PYTHONPATH`):" msgstr "" -#: ../../library/sys.rst:1218 +#: ../../library/sys.rst:1222 msgid "" "``python -m module`` command line: prepend the current working directory." msgstr "" -#: ../../library/sys.rst:1220 +#: ../../library/sys.rst:1224 msgid "" "``python script.py`` command line: prepend the script's directory. If it's a " "symbolic link, resolve symbolic links." msgstr "" -#: ../../library/sys.rst:1222 +#: ../../library/sys.rst:1226 msgid "" "``python -c code`` and ``python`` (REPL) command lines: prepend an empty " "string, which means the current working directory." msgstr "" -#: ../../library/sys.rst:1225 +#: ../../library/sys.rst:1229 msgid "" "To not prepend this potentially unsafe path, use the :option:`-P` command " "line option or the :envvar:`PYTHONSAFEPATH` environment variable." msgstr "" -#: ../../library/sys.rst:1228 +#: ../../library/sys.rst:1232 msgid "" "A program is free to modify this list for its own purposes. Only strings " "should be added to :data:`sys.path`; all other data types are ignored during " "import." msgstr "" -#: ../../library/sys.rst:1234 +#: ../../library/sys.rst:1238 msgid "" "Module :mod:`site` This describes how to use .pth files to extend :data:`sys." "path`." msgstr "" -#: ../../library/sys.rst:1239 +#: ../../library/sys.rst:1243 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:1243 ../../library/sys.rst:1254 +#: ../../library/sys.rst:1247 ../../library/sys.rst:1258 msgid "Originally specified in :pep:`302`." msgstr "" -#: ../../library/sys.rst:1248 +#: ../../library/sys.rst:1252 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 " @@ -1784,13 +1801,13 @@ msgid "" "is found on :data:`sys.path_hooks` then ``None`` is stored." msgstr "" -#: ../../library/sys.rst:1259 +#: ../../library/sys.rst:1263 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:1262 +#: ../../library/sys.rst:1266 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 " @@ -1799,75 +1816,75 @@ msgid "" "version, it is therefore recommended to use the following idiom::" msgstr "" -#: ../../library/sys.rst:1275 +#: ../../library/sys.rst:1279 msgid "For other systems, the values are:" msgstr "" -#: ../../library/sys.rst:1278 +#: ../../library/sys.rst:1282 msgid "System" msgstr "" -#: ../../library/sys.rst:1278 +#: ../../library/sys.rst:1282 msgid "``platform`` value" msgstr "" -#: ../../library/sys.rst:1280 +#: ../../library/sys.rst:1284 msgid "AIX" msgstr "AIX" -#: ../../library/sys.rst:1280 +#: ../../library/sys.rst:1284 msgid "``'aix'``" msgstr "``'aix'``" -#: ../../library/sys.rst:1281 +#: ../../library/sys.rst:1285 msgid "Emscripten" msgstr "Emscripten" -#: ../../library/sys.rst:1281 +#: ../../library/sys.rst:1285 msgid "``'emscripten'``" msgstr "``'emscripten'``" -#: ../../library/sys.rst:1282 +#: ../../library/sys.rst:1286 msgid "Linux" msgstr "Linux" -#: ../../library/sys.rst:1282 +#: ../../library/sys.rst:1286 msgid "``'linux'``" msgstr "``'linux'``" -#: ../../library/sys.rst:1283 +#: ../../library/sys.rst:1287 msgid "WASI" msgstr "WASI" -#: ../../library/sys.rst:1283 +#: ../../library/sys.rst:1287 msgid "``'wasi'``" msgstr "``'wasi'``" -#: ../../library/sys.rst:1284 +#: ../../library/sys.rst:1288 msgid "Windows" msgstr "Windows" -#: ../../library/sys.rst:1284 +#: ../../library/sys.rst:1288 msgid "``'win32'``" msgstr "``'win32'``" -#: ../../library/sys.rst:1285 +#: ../../library/sys.rst:1289 msgid "Windows/Cygwin" msgstr "Windows/Cygwin" -#: ../../library/sys.rst:1285 +#: ../../library/sys.rst:1289 msgid "``'cygwin'``" msgstr "``'cygwin'``" -#: ../../library/sys.rst:1286 +#: ../../library/sys.rst:1290 msgid "macOS" msgstr "macOS" -#: ../../library/sys.rst:1286 +#: ../../library/sys.rst:1290 msgid "``'darwin'``" msgstr "``'darwin'``" -#: ../../library/sys.rst:1289 +#: ../../library/sys.rst:1293 msgid "" "On Linux, :data:`sys.platform` doesn't contain the major version anymore. It " "is always ``'linux'``, instead of ``'linux2'`` or ``'linux3'``. Since older " @@ -1875,7 +1892,7 @@ msgid "" "the ``startswith`` idiom presented above." msgstr "" -#: ../../library/sys.rst:1295 +#: ../../library/sys.rst:1299 msgid "" "On AIX, :data:`sys.platform` doesn't contain the major version anymore. It " "is always ``'aix'``, instead of ``'aix5'`` or ``'aix7'``. Since older " @@ -1883,57 +1900,57 @@ msgid "" "the ``startswith`` idiom presented above." msgstr "" -#: ../../library/sys.rst:1303 +#: ../../library/sys.rst:1307 msgid "" ":data:`os.name` has a coarser granularity. :func:`os.uname` gives system-" "dependent version information." msgstr "" -#: ../../library/sys.rst:1306 +#: ../../library/sys.rst:1310 msgid "" "The :mod:`platform` module provides detailed checks for the system's " "identity." msgstr "" -#: ../../library/sys.rst:1312 +#: ../../library/sys.rst:1316 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:1315 +#: ../../library/sys.rst:1319 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:1319 +#: ../../library/sys.rst:1323 msgid "" "``/usr/lib64/pythonX.Y/``: Standard library (like ``os.py`` of the :mod:`os` " "module)" msgstr "" -#: ../../library/sys.rst:1321 +#: ../../library/sys.rst:1325 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:1324 +#: ../../library/sys.rst:1328 msgid "" "``/usr/lib/pythonX.Y/site-packages/`` (always use ``lib``, not :data:`sys." "platlibdir`): Third-party modules" msgstr "" -#: ../../library/sys.rst:1326 +#: ../../library/sys.rst:1330 msgid "" "``/usr/lib64/pythonX.Y/site-packages/``: C extension modules of third-party " "packages" msgstr "" -#: ../../library/sys.rst:1334 +#: ../../library/sys.rst:1338 msgid "" "A string giving the site-specific directory prefix where the platform " "independent Python files are installed; on Unix, the default is :file:`/usr/" @@ -1942,14 +1959,14 @@ msgid "" "derived paths." msgstr "" -#: ../../library/sys.rst:1340 +#: ../../library/sys.rst:1344 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:1355 +#: ../../library/sys.rst:1359 msgid "" "Strings specifying the primary and secondary prompt of the interpreter. " "These are only defined if the interpreter is in interactive mode. Their " @@ -1959,7 +1976,7 @@ msgid "" "used to implement a dynamic prompt." msgstr "" -#: ../../library/sys.rst:1365 +#: ../../library/sys.rst:1369 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 " @@ -1970,14 +1987,14 @@ msgid "" "const:`os.RTLD_LAZY`)." msgstr "" -#: ../../library/sys.rst:1377 +#: ../../library/sys.rst:1381 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:1389 +#: ../../library/sys.rst:1393 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 " @@ -1992,7 +2009,7 @@ msgid "" "in the profile function will cause itself unset." msgstr "" -#: ../../library/sys.rst:1400 +#: ../../library/sys.rst:1404 msgid "" "Profile functions should have three arguments: *frame*, *event*, and *arg*. " "*frame* is the current stack frame. *event* is a string: ``'call'``, " @@ -2000,71 +2017,71 @@ msgid "" "depends on the event type." msgstr "" -#: ../../library/sys.rst:1405 +#: ../../library/sys.rst:1409 msgid "" "Raises an :ref:`auditing event ` ``sys.setprofile`` with no " "arguments." msgstr "引發一個不附帶引數的\\ :ref:`稽核事件 ` ``sys.setprofile``。" -#: ../../library/sys.rst:1407 ../../library/sys.rst:1488 +#: ../../library/sys.rst:1411 ../../library/sys.rst:1492 msgid "The events have the following meaning:" msgstr "" -#: ../../library/sys.rst:1411 ../../library/sys.rst:1493 +#: ../../library/sys.rst:1415 ../../library/sys.rst:1497 msgid "``'call'``" msgstr "``'call'``" -#: ../../library/sys.rst:1410 +#: ../../library/sys.rst:1414 msgid "" "A function is called (or some other code block entered). The profile " "function is called; *arg* is ``None``." msgstr "" -#: ../../library/sys.rst:1416 ../../library/sys.rst:1508 +#: ../../library/sys.rst:1420 ../../library/sys.rst:1512 msgid "``'return'``" msgstr "``'return'``" -#: ../../library/sys.rst:1414 +#: ../../library/sys.rst:1418 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:1420 +#: ../../library/sys.rst:1424 msgid "``'c_call'``" msgstr "``'c_call'``" -#: ../../library/sys.rst:1419 +#: ../../library/sys.rst:1423 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:1423 +#: ../../library/sys.rst:1427 msgid "``'c_return'``" msgstr "``'c_return'``" -#: ../../library/sys.rst:1423 +#: ../../library/sys.rst:1427 msgid "A C function has returned. *arg* is the C function object." msgstr "" -#: ../../library/sys.rst:1425 +#: ../../library/sys.rst:1429 msgid "``'c_exception'``" msgstr "``'c_exception'``" -#: ../../library/sys.rst:1426 +#: ../../library/sys.rst:1430 msgid "A C function has raised an exception. *arg* is the C function object." msgstr "" -#: ../../library/sys.rst:1430 +#: ../../library/sys.rst:1434 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:1434 +#: ../../library/sys.rst:1438 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 " @@ -2072,19 +2089,19 @@ msgid "" "because a too-high limit can lead to a crash." msgstr "" -#: ../../library/sys.rst:1439 +#: ../../library/sys.rst:1443 msgid "" "If the new limit is too low at the current recursion depth, a :exc:" "`RecursionError` exception is raised." msgstr "" -#: ../../library/sys.rst:1442 +#: ../../library/sys.rst:1446 msgid "" "A :exc:`RecursionError` exception is now raised if the new limit is too low " "at the current recursion depth." msgstr "" -#: ../../library/sys.rst:1449 +#: ../../library/sys.rst:1453 msgid "" "Set the interpreter's thread switch interval (in seconds). This floating-" "point value determines the ideal duration of the \"timeslices\" allocated to " @@ -2095,7 +2112,7 @@ msgid "" "scheduler." msgstr "" -#: ../../library/sys.rst:1466 +#: ../../library/sys.rst:1470 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 " @@ -2104,7 +2121,7 @@ msgid "" "`threading.settrace`." msgstr "" -#: ../../library/sys.rst:1471 +#: ../../library/sys.rst:1475 msgid "" "Trace functions should have three arguments: *frame*, *event*, and *arg*. " "*frame* is the current stack frame. *event* is a string: ``'call'``, " @@ -2112,7 +2129,7 @@ msgid "" "the event type." msgstr "" -#: ../../library/sys.rst:1476 +#: ../../library/sys.rst:1480 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 " @@ -2120,31 +2137,31 @@ msgid "" "traced." msgstr "" -#: ../../library/sys.rst:1481 +#: ../../library/sys.rst:1485 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:1485 +#: ../../library/sys.rst:1489 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:1491 +#: ../../library/sys.rst:1495 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:1502 +#: ../../library/sys.rst:1506 msgid "``'line'``" msgstr "``'line'``" -#: ../../library/sys.rst:1496 +#: ../../library/sys.rst:1500 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``; " @@ -2154,7 +2171,7 @@ msgid "" "const:`False` on that frame." msgstr "" -#: ../../library/sys.rst:1505 +#: ../../library/sys.rst:1509 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 " @@ -2162,22 +2179,22 @@ msgid "" "return value is ignored." msgstr "" -#: ../../library/sys.rst:1513 +#: ../../library/sys.rst:1517 msgid "``'exception'``" msgstr "``'exception'``" -#: ../../library/sys.rst:1511 +#: ../../library/sys.rst:1515 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:1521 +#: ../../library/sys.rst:1525 msgid "``'opcode'``" msgstr "``'opcode'``" -#: ../../library/sys.rst:1516 +#: ../../library/sys.rst:1520 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 " @@ -2186,13 +2203,13 @@ msgid "" "`f_trace_opcodes` to :const:`True` on the frame." msgstr "" -#: ../../library/sys.rst:1523 +#: ../../library/sys.rst:1527 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:1526 +#: ../../library/sys.rst:1530 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 " @@ -2206,17 +2223,17 @@ msgid "" "on each frame)." msgstr "" -#: ../../library/sys.rst:1537 +#: ../../library/sys.rst:1541 msgid "For more information on code and frame objects, refer to :ref:`types`." msgstr "" -#: ../../library/sys.rst:1539 +#: ../../library/sys.rst:1543 msgid "" "Raises an :ref:`auditing event ` ``sys.settrace`` with no " "arguments." msgstr "" -#: ../../library/sys.rst:1543 +#: ../../library/sys.rst:1547 msgid "" "The :func:`settrace` function is intended only for implementing debuggers, " "profilers, coverage tools and the like. Its behavior is part of the " @@ -2224,13 +2241,13 @@ msgid "" "thus may not be available in all Python implementations." msgstr "" -#: ../../library/sys.rst:1550 +#: ../../library/sys.rst:1554 msgid "" "``'opcode'`` event type added; :attr:`f_trace_lines` and :attr:" "`f_trace_opcodes` attributes added to frames" msgstr "" -#: ../../library/sys.rst:1555 +#: ../../library/sys.rst:1559 msgid "" "Accepts two optional keyword arguments which are callables that accept an :" "term:`asynchronous generator iterator` as an argument. The *firstiter* " @@ -2239,7 +2256,7 @@ msgid "" "about to be garbage collected." msgstr "" -#: ../../library/sys.rst:1561 +#: ../../library/sys.rst:1565 msgid "" "Raises an :ref:`auditing event ` ``sys." "set_asyncgen_hooks_firstiter`` with no arguments." @@ -2247,7 +2264,7 @@ msgstr "" "引發一個不附帶引數的\\ :ref:`稽核事件 ` ``sys." "set_asyncgen_hooks_firstiter``。" -#: ../../library/sys.rst:1563 +#: ../../library/sys.rst:1567 msgid "" "Raises an :ref:`auditing event ` ``sys." "set_asyncgen_hooks_finalizer`` with no arguments." @@ -2255,20 +2272,20 @@ msgstr "" "引發一個不附帶引數的\\ :ref:`稽核事件 ` ``sys." "set_asyncgen_hooks_finalizer``。" -#: ../../library/sys.rst:1565 +#: ../../library/sys.rst:1569 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:1568 +#: ../../library/sys.rst:1572 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:1580 +#: ../../library/sys.rst:1584 msgid "" "Allows enabling or disabling coroutine origin tracking. When enabled, the " "``cr_origin`` attribute on coroutine objects will contain a tuple of " @@ -2277,105 +2294,105 @@ msgid "" "disabled, ``cr_origin`` will be None." msgstr "" -#: ../../library/sys.rst:1587 +#: ../../library/sys.rst:1591 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:1591 +#: ../../library/sys.rst:1595 msgid "This setting is thread-specific." msgstr "" -#: ../../library/sys.rst:1601 +#: ../../library/sys.rst:1605 msgid "" "Activate the stack profiler trampoline *backend*. The only supported backend " "is ``\"perf\"``." msgstr "" -#: ../../library/sys.rst:1604 ../../library/sys.rst:1619 -#: ../../library/sys.rst:1627 +#: ../../library/sys.rst:1608 ../../library/sys.rst:1623 +#: ../../library/sys.rst:1631 msgid ":ref:`Availability `: Linux." msgstr ":ref:`適用 `:Linux。" -#: ../../library/sys.rst:1610 +#: ../../library/sys.rst:1614 msgid ":ref:`perf_profiling`" msgstr "" -#: ../../library/sys.rst:1611 +#: ../../library/sys.rst:1615 msgid "https://perf.wiki.kernel.org" msgstr "" -#: ../../library/sys.rst:1615 +#: ../../library/sys.rst:1619 msgid "Deactivate the current stack profiler trampoline backend." msgstr "" -#: ../../library/sys.rst:1617 +#: ../../library/sys.rst:1621 msgid "If no stack profiler is activated, this function has no effect." msgstr "" -#: ../../library/sys.rst:1625 +#: ../../library/sys.rst:1629 msgid "Return ``True`` if a stack profiler trampoline is active." msgstr "" -#: ../../library/sys.rst:1633 +#: ../../library/sys.rst:1637 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:1637 +#: ../../library/sys.rst:1641 msgid "" "This is equivalent to defining the :envvar:`PYTHONLEGACYWINDOWSFSENCODING` " "environment variable before launching Python." msgstr "" -#: ../../library/sys.rst:1640 +#: ../../library/sys.rst:1644 msgid "" "See also :func:`sys.getfilesystemencoding` and :func:`sys." "getfilesystemencodeerrors`." msgstr "" -#: ../../library/sys.rst:1645 +#: ../../library/sys.rst:1649 msgid "See :pep:`529` for more details." msgstr "更多細節請見 :pep:`529`\\ 。" -#: ../../library/sys.rst:1652 +#: ../../library/sys.rst:1656 msgid "" ":term:`File objects ` used by the interpreter for standard " "input, output and errors:" msgstr "" -#: ../../library/sys.rst:1655 +#: ../../library/sys.rst:1659 msgid "" "``stdin`` is used for all interactive input (including calls to :func:" "`input`);" msgstr "" -#: ../../library/sys.rst:1657 +#: ../../library/sys.rst:1661 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:1659 +#: ../../library/sys.rst:1663 msgid "The interpreter's own prompts and its error messages go to ``stderr``." msgstr "" -#: ../../library/sys.rst:1661 +#: ../../library/sys.rst:1665 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:1665 +#: ../../library/sys.rst:1669 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:1668 +#: ../../library/sys.rst:1672 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 " @@ -2386,14 +2403,14 @@ msgid "" "initially attached to a console." msgstr "" -#: ../../library/sys.rst:1677 +#: ../../library/sys.rst:1681 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:1682 +#: ../../library/sys.rst:1686 msgid "" "Under all platforms, you can override the character encoding by setting the :" "envvar:`PYTHONIOENCODING` environment variable before starting Python or by " @@ -2402,7 +2419,7 @@ msgid "" "only applies when :envvar:`PYTHONLEGACYWINDOWSSTDIO` is also set." msgstr "" -#: ../../library/sys.rst:1689 +#: ../../library/sys.rst:1693 msgid "" "When interactive, the ``stdout`` stream is line-buffered. Otherwise, it is " "block-buffered like regular text files. The ``stderr`` stream is line-" @@ -2411,19 +2428,19 @@ msgid "" "`PYTHONUNBUFFERED` environment variable." msgstr "" -#: ../../library/sys.rst:1695 +#: ../../library/sys.rst:1699 msgid "" "Non-interactive ``stderr`` is now line-buffered instead of fully buffered." msgstr "" -#: ../../library/sys.rst:1701 +#: ../../library/sys.rst:1705 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:1705 +#: ../../library/sys.rst:1709 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 " @@ -2431,7 +2448,7 @@ msgid "" "support the :attr:`~io.BufferedIOBase.buffer` attribute." msgstr "" -#: ../../library/sys.rst:1715 +#: ../../library/sys.rst:1719 msgid "" "These objects contain the original values of ``stdin``, ``stderr`` and " "``stdout`` at the start of the program. They are used during finalization, " @@ -2439,7 +2456,7 @@ msgid "" "``sys.std*`` object has been redirected." msgstr "" -#: ../../library/sys.rst:1720 +#: ../../library/sys.rst:1724 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, " @@ -2447,7 +2464,7 @@ msgid "" "before replacing it, and restore the saved object." msgstr "" -#: ../../library/sys.rst:1726 +#: ../../library/sys.rst:1730 msgid "" "Under some conditions ``stdin``, ``stdout`` and ``stderr`` as well as the " "original values ``__stdin__``, ``__stdout__`` and ``__stderr__`` can be " @@ -2455,12 +2472,12 @@ msgid "" "to a console and Python apps started with :program:`pythonw`." msgstr "" -#: ../../library/sys.rst:1734 +#: ../../library/sys.rst:1738 msgid "" "A frozenset of strings containing the names of standard library modules." msgstr "" -#: ../../library/sys.rst:1736 +#: ../../library/sys.rst:1740 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 " @@ -2468,7 +2485,7 @@ msgid "" "modules are excluded." msgstr "" -#: ../../library/sys.rst:1741 +#: ../../library/sys.rst:1745 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 " @@ -2476,73 +2493,73 @@ msgid "" "listed." msgstr "" -#: ../../library/sys.rst:1746 +#: ../../library/sys.rst:1750 #, fuzzy msgid "See also the :data:`sys.builtin_module_names` list." msgstr "另請參閱 :attr:`sys.builtin_module_names` 清單。" -#: ../../library/sys.rst:1753 +#: ../../library/sys.rst:1757 msgid "" "A :term:`named tuple` holding information about the thread implementation." msgstr "" -#: ../../library/sys.rst:1761 +#: ../../library/sys.rst:1765 msgid ":const:`name`" msgstr ":const:`name`" -#: ../../library/sys.rst:1761 +#: ../../library/sys.rst:1765 msgid "Name of the thread implementation:" msgstr "" -#: ../../library/sys.rst:1763 +#: ../../library/sys.rst:1767 msgid "``'nt'``: Windows threads" msgstr "``'nt'``: Windows 執行緒" -#: ../../library/sys.rst:1764 +#: ../../library/sys.rst:1768 msgid "``'pthread'``: POSIX threads" msgstr "``'pthread'``: POSIX 執行緒" -#: ../../library/sys.rst:1765 +#: ../../library/sys.rst:1769 msgid "" "``'pthread-stubs'``: stub POSIX threads (on WebAssembly platforms without " "threading support)" msgstr "" -#: ../../library/sys.rst:1767 +#: ../../library/sys.rst:1771 msgid "``'solaris'``: Solaris threads" msgstr "" -#: ../../library/sys.rst:1769 +#: ../../library/sys.rst:1773 msgid ":const:`lock`" msgstr ":const:`lock`" -#: ../../library/sys.rst:1769 +#: ../../library/sys.rst:1773 msgid "Name of the lock implementation:" msgstr "" -#: ../../library/sys.rst:1771 +#: ../../library/sys.rst:1775 msgid "``'semaphore'``: a lock uses a semaphore" msgstr "" -#: ../../library/sys.rst:1772 +#: ../../library/sys.rst:1776 msgid "``'mutex+cond'``: a lock uses a mutex and a condition variable" msgstr "" -#: ../../library/sys.rst:1774 +#: ../../library/sys.rst:1778 msgid "``None`` if this information is unknown" msgstr "為 ``None`` 表示此資訊未知" -#: ../../library/sys.rst:1776 +#: ../../library/sys.rst:1780 msgid ":const:`version`" msgstr ":const:`version`" -#: ../../library/sys.rst:1776 +#: ../../library/sys.rst:1780 msgid "" "Name and version of the thread library. It is a string, or ``None`` if this " "information is unknown." msgstr "" -#: ../../library/sys.rst:1785 +#: ../../library/sys.rst:1789 msgid "" "When this variable is set to an integer value, it determines the maximum " "number of levels of traceback information printed when an unhandled " @@ -2551,72 +2568,72 @@ msgid "" "are printed." msgstr "" -#: ../../library/sys.rst:1793 +#: ../../library/sys.rst:1797 msgid "Handle an unraisable exception." msgstr "處理一個不可被引發的例外。" -#: ../../library/sys.rst:1795 +#: ../../library/sys.rst:1799 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:1799 +#: ../../library/sys.rst:1803 msgid "The *unraisable* argument has the following attributes:" msgstr "" -#: ../../library/sys.rst:1801 +#: ../../library/sys.rst:1805 msgid "*exc_type*: Exception type." msgstr "*exc_type*: 例外型別。" -#: ../../library/sys.rst:1802 +#: ../../library/sys.rst:1806 msgid "*exc_value*: Exception value, can be ``None``." msgstr "*exc_value*: 例外值,可以為 ``None``。" -#: ../../library/sys.rst:1803 +#: ../../library/sys.rst:1807 msgid "*exc_traceback*: Exception traceback, can be ``None``." msgstr "*exc_traceback*: 例外追蹤,可以為 ``None``。" -#: ../../library/sys.rst:1804 +#: ../../library/sys.rst:1808 msgid "*err_msg*: Error message, can be ``None``." msgstr "*err_msg*: 錯誤訊息,可以為 ``None``。" -#: ../../library/sys.rst:1805 +#: ../../library/sys.rst:1809 msgid "*object*: Object causing the exception, can be ``None``." msgstr "*object*: 導致例外的物件,可以為 ``None``。" -#: ../../library/sys.rst:1807 +#: ../../library/sys.rst:1811 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:1811 +#: ../../library/sys.rst:1815 msgid "" ":func:`sys.unraisablehook` can be overridden to control how unraisable " "exceptions are handled." msgstr "" -#: ../../library/sys.rst:1814 +#: ../../library/sys.rst:1818 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:1818 +#: ../../library/sys.rst:1822 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:1822 +#: ../../library/sys.rst:1826 msgid "See also :func:`excepthook` which handles uncaught exceptions." msgstr "關於處理未捕捉得例外,另請參閱 :func:`excepthook`。" -#: ../../library/sys.rst:1824 +#: ../../library/sys.rst:1828 #, fuzzy msgid "" "Raises an :ref:`auditing event ` ``sys.unraisablehook`` with " @@ -2625,7 +2642,7 @@ msgstr "" "引發一個附帶引數 ``hook``、``unraisable`` 的\\ :ref:`稽核事件 ` " "``sys.unraisablehook``。" -#: ../../library/sys.rst:1826 +#: ../../library/sys.rst:1830 msgid "" "Raise an auditing event ``sys.unraisablehook`` with arguments ``hook``, " "``unraisable`` when an exception that cannot be handled occurs. The " @@ -2633,7 +2650,7 @@ msgid "" "hook has been set, ``hook`` may be ``None``." msgstr "" -#: ../../library/sys.rst:1835 +#: ../../library/sys.rst:1839 msgid "" "A string containing the version number of the Python interpreter plus " "additional information on the build number and compiler used. This string " @@ -2642,13 +2659,13 @@ msgid "" "functions provided by the :mod:`platform` module." msgstr "" -#: ../../library/sys.rst:1844 +#: ../../library/sys.rst:1848 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:1850 +#: ../../library/sys.rst:1854 msgid "" "A tuple containing the five components of the version number: *major*, " "*minor*, *micro*, *releaselevel*, and *serial*. All values except " @@ -2659,18 +2676,18 @@ msgid "" "version_info.major`` and so on." msgstr "" -#: ../../library/sys.rst:1858 +#: ../../library/sys.rst:1862 msgid "Added named component attributes." msgstr "新增了附名的元件屬性。" -#: ../../library/sys.rst:1863 +#: ../../library/sys.rst:1867 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:1870 +#: ../../library/sys.rst:1874 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 " @@ -2679,25 +2696,25 @@ msgid "" "has no effect on the registry keys used by Python." msgstr "" -#: ../../library/sys.rst:1881 +#: ../../library/sys.rst:1885 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:1897 +#: ../../library/sys.rst:1901 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:1905 +#: ../../library/sys.rst:1909 msgid "Citations" msgstr "引用" -#: ../../library/sys.rst:1906 +#: ../../library/sys.rst:1910 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/" @@ -2718,50 +2735,50 @@ msgstr "object(物件)" msgid "traceback" msgstr "traceback" -#: ../../library/sys.rst:840 ../../library/sys.rst:1385 +#: ../../library/sys.rst:844 ../../library/sys.rst:1389 msgid "profile function" msgstr "" -#: ../../library/sys.rst:840 ../../library/sys.rst:1385 +#: ../../library/sys.rst:844 ../../library/sys.rst:1389 msgid "profiler" msgstr "" -#: ../../library/sys.rst:849 ../../library/sys.rst:1462 +#: ../../library/sys.rst:853 ../../library/sys.rst:1466 msgid "trace function" msgstr "" -#: ../../library/sys.rst:849 ../../library/sys.rst:1462 +#: ../../library/sys.rst:853 ../../library/sys.rst:1466 msgid "debugger" msgstr "debugger(除錯器)" -#: ../../library/sys.rst:1208 +#: ../../library/sys.rst:1212 msgid "module" msgstr "module(模組)" -#: ../../library/sys.rst:1208 +#: ../../library/sys.rst:1212 msgid "search" msgstr "search(搜尋)" -#: ../../library/sys.rst:1208 +#: ../../library/sys.rst:1212 msgid "path" msgstr "path(路徑)" -#: ../../library/sys.rst:1349 +#: ../../library/sys.rst:1353 msgid "interpreter prompts" msgstr "interpreter prompts(直譯器提示)" -#: ../../library/sys.rst:1349 +#: ../../library/sys.rst:1353 msgid "prompts, interpreter" msgstr "prompts, interpreter(提示、直譯器)" -#: ../../library/sys.rst:1349 +#: ../../library/sys.rst:1353 msgid ">>>" msgstr ">>>" -#: ../../library/sys.rst:1349 +#: ../../library/sys.rst:1353 msgid "interpreter prompt" msgstr "interpreter prompt(直譯器提示)" -#: ../../library/sys.rst:1349 +#: ../../library/sys.rst:1353 msgid "..." msgstr "..." diff --git a/whatsnew/3.5.po b/whatsnew/3.5.po index fb407f0473..c9b941d61e 100644 --- a/whatsnew/3.5.po +++ b/whatsnew/3.5.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-22 00:04+0000\n" +"POT-Creation-Date: 2023-07-23 00:04+0000\n" "PO-Revision-Date: 2018-05-23 16:20+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -1261,10 +1261,9 @@ msgstr "curses" #: ../../whatsnew/3.5.rst:1048 msgid "" -"The new :func:`~curses.update_lines_cols` function updates the :envvar:" -"`LINES` and :envvar:`COLS` environment variables. This is useful for " -"detecting manual screen resizing. (Contributed by Arnon Yaari in :issue:" -"`4254`.)" +"The new :func:`~curses.update_lines_cols` function updates the :data:`LINES` " +"and :data:`COLS` module variables. This is useful for detecting manual " +"screen resizing. (Contributed by Arnon Yaari in :issue:`4254`.)" msgstr "" #: ../../whatsnew/3.5.rst:1054 From 66487c2b68dc4e63c756d5cd811f9a7ad1a61625 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 24 Jul 2023 00:06:19 +0000 Subject: [PATCH 09/10] sync with cpython 84c5676e --- c-api/arg.po | 4 +- c-api/buffer.po | 8 +- c-api/exceptions.po | 4 +- c-api/iterator.po | 10 +- c-api/mapping.po | 17 +- c-api/memory.po | 12 +- c-api/method.po | 7 +- c-api/module.po | 4 +- c-api/refcounting.po | 19 +- c-api/sequence.po | 8 +- c-api/sys.po | 8 +- c-api/type.po | 6 +- c-api/typeobj.po | 7 +- c-api/unicode.po | 24 +- c-api/veryhigh.po | 4 +- extending/extending.po | 17 +- howto/argparse.po | 59 +- howto/functional.po | 6 +- howto/instrumentation.po | 12 +- howto/isolating-extensions.po | 14 +- howto/regex.po | 308 +++--- howto/sorting.po | 8 +- howto/unicode.po | 16 +- library/_thread.po | 18 +- library/array.po | 7 +- library/codeop.po | 18 +- library/constants.po | 19 +- library/ctypes.po | 26 +- library/gettext.po | 88 +- library/mailbox.po | 8 +- library/os.po | 10 +- library/re.po | 6 +- library/select.po | 53 +- library/signal.po | 9 +- library/struct.po | 8 +- library/turtle.po | 1083 ++++++++++--------- library/venv.po | 14 +- reference/lexical_analysis.po | 305 +++--- tutorial/controlflow.po | 340 +++--- tutorial/introduction.po | 8 +- tutorial/modules.po | 36 +- whatsnew/2.6.po | 13 +- whatsnew/2.7.po | 4 +- whatsnew/3.10.po | 9 +- whatsnew/3.11.po | 17 +- whatsnew/3.12.po | 1844 +++++++++++++++++---------------- whatsnew/3.3.po | 8 +- whatsnew/3.5.po | 6 +- whatsnew/3.9.po | 12 +- 49 files changed, 2431 insertions(+), 2120 deletions(-) diff --git a/c-api/arg.po b/c-api/arg.po index f9d136f14a..0e89cafb71 100644 --- a/c-api/arg.po +++ b/c-api/arg.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-22 00:04+0000\n" +"POT-Creation-Date: 2023-07-24 00:03+0000\n" "PO-Revision-Date: 2022-10-16 03:21+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -943,7 +943,7 @@ msgstr "``u`` (:class:`str`) [const wchar_t \\*]" #: ../../c-api/arg.rst:550 msgid "" -"Convert a null-terminated :c:expr:`wchar_t` buffer of Unicode (UTF-16 or " +"Convert a null-terminated :c:type:`wchar_t` buffer of Unicode (UTF-16 or " "UCS-4) data to a Python Unicode object. If the Unicode buffer pointer is " "``NULL``, ``None`` is returned." msgstr "" diff --git a/c-api/buffer.po b/c-api/buffer.po index dffde5dac5..01df994fde 100644 --- a/c-api/buffer.po +++ b/c-api/buffer.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-05-09 00:15+0000\n" +"POT-Creation-Date: 2023-07-24 00:03+0000\n" "PO-Revision-Date: 2018-05-23 14:30+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -321,7 +321,7 @@ msgstr "" #: ../../c-api/buffer.rst:228 msgid "" -"All :c:data:`Py_buffer` fields are unambiguously defined by the request type." +"All :c:type:`Py_buffer` fields are unambiguously defined by the request type." msgstr "" #: ../../c-api/buffer.rst:232 @@ -606,8 +606,8 @@ msgstr "" #: ../../c-api/buffer.rst:467 msgid "" -"Return the implied :c:data:`~Py_buffer.itemsize` from :c:data:`~Py_buffer." -"format`. On error, raise an exception and return -1." +"Return the implied :c:member:`~Py_buffer.itemsize` from :c:member:" +"`~Py_buffer.format`. On error, raise an exception and return -1." msgstr "" #: ../../c-api/buffer.rst:475 diff --git a/c-api/exceptions.po b/c-api/exceptions.po index 97d8081dd1..443fd46d9f 100644 --- a/c-api/exceptions.po +++ b/c-api/exceptions.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-22 00:04+0000\n" +"POT-Creation-Date: 2023-07-24 00:03+0000\n" "PO-Revision-Date: 2018-05-23 14:05+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -202,7 +202,7 @@ msgid "" "function has returned an error and set the C variable :c:data:`errno`. It " "constructs a tuple object whose first item is the integer :c:data:`errno` " "value and whose second item is the corresponding error message (gotten from :" -"c:func:`strerror`), and then calls ``PyErr_SetObject(type, object)``. On " +"c:func:`!strerror`), and then calls ``PyErr_SetObject(type, object)``. On " "Unix, when the :c:data:`errno` value is :c:macro:`EINTR`, indicating an " "interrupted system call, this calls :c:func:`PyErr_CheckSignals`, and if " "that set the error indicator, leaves it set to that. The function always " diff --git a/c-api/iterator.po b/c-api/iterator.po index 748615e442..805a6ed7bb 100644 --- a/c-api/iterator.po +++ b/c-api/iterator.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-09-13 00:11+0000\n" +"POT-Creation-Date: 2023-07-24 00:03+0000\n" "PO-Revision-Date: 2017-09-22 18:26+0000\n" "Last-Translator: Leon H.\n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -26,10 +26,10 @@ msgstr "疊代器(Iterator)物件" #: ../../c-api/iterator.rst:8 msgid "" "Python provides two general-purpose iterator objects. The first, a sequence " -"iterator, works with an arbitrary sequence supporting the :meth:" -"`__getitem__` method. The second works with a callable object and a " -"sentinel value, calling the callable for each item in the sequence, and " -"ending the iteration when the sentinel value is returned." +"iterator, works with an arbitrary sequence supporting the :meth:`~object." +"__getitem__` method. The second works with a callable object and a sentinel " +"value, calling the callable for each item in the sequence, and ending the " +"iteration when the sentinel value is returned." msgstr "" #: ../../c-api/iterator.rst:17 diff --git a/c-api/mapping.po b/c-api/mapping.po index eb5e539d3e..cdfeb15ebe 100644 --- a/c-api/mapping.po +++ b/c-api/mapping.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-05-09 00:15+0000\n" +"POT-Creation-Date: 2023-07-24 00:03+0000\n" "PO-Revision-Date: 2018-05-23 14:32+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -32,8 +32,8 @@ msgstr "" msgid "" "Return ``1`` if the object provides the mapping protocol or supports " "slicing, and ``0`` otherwise. Note that it returns ``1`` for Python classes " -"with a :meth:`__getitem__` method, since in general it is impossible to " -"determine what type of keys the class supports. This function always " +"with a :meth:`~object.__getitem__` method, since in general it is impossible " +"to determine what type of keys the class supports. This function always " "succeeds." msgstr "" @@ -80,16 +80,17 @@ msgstr "" #: ../../c-api/mapping.rst:63 msgid "" -"Note that exceptions which occur while calling the :meth:`__getitem__` " -"method will get suppressed. To get error reporting use :c:func:" +"Note that exceptions which occur while calling the :meth:`~object." +"__getitem__` method will get suppressed. To get error reporting use :c:func:" "`PyObject_GetItem()` instead." msgstr "" #: ../../c-api/mapping.rst:74 msgid "" -"Note that exceptions which occur while calling the :meth:`__getitem__` " -"method and creating a temporary string object will get suppressed. To get " -"error reporting use :c:func:`PyMapping_GetItemString()` instead." +"Note that exceptions which occur while calling the :meth:`~object." +"__getitem__` method and creating a temporary string object will get " +"suppressed. To get error reporting use :c:func:`PyMapping_GetItemString()` " +"instead." msgstr "" #: ../../c-api/mapping.rst:81 diff --git a/c-api/memory.po b/c-api/memory.po index e2b090650c..7688c51e7a 100644 --- a/c-api/memory.po +++ b/c-api/memory.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-22 00:04+0000\n" +"POT-Creation-Date: 2023-07-24 00:03+0000\n" "PO-Revision-Date: 2018-05-23 14:06+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -882,11 +882,11 @@ msgstr "" #: ../../c-api/memory.rst:583 msgid "" "A serial number, incremented by 1 on each call to a malloc-like or realloc-" -"like function. Big-endian ``size_t``. If \"bad memory\" is detected later, " -"the serial number gives an excellent way to set a breakpoint on the next " -"run, to capture the instant at which this block was passed out. The static " -"function bumpserialno() in obmalloc.c is the only place the serial number is " -"incremented, and exists so you can set such a breakpoint easily." +"like function. Big-endian :c:type:`size_t`. If \"bad memory\" is detected " +"later, the serial number gives an excellent way to set a breakpoint on the " +"next run, to capture the instant at which this block was passed out. The " +"static function bumpserialno() in obmalloc.c is the only place the serial " +"number is incremented, and exists so you can set such a breakpoint easily." msgstr "" #: ../../c-api/memory.rst:590 diff --git a/c-api/method.po b/c-api/method.po index 3a025153c9..76120a5eaf 100644 --- a/c-api/method.po +++ b/c-api/method.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-05-09 00:15+0000\n" +"POT-Creation-Date: 2023-07-24 00:03+0000\n" "PO-Revision-Date: 2022-01-24 22:22+0800\n" "Last-Translator: Matt Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -25,9 +25,10 @@ msgid "Instance Method Objects" msgstr "實例方法物件 (Instance Method Objects)" #: ../../c-api/method.rst:10 +#, fuzzy msgid "" -"An instance method is a wrapper for a :c:data:`PyCFunction` and the new way " -"to bind a :c:data:`PyCFunction` to a class object. It replaces the former " +"An instance method is a wrapper for a :c:type:`PyCFunction` and the new way " +"to bind a :c:type:`PyCFunction` to a class object. It replaces the former " "call ``PyMethod_New(func, NULL, class)``." msgstr "" "實例方法是 :c:data:`PyCFunction` 的包裝器 (wrapper),也是將 :c:data:" diff --git a/c-api/module.po b/c-api/module.po index b2b11efceb..751c9c7f8c 100644 --- a/c-api/module.po +++ b/c-api/module.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-22 00:04+0000\n" +"POT-Creation-Date: 2023-07-24 00:03+0000\n" "PO-Revision-Date: 2018-05-23 14:32+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -148,7 +148,7 @@ msgid "" msgstr "" #: ../../c-api/module.rst:148 -msgid "Always initialize this member to :c:data:`PyModuleDef_HEAD_INIT`." +msgid "Always initialize this member to :c:macro:`PyModuleDef_HEAD_INIT`." msgstr "" #: ../../c-api/module.rst:152 diff --git a/c-api/refcounting.po b/c-api/refcounting.po index 3135285199..7c866dae1b 100644 --- a/c-api/refcounting.po +++ b/c-api/refcounting.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-17 17:39+0800\n" +"POT-Creation-Date: 2023-07-24 00:03+0000\n" "PO-Revision-Date: 2023-07-01 14:19+0800\n" "Last-Translator: Matt Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -162,16 +162,17 @@ msgstr "" "`Py_XDECREF`。" #: ../../c-api/refcounting.rst:103 +#, fuzzy msgid "" "The deallocation function can cause arbitrary Python code to be invoked (e." -"g. when a class instance with a :meth:`__del__` method is deallocated). " -"While exceptions in such code are not propagated, the executed code has free " -"access to all Python global variables. This means that any object that is " -"reachable from a global variable should be in a consistent state before :c:" -"func:`Py_DECREF` is invoked. For example, code to delete an object from a " -"list should copy a reference to the deleted object in a temporary variable, " -"update the list data structure, and then call :c:func:`Py_DECREF` for the " -"temporary variable." +"g. when a class instance with a :meth:`~object.__del__` method is " +"deallocated). While exceptions in such code are not propagated, the " +"executed code has free access to all Python global variables. This means " +"that any object that is reachable from a global variable should be in a " +"consistent state before :c:func:`Py_DECREF` is invoked. For example, code " +"to delete an object from a list should copy a reference to the deleted " +"object in a temporary variable, update the list data structure, and then " +"call :c:func:`Py_DECREF` for the temporary variable." msgstr "" "釋放函式可以導致任意 Python 程式碼被調用(例如,當釋放具有 :meth:`__del__` 方" "法的類別實例時)。雖然此類程式碼中的例外不會被傳遞出來,但​​執行的程式碼可以自" diff --git a/c-api/sequence.po b/c-api/sequence.po index a2e2117a3a..5ef95263f1 100644 --- a/c-api/sequence.po +++ b/c-api/sequence.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-05-09 00:15+0000\n" +"POT-Creation-Date: 2023-07-24 00:03+0000\n" "PO-Revision-Date: 2018-05-23 14:32+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -26,9 +26,9 @@ msgstr "" msgid "" "Return ``1`` if the object provides the sequence protocol, and ``0`` " "otherwise. Note that it returns ``1`` for Python classes with a :meth:" -"`__getitem__` method, unless they are :class:`dict` subclasses, since in " -"general it is impossible to determine what type of keys the class supports. " -"This function always succeeds." +"`~object.__getitem__` method, unless they are :class:`dict` subclasses, " +"since in general it is impossible to determine what type of keys the class " +"supports. This function always succeeds." msgstr "" #: ../../c-api/sequence.rst:23 diff --git a/c-api/sys.po b/c-api/sys.po index edb881a192..32c959133e 100644 --- a/c-api/sys.po +++ b/c-api/sys.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-22 00:04+0000\n" +"POT-Creation-Date: 2023-07-24 00:03+0000\n" "PO-Revision-Date: 2018-05-23 14:07+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -127,7 +127,7 @@ msgstr "" #: ../../c-api/sys.rst:108 msgid "" "Return the current signal handler for signal *i*. This is a thin wrapper " -"around either :c:func:`sigaction` or :c:func:`signal`. Do not call those " +"around either :c:func:`!sigaction` or :c:func:`!signal`. Do not call those " "functions directly! :c:type:`PyOS_sighandler_t` is a typedef alias for :c:" "expr:`void (\\*)(int)`." msgstr "" @@ -135,8 +135,8 @@ msgstr "" #: ../../c-api/sys.rst:116 msgid "" "Set the signal handler for signal *i* to be *h*; return the old signal " -"handler. This is a thin wrapper around either :c:func:`sigaction` or :c:func:" -"`signal`. Do not call those functions directly! :c:type:" +"handler. This is a thin wrapper around either :c:func:`!sigaction` or :c:" +"func:`!signal`. Do not call those functions directly! :c:type:" "`PyOS_sighandler_t` is a typedef alias for :c:expr:`void (\\*)(int)`." msgstr "" diff --git a/c-api/type.po b/c-api/type.po index d599613b94..0c874d569d 100644 --- a/c-api/type.po +++ b/c-api/type.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-22 00:04+0000\n" +"POT-Creation-Date: 2023-07-24 00:03+0000\n" "PO-Revision-Date: 2015-12-09 17:51+0000\n" "Last-Translator: Liang-Bo Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -246,8 +246,8 @@ msgid "" "not return the intended result. ``Py_TYPE(self)`` may be a *subclass* of the " "intended class, and subclasses are not necessarily defined in the same " "module as their superclass. See :c:type:`PyCMethod` to get the class that " -"defines the method. See :c:func:`PyType_GetModuleByDef` for cases when " -"``PyCMethod`` cannot be used." +"defines the method. See :c:func:`PyType_GetModuleByDef` for cases when :c:" +"type:`!PyCMethod` cannot be used." msgstr "" #: ../../c-api/type.rst:225 diff --git a/c-api/typeobj.po b/c-api/typeobj.po index 5fe4583d1c..6144091a33 100644 --- a/c-api/typeobj.po +++ b/c-api/typeobj.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-22 00:04+0000\n" +"POT-Creation-Date: 2023-07-24 00:03+0000\n" "PO-Revision-Date: 2018-05-23 14:33+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -3137,8 +3137,9 @@ msgstr "" #: ../../c-api/typeobj.rst:2258 msgid "" -"The :c:data:`nb_reserved` field should always be ``NULL``. It was " -"previously called :c:data:`nb_long`, and was renamed in Python 3.0.1." +"The :c:member:`~PyNumberMethods.nb_reserved` field should always be " +"``NULL``. It was previously called :c:member:`!nb_long`, and was renamed in " +"Python 3.0.1." msgstr "" #: ../../c-api/typeobj.rst:2303 diff --git a/c-api/unicode.po b/c-api/unicode.po index 876e3c2879..cf79da2b43 100644 --- a/c-api/unicode.po +++ b/c-api/unicode.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-22 00:04+0000\n" +"POT-Creation-Date: 2023-07-24 00:03+0000\n" "PO-Revision-Date: 2018-05-23 14:08+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -68,7 +68,7 @@ msgstr "" #: ../../c-api/unicode.rst:47 msgid "" -"This is a typedef of :c:expr:`wchar_t`, which is a 16-bit type or 32-bit " +"This is a typedef of :c:type:`wchar_t`, which is a 16-bit type or 32-bit " "type depending on the platform." msgstr "" @@ -510,7 +510,7 @@ msgid "``j``" msgstr "" #: ../../c-api/unicode.rst:447 -msgid ":c:expr:`intmax_t` or :c:expr:`uintmax_t`" +msgid ":c:type:`intmax_t` or :c:type:`uintmax_t`" msgstr "" #: ../../c-api/unicode.rst:449 @@ -518,7 +518,7 @@ msgid "``z``" msgstr "" #: ../../c-api/unicode.rst:449 -msgid ":c:expr:`size_t` or :c:expr:`ssize_t`" +msgid ":c:type:`size_t` or :c:type:`ssize_t`" msgstr "" #: ../../c-api/unicode.rst:451 @@ -526,7 +526,7 @@ msgid "``t``" msgstr "" #: ../../c-api/unicode.rst:451 -msgid ":c:expr:`ptrdiff_t`" +msgid ":c:type:`ptrdiff_t`" msgstr "" #: ../../c-api/unicode.rst:454 @@ -703,7 +703,7 @@ msgstr "" #: ../../c-api/unicode.rst:529 msgid "" "The width formatter unit is number of characters rather than bytes. The " -"precision formatter unit is number of bytes or :c:expr:`wchar_t` items (if " +"precision formatter unit is number of bytes or :c:type:`wchar_t` items (if " "the length modifier ``l`` is used) for ``\"%s\"`` and ``\"%V\"`` (if the " "``PyObject*`` argument is ``NULL``), and a number of characters for " "``\"%A\"``, ``\"%U\"``, ``\"%S\"``, ``\"%R\"`` and ``\"%V\"`` (if the " @@ -1029,21 +1029,21 @@ msgid "wchar_t Support" msgstr "" #: ../../c-api/unicode.rst:849 -msgid ":c:expr:`wchar_t` support for platforms which support it:" +msgid ":c:type:`wchar_t` support for platforms which support it:" msgstr "" #: ../../c-api/unicode.rst:853 msgid "" -"Create a Unicode object from the :c:expr:`wchar_t` buffer *w* of the given " +"Create a Unicode object from the :c:type:`wchar_t` buffer *w* of the given " "*size*. Passing ``-1`` as the *size* indicates that the function must itself " "compute the length, using wcslen. Return ``NULL`` on failure." msgstr "" #: ../../c-api/unicode.rst:861 msgid "" -"Copy the Unicode object contents into the :c:expr:`wchar_t` buffer *w*. At " -"most *size* :c:expr:`wchar_t` characters are copied (excluding a possibly " -"trailing null termination character). Return the number of :c:expr:" +"Copy the Unicode object contents into the :c:type:`wchar_t` buffer *w*. At " +"most *size* :c:type:`wchar_t` characters are copied (excluding a possibly " +"trailing null termination character). Return the number of :c:type:" "`wchar_t` characters copied or ``-1`` in case of an error. Note that the " "resulting :c:expr:`wchar_t*` string may or may not be null-terminated. It " "is the responsibility of the caller to make sure that the :c:expr:`wchar_t*` " @@ -1057,7 +1057,7 @@ msgid "" "Convert the Unicode object to a wide character string. The output string " "always ends with a null character. If *size* is not ``NULL``, write the " "number of wide characters (excluding the trailing null termination " -"character) into *\\*size*. Note that the resulting :c:expr:`wchar_t` string " +"character) into *\\*size*. Note that the resulting :c:type:`wchar_t` string " "might contain null characters, which would cause the string to be truncated " "when used with most C functions. If *size* is ``NULL`` and the :c:expr:" "`wchar_t*` string contains null characters a :exc:`ValueError` is raised." diff --git a/c-api/veryhigh.po b/c-api/veryhigh.po index f78f02235e..a2b365a7f3 100644 --- a/c-api/veryhigh.po +++ b/c-api/veryhigh.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-22 00:04+0000\n" +"POT-Creation-Date: 2023-07-24 00:03+0000\n" "PO-Revision-Date: 2018-05-23 14:08+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -40,7 +40,7 @@ msgstr "" #: ../../c-api/veryhigh.rst:19 msgid "" "Note also that several of these functions take :c:expr:`FILE*` parameters. " -"One particular issue which needs to be handled carefully is that the :c:expr:" +"One particular issue which needs to be handled carefully is that the :c:type:" "`FILE` structure for different C libraries can be different and " "incompatible. Under Windows (at least), it is possible for dynamically " "linked extensions to actually use different libraries, so care should be " diff --git a/extending/extending.po b/extending/extending.po index 7d67bc61c1..cd754900a3 100644 --- a/extending/extending.po +++ b/extending/extending.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-22 00:04+0000\n" +"POT-Creation-Date: 2023-07-24 00:03+0000\n" "PO-Revision-Date: 2018-05-23 14:34+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -296,11 +296,11 @@ msgstr "" #: ../../extending/extending.rst:238 msgid "" -"Note also that the :c:data:`SpamError` variable retains a reference to the " +"Note also that the :c:data:`!SpamError` variable retains a reference to the " "newly created exception class; this is intentional! Since the exception " "could be removed from the module by external code, an owned reference to the " -"class is needed to ensure that it will not be discarded, causing :c:data:" -"`SpamError` to become a dangling pointer. Should it become a dangling " +"class is needed to ensure that it will not be discarded, causing :c:data:`!" +"SpamError` to become a dangling pointer. Should it become a dangling " "pointer, C code which raises the exception could cause a core dump or other " "unintended side effects." msgstr "" @@ -332,9 +332,9 @@ msgid "" "It returns ``NULL`` (the error indicator for functions returning object " "pointers) if an error is detected in the argument list, relying on the " "exception set by :c:func:`PyArg_ParseTuple`. Otherwise the string value of " -"the argument has been copied to the local variable :c:data:`command`. This " +"the argument has been copied to the local variable :c:data:`!command`. This " "is a pointer assignment and you are not supposed to modify the string to " -"which it points (so in Standard C, the variable :c:data:`command` should " +"which it points (so in Standard C, the variable :c:data:`!command` should " "properly be declared as ``const char *command``)." msgstr "" @@ -346,8 +346,9 @@ msgstr "" #: ../../extending/extending.rst:292 msgid "" -"Our :func:`spam.system` function must return the value of :c:data:`sts` as a " -"Python object. This is done using the function :c:func:`PyLong_FromLong`. ::" +"Our :func:`!spam.system` function must return the value of :c:data:`!sts` as " +"a Python object. This is done using the function :c:func:" +"`PyLong_FromLong`. ::" msgstr "" #: ../../extending/extending.rst:297 diff --git a/howto/argparse.po b/howto/argparse.po index d426fb254d..4cb051ef70 100644 --- a/howto/argparse.po +++ b/howto/argparse.po @@ -12,7 +12,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-17 17:39+0800\n" +"POT-Creation-Date: 2023-07-24 00:03+0000\n" "PO-Revision-Date: 2022-01-31 17:33+0800\n" "Last-Translator: Phil Lin \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -570,10 +570,65 @@ msgid "" msgstr "" #: ../../howto/argparse.rst:792 +msgid "How to translate the argparse output" +msgstr "" + +#: ../../howto/argparse.rst:794 +msgid "" +"The output of the :mod:`argparse` module such as its help text and error " +"messages are all made translatable using the :mod:`gettext` module. This " +"allows applications to easily localize messages produced by :mod:`argparse`. " +"See also :ref:`i18n-howto`." +msgstr "" + +#: ../../howto/argparse.rst:799 +msgid "For instance, in this :mod:`argparse` output:" +msgstr "" + +#: ../../howto/argparse.rst:817 +msgid "" +"The strings ``usage:``, ``positional arguments:``, ``options:`` and ``show " +"this help message and exit`` are all translatable." +msgstr "" + +#: ../../howto/argparse.rst:820 +msgid "" +"In order to translate these strings, they must first be extracted into a ``." +"po`` file. For example, using `Babel `__, run this " +"command:" +msgstr "" + +#: ../../howto/argparse.rst:828 +msgid "" +"This command will extract all translatable strings from the :mod:`argparse` " +"module and output them into a file named ``messages.po``. This command " +"assumes that your Python installation is in ``/usr/lib``." +msgstr "" + +#: ../../howto/argparse.rst:832 +msgid "" +"You can find out the location of the :mod:`argparse` module on your system " +"using this script::" +msgstr "" + +#: ../../howto/argparse.rst:838 +msgid "" +"Once the messages in the ``.po`` file are translated and the translations " +"are installed using :mod:`gettext`, :mod:`argparse` will be able to display " +"the translated messages." +msgstr "" + +#: ../../howto/argparse.rst:842 +msgid "" +"To translate your own strings in the :mod:`argparse` output, use :mod:" +"`gettext`." +msgstr "" + +#: ../../howto/argparse.rst:845 msgid "Conclusion" msgstr "結論" -#: ../../howto/argparse.rst:794 +#: ../../howto/argparse.rst:847 msgid "" "The :mod:`argparse` module offers a lot more than shown here. Its docs are " "quite detailed and thorough, and full of examples. Having gone through this " diff --git a/howto/functional.po b/howto/functional.po index bd60239f56..12ddb77d69 100644 --- a/howto/functional.po +++ b/howto/functional.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-17 17:39+0800\n" +"POT-Creation-Date: 2023-07-24 00:03+0000\n" "PO-Revision-Date: 2018-05-23 14:36+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -1110,8 +1110,8 @@ msgstr "" msgid "" "A related function is :func:`itertools.accumulate(iterable, func=operator." "add) `. It performs the same calculation, but instead " -"of returning only the final result, :func:`accumulate` returns an iterator " -"that also yields each partial result::" +"of returning only the final result, :func:`~itertools.accumulate` returns an " +"iterator that also yields each partial result::" msgstr "" #: ../../howto/functional.rst:1086 diff --git a/howto/instrumentation.po b/howto/instrumentation.po index df81604478..d5e62b6a96 100644 --- a/howto/instrumentation.po +++ b/howto/instrumentation.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-07-06 00:17+0000\n" +"POT-Creation-Date: 2023-07-24 00:03+0000\n" "PO-Revision-Date: 2018-07-15 18:56+0800\n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" "tw)\n" @@ -232,13 +232,13 @@ msgstr "" #: ../../howto/instrumentation.rst:295 msgid "" -"This marker is the converse of :c:func:`function__entry`, and indicates that " -"execution of a Python function has ended (either via ``return``, or via an " -"exception). It is only triggered for pure-Python (bytecode) functions." +"This marker is the converse of :c:func:`!function__entry`, and indicates " +"that execution of a Python function has ended (either via ``return``, or via " +"an exception). It is only triggered for pure-Python (bytecode) functions." msgstr "" #: ../../howto/instrumentation.rst:299 -msgid "The arguments are the same as for :c:func:`function__entry`" +msgid "The arguments are the same as for :c:func:`!function__entry`" msgstr "" #: ../../howto/instrumentation.rst:303 @@ -249,7 +249,7 @@ msgid "" msgstr "" #: ../../howto/instrumentation.rst:307 -msgid "The arguments are the same as for :c:func:`function__entry`." +msgid "The arguments are the same as for :c:func:`!function__entry`." msgstr "" #: ../../howto/instrumentation.rst:311 diff --git a/howto/isolating-extensions.po b/howto/isolating-extensions.po index b6db6023dd..7988568fb5 100644 --- a/howto/isolating-extensions.po +++ b/howto/isolating-extensions.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-22 00:04+0000\n" +"POT-Creation-Date: 2023-07-24 00:03+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -563,17 +563,17 @@ msgstr "" #: ../../howto/isolating-extensions.rst:486 msgid "" -"``PyType_GetModuleByDef`` works by searching the :term:`method resolution " -"order` (i.e. all superclasses) for the first superclass that has a " -"corresponding module." +":c:func:`!PyType_GetModuleByDef` works by searching the :term:`method " +"resolution order` (i.e. all superclasses) for the first superclass that has " +"a corresponding module." msgstr "" #: ../../howto/isolating-extensions.rst:492 msgid "" "In very exotic cases (inheritance chains spanning multiple modules created " -"from the same definition), ``PyType_GetModuleByDef`` might not return the " -"module of the true defining class. However, it will always return a module " -"with the same definition, ensuring a compatible C memory layout." +"from the same definition), :c:func:`!PyType_GetModuleByDef` might not return " +"the module of the true defining class. However, it will always return a " +"module with the same definition, ensuring a compatible C memory layout." msgstr "" #: ../../howto/isolating-extensions.rst:500 diff --git a/howto/regex.po b/howto/regex.po index 4d99613d39..e9df685f6d 100644 --- a/howto/regex.po +++ b/howto/regex.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-17 17:39+0800\n" +"POT-Creation-Date: 2023-07-24 00:03+0000\n" "PO-Revision-Date: 2018-05-23 14:37+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -634,12 +634,12 @@ msgid "" msgstr "" #: ../../howto/regex.rst:360 ../../howto/regex.rst:414 -#: ../../howto/regex.rst:1060 +#: ../../howto/regex.rst:1062 msgid "Method/Attribute" msgstr "" #: ../../howto/regex.rst:360 ../../howto/regex.rst:414 -#: ../../howto/regex.rst:1060 +#: ../../howto/regex.rst:1062 msgid "Purpose" msgstr "" @@ -832,7 +832,7 @@ msgstr "" msgid "Compilation Flags" msgstr "" -#: ../../howto/regex.rst:521 +#: ../../howto/regex.rst:523 msgid "" "Compilation flags let you modify some aspects of how regular expressions " "work. Flags are available in the :mod:`re` module under two names, a long " @@ -844,72 +844,72 @@ msgid "" "example." msgstr "" -#: ../../howto/regex.rst:529 +#: ../../howto/regex.rst:531 msgid "" "Here's a table of the available flags, followed by a more detailed " "explanation of each one." msgstr "" -#: ../../howto/regex.rst:533 +#: ../../howto/regex.rst:535 msgid "Flag" msgstr "" -#: ../../howto/regex.rst:533 +#: ../../howto/regex.rst:535 msgid "Meaning" msgstr "" -#: ../../howto/regex.rst:535 +#: ../../howto/regex.rst:537 msgid ":const:`ASCII`, :const:`A`" msgstr ":const:`ASCII`, :const:`A`" -#: ../../howto/regex.rst:535 +#: ../../howto/regex.rst:537 msgid "" "Makes several escapes like ``\\w``, ``\\b``, ``\\s`` and ``\\d`` match only " "on ASCII characters with the respective property." msgstr "" -#: ../../howto/regex.rst:539 +#: ../../howto/regex.rst:541 msgid ":const:`DOTALL`, :const:`S`" msgstr ":const:`DOTALL`, :const:`S`" -#: ../../howto/regex.rst:539 +#: ../../howto/regex.rst:541 msgid "Make ``.`` match any character, including newlines." msgstr "" -#: ../../howto/regex.rst:542 +#: ../../howto/regex.rst:544 msgid ":const:`IGNORECASE`, :const:`I`" msgstr ":const:`IGNORECASE`, :const:`I`" -#: ../../howto/regex.rst:542 +#: ../../howto/regex.rst:544 msgid "Do case-insensitive matches." msgstr "" -#: ../../howto/regex.rst:544 +#: ../../howto/regex.rst:546 msgid ":const:`LOCALE`, :const:`L`" msgstr ":const:`LOCALE`, :const:`L`" -#: ../../howto/regex.rst:544 +#: ../../howto/regex.rst:546 msgid "Do a locale-aware match." msgstr "" -#: ../../howto/regex.rst:546 +#: ../../howto/regex.rst:548 msgid ":const:`MULTILINE`, :const:`M`" msgstr ":const:`MULTILINE`, :const:`M`" -#: ../../howto/regex.rst:546 +#: ../../howto/regex.rst:548 msgid "Multi-line matching, affecting ``^`` and ``$``." msgstr "" -#: ../../howto/regex.rst:549 +#: ../../howto/regex.rst:551 msgid ":const:`VERBOSE`, :const:`X` (for 'extended')" msgstr "" -#: ../../howto/regex.rst:549 +#: ../../howto/regex.rst:551 msgid "" "Enable verbose REs, which can be organized more cleanly and understandably." msgstr "" -#: ../../howto/regex.rst:558 +#: ../../howto/regex.rst:560 msgid "" "Perform case-insensitive matching; character class and literal strings will " "match letters by ignoring case. For example, ``[A-Z]`` will match lowercase " @@ -925,13 +925,13 @@ msgid "" "also set the :const:`LOCALE` flag." msgstr "" -#: ../../howto/regex.rst:576 +#: ../../howto/regex.rst:578 msgid "" "Make ``\\w``, ``\\W``, ``\\b``, ``\\B`` and case-insensitive matching " "dependent on the current locale instead of the Unicode database." msgstr "" -#: ../../howto/regex.rst:579 +#: ../../howto/regex.rst:581 msgid "" "Locales are a feature of the C library intended to help in writing programs " "that take account of language differences. For example, if you're " @@ -950,13 +950,13 @@ msgid "" "patterns, and it is able to handle different locales/languages." msgstr "" -#: ../../howto/regex.rst:601 +#: ../../howto/regex.rst:603 msgid "" "(``^`` and ``$`` haven't been explained yet; they'll be introduced in " "section :ref:`more-metacharacters`.)" msgstr "" -#: ../../howto/regex.rst:604 +#: ../../howto/regex.rst:606 msgid "" "Usually ``^`` matches only at the beginning of the string, and ``$`` matches " "only at the end of the string and immediately before the newline (if any) at " @@ -967,20 +967,20 @@ msgid "" "(immediately preceding each newline)." msgstr "" -#: ../../howto/regex.rst:617 +#: ../../howto/regex.rst:619 msgid "" "Makes the ``'.'`` special character match any character at all, including a " "newline; without this flag, ``'.'`` will match anything *except* a newline." msgstr "" -#: ../../howto/regex.rst:625 +#: ../../howto/regex.rst:627 msgid "" "Make ``\\w``, ``\\W``, ``\\b``, ``\\B``, ``\\s`` and ``\\S`` perform ASCII-" "only matching instead of full Unicode matching. This is only meaningful for " "Unicode patterns, and is ignored for byte patterns." msgstr "" -#: ../../howto/regex.rst:634 +#: ../../howto/regex.rst:636 msgid "" "This flag allows you to write regular expressions that are more readable by " "granting you more flexibility in how you can format them. When this flag " @@ -992,45 +992,45 @@ msgid "" "preceded by an unescaped backslash." msgstr "" -#: ../../howto/regex.rst:643 +#: ../../howto/regex.rst:645 msgid "" "For example, here's a RE that uses :const:`re.VERBOSE`; see how much easier " "it is to read? ::" msgstr "" -#: ../../howto/regex.rst:656 +#: ../../howto/regex.rst:658 msgid "Without the verbose setting, the RE would look like this::" msgstr "" -#: ../../howto/regex.rst:662 +#: ../../howto/regex.rst:664 msgid "" "In the above example, Python's automatic concatenation of string literals " "has been used to break up the RE into smaller pieces, but it's still more " "difficult to understand than the version using :const:`re.VERBOSE`." msgstr "" -#: ../../howto/regex.rst:668 +#: ../../howto/regex.rst:670 msgid "More Pattern Power" msgstr "" -#: ../../howto/regex.rst:670 +#: ../../howto/regex.rst:672 msgid "" "So far we've only covered a part of the features of regular expressions. In " "this section, we'll cover some new metacharacters, and how to use groups to " "retrieve portions of the text that was matched." msgstr "" -#: ../../howto/regex.rst:678 +#: ../../howto/regex.rst:680 msgid "More Metacharacters" msgstr "" -#: ../../howto/regex.rst:680 +#: ../../howto/regex.rst:682 msgid "" "There are some metacharacters that we haven't covered yet. Most of them " "will be covered in this section." msgstr "" -#: ../../howto/regex.rst:683 +#: ../../howto/regex.rst:685 msgid "" "Some of the remaining metacharacters to be discussed are :dfn:`zero-width " "assertions`. They don't cause the engine to advance through the string; " @@ -1042,11 +1042,11 @@ msgid "" "of times." msgstr "" -#: ../../howto/regex.rst:699 +#: ../../howto/regex.rst:701 msgid "``|``" msgstr "``|``" -#: ../../howto/regex.rst:692 +#: ../../howto/regex.rst:694 msgid "" "Alternation, or the \"or\" operator. If *A* and *B* are regular " "expressions, ``A|B`` will match any string that matches either *A* or *B*. " @@ -1056,17 +1056,17 @@ msgid "" "``'ervo'``." msgstr "" -#: ../../howto/regex.rst:698 +#: ../../howto/regex.rst:700 msgid "" "To match a literal ``'|'``, use ``\\|``, or enclose it inside a character " "class, as in ``[|]``." msgstr "" -#: ../../howto/regex.rst:714 +#: ../../howto/regex.rst:716 msgid "``^``" msgstr "``^``" -#: ../../howto/regex.rst:702 +#: ../../howto/regex.rst:704 msgid "" "Matches at the beginning of lines. Unless the :const:`MULTILINE` flag has " "been set, this will only match at the beginning of the string. In :const:" @@ -1074,37 +1074,37 @@ msgid "" "the string." msgstr "" -#: ../../howto/regex.rst:706 +#: ../../howto/regex.rst:708 msgid "" "For example, if you wish to match the word ``From`` only at the beginning of " "a line, the RE to use is ``^From``. ::" msgstr "" -#: ../../howto/regex.rst:714 +#: ../../howto/regex.rst:716 msgid "To match a literal ``'^'``, use ``\\^``." msgstr "" -#: ../../howto/regex.rst:728 +#: ../../howto/regex.rst:730 msgid "``$``" msgstr "``$``" -#: ../../howto/regex.rst:717 +#: ../../howto/regex.rst:719 msgid "" "Matches at the end of a line, which is defined as either the end of the " "string, or any location followed by a newline character. ::" msgstr "" -#: ../../howto/regex.rst:727 +#: ../../howto/regex.rst:729 msgid "" "To match a literal ``'$'``, use ``\\$`` or enclose it inside a character " "class, as in ``[$]``." msgstr "" -#: ../../howto/regex.rst:734 +#: ../../howto/regex.rst:736 msgid "``\\A``" msgstr "``\\A``" -#: ../../howto/regex.rst:731 +#: ../../howto/regex.rst:733 msgid "" "Matches only at the start of the string. When not in :const:`MULTILINE` " "mode, ``\\A`` and ``^`` are effectively the same. In :const:`MULTILINE` " @@ -1113,19 +1113,19 @@ msgid "" "newline character." msgstr "" -#: ../../howto/regex.rst:737 +#: ../../howto/regex.rst:739 msgid "``\\Z``" msgstr "``\\Z``" -#: ../../howto/regex.rst:737 +#: ../../howto/regex.rst:739 msgid "Matches only at the end of the string." msgstr "" -#: ../../howto/regex.rst:772 +#: ../../howto/regex.rst:774 msgid "``\\b``" msgstr "``\\b``" -#: ../../howto/regex.rst:740 +#: ../../howto/regex.rst:742 msgid "" "Word boundary. This is a zero-width assertion that matches only at the " "beginning or end of a word. A word is defined as a sequence of alphanumeric " @@ -1133,13 +1133,13 @@ msgid "" "alphanumeric character." msgstr "" -#: ../../howto/regex.rst:745 +#: ../../howto/regex.rst:747 msgid "" "The following example matches ``class`` only when it's a complete word; it " "won't match when it's contained inside another word. ::" msgstr "" -#: ../../howto/regex.rst:756 +#: ../../howto/regex.rst:758 msgid "" "There are two subtleties you should remember when using this special " "sequence. First, this is the worst collision between Python's string " @@ -1150,28 +1150,28 @@ msgid "" "previous RE, but omits the ``'r'`` in front of the RE string. ::" msgstr "" -#: ../../howto/regex.rst:770 +#: ../../howto/regex.rst:772 msgid "" "Second, inside a character class, where there's no use for this assertion, " "``\\b`` represents the backspace character, for compatibility with Python's " "string literals." msgstr "" -#: ../../howto/regex.rst:777 +#: ../../howto/regex.rst:779 msgid "``\\B``" msgstr "``\\B``" -#: ../../howto/regex.rst:775 +#: ../../howto/regex.rst:777 msgid "" "Another zero-width assertion, this is the opposite of ``\\b``, only matching " "when the current position is not at a word boundary." msgstr "" -#: ../../howto/regex.rst:780 +#: ../../howto/regex.rst:782 msgid "Grouping" msgstr "" -#: ../../howto/regex.rst:782 +#: ../../howto/regex.rst:784 msgid "" "Frequently you need to obtain more information than just whether the RE " "matched or not. Regular expressions are often used to dissect strings by " @@ -1180,14 +1180,14 @@ msgid "" "name and a value, separated by a ``':'``, like this:" msgstr "" -#: ../../howto/regex.rst:795 +#: ../../howto/regex.rst:797 msgid "" "This can be handled by writing a regular expression which matches an entire " "header line, and has one group which matches the header name, and another " "group which matches the header's value." msgstr "" -#: ../../howto/regex.rst:799 +#: ../../howto/regex.rst:801 msgid "" "Groups are marked by the ``'('``, ``')'`` metacharacters. ``'('`` and " "``')'`` have much the same meaning as they do in mathematical expressions; " @@ -1197,7 +1197,7 @@ msgid "" "repetitions of ``ab``. ::" msgstr "" -#: ../../howto/regex.rst:810 +#: ../../howto/regex.rst:812 msgid "" "Groups indicated with ``'('``, ``')'`` also capture the starting and ending " "index of the text that they match; this can be retrieved by passing an " @@ -1209,27 +1209,27 @@ msgid "" "they match. ::" msgstr "" -#: ../../howto/regex.rst:826 +#: ../../howto/regex.rst:828 msgid "" "Subgroups are numbered from left to right, from 1 upward. Groups can be " "nested; to determine the number, just count the opening parenthesis " "characters, going from left to right. ::" msgstr "" -#: ../../howto/regex.rst:839 +#: ../../howto/regex.rst:841 msgid "" ":meth:`~re.Match.group` can be passed multiple group numbers at a time, in " "which case it will return a tuple containing the corresponding values for " "those groups. ::" msgstr "" -#: ../../howto/regex.rst:845 +#: ../../howto/regex.rst:847 msgid "" "The :meth:`~re.Match.groups` method returns a tuple containing the strings " "for all the subgroups, from 1 up to however many there are. ::" msgstr "" -#: ../../howto/regex.rst:851 +#: ../../howto/regex.rst:853 msgid "" "Backreferences in a pattern allow you to specify that the contents of an " "earlier capturing group must also be found at the current location in the " @@ -1240,11 +1240,11 @@ msgid "" "when incorporating backreferences in a RE." msgstr "" -#: ../../howto/regex.rst:859 +#: ../../howto/regex.rst:861 msgid "For example, the following RE detects doubled words in a string. ::" msgstr "" -#: ../../howto/regex.rst:865 +#: ../../howto/regex.rst:867 msgid "" "Backreferences like this aren't often useful for just searching through a " "string --- there are few text formats which repeat data in this way --- but " @@ -1252,11 +1252,11 @@ msgid "" "substitutions." msgstr "" -#: ../../howto/regex.rst:871 +#: ../../howto/regex.rst:873 msgid "Non-capturing and Named Groups" msgstr "" -#: ../../howto/regex.rst:873 +#: ../../howto/regex.rst:875 msgid "" "Elaborate REs may use many groups, both to capture substrings of interest, " "and to group and structure the RE itself. In complex REs, it becomes " @@ -1265,7 +1265,7 @@ msgid "" "expression extensions, so we'll look at that first." msgstr "" -#: ../../howto/regex.rst:879 +#: ../../howto/regex.rst:881 msgid "" "Perl 5 is well known for its powerful additions to standard regular " "expressions. For these new features the Perl developers couldn't choose new " @@ -1276,7 +1276,7 @@ msgid "" "wouldn't have escaped it by writing ``\\&`` or ``[&]``." msgstr "" -#: ../../howto/regex.rst:886 +#: ../../howto/regex.rst:888 msgid "" "The solution chosen by the Perl developers was to use ``(?...)`` as the " "extension syntax. ``?`` immediately after a parenthesis was a syntax error " @@ -1287,20 +1287,20 @@ msgid "" "capturing group containing the subexpression ``foo``)." msgstr "" -#: ../../howto/regex.rst:894 +#: ../../howto/regex.rst:896 msgid "" "Python supports several of Perl's extensions and adds an extension syntax to " "Perl's extension syntax. If the first character after the question mark is " "a ``P``, you know that it's an extension that's specific to Python." msgstr "" -#: ../../howto/regex.rst:899 +#: ../../howto/regex.rst:901 msgid "" "Now that we've looked at the general extension syntax, we can return to the " "features that simplify working with groups in complex REs." msgstr "" -#: ../../howto/regex.rst:902 +#: ../../howto/regex.rst:904 msgid "" "Sometimes you'll want to use a group to denote a part of a regular " "expression, but aren't interested in retrieving the group's contents. You " @@ -1308,7 +1308,7 @@ msgid "" "where you can replace the ``...`` with any other regular expression. ::" msgstr "" -#: ../../howto/regex.rst:914 +#: ../../howto/regex.rst:916 msgid "" "Except for the fact that you can't retrieve the contents of what the group " "matched, a non-capturing group behaves exactly the same as a capturing " @@ -1321,13 +1321,13 @@ msgid "" "groups; neither form is any faster than the other." msgstr "" -#: ../../howto/regex.rst:923 +#: ../../howto/regex.rst:925 msgid "" "A more significant feature is named groups: instead of referring to them by " "numbers, groups can be referenced by a name." msgstr "" -#: ../../howto/regex.rst:926 +#: ../../howto/regex.rst:928 msgid "" "The syntax for a named group is one of the Python-specific extensions: ``(?" "P...)``. *name* is, obviously, the name of the group. Named groups " @@ -1339,26 +1339,26 @@ msgid "" "ways::" msgstr "" -#: ../../howto/regex.rst:941 +#: ../../howto/regex.rst:943 msgid "" "Additionally, you can retrieve named groups as a dictionary with :meth:`~re." "Match.groupdict`::" msgstr "" -#: ../../howto/regex.rst:948 +#: ../../howto/regex.rst:950 msgid "" "Named groups are handy because they let you use easily remembered names, " "instead of having to remember numbers. Here's an example RE from the :mod:" "`imaplib` module::" msgstr "" -#: ../../howto/regex.rst:959 +#: ../../howto/regex.rst:961 msgid "" "It's obviously much easier to retrieve ``m.group('zonem')``, instead of " "having to remember to retrieve group 9." msgstr "" -#: ../../howto/regex.rst:962 +#: ../../howto/regex.rst:964 msgid "" "The syntax for backreferences in an expression such as ``(...)\\1`` refers " "to the number of the group. There's naturally a variant that uses the group " @@ -1369,22 +1369,22 @@ msgid "" "P\\w+)\\s+(?P=word)\\b``::" msgstr "" -#: ../../howto/regex.rst:975 +#: ../../howto/regex.rst:977 msgid "Lookahead Assertions" msgstr "" -#: ../../howto/regex.rst:977 +#: ../../howto/regex.rst:979 msgid "" "Another zero-width assertion is the lookahead assertion. Lookahead " "assertions are available in both positive and negative form, and look like " "this:" msgstr "" -#: ../../howto/regex.rst:985 +#: ../../howto/regex.rst:987 msgid "``(?=...)``" msgstr "``(?=...)``" -#: ../../howto/regex.rst:981 +#: ../../howto/regex.rst:983 msgid "" "Positive lookahead assertion. This succeeds if the contained regular " "expression, represented here by ``...``, successfully matches at the current " @@ -1393,18 +1393,18 @@ msgid "" "is tried right where the assertion started." msgstr "" -#: ../../howto/regex.rst:990 +#: ../../howto/regex.rst:992 msgid "``(?!...)``" msgstr "``(?!...)``" -#: ../../howto/regex.rst:988 +#: ../../howto/regex.rst:990 msgid "" "Negative lookahead assertion. This is the opposite of the positive " "assertion; it succeeds if the contained expression *doesn't* match at the " "current position in the string." msgstr "" -#: ../../howto/regex.rst:992 +#: ../../howto/regex.rst:994 msgid "" "To make this concrete, let's look at a case where a lookahead is useful. " "Consider a simple pattern to match a filename and split it apart into a base " @@ -1412,15 +1412,15 @@ msgid "" "``news`` is the base name, and ``rc`` is the filename's extension." msgstr "" -#: ../../howto/regex.rst:997 +#: ../../howto/regex.rst:999 msgid "The pattern to match this is quite simple:" msgstr "" -#: ../../howto/regex.rst:999 +#: ../../howto/regex.rst:1001 msgid "``.*[.].*$``" msgstr "``.*[.].*$``" -#: ../../howto/regex.rst:1001 +#: ../../howto/regex.rst:1003 msgid "" "Notice that the ``.`` needs to be treated specially because it's a " "metacharacter, so it's inside a character class to only match that specific " @@ -1430,24 +1430,24 @@ msgid "" "``printers.conf``." msgstr "" -#: ../../howto/regex.rst:1008 +#: ../../howto/regex.rst:1010 msgid "" "Now, consider complicating the problem a bit; what if you want to match " "filenames where the extension is not ``bat``? Some incorrect attempts:" msgstr "" -#: ../../howto/regex.rst:1011 +#: ../../howto/regex.rst:1013 msgid "" "``.*[.][^b].*$`` The first attempt above tries to exclude ``bat`` by " "requiring that the first character of the extension is not a ``b``. This is " "wrong, because the pattern also doesn't match ``foo.bar``." msgstr "" -#: ../../howto/regex.rst:1015 +#: ../../howto/regex.rst:1017 msgid "``.*[.]([^b]..|.[^a].|..[^t])$``" msgstr "``.*[.]([^b]..|.[^a].|..[^t])$``" -#: ../../howto/regex.rst:1017 +#: ../../howto/regex.rst:1019 msgid "" "The expression gets messier when you try to patch up the first solution by " "requiring one of the following cases to match: the first character of the " @@ -1458,18 +1458,18 @@ msgid "" "pattern again in an effort to fix it." msgstr "" -#: ../../howto/regex.rst:1025 +#: ../../howto/regex.rst:1027 msgid "``.*[.]([^b].?.?|.[^a]?.?|..?[^t]?)$``" msgstr "``.*[.]([^b].?.?|.[^a]?.?|..?[^t]?)$``" -#: ../../howto/regex.rst:1027 +#: ../../howto/regex.rst:1029 msgid "" "In the third attempt, the second and third letters are all made optional in " "order to allow matching extensions shorter than three characters, such as " "``sendmail.cf``." msgstr "" -#: ../../howto/regex.rst:1031 +#: ../../howto/regex.rst:1033 msgid "" "The pattern's getting really complicated now, which makes it hard to read " "and understand. Worse, if the problem changes and you want to exclude both " @@ -1477,11 +1477,11 @@ msgid "" "complicated and confusing." msgstr "" -#: ../../howto/regex.rst:1036 +#: ../../howto/regex.rst:1038 msgid "A negative lookahead cuts through all this confusion:" msgstr "" -#: ../../howto/regex.rst:1038 +#: ../../howto/regex.rst:1040 msgid "" "``.*[.](?!bat$)[^.]*$`` The negative lookahead means: if the expression " "``bat`` doesn't match at this point, try the rest of the pattern; if " @@ -1491,61 +1491,61 @@ msgid "" "the pattern works when there are multiple dots in the filename." msgstr "" -#: ../../howto/regex.rst:1045 +#: ../../howto/regex.rst:1047 msgid "" "Excluding another filename extension is now easy; simply add it as an " "alternative inside the assertion. The following pattern excludes filenames " "that end in either ``bat`` or ``exe``:" msgstr "" -#: ../../howto/regex.rst:1049 +#: ../../howto/regex.rst:1051 msgid "``.*[.](?!bat$|exe$)[^.]*$``" msgstr "``.*[.](?!bat$|exe$)[^.]*$``" -#: ../../howto/regex.rst:1053 +#: ../../howto/regex.rst:1055 msgid "Modifying Strings" msgstr "" -#: ../../howto/regex.rst:1055 +#: ../../howto/regex.rst:1057 msgid "" "Up to this point, we've simply performed searches against a static string. " "Regular expressions are also commonly used to modify strings in various " "ways, using the following pattern methods:" msgstr "" -#: ../../howto/regex.rst:1062 +#: ../../howto/regex.rst:1064 msgid "``split()``" msgstr "``split()``" -#: ../../howto/regex.rst:1062 +#: ../../howto/regex.rst:1064 msgid "Split the string into a list, splitting it wherever the RE matches" msgstr "" -#: ../../howto/regex.rst:1065 +#: ../../howto/regex.rst:1067 msgid "``sub()``" msgstr "``sub()``" -#: ../../howto/regex.rst:1065 +#: ../../howto/regex.rst:1067 msgid "" "Find all substrings where the RE matches, and replace them with a different " "string" msgstr "" -#: ../../howto/regex.rst:1068 +#: ../../howto/regex.rst:1070 msgid "``subn()``" msgstr "``subn()``" -#: ../../howto/regex.rst:1068 +#: ../../howto/regex.rst:1070 msgid "" "Does the same thing as :meth:`!sub`, but returns the new string and the " "number of replacements" msgstr "" -#: ../../howto/regex.rst:1075 +#: ../../howto/regex.rst:1077 msgid "Splitting Strings" msgstr "" -#: ../../howto/regex.rst:1077 +#: ../../howto/regex.rst:1079 msgid "" "The :meth:`~re.Pattern.split` method of a pattern splits a string apart " "wherever the RE matches, returning a list of the pieces. It's similar to " @@ -1555,7 +1555,7 @@ msgid "" "module-level :func:`re.split` function, too." msgstr "" -#: ../../howto/regex.rst:1088 +#: ../../howto/regex.rst:1090 msgid "" "Split *string* by the matches of the regular expression. If capturing " "parentheses are used in the RE, then their contents will also be returned as " @@ -1563,7 +1563,7 @@ msgid "" "splits are performed." msgstr "" -#: ../../howto/regex.rst:1093 +#: ../../howto/regex.rst:1095 msgid "" "You can limit the number of splits made, by passing a value for *maxsplit*. " "When *maxsplit* is nonzero, at most *maxsplit* splits will be made, and the " @@ -1572,7 +1572,7 @@ msgid "" "characters. ::" msgstr "" -#: ../../howto/regex.rst:1105 +#: ../../howto/regex.rst:1107 msgid "" "Sometimes you're not only interested in what the text between delimiters is, " "but also need to know what the delimiter was. If capturing parentheses are " @@ -1580,17 +1580,17 @@ msgid "" "Compare the following calls::" msgstr "" -#: ../../howto/regex.rst:1117 +#: ../../howto/regex.rst:1119 msgid "" "The module-level function :func:`re.split` adds the RE to be used as the " "first argument, but is otherwise the same. ::" msgstr "" -#: ../../howto/regex.rst:1129 +#: ../../howto/regex.rst:1131 msgid "Search and Replace" msgstr "" -#: ../../howto/regex.rst:1131 +#: ../../howto/regex.rst:1133 msgid "" "Another common task is to find all the matches for a pattern, and replace " "them with a different string. The :meth:`~re.Pattern.sub` method takes a " @@ -1598,40 +1598,40 @@ msgid "" "string to be processed." msgstr "" -#: ../../howto/regex.rst:1138 +#: ../../howto/regex.rst:1140 msgid "" "Returns the string obtained by replacing the leftmost non-overlapping " "occurrences of the RE in *string* by the replacement *replacement*. If the " "pattern isn't found, *string* is returned unchanged." msgstr "" -#: ../../howto/regex.rst:1142 +#: ../../howto/regex.rst:1144 msgid "" "The optional argument *count* is the maximum number of pattern occurrences " "to be replaced; *count* must be a non-negative integer. The default value " "of 0 means to replace all occurrences." msgstr "" -#: ../../howto/regex.rst:1146 +#: ../../howto/regex.rst:1148 msgid "" "Here's a simple example of using the :meth:`~re.Pattern.sub` method. It " "replaces colour names with the word ``colour``::" msgstr "" -#: ../../howto/regex.rst:1155 +#: ../../howto/regex.rst:1157 msgid "" "The :meth:`~re.Pattern.subn` method does the same work, but returns a 2-" "tuple containing the new string value and the number of replacements that " "were performed::" msgstr "" -#: ../../howto/regex.rst:1164 +#: ../../howto/regex.rst:1166 msgid "" "Empty matches are replaced only when they're not adjacent to a previous " "empty match. ::" msgstr "" -#: ../../howto/regex.rst:1171 +#: ../../howto/regex.rst:1173 msgid "" "If *replacement* is a string, any backslash escapes in it are processed. " "That is, ``\\n`` is converted to a single newline character, ``\\r`` is " @@ -1642,13 +1642,13 @@ msgid "" "string." msgstr "" -#: ../../howto/regex.rst:1178 +#: ../../howto/regex.rst:1180 msgid "" "This example matches the word ``section`` followed by a string enclosed in " "``{``, ``}``, and changes ``section`` to ``subsection``::" msgstr "" -#: ../../howto/regex.rst:1185 +#: ../../howto/regex.rst:1187 msgid "" "There's also a syntax for referring to named groups as defined by the ``(?" "P...)`` syntax. ``\\g`` will use the substring matched by the " @@ -1660,7 +1660,7 @@ msgid "" "but use all three variations of the replacement string. ::" msgstr "" -#: ../../howto/regex.rst:1202 +#: ../../howto/regex.rst:1204 msgid "" "*replacement* can also be a function, which gives you even more control. If " "*replacement* is a function, the function is called for every non-" @@ -1669,13 +1669,13 @@ msgid "" "this information to compute the desired replacement string and return it." msgstr "" -#: ../../howto/regex.rst:1208 +#: ../../howto/regex.rst:1210 msgid "" "In the following example, the replacement function translates decimals into " "hexadecimal::" msgstr "" -#: ../../howto/regex.rst:1220 +#: ../../howto/regex.rst:1222 msgid "" "When using the module-level :func:`re.sub` function, the pattern is passed " "as the first argument. The pattern may be provided as an object or as a " @@ -1685,11 +1685,11 @@ msgid "" "x'``." msgstr "" -#: ../../howto/regex.rst:1228 +#: ../../howto/regex.rst:1230 msgid "Common Problems" msgstr "" -#: ../../howto/regex.rst:1230 +#: ../../howto/regex.rst:1232 msgid "" "Regular expressions are a powerful tool for some applications, but in some " "ways their behaviour isn't intuitive and at times they don't behave the way " @@ -1697,11 +1697,11 @@ msgid "" "pitfalls." msgstr "" -#: ../../howto/regex.rst:1236 +#: ../../howto/regex.rst:1238 msgid "Use String Methods" msgstr "" -#: ../../howto/regex.rst:1238 +#: ../../howto/regex.rst:1240 msgid "" "Sometimes using the :mod:`re` module is a mistake. If you're matching a " "fixed string, or a single character class, and you're not using any :mod:" @@ -1713,7 +1713,7 @@ msgid "" "engine." msgstr "" -#: ../../howto/regex.rst:1246 +#: ../../howto/regex.rst:1248 msgid "" "One example might be replacing a single fixed string with another one; for " "example, you might replace ``word`` with ``deed``. :func:`re.sub` seems " @@ -1726,7 +1726,7 @@ msgid "" "meth:`!replace`'s abilities.)" msgstr "" -#: ../../howto/regex.rst:1255 +#: ../../howto/regex.rst:1257 msgid "" "Another common task is deleting every occurrence of a single character from " "a string or replacing it with another single character. You might do this " @@ -1735,17 +1735,17 @@ msgid "" "operation can be." msgstr "" -#: ../../howto/regex.rst:1261 +#: ../../howto/regex.rst:1263 msgid "" "In short, before turning to the :mod:`re` module, consider whether your " "problem can be solved with a faster and simpler string method." msgstr "" -#: ../../howto/regex.rst:1266 +#: ../../howto/regex.rst:1268 msgid "match() versus search()" msgstr "" -#: ../../howto/regex.rst:1268 +#: ../../howto/regex.rst:1270 msgid "" "The :func:`~re.match` function only checks if the RE matches at the " "beginning of the string while :func:`~re.search` will scan forward through " @@ -1755,13 +1755,13 @@ msgid "" "report it. ::" msgstr "" -#: ../../howto/regex.rst:1279 +#: ../../howto/regex.rst:1281 msgid "" "On the other hand, :func:`~re.search` will scan forward through the string, " "reporting the first match it finds. ::" msgstr "" -#: ../../howto/regex.rst:1287 +#: ../../howto/regex.rst:1289 msgid "" "Sometimes you'll be tempted to keep using :func:`re.match`, and just add ``." "*`` to the front of your RE. Resist this temptation and use :func:`re." @@ -1773,18 +1773,18 @@ msgid "" "starting character, only trying the full match if a ``'C'`` is found." msgstr "" -#: ../../howto/regex.rst:1296 +#: ../../howto/regex.rst:1298 msgid "" "Adding ``.*`` defeats this optimization, requiring scanning to the end of " "the string and then backtracking to find a match for the rest of the RE. " "Use :func:`re.search` instead." msgstr "" -#: ../../howto/regex.rst:1302 +#: ../../howto/regex.rst:1304 msgid "Greedy versus Non-Greedy" msgstr "" -#: ../../howto/regex.rst:1304 +#: ../../howto/regex.rst:1306 msgid "" "When repeating a regular expression, as in ``a*``, the resulting action is " "to consume as much of the pattern as possible. This fact often bites you " @@ -1793,7 +1793,7 @@ msgid "" "HTML tag doesn't work because of the greedy nature of ``.*``. ::" msgstr "" -#: ../../howto/regex.rst:1318 +#: ../../howto/regex.rst:1320 msgid "" "The RE matches the ``'<'`` in ``''``, and the ``.*`` consumes the rest " "of the string. There's still more left in the RE, though, and the ``>`` " @@ -1803,7 +1803,7 @@ msgid "" "``''``, which isn't what you want." msgstr "" -#: ../../howto/regex.rst:1325 +#: ../../howto/regex.rst:1327 msgid "" "In this case, the solution is to use the non-greedy quantifiers ``*?``, ``+?" "``, ``??``, or ``{m,n}?``, which match as *little* text as possible. In the " @@ -1812,7 +1812,7 @@ msgid "" "retrying the ``'>'`` at every step. This produces just the right result::" msgstr "" -#: ../../howto/regex.rst:1334 +#: ../../howto/regex.rst:1336 msgid "" "(Note that parsing HTML or XML with regular expressions is painful. Quick-" "and-dirty patterns will handle common cases, but HTML and XML have special " @@ -1822,11 +1822,11 @@ msgid "" "such tasks.)" msgstr "" -#: ../../howto/regex.rst:1342 +#: ../../howto/regex.rst:1344 msgid "Using re.VERBOSE" msgstr "" -#: ../../howto/regex.rst:1344 +#: ../../howto/regex.rst:1346 msgid "" "By now you've probably noticed that regular expressions are a very compact " "notation, but they're not terribly readable. REs of moderate complexity can " @@ -1834,14 +1834,14 @@ msgid "" "making them difficult to read and understand." msgstr "" -#: ../../howto/regex.rst:1349 +#: ../../howto/regex.rst:1351 msgid "" "For such REs, specifying the :const:`re.VERBOSE` flag when compiling the " "regular expression can be helpful, because it allows you to format the " "regular expression more clearly." msgstr "" -#: ../../howto/regex.rst:1353 +#: ../../howto/regex.rst:1355 msgid "" "The ``re.VERBOSE`` flag has several effects. Whitespace in the regular " "expression that *isn't* inside a character class is ignored. This means " @@ -1852,15 +1852,15 @@ msgid "" "quoted strings, this enables REs to be formatted more neatly::" msgstr "" -#: ../../howto/regex.rst:1370 +#: ../../howto/regex.rst:1372 msgid "This is far more readable than::" msgstr "" -#: ../../howto/regex.rst:1376 +#: ../../howto/regex.rst:1378 msgid "Feedback" msgstr "" -#: ../../howto/regex.rst:1378 +#: ../../howto/regex.rst:1380 msgid "" "Regular expressions are a complicated topic. Did this document help you " "understand them? Were there parts that were unclear, or Problems you " @@ -1868,7 +1868,7 @@ msgid "" "improvements to the author." msgstr "" -#: ../../howto/regex.rst:1383 +#: ../../howto/regex.rst:1385 msgid "" "The most complete book on regular expressions is almost certainly Jeffrey " "Friedl's Mastering Regular Expressions, published by O'Reilly. " diff --git a/howto/sorting.po b/howto/sorting.po index f7fbea9ba6..d5f50b1ced 100644 --- a/howto/sorting.po +++ b/howto/sorting.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-31 08:13+0000\n" +"POT-Creation-Date: 2023-07-24 00:03+0000\n" "PO-Revision-Date: 2018-05-23 14:37+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -307,13 +307,13 @@ msgstr "" msgid "" "The sort routines use ``<`` when making comparisons between two objects. So, " "it is easy to add a standard sort order to a class by defining an :meth:" -"`__lt__` method:" +"`~object.__lt__` method:" msgstr "" #: ../../howto/sorting.rst:284 msgid "" -"However, note that ``<`` can fall back to using :meth:`__gt__` if :meth:" -"`__lt__` is not implemented (see :func:`object.__lt__`)." +"However, note that ``<`` can fall back to using :meth:`~object.__gt__` if :" +"meth:`~object.__lt__` is not implemented (see :func:`object.__lt__`)." msgstr "" #: ../../howto/sorting.rst:287 diff --git a/howto/unicode.po b/howto/unicode.po index 87530aabd5..eca6919292 100644 --- a/howto/unicode.po +++ b/howto/unicode.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-09-26 00:21+0000\n" +"POT-Creation-Date: 2023-07-24 00:03+0000\n" "PO-Revision-Date: 2018-05-23 14:37+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -501,9 +501,9 @@ msgid "" "A second tool is the :mod:`unicodedata` module's :func:`~unicodedata." "normalize` function that converts strings to one of several normal forms, " "where letters followed by a combining character are replaced with single " -"characters. :func:`normalize` can be used to perform string comparisons " -"that won't falsely report inequality if two strings use combining characters " -"differently:" +"characters. :func:`~unicodedata.normalize` can be used to perform string " +"comparisons that won't falsely report inequality if two strings use " +"combining characters differently:" msgstr "" #: ../../howto/unicode.rst:448 @@ -523,10 +523,10 @@ msgstr "" #: ../../howto/unicode.rst:477 msgid "" -"This will print ``True``. (Why is :func:`NFD` invoked twice? Because there " -"are a few characters that make :meth:`casefold` return a non-normalized " -"string, so the result needs to be normalized again. See section 3.13 of the " -"Unicode Standard for a discussion and an example.)" +"This will print ``True``. (Why is :func:`!NFD` invoked twice? Because " +"there are a few characters that make :meth:`~str.casefold` return a non-" +"normalized string, so the result needs to be normalized again. See section " +"3.13 of the Unicode Standard for a discussion and an example.)" msgstr "" #: ../../howto/unicode.rst:484 diff --git a/library/_thread.po b/library/_thread.po index 0d60f4b515..133c25edfd 100644 --- a/library/_thread.po +++ b/library/_thread.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-22 00:04+0000\n" +"POT-Creation-Date: 2023-07-24 00:03+0000\n" "PO-Revision-Date: 2015-12-09 17:51+0000\n" "Last-Translator: Liang-Bo Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -183,9 +183,9 @@ msgstr "" #: ../../library/_thread.rst:152 msgid "" -"The maximum value allowed for the *timeout* parameter of :meth:`Lock." -"acquire`. Specifying a timeout greater than this value will raise an :exc:" -"`OverflowError`." +"The maximum value allowed for the *timeout* parameter of :meth:`Lock.acquire " +"`. Specifying a timeout greater than this value will " +"raise an :exc:`OverflowError`." msgstr "" #: ../../library/_thread.rst:159 @@ -267,19 +267,19 @@ msgstr "" #: ../../library/_thread.rst:220 msgid "" -"It is not possible to interrupt the :meth:`acquire` method on a lock --- " -"the :exc:`KeyboardInterrupt` exception will happen after the lock has been " -"acquired." +"It is not possible to interrupt the :meth:`~threading.Lock.acquire` method " +"on a lock --- the :exc:`KeyboardInterrupt` exception will happen after the " +"lock has been acquired." msgstr "" -#: ../../library/_thread.rst:223 +#: ../../library/_thread.rst:224 msgid "" "When the main thread exits, it is system defined whether the other threads " "survive. On most systems, they are killed without executing :keyword:" "`try` ... :keyword:`finally` clauses or executing object destructors." msgstr "" -#: ../../library/_thread.rst:228 +#: ../../library/_thread.rst:229 msgid "" "When the main thread exits, it does not do any of its usual cleanup (except " "that :keyword:`try` ... :keyword:`finally` clauses are honored), and the " diff --git a/library/array.po b/library/array.po index f4df9a08c4..336ad5e0a8 100644 --- a/library/array.po +++ b/library/array.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-05-09 00:15+0000\n" +"POT-Creation-Date: 2023-07-24 00:03+0000\n" "PO-Revision-Date: 2021-11-23 18:40+0800\n" "Last-Translator: Benson Chen \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -210,10 +210,11 @@ msgid "It can be 16 bits or 32 bits depending on the platform." msgstr "根據平台的不同,它有可能是 16 位元或者 32 位元。" #: ../../library/array.rst:53 +#, fuzzy msgid "" -"``array('u')`` now uses ``wchar_t`` as C type instead of deprecated " +"``array('u')`` now uses :c:type:`wchar_t` as C type instead of deprecated " "``Py_UNICODE``. This change doesn't affect its behavior because " -"``Py_UNICODE`` is alias of ``wchar_t`` since Python 3.3." +"``Py_UNICODE`` is alias of :c:type:`wchar_t` since Python 3.3." msgstr "" "目前 ``array('u')`` 使用 ``wchar_t`` 取代已棄用的 ``Py_UNICODE`` 作為 C " "type。這個異動並沒有影響到它的作用,因爲自從 Python 3.3 開始 ``Py_UNICODE`` " diff --git a/library/codeop.po b/library/codeop.po index 9d99ee838b..18e67059b8 100644 --- a/library/codeop.po +++ b/library/codeop.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-03-31 00:16+0000\n" +"POT-Creation-Date: 2023-07-24 00:03+0000\n" "PO-Revision-Date: 2016-11-19 00:28+0000\n" "Last-Translator: Liang-Bo Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -96,18 +96,18 @@ msgstr "" #: ../../library/codeop.rst:61 msgid "" -"Instances of this class have :meth:`__call__` methods identical in signature " -"to the built-in function :func:`compile`, but with the difference that if " -"the instance compiles program text containing a :mod:`__future__` statement, " -"the instance 'remembers' and compiles all subsequent program texts with the " -"statement in force." +"Instances of this class have :meth:`~object.__call__` methods identical in " +"signature to the built-in function :func:`compile`, but with the difference " +"that if the instance compiles program text containing a :mod:`__future__` " +"statement, the instance 'remembers' and compiles all subsequent program " +"texts with the statement in force." msgstr "" #: ../../library/codeop.rst:70 msgid "" -"Instances of this class have :meth:`__call__` methods identical in signature " -"to :func:`compile_command`; the difference is that if the instance compiles " -"program text containing a :mod:`__future__` statement, the instance " +"Instances of this class have :meth:`~object.__call__` methods identical in " +"signature to :func:`compile_command`; the difference is that if the instance " +"compiles program text containing a :mod:`__future__` statement, the instance " "'remembers' and compiles all subsequent program texts with the statement in " "force." msgstr "" diff --git a/library/constants.po b/library/constants.po index c8e5e0da01..e594040d2c 100644 --- a/library/constants.po +++ b/library/constants.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-05-09 00:15+0000\n" +"POT-Creation-Date: 2023-07-24 00:03+0000\n" "PO-Revision-Date: 2021-11-19 23:36+0800\n" "Last-Translator: Jordan Su \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -46,25 +46,28 @@ msgstr "" "出 :exc:`SyntaxError`。" #: ../../library/constants.rst:22 +#, fuzzy msgid "" "An object frequently used to represent the absence of a value, as when " "default arguments are not passed to a function. Assignments to ``None`` are " "illegal and raise a :exc:`SyntaxError`. ``None`` is the sole instance of " -"the :data:`NoneType` type." +"the :data:`~types.NoneType` type." msgstr "" "型別 ``NoneType`` 的唯一值。``None`` 經常被使用來表達缺少值,例如未傳送預設的" "引數至函式時,相對應參數即會被賦予 ``None``。對於 ``None`` 的賦值是不合法的," "並且會拋出 :exc:`SyntaxError`。``None`` 是型別 :data:`NoneType` 的唯一實例。" #: ../../library/constants.rst:30 +#, fuzzy msgid "" "A special value which should be returned by the binary special methods (e." -"g. :meth:`__eq__`, :meth:`__lt__`, :meth:`__add__`, :meth:`__rsub__`, etc.) " -"to indicate that the operation is not implemented with respect to the other " -"type; may be returned by the in-place binary special methods (e.g. :meth:" -"`__imul__`, :meth:`__iand__`, etc.) for the same purpose. It should not be " -"evaluated in a boolean context. ``NotImplemented`` is the sole instance of " -"the :data:`types.NotImplementedType` type." +"g. :meth:`~object.__eq__`, :meth:`~object.__lt__`, :meth:`~object.__add__`, :" +"meth:`~object.__rsub__`, etc.) to indicate that the operation is not " +"implemented with respect to the other type; may be returned by the in-place " +"binary special methods (e.g. :meth:`~object.__imul__`, :meth:`~object." +"__iand__`, etc.) for the same purpose. It should not be evaluated in a " +"boolean context. ``NotImplemented`` is the sole instance of the :data:`types." +"NotImplementedType` type." msgstr "" "會被二元特殊方法 (binary special methods)(如::meth:`__eq__`、:meth:" "`__lt__`、:meth:`__add__`,:meth:`__rsub__` 等)所回傳的特殊值,代表著該運算" diff --git a/library/ctypes.po b/library/ctypes.po index def1539dfd..e3c849e3ca 100644 --- a/library/ctypes.po +++ b/library/ctypes.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-17 17:39+0800\n" +"POT-Creation-Date: 2023-07-24 00:03+0000\n" "PO-Revision-Date: 2023-04-26 02:59+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -259,7 +259,8 @@ msgid ":class:`c_wchar`" msgstr ":class:`c_wchar`" #: ../../library/ctypes.rst:223 -msgid ":c:expr:`wchar_t`" +#, fuzzy +msgid ":c:type:`wchar_t`" msgstr ":c:expr:`wchar_t`" #: ../../library/ctypes.rst:223 @@ -357,15 +358,17 @@ msgid ":class:`c_size_t`" msgstr ":class:`c_size_t`" #: ../../library/ctypes.rst:246 -msgid ":c:expr:`size_t`" -msgstr ":c:expr:`size_t`" +#, fuzzy +msgid ":c:type:`size_t`" +msgstr ":c:type:`time_t`" #: ../../library/ctypes.rst:248 msgid ":class:`c_ssize_t`" msgstr ":class:`c_ssize_t`" #: ../../library/ctypes.rst:248 -msgid ":c:expr:`ssize_t` or :c:expr:`Py_ssize_t`" +#, fuzzy +msgid ":c:type:`ssize_t` or :c:expr:`Py_ssize_t`" msgstr ":c:expr:`ssize_t` 或 :c:expr:`Py_ssize_t`" #: ../../library/ctypes.rst:251 @@ -478,7 +481,7 @@ msgstr "" msgid "" "The :func:`create_string_buffer` function replaces the old :func:`c_buffer` " "function (which is still available as an alias). To create a mutable memory " -"block containing unicode characters of the C type :c:expr:`wchar_t`, use " +"block containing unicode characters of the C type :c:type:`wchar_t`, use " "the :func:`create_unicode_buffer` function." msgstr "" @@ -595,9 +598,9 @@ msgstr "" #: ../../library/ctypes.rst:481 msgid "" -"The C prototype of ``time()`` is ``time_t time(time_t *)``. Because " -"``time_t`` might be of a different type than the default return type " -"``int``, you should specify the ``restype``::" +"The C prototype of ``time()`` is ``time_t time(time_t *)``. Because :c:type:" +"`time_t` might be of a different type than the default return type ``int``, " +"you should specify the ``restype``::" msgstr "" #: ../../library/ctypes.rst:487 @@ -2527,7 +2530,7 @@ msgstr "" #: ../../library/ctypes.rst:2410 msgid "" -"Represents the C :c:expr:`wchar_t` datatype, and interprets the value as a " +"Represents the C :c:type:`wchar_t` datatype, and interprets the value as a " "single character unicode string. The constructor accepts an optional string " "initializer, the length of the string must be exactly one character." msgstr "" @@ -2768,3 +2771,6 @@ msgid "" "Returns the object to which to pointer points. Assigning to this attribute " "changes the pointer to point to the assigned object." msgstr "" + +#~ msgid ":c:expr:`size_t`" +#~ msgstr ":c:expr:`size_t`" diff --git a/library/gettext.po b/library/gettext.po index 87ff788d99..1b56ff954e 100644 --- a/library/gettext.po +++ b/library/gettext.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-05-09 00:15+0000\n" +"POT-Creation-Date: 2023-07-24 00:03+0000\n" "PO-Revision-Date: 2018-05-23 16:02+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -493,11 +493,11 @@ msgid "" "is not currently supported." msgstr "" -#: ../../library/gettext.rst:416 +#: ../../library/gettext.rst:417 msgid "Internationalizing your programs and modules" msgstr "" -#: ../../library/gettext.rst:418 +#: ../../library/gettext.rst:419 msgid "" "Internationalization (I18N) refers to the operation by which a program is " "made aware of multiple languages. Localization (L10N) refers to the " @@ -506,26 +506,26 @@ msgid "" "Python programs, you need to take the following steps:" msgstr "" -#: ../../library/gettext.rst:424 +#: ../../library/gettext.rst:425 msgid "" "prepare your program or module by specially marking translatable strings" msgstr "" -#: ../../library/gettext.rst:426 +#: ../../library/gettext.rst:427 msgid "" "run a suite of tools over your marked files to generate raw messages catalogs" msgstr "" -#: ../../library/gettext.rst:428 +#: ../../library/gettext.rst:429 msgid "create language-specific translations of the message catalogs" msgstr "" -#: ../../library/gettext.rst:430 +#: ../../library/gettext.rst:431 msgid "" "use the :mod:`gettext` module so that message strings are properly translated" msgstr "" -#: ../../library/gettext.rst:432 +#: ../../library/gettext.rst:433 msgid "" "In order to prepare your code for I18N, you need to look at all the strings " "in your files. Any string that needs to be translated should be marked by " @@ -533,14 +533,14 @@ msgid "" "For example::" msgstr "" -#: ../../library/gettext.rst:441 +#: ../../library/gettext.rst:442 msgid "" "In this example, the string ``'writing a log message'`` is marked as a " "candidate for translation, while the strings ``'mylog.txt'`` and ``'w'`` are " "not." msgstr "" -#: ../../library/gettext.rst:444 +#: ../../library/gettext.rst:445 msgid "" "There are a few tools to extract the strings meant for translation. The " "original GNU :program:`gettext` only supported C or C++ source code but its " @@ -553,7 +553,7 @@ msgid "" "utils>`__." msgstr "" -#: ../../library/gettext.rst:454 +#: ../../library/gettext.rst:455 msgid "" "(Python also includes pure-Python versions of these programs, called :" "program:`pygettext.py` and :program:`msgfmt.py`; some Python distributions " @@ -566,7 +566,7 @@ msgid "" "GNU :program:`gettext` package to internationalize your Python applications.)" msgstr "" -#: ../../library/gettext.rst:466 +#: ../../library/gettext.rst:467 msgid "" ":program:`xgettext`, :program:`pygettext`, and similar tools generate :file:" "`.po` files that are message catalogs. They are structured human-readable " @@ -574,7 +574,7 @@ msgid "" "placeholder for the translated versions of these strings." msgstr "" -#: ../../library/gettext.rst:472 +#: ../../library/gettext.rst:473 msgid "" "Copies of these :file:`.po` files are then handed over to the individual " "human translators who write translations for every supported natural " @@ -585,25 +585,25 @@ msgid "" "processing at run-time." msgstr "" -#: ../../library/gettext.rst:481 +#: ../../library/gettext.rst:482 msgid "" "How you use the :mod:`gettext` module in your code depends on whether you " "are internationalizing a single module or your entire application. The next " "two sections will discuss each case." msgstr "" -#: ../../library/gettext.rst:487 +#: ../../library/gettext.rst:488 msgid "Localizing your module" msgstr "" -#: ../../library/gettext.rst:489 +#: ../../library/gettext.rst:490 msgid "" "If you are localizing your module, you must take care not to make global " "changes, e.g. to the built-in namespace. You should not use the GNU :program:" "`gettext` API but instead the class-based API." msgstr "" -#: ../../library/gettext.rst:493 +#: ../../library/gettext.rst:494 msgid "" "Let's say your module is called \"spam\" and the module's various natural " "language translation :file:`.mo` files reside in :file:`/usr/share/locale` " @@ -611,11 +611,11 @@ msgid "" "your module::" msgstr "" -#: ../../library/gettext.rst:504 +#: ../../library/gettext.rst:505 msgid "Localizing your application" msgstr "" -#: ../../library/gettext.rst:506 +#: ../../library/gettext.rst:507 msgid "" "If you are localizing your application, you can install the :func:`_` " "function globally into the built-in namespace, usually in the main driver " @@ -623,52 +623,52 @@ msgid "" "just use ``_('...')`` without having to explicitly install it in each file." msgstr "" -#: ../../library/gettext.rst:511 +#: ../../library/gettext.rst:512 msgid "" "In the simple case then, you need only add the following bit of code to the " "main driver file of your application::" msgstr "" -#: ../../library/gettext.rst:517 +#: ../../library/gettext.rst:518 msgid "" "If you need to set the locale directory, you can pass it into the :func:" "`install` function::" msgstr "" -#: ../../library/gettext.rst:525 +#: ../../library/gettext.rst:526 msgid "Changing languages on the fly" msgstr "" -#: ../../library/gettext.rst:527 +#: ../../library/gettext.rst:528 msgid "" "If your program needs to support many languages at the same time, you may " "want to create multiple translation instances and then switch between them " "explicitly, like so::" msgstr "" -#: ../../library/gettext.rst:548 +#: ../../library/gettext.rst:549 msgid "Deferred translations" msgstr "" -#: ../../library/gettext.rst:550 +#: ../../library/gettext.rst:551 msgid "" "In most coding situations, strings are translated where they are coded. " "Occasionally however, you need to mark strings for translation, but defer " "actual translation until later. A classic example is::" msgstr "" -#: ../../library/gettext.rst:563 +#: ../../library/gettext.rst:564 msgid "" "Here, you want to mark the strings in the ``animals`` list as being " "translatable, but you don't actually want to translate them until they are " "printed." msgstr "" -#: ../../library/gettext.rst:567 +#: ../../library/gettext.rst:568 msgid "Here is one way you can handle this situation::" msgstr "" -#: ../../library/gettext.rst:583 +#: ../../library/gettext.rst:584 msgid "" "This works because the dummy definition of :func:`_` simply returns the " "string unchanged. And this dummy definition will temporarily override any " @@ -677,18 +677,18 @@ msgid "" "in the local namespace." msgstr "" -#: ../../library/gettext.rst:589 +#: ../../library/gettext.rst:590 msgid "" "Note that the second use of :func:`_` will not identify \"a\" as being " "translatable to the :program:`gettext` program, because the parameter is not " "a string literal." msgstr "" -#: ../../library/gettext.rst:593 +#: ../../library/gettext.rst:594 msgid "Another way to handle this is with the following example::" msgstr "" -#: ../../library/gettext.rst:607 +#: ../../library/gettext.rst:608 msgid "" "In this case, you are marking translatable strings with the function :func:" "`N_`, which won't conflict with any definition of :func:`_`. However, you " @@ -700,54 +700,54 @@ msgid "" "`MarkThisStringForTranslation`." msgstr "" -#: ../../library/gettext.rst:618 +#: ../../library/gettext.rst:619 msgid "Acknowledgements" msgstr "致謝" -#: ../../library/gettext.rst:620 +#: ../../library/gettext.rst:621 msgid "" "The following people contributed code, feedback, design suggestions, " "previous implementations, and valuable experience to the creation of this " "module:" msgstr "" -#: ../../library/gettext.rst:623 +#: ../../library/gettext.rst:624 msgid "Peter Funk" msgstr "Peter Funk" -#: ../../library/gettext.rst:625 +#: ../../library/gettext.rst:626 msgid "James Henstridge" msgstr "James Henstridge" -#: ../../library/gettext.rst:627 +#: ../../library/gettext.rst:628 msgid "Juan David Ibáñez Palomar" msgstr "Juan David Ibáñez Palomar" -#: ../../library/gettext.rst:629 +#: ../../library/gettext.rst:630 msgid "Marc-André Lemburg" msgstr "Marc-André Lemburg" -#: ../../library/gettext.rst:631 +#: ../../library/gettext.rst:632 msgid "Martin von Löwis" msgstr "Martin von Löwis" -#: ../../library/gettext.rst:633 +#: ../../library/gettext.rst:634 msgid "François Pinard" msgstr "François Pinard" -#: ../../library/gettext.rst:635 +#: ../../library/gettext.rst:636 msgid "Barry Warsaw" msgstr "Barry Warsaw" -#: ../../library/gettext.rst:637 +#: ../../library/gettext.rst:638 msgid "Gustavo Niemeyer" msgstr "Gustavo Niemeyer" -#: ../../library/gettext.rst:640 +#: ../../library/gettext.rst:641 msgid "Footnotes" msgstr "註解" -#: ../../library/gettext.rst:641 +#: ../../library/gettext.rst:642 msgid "" "The default locale directory is system dependent; for example, on RedHat " "Linux it is :file:`/usr/share/locale`, but on Solaris it is :file:`/usr/lib/" @@ -758,7 +758,7 @@ msgid "" "your application." msgstr "" -#: ../../library/gettext.rst:649 +#: ../../library/gettext.rst:650 msgid "See the footnote for :func:`bindtextdomain` above." msgstr "請見上方 :func:`bindtextdomain` 之註解。" diff --git a/library/mailbox.po b/library/mailbox.po index a9f92f7cc2..a8a1eb86e8 100644 --- a/library/mailbox.po +++ b/library/mailbox.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-09-28 00:27+0000\n" +"POT-Creation-Date: 2023-07-24 00:03+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-" @@ -540,7 +540,7 @@ msgstr "" #: ../../library/mailbox.rst:739 msgid "" "Three locking mechanisms are used---dot locking and, if available, the :c:" -"func:`flock` and :c:func:`lockf` system calls." +"func:`!flock` and :c:func:`!lockf` system calls." msgstr "" #: ../../library/mailbox.rst:486 @@ -665,8 +665,8 @@ msgstr "" #: ../../library/mailbox.rst:590 msgid "" "Three locking mechanisms are used---dot locking and, if available, the :c:" -"func:`flock` and :c:func:`lockf` system calls. For MH mailboxes, locking the " -"mailbox means locking the :file:`.mh_sequences` file and, only for the " +"func:`!flock` and :c:func:`!lockf` system calls. For MH mailboxes, locking " +"the mailbox means locking the :file:`.mh_sequences` file and, only for the " "duration of any operations that affect them, locking individual message " "files." msgstr "" diff --git a/library/os.po b/library/os.po index 67b3d7363a..5e6f3f0066 100644 --- a/library/os.po +++ b/library/os.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-22 00:04+0000\n" +"POT-Creation-Date: 2023-07-24 00:03+0000\n" "PO-Revision-Date: 2022-10-16 08:11+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -816,13 +816,13 @@ msgstr "" #: ../../library/os.rst:717 msgid "" -"Call the system call :c:func:`getsid`. See the Unix manual for the " +"Call the system call :c:func:`!getsid`. See the Unix manual for the " "semantics." msgstr "" #: ../../library/os.rst:724 msgid "" -"Call the system call :c:func:`setsid`. See the Unix manual for the " +"Call the system call :c:func:`!setsid`. See the Unix manual for the " "semantics." msgstr "" @@ -833,7 +833,7 @@ msgstr "" #: ../../library/os.rst:741 msgid "" "Return the error message corresponding to the error code in *code*. On " -"platforms where :c:func:`strerror` returns ``NULL`` when given an unknown " +"platforms where :c:func:`!strerror` returns ``NULL`` when given an unknown " "error number, :exc:`ValueError` is raised." msgstr "" @@ -5169,7 +5169,7 @@ msgstr "" #: ../../library/os.rst:4652 msgid "" "The return value is an object representing the data contained in the :c:type:" -"`!siginfo_t` structure with the following attributes:" +"`siginfo_t` structure with the following attributes:" msgstr "" #: ../../library/os.rst:4655 diff --git a/library/re.po b/library/re.po index becbf3c2a8..e7d4eef380 100644 --- a/library/re.po +++ b/library/re.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-23 00:04+0000\n" +"POT-Creation-Date: 2023-07-24 00:03+0000\n" "PO-Revision-Date: 2023-05-20 13:44+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -877,8 +877,8 @@ msgstr "" #: ../../library/re.rst:637 msgid "" -"Most of the standard escapes supported by Python string literals are also " -"accepted by the regular expression parser::" +"Most of the :ref:`escape sequences ` supported by Python " +"string literals are also accepted by the regular expression parser::" msgstr "" #: ../../library/re.rst:644 diff --git a/library/select.po b/library/select.po index 79302136d3..d8d03c432e 100644 --- a/library/select.po +++ b/library/select.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-05-09 00:15+0000\n" +"POT-Creation-Date: 2023-07-24 00:03+0000\n" "PO-Revision-Date: 2018-05-23 16:09+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -24,13 +24,13 @@ msgstr "" #: ../../library/select.rst:9 msgid "" -"This module provides access to the :c:func:`select` and :c:func:`poll` " -"functions available in most operating systems, :c:func:`devpoll` available " -"on Solaris and derivatives, :c:func:`epoll` available on Linux 2.5+ and :c:" -"func:`kqueue` available on most BSD. Note that on Windows, it only works for " -"sockets; on other operating systems, it also works for other file types (in " -"particular, on Unix, it works on pipes). It cannot be used on regular files " -"to determine whether a file has grown since it was last read." +"This module provides access to the :c:func:`!select` and :c:func:`!poll` " +"functions available in most operating systems, :c:func:`!devpoll` available " +"on Solaris and derivatives, :c:func:`!epoll` available on Linux 2.5+ and :c:" +"func:`!kqueue` available on most BSD. Note that on Windows, it only works " +"for sockets; on other operating systems, it also works for other file types " +"(in particular, on Unix, it works on pipes). It cannot be used on regular " +"files to determine whether a file has grown since it was last read." msgstr "" #: ../../library/select.rst:20 @@ -73,10 +73,10 @@ msgstr "" #: ../../library/select.rst:44 msgid "" -":c:func:`devpoll` objects are linked to the number of file descriptors " +":c:func:`!devpoll` objects are linked to the number of file descriptors " "allowed at the time of instantiation. If your program reduces this value, :c:" -"func:`devpoll` will fail. If your program increases this value, :c:func:" -"`devpoll` may return an incomplete list of active file descriptors." +"func:`!devpoll` will fail. If your program increases this value, :c:func:`!" +"devpoll` may return an incomplete list of active file descriptors." msgstr "" #: ../../library/select.rst:50 ../../library/select.rst:79 @@ -98,7 +98,7 @@ msgstr "" msgid "" "*sizehint* informs epoll about the expected number of events to be " "registered. It must be positive, or ``-1`` to use the default. It is only " -"used on older systems where :c:func:`epoll_create1` is not available; " +"used on older systems where :c:func:`!epoll_create1` is not available; " "otherwise it has no effect (though its value is still checked)." msgstr "" @@ -160,7 +160,7 @@ msgstr "" #: ../../library/select.rst:120 msgid "" -"This is a straightforward interface to the Unix :c:func:`select` system " +"This is a straightforward interface to the Unix :c:func:`!select` system " "call. The first three arguments are iterables of 'waitable objects': either " "integers representing file descriptors or objects with a parameterless " "method named :meth:`~io.IOBase.fileno` returning such an integer:" @@ -210,8 +210,9 @@ msgstr "" #: ../../library/select.rst:156 msgid "" "File objects on Windows are not acceptable, but sockets are. On Windows, " -"the underlying :c:func:`select` function is provided by the WinSock library, " -"and does not handle file descriptors that don't originate from WinSock." +"the underlying :c:func:`!select` function is provided by the WinSock " +"library, and does not handle file descriptors that don't originate from " +"WinSock." msgstr "" #: ../../library/select.rst:161 ../../library/select.rst:267 @@ -227,7 +228,7 @@ msgstr "" msgid "" "The minimum number of bytes which can be written without blocking to a pipe " "when the pipe has been reported as ready for writing by :func:`~select." -"select`, :func:`poll` or another interface in this module. This doesn't " +"select`, :func:`!poll` or another interface in this module. This doesn't " "apply to other kind of file-like objects such as sockets." msgstr "" @@ -245,14 +246,14 @@ msgstr "" #: ../../library/select.rst:187 msgid "" -"Solaris and derivatives have ``/dev/poll``. While :c:func:`select` is " -"O(highest file descriptor) and :c:func:`poll` is O(number of file " +"Solaris and derivatives have ``/dev/poll``. While :c:func:`!select` is " +"O(highest file descriptor) and :c:func:`!poll` is O(number of file " "descriptors), ``/dev/poll`` is O(active file descriptors)." msgstr "" #: ../../library/select.rst:191 msgid "" -"``/dev/poll`` behaviour is very close to the standard :c:func:`poll` object." +"``/dev/poll`` behaviour is very close to the standard :c:func:`!poll` object." msgstr "" #: ../../library/select.rst:197 @@ -279,7 +280,7 @@ msgstr "" #: ../../library/select.rst:224 msgid "" "*eventmask* is an optional bitmask describing the type of events you want to " -"check for. The constants are the same that with :c:func:`poll` object. The " +"check for. The constants are the same that with :c:func:`!poll` object. The " "default value is a combination of the constants :const:`POLLIN`, :const:" "`POLLPRI`, and :const:`POLLOUT`." msgstr "" @@ -288,7 +289,7 @@ msgstr "" msgid "" "Registering a file descriptor that's already registered is not an error, but " "the result is undefined. The appropriate action is to unregister or modify " -"it first. This is an important difference compared with :c:func:`poll`." +"it first. This is an important difference compared with :c:func:`!poll`." msgstr "" #: ../../library/select.rst:239 @@ -515,13 +516,13 @@ msgstr "" #: ../../library/select.rst:379 msgid "" -"The :c:func:`poll` system call, supported on most Unix systems, provides " +"The :c:func:`!poll` system call, supported on most Unix systems, provides " "better scalability for network servers that service many, many clients at " -"the same time. :c:func:`poll` scales better because the system call only " -"requires listing the file descriptors of interest, while :c:func:`select` " +"the same time. :c:func:`!poll` scales better because the system call only " +"requires listing the file descriptors of interest, while :c:func:`!select` " "builds a bitmap, turns on bits for the fds of interest, and then afterward " -"the whole bitmap has to be linearly scanned again. :c:func:`select` is " -"O(highest file descriptor), while :c:func:`poll` is O(number of file " +"the whole bitmap has to be linearly scanned again. :c:func:`!select` is " +"O(highest file descriptor), while :c:func:`!poll` is O(number of file " "descriptors)." msgstr "" diff --git a/library/signal.po b/library/signal.po index be7aa7e009..186dbd0336 100644 --- a/library/signal.po +++ b/library/signal.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-04-24 00:16+0000\n" +"POT-Creation-Date: 2023-07-24 00:03+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-" @@ -498,7 +498,8 @@ msgid "" "Raises an :ref:`auditing event ` ``signal.pthread_kill`` with " "arguments ``thread_id``, ``signalnum``." msgstr "" -"引發一個附帶引數 ``thread_id``、``signalnum`` 的\\ :ref:`稽核事件 ` ``signal.pthread_kill``。" +"引發一個附帶引數 ``thread_id``、``signalnum`` 的\\ :ref:`稽核事件 " +"` ``signal.pthread_kill``。" #: ../../library/signal.rst:437 msgid "See the man page :manpage:`pthread_kill(3)` for further information." @@ -666,8 +667,8 @@ msgstr "更多資訊請見 :manpage:`siginterrupt(3)` 手冊頁。" #: ../../library/signal.rst:563 msgid "" "Note that installing a signal handler with :func:`signal` will reset the " -"restart behaviour to interruptible by implicitly calling :c:func:" -"`siginterrupt` with a true *flag* value for the given signal." +"restart behaviour to interruptible by implicitly calling :c:func:`!" +"siginterrupt` with a true *flag* value for the given signal." msgstr "" #: ../../library/signal.rst:570 diff --git a/library/struct.po b/library/struct.po index 6b5723362f..7504d1edb1 100644 --- a/library/struct.po +++ b/library/struct.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-17 17:39+0800\n" +"POT-Creation-Date: 2023-07-24 00:03+0000\n" "PO-Revision-Date: 2018-05-23 16:11+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -492,7 +492,8 @@ msgid "``n``" msgstr "``n``" #: ../../library/struct.rst:234 -msgid ":c:expr:`ssize_t`" +#, fuzzy +msgid ":c:type:`ssize_t`" msgstr ":c:expr:`ssize_t`" #: ../../library/struct.rst:234 ../../library/struct.rst:236 @@ -504,7 +505,8 @@ msgid "``N``" msgstr "``N``" #: ../../library/struct.rst:236 -msgid ":c:expr:`size_t`" +#, fuzzy +msgid ":c:type:`size_t`" msgstr ":c:expr:`size_t`" #: ../../library/struct.rst:238 diff --git a/library/turtle.po b/library/turtle.po index 7a026c328b..3b21472329 100644 --- a/library/turtle.po +++ b/library/turtle.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-17 17:39+0800\n" +"POT-Creation-Date: 2023-07-24 00:03+0000\n" "PO-Revision-Date: 2018-05-23 16:13+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -34,44 +34,192 @@ msgstr "介紹" #: ../../library/turtle.rst:22 #, fuzzy msgid "" -"Turtle graphics is a popular way for introducing programming to kids. It " -"was part of the original Logo programming language developed by Wally " -"Feurzeig, Seymour Papert and Cynthia Solomon in 1967." +"Turtle graphics is an implementation of `the popular geometric drawing tools " +"introduced in Logo `_, " +"developed by Wally Feurzeig, Seymour Papert and Cynthia Solomon in 1967." msgstr "" "龜圖學是介紹程式設計給孩子們的常用方法,這是由 Wally Feurzeig 和 Seymour " "Papert 於 1966 年開發的原始 Logo 程式語言的一部分。" -#: ../../library/turtle.rst:26 +#: ../../library/turtle.rst:29 msgid "" -"Imagine a robotic turtle starting at (0, 0) in the x-y plane. After an " -"``import turtle``, give it the command ``turtle.forward(15)``, and it moves " -"(on-screen!) 15 pixels in the direction it is facing, drawing a line as it " -"moves. Give it the command ``turtle.right(25)``, and it rotates in-place 25 " -"degrees clockwise." +"Turtle can draw intricate shapes using programs that repeat simple moves." +msgstr "龜可以使用重複簡單動作之程式來畫出複雜的形狀。" + +#: ../../library/turtle.rst:35 +msgid "" +"In Python, turtle graphics provides a representation of a physical " +"\"turtle\" (a little robot with a pen) that draws on a sheet of paper on the " +"floor." msgstr "" -"想像一下,一隻機器龜在 x-y 平面上從 (0, 0) 出發。在 ``import turtle`` 之後," -"給它命令 ``turtle.forward(15)`` ,然後它就會移動 (在螢幕上!) 15 個單位像素," -"方向是朝著其正面對的方向。給它命令 ``turtle.right(25)`` ,它就會在原地順時針" -"旋轉 25 度。" -#: ../../library/turtle.rst:33 +#: ../../library/turtle.rst:38 msgid "" -"Turtle can draw intricate shapes using programs that repeat simple moves." -msgstr "龜可以使用重複簡單動作之程式來畫出複雜的形狀。" +"It's an effective and well-proven way for learners to encounter programming " +"concepts and interaction with software, as it provides instant, visible " +"feedback. It also provides convenient access to graphical output in general." +msgstr "" + +#: ../../library/turtle.rst:43 +msgid "" +"Turtle drawing was originally created as an educational tool, to be used by " +"teachers in the classroom. For the programmer who needs to produce some " +"graphical output it can be a way to do that without the overhead of " +"introducing more complex or external libraries into their work." +msgstr "" + +#: ../../library/turtle.rst:50 +msgid "Tutorial" +msgstr "" + +#: ../../library/turtle.rst:52 +msgid "" +"New users should start here. In this tutorial we'll explore some of the " +"basics of turtle drawing." +msgstr "" + +#: ../../library/turtle.rst:57 +msgid "Starting a turtle environment" +msgstr "" + +#: ../../library/turtle.rst:59 +msgid "In a Python shell, import all the objects of the ``turtle`` module::" +msgstr "" + +#: ../../library/turtle.rst:63 +msgid "" +"If you run into a ``No module named '_tkinter'`` error, you'll have to " +"install the :mod:`Tk interface package ` on your system." +msgstr "" + +#: ../../library/turtle.rst:68 +msgid "Basic drawing" +msgstr "" + +#: ../../library/turtle.rst:70 +msgid "Send the turtle forward 100 steps::" +msgstr "" + +#: ../../library/turtle.rst:74 +msgid "" +"You should see (most likely, in a new window on your display) a line drawn " +"by the turtle, heading East. Change the direction of the turtle, so that it " +"turns 120 degrees left (anti-clockwise)::" +msgstr "" + +#: ../../library/turtle.rst:80 +msgid "Let's continue by drawing a triangle::" +msgstr "" + +#: ../../library/turtle.rst:86 +msgid "" +"Notice how the turtle, represented by an arrow, points in different " +"directions as you steer it." +msgstr "" + +#: ../../library/turtle.rst:89 +msgid "" +"Experiment with those commands, and also with ``backward()`` and ``right()``." +msgstr "" + +#: ../../library/turtle.rst:94 ../../library/turtle.rst:283 +#: ../../library/turtle.rst:953 +msgid "Pen control" +msgstr "" + +#: ../../library/turtle.rst:96 +msgid "" +"Try changing the color - for example, ``color('blue')`` - and width of the " +"line - for example, ``width(3)`` - and then drawing again." +msgstr "" + +#: ../../library/turtle.rst:99 +msgid "" +"You can also move the turtle around without drawing, by lifting up the pen: " +"``up()`` before moving. To start drawing again, use ``down()``." +msgstr "" + +#: ../../library/turtle.rst:104 +msgid "The turtle's position" +msgstr "" + +#: ../../library/turtle.rst:106 +msgid "" +"Send your turtle back to its starting-point (useful if it has disappeared " +"off-screen)::" +msgstr "" + +#: ../../library/turtle.rst:111 +msgid "" +"The home position is at the center of the turtle's screen. If you ever need " +"to know them, get the turtle's x-y co-ordinates with::" +msgstr "" + +#: ../../library/turtle.rst:116 +msgid "Home is at ``(0, 0)``." +msgstr "" + +#: ../../library/turtle.rst:118 +msgid "" +"And after a while, it will probably help to clear the window so we can start " +"anew::" +msgstr "" + +#: ../../library/turtle.rst:125 +msgid "Making algorithmic patterns" +msgstr "" + +#: ../../library/turtle.rst:127 +msgid "Using loops, it's possible to build up geometric patterns::" +msgstr "" + +#: ../../library/turtle.rst:136 +msgid "\\ - which of course, are limited only by the imagination!" +msgstr "" + +#: ../../library/turtle.rst:138 +msgid "" +"Let's draw the star shape at the top of this page. We want red lines, filled " +"in with yellow::" +msgstr "" -#: ../../library/turtle.rst:41 +#: ../../library/turtle.rst:144 msgid "" -"By combining together these and similar commands, intricate shapes and " -"pictures can easily be drawn." -msgstr "藉由結合這些類似的命令,複雜的形狀和圖形可以輕易被畫出來。" +"Just as ``up()`` and ``down()`` determine whether lines will be drawn, " +"filling can be turned on and off::" +msgstr "" + +#: ../../library/turtle.rst:149 +msgid "Next we'll create a loop::" +msgstr "" + +#: ../../library/turtle.rst:157 +msgid "" +"``abs(pos()) < 1`` is a good way to know when the turtle is back at its home " +"position." +msgstr "" + +#: ../../library/turtle.rst:160 +msgid "Finally, complete the filling::" +msgstr "" + +#: ../../library/turtle.rst:164 +msgid "" +"(Note that filling only actually takes place when you give the " +"``end_fill()`` command.)" +msgstr "" + +#: ../../library/turtle.rst:169 +msgid "Explanation" +msgstr "" -#: ../../library/turtle.rst:44 +#: ../../library/turtle.rst:171 msgid "" "The :mod:`turtle` module is an extended reimplementation of the same-named " "module from the Python standard distribution up to version Python 2.5." msgstr "" -#: ../../library/turtle.rst:47 +#: ../../library/turtle.rst:174 msgid "" "It tries to keep the merits of the old turtle module and to be (nearly) 100% " "compatible with it. This means in the first place to enable the learning " @@ -79,7 +227,7 @@ msgid "" "using the module from within IDLE run with the ``-n`` switch." msgstr "" -#: ../../library/turtle.rst:52 +#: ../../library/turtle.rst:179 msgid "" "The turtle module provides turtle graphics primitives, in both object-" "oriented and procedure-oriented ways. Because it uses :mod:`tkinter` for " @@ -87,11 +235,11 @@ msgid "" "support." msgstr "" -#: ../../library/turtle.rst:56 +#: ../../library/turtle.rst:183 msgid "The object-oriented interface uses essentially two+two classes:" msgstr "" -#: ../../library/turtle.rst:58 +#: ../../library/turtle.rst:185 msgid "" "The :class:`TurtleScreen` class defines graphics windows as a playground for " "the drawing turtles. Its constructor needs a :class:`tkinter.Canvas` or a :" @@ -99,7 +247,7 @@ msgid "" "used as part of some application." msgstr "" -#: ../../library/turtle.rst:63 +#: ../../library/turtle.rst:190 msgid "" "The function :func:`Screen` returns a singleton object of a :class:" "`TurtleScreen` subclass. This function should be used when :mod:`turtle` is " @@ -107,13 +255,13 @@ msgid "" "inheriting from its class is not possible." msgstr "" -#: ../../library/turtle.rst:68 +#: ../../library/turtle.rst:195 msgid "" "All methods of TurtleScreen/Screen also exist as functions, i.e. as part of " "the procedure-oriented interface." msgstr "" -#: ../../library/turtle.rst:71 +#: ../../library/turtle.rst:198 msgid "" ":class:`RawTurtle` (alias: :class:`RawPen`) defines Turtle objects which " "draw on a :class:`TurtleScreen`. Its constructor needs a Canvas, " @@ -121,20 +269,20 @@ msgid "" "where to draw." msgstr "" -#: ../../library/turtle.rst:75 +#: ../../library/turtle.rst:202 msgid "" "Derived from RawTurtle is the subclass :class:`Turtle` (alias: :class:" "`Pen`), which draws on \"the\" :class:`Screen` instance which is " "automatically created, if not already present." msgstr "" -#: ../../library/turtle.rst:79 +#: ../../library/turtle.rst:206 msgid "" "All methods of RawTurtle/Turtle also exist as functions, i.e. part of the " "procedure-oriented interface." msgstr "" -#: ../../library/turtle.rst:82 +#: ../../library/turtle.rst:209 msgid "" "The procedural interface provides functions which are derived from the " "methods of the classes :class:`Screen` and :class:`Turtle`. They have the " @@ -144,32 +292,32 @@ msgid "" "functions derived from a Turtle method is called." msgstr "" -#: ../../library/turtle.rst:89 +#: ../../library/turtle.rst:216 msgid "" "To use multiple turtles on a screen one has to use the object-oriented " "interface." msgstr "" -#: ../../library/turtle.rst:92 +#: ../../library/turtle.rst:219 msgid "" "In the following documentation the argument list for functions is given. " "Methods, of course, have the additional first argument *self* which is " "omitted here." msgstr "" -#: ../../library/turtle.rst:98 -msgid "Overview of available Turtle and Screen methods" +#: ../../library/turtle.rst:225 +msgid "Turtle graphics reference" msgstr "" -#: ../../library/turtle.rst:101 +#: ../../library/turtle.rst:228 msgid "Turtle methods" msgstr "" -#: ../../library/turtle.rst:133 ../../library/turtle.rst:243 +#: ../../library/turtle.rst:260 ../../library/turtle.rst:370 msgid "Turtle motion" msgstr "" -#: ../../library/turtle.rst:121 +#: ../../library/turtle.rst:248 msgid "Move and draw" msgstr "" @@ -213,7 +361,7 @@ msgstr ":func:`setheading` | :func:`seth`" msgid ":func:`home`" msgstr ":func:`home`" -#: ../../library/turtle.rst:0 ../../library/turtle.rst:2498 +#: ../../library/turtle.rst:0 ../../library/turtle.rst:2625 msgid ":func:`circle`" msgstr ":func:`circle`" @@ -221,7 +369,7 @@ msgstr ":func:`circle`" msgid ":func:`dot`" msgstr ":func:`dot`" -#: ../../library/turtle.rst:0 ../../library/turtle.rst:2476 +#: ../../library/turtle.rst:0 ../../library/turtle.rst:2603 msgid ":func:`stamp`" msgstr ":func:`stamp`" @@ -241,7 +389,7 @@ msgstr ":func:`undo`" msgid ":func:`speed`" msgstr ":func:`speed`" -#: ../../library/turtle.rst:129 ../../library/turtle.rst:675 +#: ../../library/turtle.rst:256 ../../library/turtle.rst:802 msgid "Tell Turtle's state" msgstr "" @@ -269,7 +417,7 @@ msgstr ":func:`heading`" msgid ":func:`distance`" msgstr ":func:`distance`" -#: ../../library/turtle.rst:133 +#: ../../library/turtle.rst:260 msgid "Setting and measurement" msgstr "" @@ -281,11 +429,7 @@ msgstr ":func:`degrees`" msgid ":func:`radians`" msgstr ":func:`radians`" -#: ../../library/turtle.rst:156 ../../library/turtle.rst:826 -msgid "Pen control" -msgstr "" - -#: ../../library/turtle.rst:141 ../../library/turtle.rst:829 +#: ../../library/turtle.rst:268 ../../library/turtle.rst:956 msgid "Drawing state" msgstr "" @@ -309,7 +453,7 @@ msgstr ":func:`pen`" msgid ":func:`isdown`" msgstr ":func:`isdown`" -#: ../../library/turtle.rst:146 ../../library/turtle.rst:921 +#: ../../library/turtle.rst:273 ../../library/turtle.rst:1048 msgid "Color control" msgstr "" @@ -325,7 +469,7 @@ msgstr ":func:`pencolor`" msgid ":func:`fillcolor`" msgstr ":func:`fillcolor`" -#: ../../library/turtle.rst:151 ../../library/turtle.rst:1053 +#: ../../library/turtle.rst:278 ../../library/turtle.rst:1180 msgid "Filling" msgstr "" @@ -341,7 +485,7 @@ msgstr ":func:`begin_fill`" msgid ":func:`end_fill`" msgstr ":func:`end_fill`" -#: ../../library/turtle.rst:156 ../../library/turtle.rst:1100 +#: ../../library/turtle.rst:283 ../../library/turtle.rst:1227 msgid "More drawing control" msgstr "" @@ -357,11 +501,11 @@ msgstr ":func:`clear`" msgid ":func:`write`" msgstr ":func:`write`" -#: ../../library/turtle.rst:173 ../../library/turtle.rst:1146 +#: ../../library/turtle.rst:300 ../../library/turtle.rst:1273 msgid "Turtle state" msgstr "" -#: ../../library/turtle.rst:162 ../../library/turtle.rst:1149 +#: ../../library/turtle.rst:289 ../../library/turtle.rst:1276 msgid "Visibility" msgstr "" @@ -377,7 +521,7 @@ msgstr ":func:`hideturtle` | :func:`ht`" msgid ":func:`isvisible`" msgstr ":func:`isvisible`" -#: ../../library/turtle.rst:173 ../../library/turtle.rst:1188 +#: ../../library/turtle.rst:300 ../../library/turtle.rst:1315 msgid "Appearance" msgstr "" @@ -417,11 +561,11 @@ msgstr ":func:`shapetransform`" msgid ":func:`get_shapepoly`" msgstr ":func:`get_shapepoly`" -#: ../../library/turtle.rst:178 ../../library/turtle.rst:1393 +#: ../../library/turtle.rst:305 ../../library/turtle.rst:1520 msgid "Using events" msgstr "" -#: ../../library/turtle.rst:0 ../../library/turtle.rst:2470 +#: ../../library/turtle.rst:0 ../../library/turtle.rst:2597 msgid ":func:`onclick`" msgstr ":func:`onclick`" @@ -429,11 +573,11 @@ msgstr ":func:`onclick`" msgid ":func:`onrelease`" msgstr ":func:`onrelease`" -#: ../../library/turtle.rst:0 ../../library/turtle.rst:2453 +#: ../../library/turtle.rst:0 ../../library/turtle.rst:2580 msgid ":func:`ondrag`" msgstr ":func:`ondrag`" -#: ../../library/turtle.rst:189 ../../library/turtle.rst:1467 +#: ../../library/turtle.rst:316 ../../library/turtle.rst:1594 msgid "Special Turtle methods" msgstr "" @@ -449,7 +593,7 @@ msgstr ":func:`end_poly`" msgid ":func:`get_poly`" msgstr ":func:`get_poly`" -#: ../../library/turtle.rst:0 ../../library/turtle.rst:2492 +#: ../../library/turtle.rst:0 ../../library/turtle.rst:2619 msgid ":func:`clone`" msgstr ":func:`clone`" @@ -469,11 +613,11 @@ msgstr ":func:`setundobuffer`" msgid ":func:`undobufferentries`" msgstr ":func:`undobufferentries`" -#: ../../library/turtle.rst:192 +#: ../../library/turtle.rst:319 msgid "Methods of TurtleScreen/Screen" msgstr "" -#: ../../library/turtle.rst:200 ../../library/turtle.rst:1621 +#: ../../library/turtle.rst:327 ../../library/turtle.rst:1748 msgid "Window control" msgstr "" @@ -501,7 +645,7 @@ msgstr ":func:`screensize`" msgid ":func:`setworldcoordinates`" msgstr ":func:`setworldcoordinates`" -#: ../../library/turtle.rst:205 ../../library/turtle.rst:1744 +#: ../../library/turtle.rst:332 ../../library/turtle.rst:1871 msgid "Animation control" msgstr "" @@ -517,7 +661,7 @@ msgstr ":func:`tracer`" msgid ":func:`update`" msgstr ":func:`update`" -#: ../../library/turtle.rst:213 ../../library/turtle.rst:1797 +#: ../../library/turtle.rst:340 ../../library/turtle.rst:1924 msgid "Using screen events" msgstr "" @@ -545,7 +689,7 @@ msgstr ":func:`ontimer`" msgid ":func:`mainloop` | :func:`done`" msgstr ":func:`mainloop` | :func:`done`" -#: ../../library/turtle.rst:223 ../../library/turtle.rst:1942 +#: ../../library/turtle.rst:350 ../../library/turtle.rst:2069 msgid "Settings and special methods" msgstr "" @@ -581,7 +725,7 @@ msgstr ":func:`window_height`" msgid ":func:`window_width`" msgstr ":func:`window_width`" -#: ../../library/turtle.rst:227 ../../library/turtle.rst:1906 +#: ../../library/turtle.rst:354 ../../library/turtle.rst:2033 msgid "Input methods" msgstr "" @@ -593,7 +737,7 @@ msgstr ":func:`textinput`" msgid ":func:`numinput`" msgstr ":func:`numinput`" -#: ../../library/turtle.rst:234 +#: ../../library/turtle.rst:361 msgid "Methods specific to Screen" msgstr "" @@ -613,11 +757,11 @@ msgstr ":func:`setup`" msgid ":func:`title`" msgstr ":func:`title`" -#: ../../library/turtle.rst:237 +#: ../../library/turtle.rst:364 msgid "Methods of RawTurtle/Turtle and corresponding functions" msgstr "" -#: ../../library/turtle.rst:239 +#: ../../library/turtle.rst:366 msgid "" "Most of the examples in this section refer to a Turtle instance called " "``turtle``." @@ -627,70 +771,70 @@ msgstr "" msgid "Parameters" msgstr "參數" -#: ../../library/turtle.rst:248 ../../library/turtle.rst:293 -#: ../../library/turtle.rst:318 ../../library/turtle.rst:416 -#: ../../library/turtle.rst:439 ../../library/turtle.rst:462 +#: ../../library/turtle.rst:375 ../../library/turtle.rst:420 +#: ../../library/turtle.rst:445 ../../library/turtle.rst:543 +#: ../../library/turtle.rst:566 ../../library/turtle.rst:589 msgid "a number (integer or float)" msgstr "" -#: ../../library/turtle.rst:250 +#: ../../library/turtle.rst:377 msgid "" "Move the turtle forward by the specified *distance*, in the direction the " "turtle is headed." msgstr "" -#: ../../library/turtle.rst:270 ../../library/turtle.rst:512 -#: ../../library/turtle.rst:779 ../../library/turtle.rst:1287 -#: ../../library/turtle.rst:1306 +#: ../../library/turtle.rst:397 ../../library/turtle.rst:639 +#: ../../library/turtle.rst:906 ../../library/turtle.rst:1414 +#: ../../library/turtle.rst:1433 msgid "a number" msgstr "" -#: ../../library/turtle.rst:272 +#: ../../library/turtle.rst:399 msgid "" "Move the turtle backward by *distance*, opposite to the direction the turtle " "is headed. Do not change the turtle's heading." msgstr "" -#: ../../library/turtle.rst:295 +#: ../../library/turtle.rst:422 msgid "" "Turn turtle right by *angle* units. (Units are by default degrees, but can " "be set via the :func:`degrees` and :func:`radians` functions.) Angle " "orientation depends on the turtle mode, see :func:`mode`." msgstr "" -#: ../../library/turtle.rst:320 +#: ../../library/turtle.rst:447 msgid "" "Turn turtle left by *angle* units. (Units are by default degrees, but can " "be set via the :func:`degrees` and :func:`radians` functions.) Angle " "orientation depends on the turtle mode, see :func:`mode`." msgstr "" -#: ../../library/turtle.rst:344 +#: ../../library/turtle.rst:471 msgid "a number or a pair/vector of numbers" msgstr "" -#: ../../library/turtle.rst:345 ../../library/turtle.rst:378 -#: ../../library/turtle.rst:379 +#: ../../library/turtle.rst:472 ../../library/turtle.rst:505 +#: ../../library/turtle.rst:506 msgid "a number or ``None``" msgstr "" -#: ../../library/turtle.rst:347 +#: ../../library/turtle.rst:474 msgid "" "If *y* is ``None``, *x* must be a pair of coordinates or a :class:`Vec2D` (e." "g. as returned by :func:`pos`)." msgstr "" -#: ../../library/turtle.rst:350 +#: ../../library/turtle.rst:477 msgid "" "Move turtle to an absolute position. If the pen is down, draw line. Do not " "change the turtle's orientation." msgstr "" -#: ../../library/turtle.rst:380 +#: ../../library/turtle.rst:507 msgid "a boolean" msgstr "" -#: ../../library/turtle.rst:382 +#: ../../library/turtle.rst:509 msgid "" "Move turtle to an absolute position. Unlike goto(x, y), a line will not be " "drawn. The turtle's orientation does not change. If currently filling, the " @@ -700,77 +844,77 @@ msgid "" "barrier like in goto(x, y)." msgstr "" -#: ../../library/turtle.rst:418 +#: ../../library/turtle.rst:545 msgid "" "Set the turtle's first coordinate to *x*, leave second coordinate unchanged." msgstr "" -#: ../../library/turtle.rst:441 +#: ../../library/turtle.rst:568 msgid "" "Set the turtle's second coordinate to *y*, leave first coordinate unchanged." msgstr "" -#: ../../library/turtle.rst:464 +#: ../../library/turtle.rst:591 msgid "" "Set the orientation of the turtle to *to_angle*. Here are some common " "directions in degrees:" msgstr "" -#: ../../library/turtle.rst:468 +#: ../../library/turtle.rst:595 msgid "standard mode" msgstr "" -#: ../../library/turtle.rst:468 +#: ../../library/turtle.rst:595 msgid "logo mode" msgstr "" -#: ../../library/turtle.rst:470 +#: ../../library/turtle.rst:597 msgid "0 - east" msgstr "" -#: ../../library/turtle.rst:470 +#: ../../library/turtle.rst:597 msgid "0 - north" msgstr "" -#: ../../library/turtle.rst:471 +#: ../../library/turtle.rst:598 msgid "90 - north" msgstr "" -#: ../../library/turtle.rst:471 +#: ../../library/turtle.rst:598 msgid "90 - east" msgstr "" -#: ../../library/turtle.rst:472 +#: ../../library/turtle.rst:599 msgid "180 - west" msgstr "" -#: ../../library/turtle.rst:472 +#: ../../library/turtle.rst:599 msgid "180 - south" msgstr "" -#: ../../library/turtle.rst:473 +#: ../../library/turtle.rst:600 msgid "270 - south" msgstr "" -#: ../../library/turtle.rst:473 +#: ../../library/turtle.rst:600 msgid "270 - west" msgstr "" -#: ../../library/turtle.rst:486 +#: ../../library/turtle.rst:613 msgid "" "Move turtle to the origin -- coordinates (0,0) -- and set its heading to its " "start-orientation (which depends on the mode, see :func:`mode`)." msgstr "" -#: ../../library/turtle.rst:513 +#: ../../library/turtle.rst:640 msgid "a number (or ``None``)" msgstr "" -#: ../../library/turtle.rst:514 ../../library/turtle.rst:607 +#: ../../library/turtle.rst:641 ../../library/turtle.rst:734 msgid "an integer (or ``None``)" msgstr "" -#: ../../library/turtle.rst:516 +#: ../../library/turtle.rst:643 msgid "" "Draw a circle with given *radius*. The center is *radius* units left of the " "turtle; *extent* -- an angle -- determines which part of the circle is " @@ -781,117 +925,117 @@ msgid "" "changed by the amount of *extent*." msgstr "" -#: ../../library/turtle.rst:524 +#: ../../library/turtle.rst:651 msgid "" "As the circle is approximated by an inscribed regular polygon, *steps* " "determines the number of steps to use. If not given, it will be calculated " "automatically. May be used to draw regular polygons." msgstr "" -#: ../../library/turtle.rst:550 +#: ../../library/turtle.rst:677 msgid "an integer >= 1 (if given)" msgstr "" -#: ../../library/turtle.rst:551 +#: ../../library/turtle.rst:678 msgid "a colorstring or a numeric color tuple" msgstr "" -#: ../../library/turtle.rst:553 +#: ../../library/turtle.rst:680 msgid "" "Draw a circular dot with diameter *size*, using *color*. If *size* is not " "given, the maximum of pensize+4 and 2*pensize is used." msgstr "" -#: ../../library/turtle.rst:571 +#: ../../library/turtle.rst:698 msgid "" "Stamp a copy of the turtle shape onto the canvas at the current turtle " "position. Return a stamp_id for that stamp, which can be used to delete it " "by calling ``clearstamp(stamp_id)``." msgstr "" -#: ../../library/turtle.rst:585 +#: ../../library/turtle.rst:712 msgid "an integer, must be return value of previous :func:`stamp` call" msgstr "" -#: ../../library/turtle.rst:588 +#: ../../library/turtle.rst:715 msgid "Delete stamp with given *stampid*." msgstr "" -#: ../../library/turtle.rst:609 +#: ../../library/turtle.rst:736 msgid "" "Delete all or first/last *n* of turtle's stamps. If *n* is ``None``, delete " "all stamps, if *n* > 0 delete first *n* stamps, else if *n* < 0 delete last " "*n* stamps." msgstr "" -#: ../../library/turtle.rst:625 +#: ../../library/turtle.rst:752 msgid "" "Undo (repeatedly) the last turtle action(s). Number of available undo " "actions is determined by the size of the undobuffer." msgstr "" -#: ../../library/turtle.rst:640 +#: ../../library/turtle.rst:767 msgid "an integer in the range 0..10 or a speedstring (see below)" msgstr "" -#: ../../library/turtle.rst:642 +#: ../../library/turtle.rst:769 msgid "" "Set the turtle's speed to an integer value in the range 0..10. If no " "argument is given, return current speed." msgstr "" -#: ../../library/turtle.rst:645 +#: ../../library/turtle.rst:772 msgid "" "If input is a number greater than 10 or smaller than 0.5, speed is set to " "0. Speedstrings are mapped to speedvalues as follows:" msgstr "" -#: ../../library/turtle.rst:648 +#: ../../library/turtle.rst:775 msgid "\"fastest\": 0" msgstr "" -#: ../../library/turtle.rst:649 +#: ../../library/turtle.rst:776 msgid "\"fast\": 10" msgstr "" -#: ../../library/turtle.rst:650 +#: ../../library/turtle.rst:777 msgid "\"normal\": 6" msgstr "" -#: ../../library/turtle.rst:651 +#: ../../library/turtle.rst:778 msgid "\"slow\": 3" msgstr "" -#: ../../library/turtle.rst:652 +#: ../../library/turtle.rst:779 msgid "\"slowest\": 1" msgstr "" -#: ../../library/turtle.rst:654 +#: ../../library/turtle.rst:781 msgid "" "Speeds from 1 to 10 enforce increasingly faster animation of line drawing " "and turtle turning." msgstr "" -#: ../../library/turtle.rst:657 +#: ../../library/turtle.rst:784 msgid "" "Attention: *speed* = 0 means that *no* animation takes place. forward/back " "makes turtle jump and likewise left/right make the turtle turn instantly." msgstr "" -#: ../../library/turtle.rst:680 +#: ../../library/turtle.rst:807 msgid "" "Return the turtle's current location (x,y) (as a :class:`Vec2D` vector)." msgstr "" -#: ../../library/turtle.rst:691 ../../library/turtle.rst:754 +#: ../../library/turtle.rst:818 ../../library/turtle.rst:881 msgid "a number or a pair/vector of numbers or a turtle instance" msgstr "" -#: ../../library/turtle.rst:692 ../../library/turtle.rst:755 +#: ../../library/turtle.rst:819 ../../library/turtle.rst:882 msgid "a number if *x* is a number, else ``None``" msgstr "" -#: ../../library/turtle.rst:694 +#: ../../library/turtle.rst:821 msgid "" "Return the angle between the line from turtle position to position specified " "by (x,y), the vector or the other turtle. This depends on the turtle's " @@ -899,116 +1043,116 @@ msgid "" "\"logo\"." msgstr "" -#: ../../library/turtle.rst:708 +#: ../../library/turtle.rst:835 msgid "Return the turtle's x coordinate." msgstr "" -#: ../../library/turtle.rst:724 +#: ../../library/turtle.rst:851 msgid "Return the turtle's y coordinate." msgstr "" -#: ../../library/turtle.rst:740 +#: ../../library/turtle.rst:867 msgid "" "Return the turtle's current heading (value depends on the turtle mode, see :" "func:`mode`)." msgstr "" -#: ../../library/turtle.rst:757 +#: ../../library/turtle.rst:884 msgid "" "Return the distance from the turtle to (x,y), the given vector, or the given " "other turtle, in turtle step units." msgstr "" -#: ../../library/turtle.rst:775 +#: ../../library/turtle.rst:902 msgid "Settings for measurement" msgstr "" -#: ../../library/turtle.rst:781 +#: ../../library/turtle.rst:908 msgid "" "Set angle measurement units, i.e. set number of \"degrees\" for a full " "circle. Default value is 360 degrees." msgstr "" -#: ../../library/turtle.rst:804 +#: ../../library/turtle.rst:931 msgid "" "Set the angle measurement units to radians. Equivalent to ``degrees(2*math." "pi)``." msgstr "" -#: ../../library/turtle.rst:835 +#: ../../library/turtle.rst:962 msgid "Pull the pen down -- drawing when moving." msgstr "" -#: ../../library/turtle.rst:842 +#: ../../library/turtle.rst:969 msgid "Pull the pen up -- no drawing when moving." msgstr "" -#: ../../library/turtle.rst:848 +#: ../../library/turtle.rst:975 msgid "a positive number" msgstr "" -#: ../../library/turtle.rst:850 +#: ../../library/turtle.rst:977 msgid "" "Set the line thickness to *width* or return it. If resizemode is set to " "\"auto\" and turtleshape is a polygon, that polygon is drawn with the same " "line thickness. If no argument is given, the current pensize is returned." msgstr "" -#: ../../library/turtle.rst:864 +#: ../../library/turtle.rst:991 msgid "a dictionary with some or all of the below listed keys" msgstr "" -#: ../../library/turtle.rst:865 +#: ../../library/turtle.rst:992 msgid "one or more keyword-arguments with the below listed keys as keywords" msgstr "" -#: ../../library/turtle.rst:867 +#: ../../library/turtle.rst:994 msgid "" "Return or set the pen's attributes in a \"pen-dictionary\" with the " "following key/value pairs:" msgstr "" -#: ../../library/turtle.rst:870 +#: ../../library/turtle.rst:997 msgid "\"shown\": True/False" msgstr "" -#: ../../library/turtle.rst:871 +#: ../../library/turtle.rst:998 msgid "\"pendown\": True/False" msgstr "" -#: ../../library/turtle.rst:872 +#: ../../library/turtle.rst:999 msgid "\"pencolor\": color-string or color-tuple" msgstr "" -#: ../../library/turtle.rst:873 +#: ../../library/turtle.rst:1000 msgid "\"fillcolor\": color-string or color-tuple" msgstr "" -#: ../../library/turtle.rst:874 +#: ../../library/turtle.rst:1001 msgid "\"pensize\": positive number" msgstr "" -#: ../../library/turtle.rst:875 +#: ../../library/turtle.rst:1002 msgid "\"speed\": number in range 0..10" msgstr "" -#: ../../library/turtle.rst:876 +#: ../../library/turtle.rst:1003 msgid "\"resizemode\": \"auto\" or \"user\" or \"noresize\"" msgstr "" -#: ../../library/turtle.rst:877 +#: ../../library/turtle.rst:1004 msgid "\"stretchfactor\": (positive number, positive number)" msgstr "" -#: ../../library/turtle.rst:878 +#: ../../library/turtle.rst:1005 msgid "\"outline\": positive number" msgstr "" -#: ../../library/turtle.rst:879 +#: ../../library/turtle.rst:1006 msgid "\"tilt\": number" msgstr "" -#: ../../library/turtle.rst:881 +#: ../../library/turtle.rst:1008 msgid "" "This dictionary can be used as argument for a subsequent call to :func:`pen` " "to restore the former pen-state. Moreover one or more of these attributes " @@ -1016,182 +1160,182 @@ msgid "" "attributes in one statement." msgstr "" -#: ../../library/turtle.rst:907 +#: ../../library/turtle.rst:1034 msgid "Return ``True`` if pen is down, ``False`` if it's up." msgstr "" -#: ../../library/turtle.rst:925 +#: ../../library/turtle.rst:1052 msgid "Return or set the pencolor." msgstr "" -#: ../../library/turtle.rst:927 ../../library/turtle.rst:976 +#: ../../library/turtle.rst:1054 ../../library/turtle.rst:1103 msgid "Four input formats are allowed:" msgstr "" -#: ../../library/turtle.rst:932 +#: ../../library/turtle.rst:1059 msgid "``pencolor()``" msgstr "``pencolor()``" -#: ../../library/turtle.rst:930 +#: ../../library/turtle.rst:1057 msgid "" "Return the current pencolor as color specification string or as a tuple (see " "example). May be used as input to another color/pencolor/fillcolor call." msgstr "" -#: ../../library/turtle.rst:936 +#: ../../library/turtle.rst:1063 msgid "``pencolor(colorstring)``" msgstr "``pencolor(colorstring)``" -#: ../../library/turtle.rst:935 +#: ../../library/turtle.rst:1062 msgid "" "Set pencolor to *colorstring*, which is a Tk color specification string, " "such as ``\"red\"``, ``\"yellow\"``, or ``\"#33cc8c\"``." msgstr "" -#: ../../library/turtle.rst:941 +#: ../../library/turtle.rst:1068 msgid "``pencolor((r, g, b))``" msgstr "``pencolor((r, g, b))``" -#: ../../library/turtle.rst:939 +#: ../../library/turtle.rst:1066 msgid "" "Set pencolor to the RGB color represented by the tuple of *r*, *g*, and " "*b*. Each of *r*, *g*, and *b* must be in the range 0..colormode, where " "colormode is either 1.0 or 255 (see :func:`colormode`)." msgstr "" -#: ../../library/turtle.rst:945 +#: ../../library/turtle.rst:1072 msgid "``pencolor(r, g, b)``" msgstr "``pencolor(r, g, b)``" -#: ../../library/turtle.rst:944 +#: ../../library/turtle.rst:1071 msgid "" "Set pencolor to the RGB color represented by *r*, *g*, and *b*. Each of " "*r*, *g*, and *b* must be in the range 0..colormode." msgstr "" -#: ../../library/turtle.rst:947 +#: ../../library/turtle.rst:1074 msgid "" "If turtleshape is a polygon, the outline of that polygon is drawn with the " "newly set pencolor." msgstr "" -#: ../../library/turtle.rst:974 +#: ../../library/turtle.rst:1101 msgid "Return or set the fillcolor." msgstr "" -#: ../../library/turtle.rst:981 +#: ../../library/turtle.rst:1108 msgid "``fillcolor()``" msgstr "``fillcolor()``" -#: ../../library/turtle.rst:979 +#: ../../library/turtle.rst:1106 msgid "" "Return the current fillcolor as color specification string, possibly in " "tuple format (see example). May be used as input to another color/pencolor/" "fillcolor call." msgstr "" -#: ../../library/turtle.rst:985 +#: ../../library/turtle.rst:1112 msgid "``fillcolor(colorstring)``" msgstr "``fillcolor(colorstring)``" -#: ../../library/turtle.rst:984 +#: ../../library/turtle.rst:1111 msgid "" "Set fillcolor to *colorstring*, which is a Tk color specification string, " "such as ``\"red\"``, ``\"yellow\"``, or ``\"#33cc8c\"``." msgstr "" -#: ../../library/turtle.rst:990 +#: ../../library/turtle.rst:1117 msgid "``fillcolor((r, g, b))``" msgstr "``fillcolor((r, g, b))``" -#: ../../library/turtle.rst:988 +#: ../../library/turtle.rst:1115 msgid "" "Set fillcolor to the RGB color represented by the tuple of *r*, *g*, and " "*b*. Each of *r*, *g*, and *b* must be in the range 0..colormode, where " "colormode is either 1.0 or 255 (see :func:`colormode`)." msgstr "" -#: ../../library/turtle.rst:994 +#: ../../library/turtle.rst:1121 msgid "``fillcolor(r, g, b)``" msgstr "``fillcolor(r, g, b)``" -#: ../../library/turtle.rst:993 +#: ../../library/turtle.rst:1120 msgid "" "Set fillcolor to the RGB color represented by *r*, *g*, and *b*. Each of " "*r*, *g*, and *b* must be in the range 0..colormode." msgstr "" -#: ../../library/turtle.rst:996 +#: ../../library/turtle.rst:1123 msgid "" "If turtleshape is a polygon, the interior of that polygon is drawn with the " "newly set fillcolor." msgstr "" -#: ../../library/turtle.rst:1017 +#: ../../library/turtle.rst:1144 msgid "Return or set pencolor and fillcolor." msgstr "" -#: ../../library/turtle.rst:1019 +#: ../../library/turtle.rst:1146 msgid "" "Several input formats are allowed. They use 0 to 3 arguments as follows:" msgstr "" -#: ../../library/turtle.rst:1025 +#: ../../library/turtle.rst:1152 msgid "``color()``" msgstr "``color()``" -#: ../../library/turtle.rst:1023 +#: ../../library/turtle.rst:1150 msgid "" "Return the current pencolor and the current fillcolor as a pair of color " "specification strings or tuples as returned by :func:`pencolor` and :func:" "`fillcolor`." msgstr "" -#: ../../library/turtle.rst:1029 +#: ../../library/turtle.rst:1156 msgid "``color(colorstring)``, ``color((r,g,b))``, ``color(r,g,b)``" msgstr "``color(colorstring)``, ``color((r,g,b))``, ``color(r,g,b)``" -#: ../../library/turtle.rst:1028 +#: ../../library/turtle.rst:1155 msgid "" "Inputs as in :func:`pencolor`, set both, fillcolor and pencolor, to the " "given value." msgstr "" -#: ../../library/turtle.rst:1033 +#: ../../library/turtle.rst:1160 msgid "" "``color(colorstring1, colorstring2)``, ``color((r1,g1,b1), (r2,g2,b2))``" msgstr "" "``color(colorstring1, colorstring2)``, ``color((r1,g1,b1), (r2,g2,b2))``" -#: ../../library/turtle.rst:1032 +#: ../../library/turtle.rst:1159 msgid "" "Equivalent to ``pencolor(colorstring1)`` and ``fillcolor(colorstring2)`` and " "analogously if the other input format is used." msgstr "" -#: ../../library/turtle.rst:1035 +#: ../../library/turtle.rst:1162 msgid "" "If turtleshape is a polygon, outline and interior of that polygon is drawn " "with the newly set colors." msgstr "" -#: ../../library/turtle.rst:1049 +#: ../../library/turtle.rst:1176 msgid "See also: Screen method :func:`colormode`." msgstr "" -#: ../../library/turtle.rst:1063 +#: ../../library/turtle.rst:1190 msgid "Return fillstate (``True`` if filling, ``False`` else)." msgstr "" -#: ../../library/turtle.rst:1078 +#: ../../library/turtle.rst:1205 msgid "To be called just before drawing a shape to be filled." msgstr "" -#: ../../library/turtle.rst:1083 +#: ../../library/turtle.rst:1210 msgid "Fill the shape drawn after the last call to :func:`begin_fill`." msgstr "" -#: ../../library/turtle.rst:1085 +#: ../../library/turtle.rst:1212 msgid "" "Whether or not overlap regions for self-intersecting polygons or multiple " "shapes are filled depends on the operating system graphics, type of overlap, " @@ -1199,36 +1343,36 @@ msgid "" "all yellow or have some white regions." msgstr "" -#: ../../library/turtle.rst:1104 +#: ../../library/turtle.rst:1231 msgid "" "Delete the turtle's drawings from the screen, re-center the turtle and set " "variables to the default values." msgstr "" -#: ../../library/turtle.rst:1125 +#: ../../library/turtle.rst:1252 msgid "" "Delete the turtle's drawings from the screen. Do not move turtle. State " "and position of the turtle as well as drawings of other turtles are not " "affected." msgstr "" -#: ../../library/turtle.rst:1131 +#: ../../library/turtle.rst:1258 msgid "object to be written to the TurtleScreen" msgstr "" -#: ../../library/turtle.rst:1132 +#: ../../library/turtle.rst:1259 msgid "True/False" msgstr "" -#: ../../library/turtle.rst:1133 +#: ../../library/turtle.rst:1260 msgid "one of the strings \"left\", \"center\" or right\"" msgstr "" -#: ../../library/turtle.rst:1134 +#: ../../library/turtle.rst:1261 msgid "a triple (fontname, fontsize, fonttype)" msgstr "" -#: ../../library/turtle.rst:1136 +#: ../../library/turtle.rst:1263 msgid "" "Write text - the string representation of *arg* - at the current turtle " "position according to *align* (\"left\", \"center\" or \"right\") and with " @@ -1236,26 +1380,26 @@ msgid "" "corner of the text. By default, *move* is ``False``." msgstr "" -#: ../../library/turtle.rst:1154 +#: ../../library/turtle.rst:1281 msgid "" "Make the turtle invisible. It's a good idea to do this while you're in the " "middle of doing some complex drawing, because hiding the turtle speeds up " "the drawing observably." msgstr "" -#: ../../library/turtle.rst:1167 +#: ../../library/turtle.rst:1294 msgid "Make the turtle visible." msgstr "" -#: ../../library/turtle.rst:1177 +#: ../../library/turtle.rst:1304 msgid "Return ``True`` if the Turtle is shown, ``False`` if it's hidden." msgstr "" -#: ../../library/turtle.rst:1192 +#: ../../library/turtle.rst:1319 msgid "a string which is a valid shapename" msgstr "" -#: ../../library/turtle.rst:1194 +#: ../../library/turtle.rst:1321 msgid "" "Set turtle shape to shape with given *name* or, if name is not given, return " "name of current shape. Shape with *name* must exist in the TurtleScreen's " @@ -1265,45 +1409,45 @@ msgid "" "`register_shape`." msgstr "" -#: ../../library/turtle.rst:1212 +#: ../../library/turtle.rst:1339 msgid "one of the strings \"auto\", \"user\", \"noresize\"" msgstr "" -#: ../../library/turtle.rst:1214 +#: ../../library/turtle.rst:1341 msgid "" "Set resizemode to one of the values: \"auto\", \"user\", \"noresize\". If " "*rmode* is not given, return current resizemode. Different resizemodes have " "the following effects:" msgstr "" -#: ../../library/turtle.rst:1218 +#: ../../library/turtle.rst:1345 msgid "" "\"auto\": adapts the appearance of the turtle corresponding to the value of " "pensize." msgstr "" -#: ../../library/turtle.rst:1219 +#: ../../library/turtle.rst:1346 msgid "" "\"user\": adapts the appearance of the turtle according to the values of " "stretchfactor and outlinewidth (outline), which are set by :func:`shapesize`." msgstr "" -#: ../../library/turtle.rst:1222 +#: ../../library/turtle.rst:1349 msgid "\"noresize\": no adaption of the turtle's appearance takes place." msgstr "" -#: ../../library/turtle.rst:1224 +#: ../../library/turtle.rst:1351 msgid "" "``resizemode(\"user\")`` is called by :func:`shapesize` when used with " "arguments." msgstr "" -#: ../../library/turtle.rst:1239 ../../library/turtle.rst:1240 -#: ../../library/turtle.rst:1241 +#: ../../library/turtle.rst:1366 ../../library/turtle.rst:1367 +#: ../../library/turtle.rst:1368 msgid "positive number" msgstr "" -#: ../../library/turtle.rst:1243 +#: ../../library/turtle.rst:1370 msgid "" "Return or set the pen's attributes x/y-stretchfactors and/or outline. Set " "resizemode to \"user\". If and only if resizemode is set to \"user\", the " @@ -1313,12 +1457,12 @@ msgid "" "determines the width of the shape's outline." msgstr "" -#: ../../library/turtle.rst:1266 ../../library/turtle.rst:1925 -#: ../../library/turtle.rst:1926 ../../library/turtle.rst:1927 +#: ../../library/turtle.rst:1393 ../../library/turtle.rst:2052 +#: ../../library/turtle.rst:2053 ../../library/turtle.rst:2054 msgid "number (optional)" msgstr "" -#: ../../library/turtle.rst:1268 +#: ../../library/turtle.rst:1395 msgid "" "Set or return the current shearfactor. Shear the turtleshape according to " "the given shearfactor shear, which is the tangent of the shear angle. Do " @@ -1327,26 +1471,26 @@ msgid "" "by which lines parallel to the heading of the turtle are sheared." msgstr "" -#: ../../library/turtle.rst:1289 +#: ../../library/turtle.rst:1416 msgid "" "Rotate the turtleshape by *angle* from its current tilt-angle, but do *not* " "change the turtle's heading (direction of movement)." msgstr "" -#: ../../library/turtle.rst:1308 +#: ../../library/turtle.rst:1435 msgid "" "Rotate the turtleshape to point in the direction specified by *angle*, " "regardless of its current tilt-angle. *Do not* change the turtle's heading " "(direction of movement)." msgstr "" -#: ../../library/turtle.rst:1328 ../../library/turtle.rst:1351 -#: ../../library/turtle.rst:1352 ../../library/turtle.rst:1353 -#: ../../library/turtle.rst:1354 +#: ../../library/turtle.rst:1455 ../../library/turtle.rst:1478 +#: ../../library/turtle.rst:1479 ../../library/turtle.rst:1480 +#: ../../library/turtle.rst:1481 msgid "a number (optional)" msgstr "" -#: ../../library/turtle.rst:1330 +#: ../../library/turtle.rst:1457 msgid "" "Set or return the current tilt-angle. If angle is given, rotate the " "turtleshape to point in the direction specified by angle, regardless of its " @@ -1356,11 +1500,11 @@ msgid "" "turtle (its direction of movement)." msgstr "" -#: ../../library/turtle.rst:1356 +#: ../../library/turtle.rst:1483 msgid "Set or return the current transformation matrix of the turtle shape." msgstr "" -#: ../../library/turtle.rst:1358 +#: ../../library/turtle.rst:1485 msgid "" "If none of the matrix elements are given, return the transformation matrix " "as a tuple of 4 elements. Otherwise set the given elements and transform the " @@ -1370,101 +1514,101 @@ msgid "" "tiltangle according to the given matrix." msgstr "" -#: ../../library/turtle.rst:1380 +#: ../../library/turtle.rst:1507 msgid "" "Return the current shape polygon as tuple of coordinate pairs. This can be " "used to define a new shape or components of a compound shape." msgstr "" -#: ../../library/turtle.rst:1398 ../../library/turtle.rst:1420 -#: ../../library/turtle.rst:1445 ../../library/turtle.rst:1849 +#: ../../library/turtle.rst:1525 ../../library/turtle.rst:1547 +#: ../../library/turtle.rst:1572 ../../library/turtle.rst:1976 msgid "" "a function with two arguments which will be called with the coordinates of " "the clicked point on the canvas" msgstr "" -#: ../../library/turtle.rst:1400 ../../library/turtle.rst:1422 -#: ../../library/turtle.rst:1447 ../../library/turtle.rst:1851 +#: ../../library/turtle.rst:1527 ../../library/turtle.rst:1549 +#: ../../library/turtle.rst:1574 ../../library/turtle.rst:1978 msgid "number of the mouse-button, defaults to 1 (left mouse button)" msgstr "" -#: ../../library/turtle.rst:1401 ../../library/turtle.rst:1423 -#: ../../library/turtle.rst:1448 ../../library/turtle.rst:1852 +#: ../../library/turtle.rst:1528 ../../library/turtle.rst:1550 +#: ../../library/turtle.rst:1575 ../../library/turtle.rst:1979 msgid "" "``True`` or ``False`` -- if ``True``, a new binding will be added, otherwise " "it will replace a former binding" msgstr "" -#: ../../library/turtle.rst:1404 +#: ../../library/turtle.rst:1531 msgid "" "Bind *fun* to mouse-click events on this turtle. If *fun* is ``None``, " "existing bindings are removed. Example for the anonymous turtle, i.e. the " "procedural way:" msgstr "" -#: ../../library/turtle.rst:1426 +#: ../../library/turtle.rst:1553 msgid "" "Bind *fun* to mouse-button-release events on this turtle. If *fun* is " "``None``, existing bindings are removed." msgstr "" -#: ../../library/turtle.rst:1451 +#: ../../library/turtle.rst:1578 msgid "" "Bind *fun* to mouse-move events on this turtle. If *fun* is ``None``, " "existing bindings are removed." msgstr "" -#: ../../library/turtle.rst:1454 +#: ../../library/turtle.rst:1581 msgid "" "Remark: Every sequence of mouse-move-events on a turtle is preceded by a " "mouse-click event on that turtle." msgstr "" -#: ../../library/turtle.rst:1462 +#: ../../library/turtle.rst:1589 msgid "" "Subsequently, clicking and dragging the Turtle will move it across the " "screen thereby producing handdrawings (if pen is down)." msgstr "" -#: ../../library/turtle.rst:1471 +#: ../../library/turtle.rst:1598 msgid "" "Start recording the vertices of a polygon. Current turtle position is first " "vertex of polygon." msgstr "" -#: ../../library/turtle.rst:1477 +#: ../../library/turtle.rst:1604 msgid "" "Stop recording the vertices of a polygon. Current turtle position is last " "vertex of polygon. This will be connected with the first vertex." msgstr "" -#: ../../library/turtle.rst:1483 +#: ../../library/turtle.rst:1610 msgid "Return the last recorded polygon." msgstr "" -#: ../../library/turtle.rst:1502 +#: ../../library/turtle.rst:1629 msgid "" "Create and return a clone of the turtle with same position, heading and " "turtle properties." msgstr "" -#: ../../library/turtle.rst:1515 +#: ../../library/turtle.rst:1642 msgid "" "Return the Turtle object itself. Only reasonable use: as a function to " "return the \"anonymous turtle\":" msgstr "" -#: ../../library/turtle.rst:1529 +#: ../../library/turtle.rst:1656 msgid "" "Return the :class:`TurtleScreen` object the turtle is drawing on. " "TurtleScreen methods can then be called for that object." msgstr "" -#: ../../library/turtle.rst:1543 +#: ../../library/turtle.rst:1670 msgid "an integer or ``None``" msgstr "" -#: ../../library/turtle.rst:1545 +#: ../../library/turtle.rst:1672 msgid "" "Set or disable undobuffer. If *size* is an integer, an empty undobuffer of " "given size is installed. *size* gives the maximum number of turtle actions " @@ -1472,71 +1616,71 @@ msgid "" "``None``, the undobuffer is disabled." msgstr "" -#: ../../library/turtle.rst:1558 +#: ../../library/turtle.rst:1685 msgid "Return number of entries in the undobuffer." msgstr "" -#: ../../library/turtle.rst:1571 +#: ../../library/turtle.rst:1698 msgid "Compound shapes" msgstr "" -#: ../../library/turtle.rst:1573 +#: ../../library/turtle.rst:1700 msgid "" "To use compound turtle shapes, which consist of several polygons of " "different color, you must use the helper class :class:`Shape` explicitly as " "described below:" msgstr "" -#: ../../library/turtle.rst:1577 +#: ../../library/turtle.rst:1704 msgid "Create an empty Shape object of type \"compound\"." msgstr "" -#: ../../library/turtle.rst:1578 +#: ../../library/turtle.rst:1705 msgid "" "Add as many components to this object as desired, using the :meth:`~Shape." "addcomponent` method." msgstr "" -#: ../../library/turtle.rst:1581 +#: ../../library/turtle.rst:1708 msgid "For example:" msgstr "舉例來說:" -#: ../../library/turtle.rst:1592 +#: ../../library/turtle.rst:1719 msgid "Now add the Shape to the Screen's shapelist and use it:" msgstr "" -#: ../../library/turtle.rst:1603 +#: ../../library/turtle.rst:1730 msgid "" "The :class:`Shape` class is used internally by the :func:`register_shape` " "method in different ways. The application programmer has to deal with the " "Shape class *only* when using compound shapes like shown above!" msgstr "" -#: ../../library/turtle.rst:1609 +#: ../../library/turtle.rst:1736 msgid "Methods of TurtleScreen/Screen and corresponding functions" msgstr "" -#: ../../library/turtle.rst:1611 +#: ../../library/turtle.rst:1738 msgid "" "Most of the examples in this section refer to a TurtleScreen instance called " "``screen``." msgstr "" -#: ../../library/turtle.rst:1625 +#: ../../library/turtle.rst:1752 msgid "" "a color string or three numbers in the range 0..colormode or a 3-tuple of " "such numbers" msgstr "" -#: ../../library/turtle.rst:1629 +#: ../../library/turtle.rst:1756 msgid "Set or return background color of the TurtleScreen." msgstr "" -#: ../../library/turtle.rst:1644 +#: ../../library/turtle.rst:1771 msgid "a string, name of a gif-file or ``\"nopic\"``, or ``None``" msgstr "" -#: ../../library/turtle.rst:1646 +#: ../../library/turtle.rst:1773 msgid "" "Set background image or return name of current backgroundimage. If " "*picname* is a filename, set the corresponding image as background. If " @@ -1544,44 +1688,44 @@ msgid "" "*picname* is ``None``, return the filename of the current backgroundimage. ::" msgstr "" -#: ../../library/turtle.rst:1662 +#: ../../library/turtle.rst:1789 msgid "" "This TurtleScreen method is available as a global function only under the " "name ``clearscreen``. The global function ``clear`` is a different one " "derived from the Turtle method ``clear``." msgstr "" -#: ../../library/turtle.rst:1669 +#: ../../library/turtle.rst:1796 msgid "" "Delete all drawings and all turtles from the TurtleScreen. Reset the now " "empty TurtleScreen to its initial state: white background, no background " "image, no event bindings and tracing on." msgstr "" -#: ../../library/turtle.rst:1678 +#: ../../library/turtle.rst:1805 msgid "" "This TurtleScreen method is available as a global function only under the " "name ``resetscreen``. The global function ``reset`` is another one derived " "from the Turtle method ``reset``." msgstr "" -#: ../../library/turtle.rst:1685 +#: ../../library/turtle.rst:1812 msgid "Reset all Turtles on the Screen to their initial state." msgstr "" -#: ../../library/turtle.rst:1690 +#: ../../library/turtle.rst:1817 msgid "positive integer, new width of canvas in pixels" msgstr "" -#: ../../library/turtle.rst:1691 +#: ../../library/turtle.rst:1818 msgid "positive integer, new height of canvas in pixels" msgstr "" -#: ../../library/turtle.rst:1692 +#: ../../library/turtle.rst:1819 msgid "colorstring or color-tuple, new background color" msgstr "" -#: ../../library/turtle.rst:1694 +#: ../../library/turtle.rst:1821 msgid "" "If no arguments are given, return current (canvaswidth, canvasheight). Else " "resize the canvas the turtles are drawing on. Do not alter the drawing " @@ -1590,59 +1734,59 @@ msgid "" "outside the canvas before." msgstr "" -#: ../../library/turtle.rst:1706 +#: ../../library/turtle.rst:1833 msgid "e.g. to search for an erroneously escaped turtle ;-)" msgstr "" -#: ../../library/turtle.rst:1711 +#: ../../library/turtle.rst:1838 msgid "a number, x-coordinate of lower left corner of canvas" msgstr "" -#: ../../library/turtle.rst:1712 +#: ../../library/turtle.rst:1839 msgid "a number, y-coordinate of lower left corner of canvas" msgstr "" -#: ../../library/turtle.rst:1713 +#: ../../library/turtle.rst:1840 msgid "a number, x-coordinate of upper right corner of canvas" msgstr "" -#: ../../library/turtle.rst:1714 +#: ../../library/turtle.rst:1841 msgid "a number, y-coordinate of upper right corner of canvas" msgstr "" -#: ../../library/turtle.rst:1716 +#: ../../library/turtle.rst:1843 msgid "" "Set up user-defined coordinate system and switch to mode \"world\" if " "necessary. This performs a ``screen.reset()``. If mode \"world\" is " "already active, all drawings are redrawn according to the new coordinates." msgstr "" -#: ../../library/turtle.rst:1720 +#: ../../library/turtle.rst:1847 msgid "" "**ATTENTION**: in user-defined coordinate systems angles may appear " "distorted." msgstr "" -#: ../../library/turtle.rst:1748 +#: ../../library/turtle.rst:1875 msgid "positive integer" msgstr "" -#: ../../library/turtle.rst:1750 +#: ../../library/turtle.rst:1877 msgid "" "Set or return the drawing *delay* in milliseconds. (This is approximately " "the time interval between two consecutive canvas updates.) The longer the " "drawing delay, the slower the animation." msgstr "" -#: ../../library/turtle.rst:1754 +#: ../../library/turtle.rst:1881 msgid "Optional argument:" msgstr "" -#: ../../library/turtle.rst:1768 ../../library/turtle.rst:1769 +#: ../../library/turtle.rst:1895 ../../library/turtle.rst:1896 msgid "nonnegative integer" msgstr "" -#: ../../library/turtle.rst:1771 +#: ../../library/turtle.rst:1898 msgid "" "Turn turtle animation on/off and set delay for update drawings. If *n* is " "given, only each n-th regular screen update is really performed. (Can be " @@ -1651,75 +1795,75 @@ msgid "" "delay value (see :func:`delay`)." msgstr "" -#: ../../library/turtle.rst:1791 +#: ../../library/turtle.rst:1918 msgid "Perform a TurtleScreen update. To be used when tracer is turned off." msgstr "" -#: ../../library/turtle.rst:1793 +#: ../../library/turtle.rst:1920 msgid "See also the RawTurtle/Turtle method :func:`speed`." msgstr "" -#: ../../library/turtle.rst:1801 +#: ../../library/turtle.rst:1928 msgid "" "Set focus on TurtleScreen (in order to collect key-events). Dummy arguments " "are provided in order to be able to pass :func:`listen` to the onclick " "method." msgstr "" -#: ../../library/turtle.rst:1808 ../../library/turtle.rst:1828 +#: ../../library/turtle.rst:1935 ../../library/turtle.rst:1955 msgid "a function with no arguments or ``None``" msgstr "" -#: ../../library/turtle.rst:1809 ../../library/turtle.rst:1829 +#: ../../library/turtle.rst:1936 ../../library/turtle.rst:1956 msgid "a string: key (e.g. \"a\") or key-symbol (e.g. \"space\")" msgstr "" -#: ../../library/turtle.rst:1811 +#: ../../library/turtle.rst:1938 msgid "" "Bind *fun* to key-release event of key. If *fun* is ``None``, event " "bindings are removed. Remark: in order to be able to register key-events, " "TurtleScreen must have the focus. (See method :func:`listen`.)" msgstr "" -#: ../../library/turtle.rst:1831 +#: ../../library/turtle.rst:1958 msgid "" "Bind *fun* to key-press event of key if key is given, or to any key-press-" "event if no key is given. Remark: in order to be able to register key-" "events, TurtleScreen must have focus. (See method :func:`listen`.)" msgstr "" -#: ../../library/turtle.rst:1855 +#: ../../library/turtle.rst:1982 msgid "" "Bind *fun* to mouse-click events on this screen. If *fun* is ``None``, " "existing bindings are removed." msgstr "" -#: ../../library/turtle.rst:1858 +#: ../../library/turtle.rst:1985 msgid "" "Example for a TurtleScreen instance named ``screen`` and a Turtle instance " "named ``turtle``:" msgstr "" -#: ../../library/turtle.rst:1869 +#: ../../library/turtle.rst:1996 msgid "" "This TurtleScreen method is available as a global function only under the " "name ``onscreenclick``. The global function ``onclick`` is another one " "derived from the Turtle method ``onclick``." msgstr "" -#: ../../library/turtle.rst:1876 +#: ../../library/turtle.rst:2003 msgid "a function with no arguments" msgstr "" -#: ../../library/turtle.rst:1877 +#: ../../library/turtle.rst:2004 msgid "a number >= 0" msgstr "" -#: ../../library/turtle.rst:1879 +#: ../../library/turtle.rst:2006 msgid "Install a timer that calls *fun* after *t* milliseconds." msgstr "" -#: ../../library/turtle.rst:1897 +#: ../../library/turtle.rst:2024 msgid "" "Starts event loop - calling Tkinter's mainloop function. Must be the last " "statement in a turtle graphics program. Must *not* be used if a script is " @@ -1727,12 +1871,12 @@ msgid "" "turtle graphics. ::" msgstr "" -#: ../../library/turtle.rst:1910 ../../library/turtle.rst:1911 -#: ../../library/turtle.rst:1923 ../../library/turtle.rst:1924 +#: ../../library/turtle.rst:2037 ../../library/turtle.rst:2038 +#: ../../library/turtle.rst:2050 ../../library/turtle.rst:2051 msgid "string" msgstr "string(字串)" -#: ../../library/turtle.rst:1913 +#: ../../library/turtle.rst:2040 msgid "" "Pop up a dialog window for input of a string. Parameter title is the title " "of the dialog window, prompt is a text mostly describing what information to " @@ -1740,7 +1884,7 @@ msgid "" "``None``. ::" msgstr "" -#: ../../library/turtle.rst:1929 +#: ../../library/turtle.rst:2056 msgid "" "Pop up a dialog window for input of a number. title is the title of the " "dialog window, prompt is a text mostly describing what numerical information " @@ -1751,17 +1895,17 @@ msgid "" "return ``None``. ::" msgstr "" -#: ../../library/turtle.rst:1946 +#: ../../library/turtle.rst:2073 msgid "one of the strings \"standard\", \"logo\" or \"world\"" msgstr "" -#: ../../library/turtle.rst:1948 +#: ../../library/turtle.rst:2075 msgid "" "Set turtle mode (\"standard\", \"logo\" or \"world\") and perform reset. If " "mode is not given, current mode is returned." msgstr "" -#: ../../library/turtle.rst:1951 +#: ../../library/turtle.rst:2078 msgid "" "Mode \"standard\" is compatible with old :mod:`turtle`. Mode \"logo\" is " "compatible with most Logo turtle graphics. Mode \"world\" uses user-defined " @@ -1769,121 +1913,121 @@ msgid "" "if ``x/y`` unit-ratio doesn't equal 1." msgstr "" -#: ../../library/turtle.rst:1957 +#: ../../library/turtle.rst:2084 msgid "Mode" msgstr "" -#: ../../library/turtle.rst:1957 +#: ../../library/turtle.rst:2084 msgid "Initial turtle heading" msgstr "" -#: ../../library/turtle.rst:1957 +#: ../../library/turtle.rst:2084 msgid "positive angles" msgstr "" -#: ../../library/turtle.rst:1959 +#: ../../library/turtle.rst:2086 msgid "\"standard\"" msgstr "" -#: ../../library/turtle.rst:1959 +#: ../../library/turtle.rst:2086 msgid "to the right (east)" msgstr "" -#: ../../library/turtle.rst:1959 +#: ../../library/turtle.rst:2086 msgid "counterclockwise" msgstr "" -#: ../../library/turtle.rst:1960 +#: ../../library/turtle.rst:2087 msgid "\"logo\"" msgstr "" -#: ../../library/turtle.rst:1960 +#: ../../library/turtle.rst:2087 msgid "upward (north)" msgstr "" -#: ../../library/turtle.rst:1960 +#: ../../library/turtle.rst:2087 msgid "clockwise" msgstr "" -#: ../../library/turtle.rst:1973 +#: ../../library/turtle.rst:2100 msgid "one of the values 1.0 or 255" msgstr "" -#: ../../library/turtle.rst:1975 +#: ../../library/turtle.rst:2102 msgid "" "Return the colormode or set it to 1.0 or 255. Subsequently *r*, *g*, *b* " "values of color triples have to be in the range 0..*cmode*." msgstr "" -#: ../../library/turtle.rst:1996 +#: ../../library/turtle.rst:2123 msgid "" "Return the Canvas of this TurtleScreen. Useful for insiders who know what " "to do with a Tkinter Canvas." msgstr "" -#: ../../library/turtle.rst:2009 +#: ../../library/turtle.rst:2136 msgid "Return a list of names of all currently available turtle shapes." msgstr "" -#: ../../library/turtle.rst:2021 +#: ../../library/turtle.rst:2148 msgid "There are three different ways to call this function:" msgstr "" -#: ../../library/turtle.rst:2023 +#: ../../library/turtle.rst:2150 msgid "" "*name* is the name of a gif-file and *shape* is ``None``: Install the " "corresponding image shape. ::" msgstr "" -#: ../../library/turtle.rst:2029 +#: ../../library/turtle.rst:2156 msgid "" "Image shapes *do not* rotate when turning the turtle, so they do not display " "the heading of the turtle!" msgstr "" -#: ../../library/turtle.rst:2032 +#: ../../library/turtle.rst:2159 msgid "" "*name* is an arbitrary string and *shape* is a tuple of pairs of " "coordinates: Install the corresponding polygon shape." msgstr "" -#: ../../library/turtle.rst:2040 +#: ../../library/turtle.rst:2167 msgid "" "*name* is an arbitrary string and *shape* is a (compound) :class:`Shape` " "object: Install the corresponding compound shape." msgstr "" -#: ../../library/turtle.rst:2043 +#: ../../library/turtle.rst:2170 msgid "" "Add a turtle shape to TurtleScreen's shapelist. Only thusly registered " "shapes can be used by issuing the command ``shape(shapename)``." msgstr "" -#: ../../library/turtle.rst:2049 +#: ../../library/turtle.rst:2176 msgid "Return the list of turtles on the screen." msgstr "" -#: ../../library/turtle.rst:2060 +#: ../../library/turtle.rst:2187 msgid "Return the height of the turtle window. ::" msgstr "" -#: ../../library/turtle.rst:2068 +#: ../../library/turtle.rst:2195 msgid "Return the width of the turtle window. ::" msgstr "" -#: ../../library/turtle.rst:2077 +#: ../../library/turtle.rst:2204 msgid "Methods specific to Screen, not inherited from TurtleScreen" msgstr "" -#: ../../library/turtle.rst:2081 +#: ../../library/turtle.rst:2208 msgid "Shut the turtlegraphics window." msgstr "" -#: ../../library/turtle.rst:2086 +#: ../../library/turtle.rst:2213 msgid "Bind ``bye()`` method to mouse clicks on the Screen." msgstr "" -#: ../../library/turtle.rst:2089 +#: ../../library/turtle.rst:2216 msgid "" "If the value \"using_IDLE\" in the configuration dictionary is ``False`` " "(default value), also enter mainloop. Remark: If IDLE with the ``-n`` " @@ -1892,246 +2036,246 @@ msgid "" "client script." msgstr "" -#: ../../library/turtle.rst:2098 +#: ../../library/turtle.rst:2225 msgid "" "Set the size and position of the main window. Default values of arguments " "are stored in the configuration dictionary and can be changed via a :file:" "`turtle.cfg` file." msgstr "" -#: ../../library/turtle.rst:2102 +#: ../../library/turtle.rst:2229 msgid "" "if an integer, a size in pixels, if a float, a fraction of the screen; " "default is 50% of screen" msgstr "" -#: ../../library/turtle.rst:2104 +#: ../../library/turtle.rst:2231 msgid "" "if an integer, the height in pixels, if a float, a fraction of the screen; " "default is 75% of screen" msgstr "" -#: ../../library/turtle.rst:2106 +#: ../../library/turtle.rst:2233 msgid "" "if positive, starting position in pixels from the left edge of the screen, " "if negative from the right edge, if ``None``, center window horizontally" msgstr "" -#: ../../library/turtle.rst:2109 +#: ../../library/turtle.rst:2236 msgid "" "if positive, starting position in pixels from the top edge of the screen, if " "negative from the bottom edge, if ``None``, center window vertically" msgstr "" -#: ../../library/turtle.rst:2124 +#: ../../library/turtle.rst:2251 msgid "a string that is shown in the titlebar of the turtle graphics window" msgstr "" -#: ../../library/turtle.rst:2127 +#: ../../library/turtle.rst:2254 msgid "Set title of turtle window to *titlestring*." msgstr "" -#: ../../library/turtle.rst:2136 +#: ../../library/turtle.rst:2263 msgid "Public classes" msgstr "" -#: ../../library/turtle.rst:2142 +#: ../../library/turtle.rst:2269 msgid "" "a :class:`tkinter.Canvas`, a :class:`ScrolledCanvas` or a :class:" "`TurtleScreen`" msgstr "" -#: ../../library/turtle.rst:2145 +#: ../../library/turtle.rst:2272 msgid "" "Create a turtle. The turtle has all methods described above as \"methods of " "Turtle/RawTurtle\"." msgstr "" -#: ../../library/turtle.rst:2151 +#: ../../library/turtle.rst:2278 msgid "" "Subclass of RawTurtle, has the same interface but draws on a default :class:" "`Screen` object created automatically when needed for the first time." msgstr "" -#: ../../library/turtle.rst:2157 +#: ../../library/turtle.rst:2284 msgid "a :class:`tkinter.Canvas`" msgstr "" -#: ../../library/turtle.rst:2159 +#: ../../library/turtle.rst:2286 msgid "" "Provides screen oriented methods like :func:`bgcolor` etc. that are " "described above." msgstr "" -#: ../../library/turtle.rst:2164 +#: ../../library/turtle.rst:2291 msgid "" "Subclass of TurtleScreen, with :ref:`four methods added `." msgstr "" -#: ../../library/turtle.rst:2169 +#: ../../library/turtle.rst:2296 msgid "" "some Tkinter widget to contain the ScrolledCanvas, i.e. a Tkinter-canvas " "with scrollbars added" msgstr "" -#: ../../library/turtle.rst:2172 +#: ../../library/turtle.rst:2299 msgid "" "Used by class Screen, which thus automatically provides a ScrolledCanvas as " "playground for the turtles." msgstr "" -#: ../../library/turtle.rst:2177 +#: ../../library/turtle.rst:2304 msgid "one of the strings \"polygon\", \"image\", \"compound\"" msgstr "" -#: ../../library/turtle.rst:2179 +#: ../../library/turtle.rst:2306 msgid "" "Data structure modeling shapes. The pair ``(type_, data)`` must follow this " "specification:" msgstr "" -#: ../../library/turtle.rst:2184 +#: ../../library/turtle.rst:2311 msgid "*type_*" msgstr "*type_*" -#: ../../library/turtle.rst:2184 +#: ../../library/turtle.rst:2311 msgid "*data*" msgstr "" -#: ../../library/turtle.rst:2186 +#: ../../library/turtle.rst:2313 msgid "\"polygon\"" msgstr "" -#: ../../library/turtle.rst:2186 +#: ../../library/turtle.rst:2313 msgid "a polygon-tuple, i.e. a tuple of pairs of coordinates" msgstr "" -#: ../../library/turtle.rst:2187 +#: ../../library/turtle.rst:2314 msgid "\"image\"" msgstr "" -#: ../../library/turtle.rst:2187 +#: ../../library/turtle.rst:2314 msgid "an image (in this form only used internally!)" msgstr "" -#: ../../library/turtle.rst:2188 +#: ../../library/turtle.rst:2315 msgid "\"compound\"" msgstr "" -#: ../../library/turtle.rst:2188 +#: ../../library/turtle.rst:2315 msgid "" "``None`` (a compound shape has to be constructed using the :meth:" "`addcomponent` method)" msgstr "" -#: ../../library/turtle.rst:2194 +#: ../../library/turtle.rst:2321 msgid "a polygon, i.e. a tuple of pairs of numbers" msgstr "" -#: ../../library/turtle.rst:2195 +#: ../../library/turtle.rst:2322 msgid "a color the *poly* will be filled with" msgstr "" -#: ../../library/turtle.rst:2196 +#: ../../library/turtle.rst:2323 msgid "a color for the poly's outline (if given)" msgstr "" -#: ../../library/turtle.rst:2198 +#: ../../library/turtle.rst:2325 msgid "Example:" msgstr "例如:" -#: ../../library/turtle.rst:2208 +#: ../../library/turtle.rst:2335 msgid "See :ref:`compoundshapes`." msgstr "請見\\ :ref:`compoundshapes`\\ 。" -#: ../../library/turtle.rst:2213 +#: ../../library/turtle.rst:2340 msgid "" "A two-dimensional vector class, used as a helper class for implementing " "turtle graphics. May be useful for turtle graphics programs too. Derived " "from tuple, so a vector is a tuple!" msgstr "" -#: ../../library/turtle.rst:2217 +#: ../../library/turtle.rst:2344 msgid "Provides (for *a*, *b* vectors, *k* number):" msgstr "" -#: ../../library/turtle.rst:2219 +#: ../../library/turtle.rst:2346 msgid "``a + b`` vector addition" msgstr "" -#: ../../library/turtle.rst:2220 +#: ../../library/turtle.rst:2347 msgid "``a - b`` vector subtraction" msgstr "" -#: ../../library/turtle.rst:2221 +#: ../../library/turtle.rst:2348 msgid "``a * b`` inner product" msgstr "" -#: ../../library/turtle.rst:2222 +#: ../../library/turtle.rst:2349 msgid "``k * a`` and ``a * k`` multiplication with scalar" msgstr "" -#: ../../library/turtle.rst:2223 +#: ../../library/turtle.rst:2350 msgid "``abs(a)`` absolute value of a" msgstr "" -#: ../../library/turtle.rst:2224 +#: ../../library/turtle.rst:2351 msgid "``a.rotate(angle)`` rotation" msgstr "" -#: ../../library/turtle.rst:2228 +#: ../../library/turtle.rst:2355 msgid "Help and configuration" msgstr "" -#: ../../library/turtle.rst:2231 +#: ../../library/turtle.rst:2358 msgid "How to use help" msgstr "" -#: ../../library/turtle.rst:2233 +#: ../../library/turtle.rst:2360 msgid "" "The public methods of the Screen and Turtle classes are documented " "extensively via docstrings. So these can be used as online-help via the " "Python help facilities:" msgstr "" -#: ../../library/turtle.rst:2237 +#: ../../library/turtle.rst:2364 msgid "" "When using IDLE, tooltips show the signatures and first lines of the " "docstrings of typed in function-/method calls." msgstr "" -#: ../../library/turtle.rst:2240 +#: ../../library/turtle.rst:2367 msgid "Calling :func:`help` on methods or functions displays the docstrings::" msgstr "" -#: ../../library/turtle.rst:2271 +#: ../../library/turtle.rst:2398 msgid "" "The docstrings of the functions which are derived from methods have a " "modified form::" msgstr "" -#: ../../library/turtle.rst:2305 +#: ../../library/turtle.rst:2432 msgid "" "These modified docstrings are created automatically together with the " "function definitions that are derived from the methods at import time." msgstr "" -#: ../../library/turtle.rst:2310 +#: ../../library/turtle.rst:2437 msgid "Translation of docstrings into different languages" msgstr "" -#: ../../library/turtle.rst:2312 +#: ../../library/turtle.rst:2439 msgid "" "There is a utility to create a dictionary the keys of which are the method " "names and the values of which are the docstrings of the public methods of " "the classes Screen and Turtle." msgstr "" -#: ../../library/turtle.rst:2318 +#: ../../library/turtle.rst:2445 msgid "a string, used as filename" msgstr "" -#: ../../library/turtle.rst:2320 +#: ../../library/turtle.rst:2447 msgid "" "Create and write docstring-dictionary to a Python script with the given " "filename. This function has to be called explicitly (it is not used by the " @@ -2140,37 +2284,37 @@ msgid "" "for translation of the docstrings into different languages." msgstr "" -#: ../../library/turtle.rst:2326 +#: ../../library/turtle.rst:2453 msgid "" "If you (or your students) want to use :mod:`turtle` with online help in your " "native language, you have to translate the docstrings and save the resulting " "file as e.g. :file:`turtle_docstringdict_german.py`." msgstr "" -#: ../../library/turtle.rst:2330 +#: ../../library/turtle.rst:2457 msgid "" "If you have an appropriate entry in your :file:`turtle.cfg` file this " "dictionary will be read in at import time and will replace the original " "English docstrings." msgstr "" -#: ../../library/turtle.rst:2333 +#: ../../library/turtle.rst:2460 msgid "" "At the time of this writing there are docstring dictionaries in German and " "in Italian. (Requests please to glingl@aon.at.)" msgstr "" -#: ../../library/turtle.rst:2339 +#: ../../library/turtle.rst:2466 msgid "How to configure Screen and Turtles" msgstr "" -#: ../../library/turtle.rst:2341 +#: ../../library/turtle.rst:2468 msgid "" "The built-in default configuration mimics the appearance and behaviour of " "the old turtle module in order to retain best possible compatibility with it." msgstr "" -#: ../../library/turtle.rst:2344 +#: ../../library/turtle.rst:2471 msgid "" "If you want to use a different configuration which better reflects the " "features of this module or which better fits to your needs, e.g. for use in " @@ -2179,54 +2323,54 @@ msgid "" "settings." msgstr "" -#: ../../library/turtle.rst:2349 +#: ../../library/turtle.rst:2476 msgid "" "The built in configuration would correspond to the following ``turtle.cfg``:" msgstr "" -#: ../../library/turtle.rst:2374 +#: ../../library/turtle.rst:2501 msgid "Short explanation of selected entries:" msgstr "" -#: ../../library/turtle.rst:2376 +#: ../../library/turtle.rst:2503 msgid "" "The first four lines correspond to the arguments of the :func:`Screen.setup " "` method." msgstr "" -#: ../../library/turtle.rst:2378 +#: ../../library/turtle.rst:2505 msgid "" "Line 5 and 6 correspond to the arguments of the method :func:`Screen." "screensize `." msgstr "" -#: ../../library/turtle.rst:2380 +#: ../../library/turtle.rst:2507 msgid "" "*shape* can be any of the built-in shapes, e.g: arrow, turtle, etc. For " "more info try ``help(shape)``." msgstr "" -#: ../../library/turtle.rst:2382 +#: ../../library/turtle.rst:2509 msgid "" "If you want to use no fill color (i.e. make the turtle transparent), you " "have to write ``fillcolor = \"\"`` (but all nonempty strings must not have " "quotes in the cfg file)." msgstr "" -#: ../../library/turtle.rst:2385 +#: ../../library/turtle.rst:2512 msgid "" "If you want to reflect the turtle its state, you have to use ``resizemode = " "auto``." msgstr "" -#: ../../library/turtle.rst:2387 +#: ../../library/turtle.rst:2514 msgid "" "If you set e.g. ``language = italian`` the docstringdict :file:" "`turtle_docstringdict_italian.py` will be loaded at import time (if present " "on the import path, e.g. in the same directory as :mod:`turtle`)." msgstr "" -#: ../../library/turtle.rst:2390 +#: ../../library/turtle.rst:2517 msgid "" "The entries *exampleturtle* and *examplescreen* define the names of these " "objects as they occur in the docstrings. The transformation of method-" @@ -2234,301 +2378,301 @@ msgid "" "docstrings." msgstr "" -#: ../../library/turtle.rst:2394 +#: ../../library/turtle.rst:2521 msgid "" "*using_IDLE*: Set this to ``True`` if you regularly work with IDLE and its " "``-n`` switch (\"no subprocess\"). This will prevent :func:`exitonclick` to " "enter the mainloop." msgstr "" -#: ../../library/turtle.rst:2398 +#: ../../library/turtle.rst:2525 msgid "" "There can be a :file:`turtle.cfg` file in the directory where :mod:`turtle` " "is stored and an additional one in the current working directory. The " "latter will override the settings of the first one." msgstr "" -#: ../../library/turtle.rst:2402 +#: ../../library/turtle.rst:2529 msgid "" "The :file:`Lib/turtledemo` directory contains a :file:`turtle.cfg` file. " "You can study it as an example and see its effects when running the demos " "(preferably not from within the demo-viewer)." msgstr "" -#: ../../library/turtle.rst:2408 +#: ../../library/turtle.rst:2535 msgid ":mod:`turtledemo` --- Demo scripts" msgstr "" -#: ../../library/turtle.rst:2413 +#: ../../library/turtle.rst:2540 msgid "" "The :mod:`turtledemo` package includes a set of demo scripts. These scripts " "can be run and viewed using the supplied demo viewer as follows::" msgstr "" -#: ../../library/turtle.rst:2418 +#: ../../library/turtle.rst:2545 msgid "" "Alternatively, you can run the demo scripts individually. For example, ::" msgstr "" -#: ../../library/turtle.rst:2422 +#: ../../library/turtle.rst:2549 msgid "The :mod:`turtledemo` package directory contains:" msgstr "" -#: ../../library/turtle.rst:2424 +#: ../../library/turtle.rst:2551 msgid "" "A demo viewer :file:`__main__.py` which can be used to view the sourcecode " "of the scripts and run them at the same time." msgstr "" -#: ../../library/turtle.rst:2426 +#: ../../library/turtle.rst:2553 msgid "" "Multiple scripts demonstrating different features of the :mod:`turtle` " "module. Examples can be accessed via the Examples menu. They can also be " "run standalone." msgstr "" -#: ../../library/turtle.rst:2429 +#: ../../library/turtle.rst:2556 msgid "" "A :file:`turtle.cfg` file which serves as an example of how to write and use " "such files." msgstr "" -#: ../../library/turtle.rst:2432 +#: ../../library/turtle.rst:2559 msgid "The demo scripts are:" msgstr "" -#: ../../library/turtle.rst:2439 +#: ../../library/turtle.rst:2566 msgid "Name" msgstr "" -#: ../../library/turtle.rst:2439 +#: ../../library/turtle.rst:2566 msgid "Description" msgstr "描述" -#: ../../library/turtle.rst:2439 +#: ../../library/turtle.rst:2566 msgid "Features" msgstr "" -#: ../../library/turtle.rst:2441 +#: ../../library/turtle.rst:2568 msgid "bytedesign" msgstr "" -#: ../../library/turtle.rst:2441 +#: ../../library/turtle.rst:2568 msgid "complex classical turtle graphics pattern" msgstr "" -#: ../../library/turtle.rst:2441 +#: ../../library/turtle.rst:2568 msgid ":func:`tracer`, delay, :func:`update`" msgstr "" -#: ../../library/turtle.rst:2444 +#: ../../library/turtle.rst:2571 msgid "chaos" msgstr "" -#: ../../library/turtle.rst:2444 +#: ../../library/turtle.rst:2571 msgid "" "graphs Verhulst dynamics, shows that computer's computations can generate " "results sometimes against the common sense expectations" msgstr "" -#: ../../library/turtle.rst:2444 +#: ../../library/turtle.rst:2571 msgid "world coordinates" msgstr "" -#: ../../library/turtle.rst:2450 +#: ../../library/turtle.rst:2577 msgid "clock" msgstr "" -#: ../../library/turtle.rst:2450 +#: ../../library/turtle.rst:2577 msgid "analog clock showing time of your computer" msgstr "" -#: ../../library/turtle.rst:2450 +#: ../../library/turtle.rst:2577 msgid "turtles as clock's hands, ontimer" msgstr "" -#: ../../library/turtle.rst:2453 +#: ../../library/turtle.rst:2580 msgid "colormixer" msgstr "" -#: ../../library/turtle.rst:2453 +#: ../../library/turtle.rst:2580 msgid "experiment with r, g, b" msgstr "" -#: ../../library/turtle.rst:2455 +#: ../../library/turtle.rst:2582 msgid "forest" msgstr "" -#: ../../library/turtle.rst:2455 +#: ../../library/turtle.rst:2582 msgid "3 breadth-first trees" msgstr "" -#: ../../library/turtle.rst:2455 +#: ../../library/turtle.rst:2582 msgid "randomization" msgstr "" -#: ../../library/turtle.rst:2457 +#: ../../library/turtle.rst:2584 msgid "fractalcurves" msgstr "" -#: ../../library/turtle.rst:2457 +#: ../../library/turtle.rst:2584 msgid "Hilbert & Koch curves" msgstr "" -#: ../../library/turtle.rst:2457 +#: ../../library/turtle.rst:2584 msgid "recursion" msgstr "" -#: ../../library/turtle.rst:2459 +#: ../../library/turtle.rst:2586 msgid "lindenmayer" msgstr "" -#: ../../library/turtle.rst:2459 +#: ../../library/turtle.rst:2586 msgid "ethnomathematics (indian kolams)" msgstr "" -#: ../../library/turtle.rst:2459 +#: ../../library/turtle.rst:2586 msgid "L-System" msgstr "" -#: ../../library/turtle.rst:2462 +#: ../../library/turtle.rst:2589 msgid "minimal_hanoi" msgstr "minimal_hanoi" -#: ../../library/turtle.rst:2462 +#: ../../library/turtle.rst:2589 msgid "Towers of Hanoi" msgstr "" -#: ../../library/turtle.rst:2462 +#: ../../library/turtle.rst:2589 msgid "Rectangular Turtles as Hanoi discs (shape, shapesize)" msgstr "" -#: ../../library/turtle.rst:2466 +#: ../../library/turtle.rst:2593 msgid "nim" msgstr "" -#: ../../library/turtle.rst:2466 +#: ../../library/turtle.rst:2593 msgid "" "play the classical nim game with three heaps of sticks against the computer." msgstr "" -#: ../../library/turtle.rst:2466 +#: ../../library/turtle.rst:2593 msgid "turtles as nimsticks, event driven (mouse, keyboard)" msgstr "" -#: ../../library/turtle.rst:2470 +#: ../../library/turtle.rst:2597 msgid "paint" msgstr "" -#: ../../library/turtle.rst:2470 +#: ../../library/turtle.rst:2597 msgid "super minimalistic drawing program" msgstr "" -#: ../../library/turtle.rst:2473 +#: ../../library/turtle.rst:2600 msgid "peace" msgstr "" -#: ../../library/turtle.rst:2473 +#: ../../library/turtle.rst:2600 msgid "elementary" msgstr "" -#: ../../library/turtle.rst:2473 +#: ../../library/turtle.rst:2600 msgid "turtle: appearance and animation" msgstr "" -#: ../../library/turtle.rst:2476 +#: ../../library/turtle.rst:2603 msgid "penrose" msgstr "" -#: ../../library/turtle.rst:2476 +#: ../../library/turtle.rst:2603 msgid "aperiodic tiling with kites and darts" msgstr "" -#: ../../library/turtle.rst:2479 +#: ../../library/turtle.rst:2606 msgid "planet_and_moon" msgstr "planet_and_moon" -#: ../../library/turtle.rst:2479 +#: ../../library/turtle.rst:2606 msgid "simulation of gravitational system" msgstr "" -#: ../../library/turtle.rst:2479 +#: ../../library/turtle.rst:2606 msgid "compound shapes, :class:`Vec2D`" msgstr "" -#: ../../library/turtle.rst:2482 +#: ../../library/turtle.rst:2609 msgid "rosette" msgstr "" -#: ../../library/turtle.rst:2482 +#: ../../library/turtle.rst:2609 msgid "a pattern from the wikipedia article on turtle graphics" msgstr "" -#: ../../library/turtle.rst:2482 +#: ../../library/turtle.rst:2609 msgid ":func:`clone`, :func:`undo`" msgstr ":func:`clone`, :func:`undo`" -#: ../../library/turtle.rst:2485 +#: ../../library/turtle.rst:2612 msgid "round_dance" msgstr "round_dance" -#: ../../library/turtle.rst:2485 +#: ../../library/turtle.rst:2612 msgid "dancing turtles rotating pairwise in opposite direction" msgstr "" -#: ../../library/turtle.rst:2485 +#: ../../library/turtle.rst:2612 msgid "compound shapes, clone shapesize, tilt, get_shapepoly, update" msgstr "" -#: ../../library/turtle.rst:2489 +#: ../../library/turtle.rst:2616 msgid "sorting_animate" msgstr "sorting_animate" -#: ../../library/turtle.rst:2489 +#: ../../library/turtle.rst:2616 msgid "visual demonstration of different sorting methods" msgstr "" -#: ../../library/turtle.rst:2489 +#: ../../library/turtle.rst:2616 msgid "simple alignment, randomization" msgstr "" -#: ../../library/turtle.rst:2492 +#: ../../library/turtle.rst:2619 msgid "tree" msgstr "" -#: ../../library/turtle.rst:2492 +#: ../../library/turtle.rst:2619 msgid "a (graphical) breadth first tree (using generators)" msgstr "" -#: ../../library/turtle.rst:2495 +#: ../../library/turtle.rst:2622 msgid "two_canvases" msgstr "two_canvases" -#: ../../library/turtle.rst:2495 +#: ../../library/turtle.rst:2622 msgid "simple design" msgstr "" -#: ../../library/turtle.rst:2495 +#: ../../library/turtle.rst:2622 msgid "turtles on two canvases" msgstr "" -#: ../../library/turtle.rst:2498 +#: ../../library/turtle.rst:2625 msgid "yinyang" msgstr "" -#: ../../library/turtle.rst:2498 +#: ../../library/turtle.rst:2625 msgid "another elementary example" msgstr "" -#: ../../library/turtle.rst:2501 +#: ../../library/turtle.rst:2628 msgid "Have fun!" msgstr "" -#: ../../library/turtle.rst:2505 +#: ../../library/turtle.rst:2632 msgid "Changes since Python 2.6" msgstr "" -#: ../../library/turtle.rst:2507 +#: ../../library/turtle.rst:2634 msgid "" "The methods :func:`Turtle.tracer `, :func:`Turtle.window_width " "` and :func:`Turtle.window_height ` have been " @@ -2539,14 +2683,14 @@ msgid "" "methods.)" msgstr "" -#: ../../library/turtle.rst:2515 +#: ../../library/turtle.rst:2642 msgid "" "The method :func:`!Turtle.fill` has been eliminated. The behaviour of :func:" "`begin_fill` and :func:`end_fill` have changed slightly: now every filling " "process must be completed with an ``end_fill()`` call." msgstr "" -#: ../../library/turtle.rst:2520 +#: ../../library/turtle.rst:2647 msgid "" "A method :func:`Turtle.filling ` has been added. It returns a " "boolean value: ``True`` if a filling process is under way, ``False`` " @@ -2554,11 +2698,11 @@ msgid "" "in Python 2.6." msgstr "" -#: ../../library/turtle.rst:2526 +#: ../../library/turtle.rst:2653 msgid "Changes since Python 3.0" msgstr "" -#: ../../library/turtle.rst:2528 +#: ../../library/turtle.rst:2655 msgid "" "The :class:`Turtle` methods :func:`shearfactor`, :func:`shapetransform` and :" "func:`get_shapepoly` have been added. Thus the full range of regular linear " @@ -2567,29 +2711,46 @@ msgid "" "set the tilt angle. :func:`settiltangle` has been deprecated." msgstr "" -#: ../../library/turtle.rst:2535 +#: ../../library/turtle.rst:2662 msgid "" "The :class:`Screen` method :func:`onkeypress` has been added as a complement " "to :func:`onkey`. As the latter binds actions to the key release event, an " "alias: :func:`onkeyrelease` was also added for it." msgstr "" -#: ../../library/turtle.rst:2539 +#: ../../library/turtle.rst:2666 msgid "" "The method :func:`Screen.mainloop ` has been added, so there is no " "longer a need to use the standalone :func:`mainloop` function when working " "with :class:`Screen` and :class:`Turtle` objects." msgstr "" -#: ../../library/turtle.rst:2543 +#: ../../library/turtle.rst:2670 msgid "" "Two input methods have been added: :func:`Screen.textinput ` and :" "func:`Screen.numinput `. These pop up input dialogs and return " "strings and numbers respectively." msgstr "" -#: ../../library/turtle.rst:2547 +#: ../../library/turtle.rst:2674 msgid "" "Two example scripts :file:`tdemo_nim.py` and :file:`tdemo_round_dance.py` " "have been added to the :file:`Lib/turtledemo` directory." msgstr "" + +#~ msgid "" +#~ "Imagine a robotic turtle starting at (0, 0) in the x-y plane. After an " +#~ "``import turtle``, give it the command ``turtle.forward(15)``, and it " +#~ "moves (on-screen!) 15 pixels in the direction it is facing, drawing a " +#~ "line as it moves. Give it the command ``turtle.right(25)``, and it " +#~ "rotates in-place 25 degrees clockwise." +#~ msgstr "" +#~ "想像一下,一隻機器龜在 x-y 平面上從 (0, 0) 出發。在 ``import turtle`` 之" +#~ "後,給它命令 ``turtle.forward(15)`` ,然後它就會移動 (在螢幕上!) 15 個單" +#~ "位像素,方向是朝著其正面對的方向。給它命令 ``turtle.right(25)`` ,它就會在" +#~ "原地順時針旋轉 25 度。" + +#~ msgid "" +#~ "By combining together these and similar commands, intricate shapes and " +#~ "pictures can easily be drawn." +#~ msgstr "藉由結合這些類似的命令,複雜的形狀和圖形可以輕易被畫出來。" diff --git a/library/venv.po b/library/venv.po index 7fc6344d40..8fab2532c7 100644 --- a/library/venv.po +++ b/library/venv.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-17 17:39+0800\n" +"POT-Creation-Date: 2023-07-24 00:03+0000\n" "PO-Revision-Date: 2023-07-09 15:09+0800\n" "Last-Translator: Po-Chuan Chen \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -232,7 +232,7 @@ msgstr "" msgid "" "A virtual environment may be \"activated\" using a script in its binary " "directory (``bin`` on POSIX; ``Scripts`` on Windows). This will prepend that " -"directory to your :envvar:`!PATH`, so that running :program:`python` will " +"directory to your :envvar:`PATH`, so that running :program:`python` will " "invoke the environment's Python interpreter and you can run installed " "scripts without having to use their full path. The invocation of the " "activation script is platform-specific (:samp:`{}` must be replaced by " @@ -326,11 +326,11 @@ msgid "" "In order to achieve this, scripts installed into virtual environments have a " "\"shebang\" line which points to the environment's Python interpreter, i.e. :" "samp:`#!/{}/bin/python`. This means that the script will run " -"with that interpreter regardless of the value of :envvar:`!PATH`. On " -"Windows, \"shebang\" line processing is supported if you have the :ref:" -"`launcher` installed. Thus, double-clicking an installed script in a Windows " -"Explorer window should run it with the correct interpreter without the " -"environment needing to be activated or on the :envvar:`!PATH`." +"with that interpreter regardless of the value of :envvar:`PATH`. On Windows, " +"\"shebang\" line processing is supported if you have the :ref:`launcher` " +"installed. Thus, double-clicking an installed script in a Windows Explorer " +"window should run it with the correct interpreter without the environment " +"needing to be activated or on the :envvar:`PATH`." msgstr "" #: ../../library/venv.rst:108 diff --git a/reference/lexical_analysis.po b/reference/lexical_analysis.po index 0ca8185c5b..acdc8d1467 100644 --- a/reference/lexical_analysis.po +++ b/reference/lexical_analysis.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-17 17:39+0800\n" +"POT-Creation-Date: 2023-07-24 00:03+0000\n" "PO-Revision-Date: 2018-05-23 16:17+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -605,242 +605,247 @@ msgid "" "either ``'`` or ``\"``.)" msgstr "" -#: ../../reference/lexical_analysis.rst:552 +#: ../../reference/lexical_analysis.rst:554 +#, fuzzy +msgid "Escape sequences" +msgstr "escape sequence(跳脫序列)" + +#: ../../reference/lexical_analysis.rst:556 msgid "" "Unless an ``'r'`` or ``'R'`` prefix is present, escape sequences in string " "and bytes literals are interpreted according to rules similar to those used " "by Standard C. The recognized escape sequences are:" msgstr "" -#: ../../reference/lexical_analysis.rst:557 -#: ../../reference/lexical_analysis.rst:590 +#: ../../reference/lexical_analysis.rst:561 +#: ../../reference/lexical_analysis.rst:594 msgid "Escape Sequence" msgstr "" -#: ../../reference/lexical_analysis.rst:557 -#: ../../reference/lexical_analysis.rst:590 +#: ../../reference/lexical_analysis.rst:561 +#: ../../reference/lexical_analysis.rst:594 msgid "Meaning" msgstr "" -#: ../../reference/lexical_analysis.rst:557 -#: ../../reference/lexical_analysis.rst:590 +#: ../../reference/lexical_analysis.rst:561 +#: ../../reference/lexical_analysis.rst:594 msgid "Notes" msgstr "註解" -#: ../../reference/lexical_analysis.rst:559 +#: ../../reference/lexical_analysis.rst:563 msgid "``\\``\\ " msgstr "``\\``\\ " -#: ../../reference/lexical_analysis.rst:559 +#: ../../reference/lexical_analysis.rst:563 msgid "Backslash and newline ignored" msgstr "" -#: ../../reference/lexical_analysis.rst:559 +#: ../../reference/lexical_analysis.rst:563 msgid "\\(1)" msgstr "\\(1)" -#: ../../reference/lexical_analysis.rst:561 +#: ../../reference/lexical_analysis.rst:565 msgid "``\\\\``" msgstr "``\\\\``" -#: ../../reference/lexical_analysis.rst:561 +#: ../../reference/lexical_analysis.rst:565 msgid "Backslash (``\\``)" msgstr "" -#: ../../reference/lexical_analysis.rst:563 +#: ../../reference/lexical_analysis.rst:567 msgid "``\\'``" msgstr "``\\'``" -#: ../../reference/lexical_analysis.rst:563 +#: ../../reference/lexical_analysis.rst:567 msgid "Single quote (``'``)" msgstr "" -#: ../../reference/lexical_analysis.rst:565 +#: ../../reference/lexical_analysis.rst:569 msgid "``\\\"``" msgstr "``\\\"``" -#: ../../reference/lexical_analysis.rst:565 +#: ../../reference/lexical_analysis.rst:569 msgid "Double quote (``\"``)" msgstr "" -#: ../../reference/lexical_analysis.rst:567 +#: ../../reference/lexical_analysis.rst:571 msgid "``\\a``" msgstr "``\\a``" -#: ../../reference/lexical_analysis.rst:567 +#: ../../reference/lexical_analysis.rst:571 msgid "ASCII Bell (BEL)" msgstr "" -#: ../../reference/lexical_analysis.rst:569 +#: ../../reference/lexical_analysis.rst:573 msgid "``\\b``" msgstr "``\\b``" -#: ../../reference/lexical_analysis.rst:569 +#: ../../reference/lexical_analysis.rst:573 msgid "ASCII Backspace (BS)" msgstr "" -#: ../../reference/lexical_analysis.rst:571 +#: ../../reference/lexical_analysis.rst:575 msgid "``\\f``" msgstr "``\\f``" -#: ../../reference/lexical_analysis.rst:571 +#: ../../reference/lexical_analysis.rst:575 msgid "ASCII Formfeed (FF)" msgstr "" -#: ../../reference/lexical_analysis.rst:573 +#: ../../reference/lexical_analysis.rst:577 msgid "``\\n``" msgstr "``\\n``" -#: ../../reference/lexical_analysis.rst:573 +#: ../../reference/lexical_analysis.rst:577 msgid "ASCII Linefeed (LF)" msgstr "" -#: ../../reference/lexical_analysis.rst:575 +#: ../../reference/lexical_analysis.rst:579 msgid "``\\r``" msgstr "``\\r``" -#: ../../reference/lexical_analysis.rst:575 +#: ../../reference/lexical_analysis.rst:579 msgid "ASCII Carriage Return (CR)" msgstr "" -#: ../../reference/lexical_analysis.rst:577 +#: ../../reference/lexical_analysis.rst:581 msgid "``\\t``" msgstr "``\\t``" -#: ../../reference/lexical_analysis.rst:577 +#: ../../reference/lexical_analysis.rst:581 msgid "ASCII Horizontal Tab (TAB)" msgstr "" -#: ../../reference/lexical_analysis.rst:579 +#: ../../reference/lexical_analysis.rst:583 msgid "``\\v``" msgstr "``\\v``" -#: ../../reference/lexical_analysis.rst:579 +#: ../../reference/lexical_analysis.rst:583 msgid "ASCII Vertical Tab (VT)" msgstr "" -#: ../../reference/lexical_analysis.rst:581 +#: ../../reference/lexical_analysis.rst:585 msgid "``\\ooo``" msgstr "``\\ooo``" -#: ../../reference/lexical_analysis.rst:581 +#: ../../reference/lexical_analysis.rst:585 msgid "Character with octal value *ooo*" msgstr "" -#: ../../reference/lexical_analysis.rst:581 +#: ../../reference/lexical_analysis.rst:585 msgid "(2,4)" msgstr "(2,4)" -#: ../../reference/lexical_analysis.rst:584 +#: ../../reference/lexical_analysis.rst:588 msgid "``\\xhh``" msgstr "``\\xhh``" -#: ../../reference/lexical_analysis.rst:584 +#: ../../reference/lexical_analysis.rst:588 msgid "Character with hex value *hh*" msgstr "" -#: ../../reference/lexical_analysis.rst:584 +#: ../../reference/lexical_analysis.rst:588 msgid "(3,4)" msgstr "(3,4)" -#: ../../reference/lexical_analysis.rst:587 +#: ../../reference/lexical_analysis.rst:591 msgid "Escape sequences only recognized in string literals are:" msgstr "" -#: ../../reference/lexical_analysis.rst:592 +#: ../../reference/lexical_analysis.rst:596 msgid "``\\N{name}``" msgstr "``\\N{name}``" -#: ../../reference/lexical_analysis.rst:592 +#: ../../reference/lexical_analysis.rst:596 msgid "Character named *name* in the Unicode database" msgstr "" -#: ../../reference/lexical_analysis.rst:592 +#: ../../reference/lexical_analysis.rst:596 msgid "\\(5)" msgstr "\\(5)" -#: ../../reference/lexical_analysis.rst:595 +#: ../../reference/lexical_analysis.rst:599 msgid "``\\uxxxx``" msgstr "``\\uxxxx``" -#: ../../reference/lexical_analysis.rst:595 +#: ../../reference/lexical_analysis.rst:599 msgid "Character with 16-bit hex value *xxxx*" msgstr "" -#: ../../reference/lexical_analysis.rst:595 +#: ../../reference/lexical_analysis.rst:599 msgid "\\(6)" msgstr "\\(6)" -#: ../../reference/lexical_analysis.rst:598 +#: ../../reference/lexical_analysis.rst:602 msgid "``\\Uxxxxxxxx``" msgstr "``\\Uxxxxxxxx``" -#: ../../reference/lexical_analysis.rst:598 +#: ../../reference/lexical_analysis.rst:602 msgid "Character with 32-bit hex value *xxxxxxxx*" msgstr "" -#: ../../reference/lexical_analysis.rst:598 +#: ../../reference/lexical_analysis.rst:602 msgid "\\(7)" msgstr "\\(7)" -#: ../../reference/lexical_analysis.rst:602 +#: ../../reference/lexical_analysis.rst:606 msgid "Notes:" msgstr "註解:" -#: ../../reference/lexical_analysis.rst:605 +#: ../../reference/lexical_analysis.rst:609 msgid "A backslash can be added at the end of a line to ignore the newline::" msgstr "" -#: ../../reference/lexical_analysis.rst:611 +#: ../../reference/lexical_analysis.rst:615 msgid "" "The same result can be achieved using :ref:`triple-quoted strings " "`, or parentheses and :ref:`string literal concatenation `." msgstr "" -#: ../../reference/lexical_analysis.rst:616 +#: ../../reference/lexical_analysis.rst:620 msgid "As in Standard C, up to three octal digits are accepted." msgstr "" -#: ../../reference/lexical_analysis.rst:618 +#: ../../reference/lexical_analysis.rst:622 msgid "" "Octal escapes with value larger than ``0o377`` produce a :exc:" "`DeprecationWarning`." msgstr "" -#: ../../reference/lexical_analysis.rst:622 +#: ../../reference/lexical_analysis.rst:626 msgid "" "Octal escapes with value larger than ``0o377`` produce a :exc:" "`SyntaxWarning`. In a future Python version they will be eventually a :exc:" "`SyntaxError`." msgstr "" -#: ../../reference/lexical_analysis.rst:628 +#: ../../reference/lexical_analysis.rst:632 msgid "Unlike in Standard C, exactly two hex digits are required." msgstr "" -#: ../../reference/lexical_analysis.rst:631 +#: ../../reference/lexical_analysis.rst:635 msgid "" "In a bytes literal, hexadecimal and octal escapes denote the byte with the " "given value. In a string literal, these escapes denote a Unicode character " "with the given value." msgstr "" -#: ../../reference/lexical_analysis.rst:636 +#: ../../reference/lexical_analysis.rst:640 msgid "Support for name aliases [#]_ has been added." msgstr "" -#: ../../reference/lexical_analysis.rst:640 +#: ../../reference/lexical_analysis.rst:644 msgid "Exactly four hex digits are required." msgstr "" -#: ../../reference/lexical_analysis.rst:643 +#: ../../reference/lexical_analysis.rst:647 msgid "" "Any Unicode character can be encoded this way. Exactly eight hex digits are " "required." msgstr "" -#: ../../reference/lexical_analysis.rst:649 +#: ../../reference/lexical_analysis.rst:653 msgid "" "Unlike Standard C, all unrecognized escape sequences are left in the string " "unchanged, i.e., *the backslash is left in the result*. (This behavior is " @@ -850,17 +855,17 @@ msgid "" "category of unrecognized escapes for bytes literals." msgstr "" -#: ../../reference/lexical_analysis.rst:656 +#: ../../reference/lexical_analysis.rst:660 msgid "Unrecognized escape sequences produce a :exc:`DeprecationWarning`." msgstr "" -#: ../../reference/lexical_analysis.rst:659 +#: ../../reference/lexical_analysis.rst:663 msgid "" "Unrecognized escape sequences produce a :exc:`SyntaxWarning`. In a future " "Python version they will be eventually a :exc:`SyntaxError`." msgstr "" -#: ../../reference/lexical_analysis.rst:663 +#: ../../reference/lexical_analysis.rst:667 msgid "" "Even in a raw literal, quotes can be escaped with a backslash, but the " "backslash remains in the result; for example, ``r\"\\\"\"`` is a valid " @@ -873,11 +878,11 @@ msgid "" "continuation." msgstr "" -#: ../../reference/lexical_analysis.rst:676 +#: ../../reference/lexical_analysis.rst:680 msgid "String literal concatenation" msgstr "" -#: ../../reference/lexical_analysis.rst:678 +#: ../../reference/lexical_analysis.rst:682 msgid "" "Multiple adjacent string or bytes literals (delimited by whitespace), " "possibly using different quoting conventions, are allowed, and their meaning " @@ -887,7 +892,7 @@ msgid "" "lines, or even to add comments to parts of strings, for example::" msgstr "" -#: ../../reference/lexical_analysis.rst:689 +#: ../../reference/lexical_analysis.rst:693 msgid "" "Note that this feature is defined at the syntactical level, but implemented " "at compile time. The '+' operator must be used to concatenate string " @@ -897,11 +902,11 @@ msgid "" "with plain string literals." msgstr "" -#: ../../reference/lexical_analysis.rst:710 +#: ../../reference/lexical_analysis.rst:714 msgid "Formatted string literals" msgstr "" -#: ../../reference/lexical_analysis.rst:714 +#: ../../reference/lexical_analysis.rst:718 msgid "" "A :dfn:`formatted string literal` or :dfn:`f-string` is a string literal " "that is prefixed with ``'f'`` or ``'F'``. These strings may contain " @@ -910,14 +915,14 @@ msgid "" "are really expressions evaluated at run time." msgstr "" -#: ../../reference/lexical_analysis.rst:720 +#: ../../reference/lexical_analysis.rst:724 msgid "" "Escape sequences are decoded like in ordinary string literals (except when a " "literal is also marked as a raw string). After decoding, the grammar for " "the contents of the string is:" msgstr "" -#: ../../reference/lexical_analysis.rst:734 +#: ../../reference/lexical_analysis.rst:738 msgid "" "The parts of the string outside curly braces are treated literally, except " "that any doubled curly braces ``'{{'`` or ``'}}'`` are replaced with the " @@ -930,7 +935,7 @@ msgid "" "replacement field ends with a closing curly bracket ``'}'``." msgstr "" -#: ../../reference/lexical_analysis.rst:744 +#: ../../reference/lexical_analysis.rst:748 msgid "" "Expressions in formatted string literals are treated like regular Python " "expressions surrounded by parentheses, with a few exceptions. An empty " @@ -944,20 +949,20 @@ msgid "" "replacement fields must be closed in a different line." msgstr "" -#: ../../reference/lexical_analysis.rst:761 +#: ../../reference/lexical_analysis.rst:765 msgid "" "Prior to Python 3.7, an :keyword:`await` expression and comprehensions " "containing an :keyword:`async for` clause were illegal in the expressions in " "formatted string literals due to a problem with the implementation." msgstr "" -#: ../../reference/lexical_analysis.rst:766 +#: ../../reference/lexical_analysis.rst:770 msgid "" "Prior to Python 3.12, comments were not allowed inside f-string replacement " "fields." msgstr "" -#: ../../reference/lexical_analysis.rst:770 +#: ../../reference/lexical_analysis.rst:774 msgid "" "When the equal sign ``'='`` is provided, the output will have the expression " "text, the ``'='`` and the evaluated value. Spaces after the opening brace " @@ -968,18 +973,18 @@ msgid "" "r'`` is declared." msgstr "" -#: ../../reference/lexical_analysis.rst:778 +#: ../../reference/lexical_analysis.rst:782 msgid "The equal sign ``'='``." msgstr "" -#: ../../reference/lexical_analysis.rst:781 +#: ../../reference/lexical_analysis.rst:785 msgid "" "If a conversion is specified, the result of evaluating the expression is " "converted before formatting. Conversion ``'!s'`` calls :func:`str` on the " "result, ``'!r'`` calls :func:`repr`, and ``'!a'`` calls :func:`ascii`." msgstr "" -#: ../../reference/lexical_analysis.rst:785 +#: ../../reference/lexical_analysis.rst:789 msgid "" "The result is then formatted using the :func:`format` protocol. The format " "specifier is passed to the :meth:`__format__` method of the expression or " @@ -988,7 +993,7 @@ msgid "" "whole string." msgstr "" -#: ../../reference/lexical_analysis.rst:791 +#: ../../reference/lexical_analysis.rst:795 msgid "" "Top-level format specifiers may include nested replacement fields. These " "nested fields may include their own conversion fields and :ref:`format " @@ -997,117 +1002,117 @@ msgid "" "as that used by the :meth:`str.format` method." msgstr "" -#: ../../reference/lexical_analysis.rst:797 +#: ../../reference/lexical_analysis.rst:801 msgid "" "Formatted string literals may be concatenated, but replacement fields cannot " "be split across literals." msgstr "" -#: ../../reference/lexical_analysis.rst:800 +#: ../../reference/lexical_analysis.rst:804 msgid "Some examples of formatted string literals::" msgstr "" -#: ../../reference/lexical_analysis.rst:832 +#: ../../reference/lexical_analysis.rst:836 msgid "" "Reusing the outer f-string quoting type inside a replacement field is " "permitted::" msgstr "" -#: ../../reference/lexical_analysis.rst:839 +#: ../../reference/lexical_analysis.rst:843 msgid "" "Prior to Python 3.12, reuse of the same quoting type of the outer f-string " "inside a replacement field was not possible." msgstr "" -#: ../../reference/lexical_analysis.rst:843 +#: ../../reference/lexical_analysis.rst:847 msgid "" "Backslashes are also allowed in replacement fields and are evaluated the " "same way as in any other context::" msgstr "" -#: ../../reference/lexical_analysis.rst:853 +#: ../../reference/lexical_analysis.rst:857 msgid "" "Prior to Python 3.12, backslashes were not permitted inside an f-string " "replacement field." msgstr "" -#: ../../reference/lexical_analysis.rst:857 +#: ../../reference/lexical_analysis.rst:861 msgid "" "Formatted string literals cannot be used as docstrings, even if they do not " "include expressions." msgstr "" -#: ../../reference/lexical_analysis.rst:868 +#: ../../reference/lexical_analysis.rst:872 msgid "" "See also :pep:`498` for the proposal that added formatted string literals, " "and :meth:`str.format`, which uses a related format string mechanism." msgstr "" -#: ../../reference/lexical_analysis.rst:875 +#: ../../reference/lexical_analysis.rst:879 msgid "Numeric literals" msgstr "" -#: ../../reference/lexical_analysis.rst:881 +#: ../../reference/lexical_analysis.rst:885 msgid "" "There are three types of numeric literals: integers, floating point numbers, " "and imaginary numbers. There are no complex literals (complex numbers can " "be formed by adding a real number and an imaginary number)." msgstr "" -#: ../../reference/lexical_analysis.rst:885 +#: ../../reference/lexical_analysis.rst:889 msgid "" "Note that numeric literals do not include a sign; a phrase like ``-1`` is " "actually an expression composed of the unary operator '``-``' and the " "literal ``1``." msgstr "" -#: ../../reference/lexical_analysis.rst:899 +#: ../../reference/lexical_analysis.rst:903 msgid "Integer literals" msgstr "" -#: ../../reference/lexical_analysis.rst:901 +#: ../../reference/lexical_analysis.rst:905 msgid "Integer literals are described by the following lexical definitions:" msgstr "" -#: ../../reference/lexical_analysis.rst:915 +#: ../../reference/lexical_analysis.rst:919 msgid "" "There is no limit for the length of integer literals apart from what can be " "stored in available memory." msgstr "" -#: ../../reference/lexical_analysis.rst:918 +#: ../../reference/lexical_analysis.rst:922 msgid "" "Underscores are ignored for determining the numeric value of the literal. " "They can be used to group digits for enhanced readability. One underscore " "can occur between digits, and after base specifiers like ``0x``." msgstr "" -#: ../../reference/lexical_analysis.rst:922 +#: ../../reference/lexical_analysis.rst:926 msgid "" "Note that leading zeros in a non-zero decimal number are not allowed. This " "is for disambiguation with C-style octal literals, which Python used before " "version 3.0." msgstr "" -#: ../../reference/lexical_analysis.rst:926 +#: ../../reference/lexical_analysis.rst:930 msgid "Some examples of integer literals::" msgstr "" -#: ../../reference/lexical_analysis.rst:932 -#: ../../reference/lexical_analysis.rst:964 +#: ../../reference/lexical_analysis.rst:936 +#: ../../reference/lexical_analysis.rst:968 msgid "Underscores are now allowed for grouping purposes in literals." msgstr "" -#: ../../reference/lexical_analysis.rst:943 +#: ../../reference/lexical_analysis.rst:947 msgid "Floating point literals" msgstr "" -#: ../../reference/lexical_analysis.rst:945 +#: ../../reference/lexical_analysis.rst:949 msgid "" "Floating point literals are described by the following lexical definitions:" msgstr "" -#: ../../reference/lexical_analysis.rst:955 +#: ../../reference/lexical_analysis.rst:959 msgid "" "Note that the integer and exponent parts are always interpreted using radix " "10. For example, ``077e010`` is legal, and denotes the same number as " @@ -1116,19 +1121,19 @@ msgid "" "grouping." msgstr "" -#: ../../reference/lexical_analysis.rst:960 +#: ../../reference/lexical_analysis.rst:964 msgid "Some examples of floating point literals::" msgstr "" -#: ../../reference/lexical_analysis.rst:973 +#: ../../reference/lexical_analysis.rst:977 msgid "Imaginary literals" msgstr "" -#: ../../reference/lexical_analysis.rst:975 +#: ../../reference/lexical_analysis.rst:979 msgid "Imaginary literals are described by the following lexical definitions:" msgstr "" -#: ../../reference/lexical_analysis.rst:980 +#: ../../reference/lexical_analysis.rst:984 msgid "" "An imaginary literal yields a complex number with a real part of 0.0. " "Complex numbers are represented as a pair of floating point numbers and have " @@ -1137,23 +1142,23 @@ msgid "" "Some examples of imaginary literals::" msgstr "" -#: ../../reference/lexical_analysis.rst:992 +#: ../../reference/lexical_analysis.rst:996 msgid "Operators" msgstr "" -#: ../../reference/lexical_analysis.rst:996 +#: ../../reference/lexical_analysis.rst:1000 msgid "The following tokens are operators:" msgstr "" -#: ../../reference/lexical_analysis.rst:1009 +#: ../../reference/lexical_analysis.rst:1013 msgid "Delimiters" msgstr "" -#: ../../reference/lexical_analysis.rst:1013 +#: ../../reference/lexical_analysis.rst:1017 msgid "The following tokens serve as delimiters in the grammar:" msgstr "" -#: ../../reference/lexical_analysis.rst:1022 +#: ../../reference/lexical_analysis.rst:1026 msgid "" "The period can also occur in floating-point and imaginary literals. A " "sequence of three periods has a special meaning as an ellipsis literal. The " @@ -1161,23 +1166,23 @@ msgid "" "as delimiters, but also perform an operation." msgstr "" -#: ../../reference/lexical_analysis.rst:1027 +#: ../../reference/lexical_analysis.rst:1031 msgid "" "The following printing ASCII characters have special meaning as part of " "other tokens or are otherwise significant to the lexical analyzer:" msgstr "" -#: ../../reference/lexical_analysis.rst:1034 +#: ../../reference/lexical_analysis.rst:1038 msgid "" "The following printing ASCII characters are not used in Python. Their " "occurrence outside string literals and comments is an unconditional error:" msgstr "" -#: ../../reference/lexical_analysis.rst:1043 +#: ../../reference/lexical_analysis.rst:1047 msgid "Footnotes" msgstr "註解" -#: ../../reference/lexical_analysis.rst:1044 +#: ../../reference/lexical_analysis.rst:1048 msgid "https://www.unicode.org/Public/15.0.0/ucd/NameAliases.txt" msgstr "https://www.unicode.org/Public/15.0.0/ucd/NameAliases.txt" @@ -1397,7 +1402,7 @@ msgid "f'" msgstr "f'" #: ../../reference/lexical_analysis.rst:522 -#: ../../reference/lexical_analysis.rst:696 +#: ../../reference/lexical_analysis.rst:700 msgid "formatted string literal" msgstr "formatted string literal(格式化字串常數)" @@ -1469,138 +1474,138 @@ msgstr "\\u" msgid "\\U" msgstr "\\U" -#: ../../reference/lexical_analysis.rst:647 +#: ../../reference/lexical_analysis.rst:651 msgid "unrecognized escape sequence" msgstr "unrecognized escape sequence(無法辨識的跳脫序列)" -#: ../../reference/lexical_analysis.rst:696 +#: ../../reference/lexical_analysis.rst:700 msgid "interpolated string literal" msgstr "interpolated string literal(插值字串常數)" -#: ../../reference/lexical_analysis.rst:696 +#: ../../reference/lexical_analysis.rst:700 msgid "string" msgstr "string(字串)" -#: ../../reference/lexical_analysis.rst:696 +#: ../../reference/lexical_analysis.rst:700 msgid "formatted literal" msgstr "formatted literal(格式化常數)" -#: ../../reference/lexical_analysis.rst:696 +#: ../../reference/lexical_analysis.rst:700 msgid "interpolated literal" msgstr "interpolated literal(插值常數)" -#: ../../reference/lexical_analysis.rst:696 +#: ../../reference/lexical_analysis.rst:700 msgid "f-string" msgstr "f-string(f 字串)" -#: ../../reference/lexical_analysis.rst:696 +#: ../../reference/lexical_analysis.rst:700 msgid "fstring" msgstr "fstring(f 字串)" -#: ../../reference/lexical_analysis.rst:696 +#: ../../reference/lexical_analysis.rst:700 msgid "{} (curly brackets)" msgstr "{} (花括號)" -#: ../../reference/lexical_analysis.rst:696 +#: ../../reference/lexical_analysis.rst:700 msgid "in formatted string literal" msgstr "於格式化字串常數中" -#: ../../reference/lexical_analysis.rst:696 +#: ../../reference/lexical_analysis.rst:700 msgid "! (exclamation)" msgstr "! (驚嘆號)" -#: ../../reference/lexical_analysis.rst:696 +#: ../../reference/lexical_analysis.rst:700 msgid ": (colon)" msgstr ": (冒號)" -#: ../../reference/lexical_analysis.rst:696 +#: ../../reference/lexical_analysis.rst:700 msgid "= (equals)" msgstr "= (等於)" -#: ../../reference/lexical_analysis.rst:696 +#: ../../reference/lexical_analysis.rst:700 msgid "for help in debugging using string literals" msgstr "for help in debugging using string literals(使用字串常數進行除錯)" -#: ../../reference/lexical_analysis.rst:877 +#: ../../reference/lexical_analysis.rst:881 msgid "number" msgstr "number(數字)" -#: ../../reference/lexical_analysis.rst:877 +#: ../../reference/lexical_analysis.rst:881 msgid "numeric literal" msgstr "numeric literal(數值常數)" -#: ../../reference/lexical_analysis.rst:877 -#: ../../reference/lexical_analysis.rst:890 +#: ../../reference/lexical_analysis.rst:881 +#: ../../reference/lexical_analysis.rst:894 msgid "integer literal" msgstr "integer literal(整數常數)" -#: ../../reference/lexical_analysis.rst:877 +#: ../../reference/lexical_analysis.rst:881 msgid "floating point literal" msgstr "floating point literal(浮點數常數)" -#: ../../reference/lexical_analysis.rst:877 +#: ../../reference/lexical_analysis.rst:881 msgid "hexadecimal literal" msgstr "hexadecimal literal(十六進位常數)" -#: ../../reference/lexical_analysis.rst:877 +#: ../../reference/lexical_analysis.rst:881 msgid "octal literal" msgstr "octal literal(八進位常數)" -#: ../../reference/lexical_analysis.rst:877 +#: ../../reference/lexical_analysis.rst:881 msgid "binary literal" msgstr "binary literal(二進位常數)" -#: ../../reference/lexical_analysis.rst:877 +#: ../../reference/lexical_analysis.rst:881 msgid "decimal literal" msgstr "decimal literal(十進位常數)" -#: ../../reference/lexical_analysis.rst:877 +#: ../../reference/lexical_analysis.rst:881 msgid "imaginary literal" msgstr "imaginary literal(虛數常數)" -#: ../../reference/lexical_analysis.rst:877 +#: ../../reference/lexical_analysis.rst:881 msgid "complex literal" msgstr "complex literal(複數常數)" -#: ../../reference/lexical_analysis.rst:890 +#: ../../reference/lexical_analysis.rst:894 msgid "0b" msgstr "0b" -#: ../../reference/lexical_analysis.rst:890 +#: ../../reference/lexical_analysis.rst:894 msgid "0o" msgstr "0o" -#: ../../reference/lexical_analysis.rst:890 +#: ../../reference/lexical_analysis.rst:894 msgid "0x" msgstr "0x" -#: ../../reference/lexical_analysis.rst:890 -#: ../../reference/lexical_analysis.rst:936 +#: ../../reference/lexical_analysis.rst:894 +#: ../../reference/lexical_analysis.rst:940 msgid "_ (underscore)" msgstr "_ (底線)" -#: ../../reference/lexical_analysis.rst:890 -#: ../../reference/lexical_analysis.rst:936 -#: ../../reference/lexical_analysis.rst:968 +#: ../../reference/lexical_analysis.rst:894 +#: ../../reference/lexical_analysis.rst:940 +#: ../../reference/lexical_analysis.rst:972 msgid "in numeric literal" msgstr "於數值常數中" -#: ../../reference/lexical_analysis.rst:936 +#: ../../reference/lexical_analysis.rst:940 msgid ". (dot)" msgstr ". (點)" -#: ../../reference/lexical_analysis.rst:936 +#: ../../reference/lexical_analysis.rst:940 msgid "e" msgstr "e" -#: ../../reference/lexical_analysis.rst:968 +#: ../../reference/lexical_analysis.rst:972 msgid "j" msgstr "j" -#: ../../reference/lexical_analysis.rst:994 +#: ../../reference/lexical_analysis.rst:998 msgid "operators" msgstr "operators(運算子)" -#: ../../reference/lexical_analysis.rst:1011 +#: ../../reference/lexical_analysis.rst:1015 msgid "delimiters" msgstr "delimiters(分隔符號)" diff --git a/tutorial/controlflow.po b/tutorial/controlflow.po index 41275b3e85..abb05753ea 100644 --- a/tutorial/controlflow.po +++ b/tutorial/controlflow.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-18 00:46+0000\n" +"POT-Creation-Date: 2023-07-24 00:03+0000\n" "PO-Revision-Date: 2022-07-24 14:52+0800\n" "Last-Translator: Steven Hsu \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -28,9 +28,10 @@ msgid "More Control Flow Tools" msgstr "深入了解流程控制" #: ../../tutorial/controlflow.rst:7 +#, fuzzy msgid "" -"Besides the :keyword:`while` statement just introduced, Python uses the " -"usual flow control statements known from other languages, with some twists." +"As well as the :keyword:`while` statement just introduced, Python uses a few " +"more that we will encounter in this chapter." msgstr "" "除了剛才介紹的 :keyword:`while`,Python 擁有在其他程式語言中常用的流程控制語" "法,並有一些不一樣的改變。" @@ -196,29 +197,48 @@ msgstr "" "子句" #: ../../tutorial/controlflow.rst:166 +#, fuzzy msgid "" -"The :keyword:`break` statement, like in C, breaks out of the innermost " -"enclosing :keyword:`for` or :keyword:`while` loop." +"The :keyword:`break` statement breaks out of the innermost enclosing :" +"keyword:`for` or :keyword:`while` loop." msgstr "" ":keyword:`break` 陳述式,如同 C 語言,終止包含它的最內部 :keyword:`for` 或 :" "keyword:`while` 迴圈。" #: ../../tutorial/controlflow.rst:169 +#, fuzzy msgid "" -"Loop statements may have an :keyword:`!else` clause; it is executed when the " -"loop terminates through exhaustion of the iterable (with :keyword:`for`) or " -"when the condition becomes false (with :keyword:`while`), but not when the " -"loop is terminated by a :keyword:`break` statement. This is exemplified by " -"the following loop, which searches for prime numbers::" +"A :keyword:`!for` or :keyword:`!while` loop can include an :keyword:`!else` " +"clause." msgstr "" -"迴圈陳述式可以帶有一個 :keyword:`!else` 子句。當迴圈用盡所有的 iterable " -"(在 :keyword:`for` 中)或條件為假(在 :keyword:`while` 中)時,這個子句會被" -"執行;但迴圈被 :keyword:`break` 陳述式終止時則不會執行。底下尋找質數的迴圈即" -"示範了這個行為:\n" -"\n" -"::" +"迴圈內的 :keyword:`!break` 和 :keyword:`!continue` 陳述式及 :keyword:`!else` " +"子句" -#: ../../tutorial/controlflow.rst:193 +#: ../../tutorial/controlflow.rst:171 +msgid "" +"In a :keyword:`for` loop, the :keyword:`!else` clause is executed after the " +"loop reaches its final iteration." +msgstr "" + +#: ../../tutorial/controlflow.rst:174 +msgid "" +"In a :keyword:`while` loop, it's executed after the loop's condition becomes " +"false." +msgstr "" + +#: ../../tutorial/controlflow.rst:176 +msgid "" +"In either kind of loop, the :keyword:`!else` clause is **not** executed if " +"the loop was terminated by a :keyword:`break`." +msgstr "" + +#: ../../tutorial/controlflow.rst:179 +msgid "" +"This is exemplified in the following :keyword:`!for` loop, which searches " +"for prime numbers::" +msgstr "" + +#: ../../tutorial/controlflow.rst:200 msgid "" "(Yes, this is the correct code. Look closely: the ``else`` clause belongs " "to the :keyword:`for` loop, **not** the :keyword:`if` statement.)" @@ -226,7 +246,7 @@ msgstr "" "(沒錯,這是正確的程式碼。請看仔細:``else`` 子句屬於 :keyword:`for` 迴圈,**" "並非** :keyword:`if` 陳述式。)" -#: ../../tutorial/controlflow.rst:196 +#: ../../tutorial/controlflow.rst:203 msgid "" "When used with a loop, the ``else`` clause has more in common with the " "``else`` clause of a :keyword:`try` statement than it does with that of :" @@ -241,7 +261,7 @@ msgstr "" "任何 ``break`` 發生時執行。更多有關 :keyword:`!try` 陳述式和例外的介紹,見" "\\ :ref:`tut-handling`\\ 。" -#: ../../tutorial/controlflow.rst:203 +#: ../../tutorial/controlflow.rst:210 msgid "" "The :keyword:`continue` statement, also borrowed from C, continues with the " "next iteration of the loop::" @@ -250,11 +270,11 @@ msgstr "" "\n" "::" -#: ../../tutorial/controlflow.rst:224 +#: ../../tutorial/controlflow.rst:231 msgid ":keyword:`!pass` Statements" msgstr ":keyword:`!pass` 陳述式" -#: ../../tutorial/controlflow.rst:226 +#: ../../tutorial/controlflow.rst:233 msgid "" "The :keyword:`pass` statement does nothing. It can be used when a statement " "is required syntactically but the program requires no action. For example::" @@ -264,14 +284,14 @@ msgstr "" "\n" "::" -#: ../../tutorial/controlflow.rst:233 +#: ../../tutorial/controlflow.rst:240 msgid "This is commonly used for creating minimal classes::" msgstr "" "這經常用於建立簡單的 class(類別):\n" "\n" "::" -#: ../../tutorial/controlflow.rst:239 +#: ../../tutorial/controlflow.rst:246 msgid "" "Another place :keyword:`pass` can be used is as a place-holder for a " "function or conditional body when you are working on new code, allowing you " @@ -283,11 +303,11 @@ msgstr "" "\n" "::" -#: ../../tutorial/controlflow.rst:251 +#: ../../tutorial/controlflow.rst:258 msgid ":keyword:`!match` Statements" msgstr ":keyword:`!match` 陳述式" -#: ../../tutorial/controlflow.rst:253 +#: ../../tutorial/controlflow.rst:260 msgid "" "A :keyword:`match` statement takes an expression and compares its value to " "successive patterns given as one or more case blocks. This is superficially " @@ -303,7 +323,7 @@ msgstr "" "言中的模式匹配 (pattern matching) 更為相近。只有第一個匹配成功的模式會被執" "行,而它也可以將成分(序列元素或物件屬性)從值中提取到變數中。" -#: ../../tutorial/controlflow.rst:261 +#: ../../tutorial/controlflow.rst:268 msgid "" "The simplest form compares a subject value against one or more literals::" msgstr "" @@ -312,7 +332,7 @@ msgstr "" "\n" "::" -#: ../../tutorial/controlflow.rst:274 +#: ../../tutorial/controlflow.rst:281 msgid "" "Note the last block: the \"variable name\" ``_`` acts as a *wildcard* and " "never fails to match. If no case matches, none of the branches is executed." @@ -320,7 +340,7 @@ msgstr "" "請注意最後一段:「變數名稱」\\ ``_`` 是作為\\ *通用字元 (wildcard)*\\ 的角" "色,且永遠不會匹配失敗。如果沒有 case 匹配成功,則不會執行任何的分支。" -#: ../../tutorial/controlflow.rst:277 +#: ../../tutorial/controlflow.rst:284 msgid "" "You can combine several literals in a single pattern using ``|`` (\"or\")::" msgstr "" @@ -328,7 +348,7 @@ msgstr "" "\n" "::" -#: ../../tutorial/controlflow.rst:282 +#: ../../tutorial/controlflow.rst:289 msgid "" "Patterns can look like unpacking assignments, and can be used to bind " "variables::" @@ -337,7 +357,7 @@ msgstr "" "\n" "::" -#: ../../tutorial/controlflow.rst:298 +#: ../../tutorial/controlflow.rst:305 msgid "" "Study that one carefully! The first pattern has two literals, and can be " "thought of as an extension of the literal pattern shown above. But the next " @@ -351,7 +371,7 @@ msgstr "" "(bind)*\\ 了來自主題 (``point``) 的一個值。第四個模式會擷取兩個值,這使得它在" "概念上類似於拆解賦值 ``(x, y) = point``。" -#: ../../tutorial/controlflow.rst:305 +#: ../../tutorial/controlflow.rst:312 msgid "" "If you are using classes to structure your data you can use the class name " "followed by an argument list resembling a constructor, but with the ability " @@ -362,7 +382,7 @@ msgstr "" "\n" "::" -#: ../../tutorial/controlflow.rst:327 +#: ../../tutorial/controlflow.rst:334 msgid "" "You can use positional parameters with some builtin classes that provide an " "ordering for their attributes (e.g. dataclasses). You can also define a " @@ -378,7 +398,7 @@ msgstr "" "\n" "::" -#: ../../tutorial/controlflow.rst:338 +#: ../../tutorial/controlflow.rst:345 msgid "" "A recommended way to read patterns is to look at them as an extended form of " "what you would put on the left of an assignment, to understand which " @@ -394,7 +414,7 @@ msgstr "" "的 ``x=`` 及 ``y=``)或 class 名稱(由它們後面的 \"(...)\" 被辨識,如上面的 " "``Point``)則永遠無法被賦值。" -#: ../../tutorial/controlflow.rst:345 +#: ../../tutorial/controlflow.rst:352 msgid "" "Patterns can be arbitrarily nested. For example, if we have a short list of " "Points, with ``__match_args__`` added, we could match it like this::" @@ -404,7 +424,7 @@ msgstr "" "\n" "::" -#: ../../tutorial/controlflow.rst:366 +#: ../../tutorial/controlflow.rst:373 msgid "" "We can add an ``if`` clause to a pattern, known as a \"guard\". If the " "guard is false, ``match`` goes on to try the next case block. Note that " @@ -416,11 +436,11 @@ msgstr "" "\n" "::" -#: ../../tutorial/controlflow.rst:376 +#: ../../tutorial/controlflow.rst:383 msgid "Several other key features of this statement:" msgstr "此種陳述式的其他幾個重要特色:" -#: ../../tutorial/controlflow.rst:378 +#: ../../tutorial/controlflow.rst:385 msgid "" "Like unpacking assignments, tuple and list patterns have exactly the same " "meaning and actually match arbitrary sequences. An important exception is " @@ -429,7 +449,7 @@ msgstr "" "與拆解賦值的情況類似,tuple(元組)和 list 模式具有完全相同的意義,而且實際上" "可以匹配任意的序列。一個重要的例外,是它們不能匹配疊代器 (iterator) 或字串。" -#: ../../tutorial/controlflow.rst:382 +#: ../../tutorial/controlflow.rst:389 msgid "" "Sequence patterns support extended unpacking: ``[x, y, *rest]`` and ``(x, y, " "*rest)`` work similar to unpacking assignments. The name after ``*`` may " @@ -441,7 +461,7 @@ msgstr "" "是 ``_``,所以 ``(x, y, *_)`` 會匹配一個至少兩項的序列,且不會連結那兩項以外" "的其餘項。" -#: ../../tutorial/controlflow.rst:387 +#: ../../tutorial/controlflow.rst:394 msgid "" "Mapping patterns: ``{\"bandwidth\": b, \"latency\": l}`` captures the " "``\"bandwidth\"`` and ``\"latency\"`` values from a dictionary. Unlike " @@ -453,14 +473,14 @@ msgstr "" "模式不同,額外的鍵 (key) 會被忽略。一種像是 ``**rest`` 的拆解方式,也是可被支" "援的。(但 ``**_`` 則是多餘的做法,所以它並不被允許。)" -#: ../../tutorial/controlflow.rst:392 +#: ../../tutorial/controlflow.rst:399 msgid "Subpatterns may be captured using the ``as`` keyword::" msgstr "" "使用關鍵字 ``as`` 可以擷取子模式 (subpattern):\n" "\n" "::" -#: ../../tutorial/controlflow.rst:396 +#: ../../tutorial/controlflow.rst:403 msgid "" "will capture the second element of the input as ``p2`` (as long as the input " "is a sequence of two points)" @@ -468,7 +488,7 @@ msgstr "" "將會擷取輸入的第二個元素作為 ``p2``\\ (只要該輸入是一個由兩個點所組成的序" "列)。" -#: ../../tutorial/controlflow.rst:399 +#: ../../tutorial/controlflow.rst:406 msgid "" "Most literals are compared by equality, however the singletons ``True``, " "``False`` and ``None`` are compared by identity." @@ -476,7 +496,7 @@ msgstr "" "大部分的字面值是藉由相等性 (equality) 來比較,但是單例物件 (singleton) " "``True``\\ 、\\ ``False`` 和 ``None`` 是藉由標識值 (identity) 來比較。" -#: ../../tutorial/controlflow.rst:402 +#: ../../tutorial/controlflow.rst:409 msgid "" "Patterns may use named constants. These must be dotted names to prevent " "them from being interpreted as capture variable::" @@ -486,18 +506,18 @@ msgstr "" "\n" "::" -#: ../../tutorial/controlflow.rst:421 +#: ../../tutorial/controlflow.rst:428 msgid "" "For a more detailed explanation and additional examples, you can look into :" "pep:`636` which is written in a tutorial format." msgstr "" "關於更詳細的解釋和其他範例,你可以閱讀 :pep:`636`,它是以教學的格式編寫而成。" -#: ../../tutorial/controlflow.rst:427 +#: ../../tutorial/controlflow.rst:434 msgid "Defining Functions" msgstr "定義函式 (function)" -#: ../../tutorial/controlflow.rst:429 +#: ../../tutorial/controlflow.rst:436 msgid "" "We can create a function that writes the Fibonacci series to an arbitrary " "boundary::" @@ -506,7 +526,7 @@ msgstr "" "\n" "::" -#: ../../tutorial/controlflow.rst:449 +#: ../../tutorial/controlflow.rst:456 msgid "" "The keyword :keyword:`def` introduces a function *definition*. It must be " "followed by the function name and the parenthesized list of formal " @@ -516,7 +536,7 @@ msgstr "" "關鍵字 :keyword:`def` 介紹一個函式的\\ *定義*\\ 。它之後必須連著該函式的名稱" "和置於括號之中的一串參數。自下一行起,所有縮排的陳述式成為該函式的主體。" -#: ../../tutorial/controlflow.rst:454 +#: ../../tutorial/controlflow.rst:461 msgid "" "The first statement of the function body can optionally be a string literal; " "this string literal is the function's documentation string, or :dfn:" @@ -532,7 +552,7 @@ msgstr "" "件,或讓使用者能以互動的方式在原始碼中瀏覽文件。在原始碼中加入 docstring 是個" "好慣例,應該養成這樣的習慣。" -#: ../../tutorial/controlflow.rst:461 +#: ../../tutorial/controlflow.rst:468 msgid "" "The *execution* of a function introduces a new symbol table used for the " "local variables of the function. More precisely, all variable assignments " @@ -553,7 +573,7 @@ msgstr "" "域變數是在 :keyword:`global` 陳述式中被定義,或外層函式變數在 :keyword:" "`nonlocal` 陳述式中被定義)。" -#: ../../tutorial/controlflow.rst:472 +#: ../../tutorial/controlflow.rst:479 msgid "" "The actual parameters (arguments) to a function call are introduced in the " "local symbol table of the called function when it is called; thus, arguments " @@ -568,7 +588,7 @@ msgstr "" "函式呼叫別的函式或遞迴呼叫它自己時,在被呼叫的函式中會建立一個新的區域符號" "表。" -#: ../../tutorial/controlflow.rst:479 +#: ../../tutorial/controlflow.rst:486 msgid "" "A function definition associates the function name with the function object " "in the current symbol table. The interpreter recognizes the object pointed " @@ -581,7 +601,7 @@ msgstr "" "\n" "::" -#: ../../tutorial/controlflow.rst:490 +#: ../../tutorial/controlflow.rst:497 msgid "" "Coming from other languages, you might object that ``fib`` is not a function " "but a procedure since it doesn't return a value. In fact, even functions " @@ -598,7 +618,7 @@ msgstr "" "\n" "::" -#: ../../tutorial/controlflow.rst:501 +#: ../../tutorial/controlflow.rst:508 msgid "" "It is simple to write a function that returns a list of the numbers of the " "Fibonacci series, instead of printing it::" @@ -607,11 +627,11 @@ msgstr "" "\n" "::" -#: ../../tutorial/controlflow.rst:517 +#: ../../tutorial/controlflow.rst:524 msgid "This example, as usual, demonstrates some new Python features:" msgstr "這個例子一樣示範了一些新的 Python 特性:" -#: ../../tutorial/controlflow.rst:519 +#: ../../tutorial/controlflow.rst:526 msgid "" "The :keyword:`return` statement returns with a value from a function. :" "keyword:`!return` without an expression argument returns ``None``. Falling " @@ -621,7 +641,7 @@ msgstr "" "不外加一個運算式作為引數時會回傳 ``None``\\ 。一個函式執行到結束也會回傳 " "``None``\\ 。" -#: ../../tutorial/controlflow.rst:523 +#: ../../tutorial/controlflow.rst:530 msgid "" "The statement ``result.append(a)`` calls a *method* of the list object " "``result``. A method is a function that 'belongs' to an object and is named " @@ -643,22 +663,22 @@ msgstr "" "method 定義在 list 物件中;它會在該 list 的末端加入一個新的元素。這個例子等同" "於 ``result = result + [a]``\\ ,但更有效率。" -#: ../../tutorial/controlflow.rst:538 +#: ../../tutorial/controlflow.rst:545 msgid "More on Defining Functions" msgstr "深入了解函式定義" -#: ../../tutorial/controlflow.rst:540 +#: ../../tutorial/controlflow.rst:547 msgid "" "It is also possible to define functions with a variable number of arguments. " "There are three forms, which can be combined." msgstr "" "定義函式時使用的引數 (argument) 數量是可變的。總共有三種可以組合使用的形式。" -#: ../../tutorial/controlflow.rst:547 +#: ../../tutorial/controlflow.rst:554 msgid "Default Argument Values" msgstr "預設引數值" -#: ../../tutorial/controlflow.rst:549 +#: ../../tutorial/controlflow.rst:556 msgid "" "The most useful form is to specify a default value for one or more " "arguments. This creates a function that can be called with fewer arguments " @@ -669,22 +689,22 @@ msgstr "" "\n" "::" -#: ../../tutorial/controlflow.rst:565 +#: ../../tutorial/controlflow.rst:572 msgid "This function can be called in several ways:" msgstr "該函式可以用以下幾種方式被呼叫:" -#: ../../tutorial/controlflow.rst:567 +#: ../../tutorial/controlflow.rst:574 msgid "" "giving only the mandatory argument: ``ask_ok('Do you really want to quit?')``" msgstr "只給必要引數:\\ ``ask_ok('Do you really want to quit?')``" -#: ../../tutorial/controlflow.rst:569 +#: ../../tutorial/controlflow.rst:576 msgid "" "giving one of the optional arguments: ``ask_ok('OK to overwrite the file?', " "2)``" msgstr "給予一個選擇性引數:\\ ``ask_ok('OK to overwrite the file?', 2)``" -#: ../../tutorial/controlflow.rst:571 +#: ../../tutorial/controlflow.rst:578 msgid "" "or even giving all arguments: ``ask_ok('OK to overwrite the file?', 2, 'Come " "on, only yes or no!')``" @@ -692,14 +712,14 @@ msgstr "" "給予所有引數:\\ ``ask_ok('OK to overwrite the file?', 2, 'Come on, only yes " "or no!')``" -#: ../../tutorial/controlflow.rst:574 +#: ../../tutorial/controlflow.rst:581 msgid "" "This example also introduces the :keyword:`in` keyword. This tests whether " "or not a sequence contains a certain value." msgstr "" "此例也使用了關鍵字 :keyword:`in`\\ ,用於測試序列中是否包含某個特定值。" -#: ../../tutorial/controlflow.rst:577 +#: ../../tutorial/controlflow.rst:584 msgid "" "The default values are evaluated at the point of function definition in the " "*defining* scope, so that ::" @@ -708,11 +728,11 @@ msgstr "" "\n" "::" -#: ../../tutorial/controlflow.rst:588 +#: ../../tutorial/controlflow.rst:595 msgid "will print ``5``." msgstr "將會輸出 ``5``\\ 。" -#: ../../tutorial/controlflow.rst:590 +#: ../../tutorial/controlflow.rst:597 msgid "" "**Important warning:** The default value is evaluated only once. This makes " "a difference when the default is a mutable object such as a list, " @@ -725,24 +745,24 @@ msgstr "" "\n" "::" -#: ../../tutorial/controlflow.rst:603 +#: ../../tutorial/controlflow.rst:610 msgid "This will print ::" msgstr "" "將會輸出:\n" "\n" "::" -#: ../../tutorial/controlflow.rst:609 +#: ../../tutorial/controlflow.rst:616 msgid "" "If you don't want the default to be shared between subsequent calls, you can " "write the function like this instead::" msgstr "如果不想在後續呼叫之間共用預設值,應以如下方式編寫函式:" -#: ../../tutorial/controlflow.rst:622 +#: ../../tutorial/controlflow.rst:629 msgid "Keyword Arguments" msgstr "關鍵字引數" -#: ../../tutorial/controlflow.rst:624 +#: ../../tutorial/controlflow.rst:631 msgid "" "Functions can also be called using :term:`keyword arguments ` of the form ``kwarg=value``. For instance, the following " @@ -753,7 +773,7 @@ msgstr "" "\n" "::" -#: ../../tutorial/controlflow.rst:633 +#: ../../tutorial/controlflow.rst:640 msgid "" "accepts one required argument (``voltage``) and three optional arguments " "(``state``, ``action``, and ``type``). This function can be called in any " @@ -764,14 +784,14 @@ msgstr "" "\n" "::" -#: ../../tutorial/controlflow.rst:644 +#: ../../tutorial/controlflow.rst:651 msgid "but all the following calls would be invalid::" msgstr "" "但以下呼叫方式都無效:\n" "\n" "::" -#: ../../tutorial/controlflow.rst:651 +#: ../../tutorial/controlflow.rst:658 msgid "" "In a function call, keyword arguments must follow positional arguments. All " "the keyword arguments passed must match one of the arguments accepted by the " @@ -789,7 +809,7 @@ msgstr "" "\n" "::" -#: ../../tutorial/controlflow.rst:667 +#: ../../tutorial/controlflow.rst:674 msgid "" "When a final formal parameter of the form ``**name`` is present, it receives " "a dictionary (see :ref:`typesmapping`) containing all keyword arguments " @@ -807,31 +827,31 @@ msgstr "" "\n" "::" -#: ../../tutorial/controlflow.rst:684 +#: ../../tutorial/controlflow.rst:691 msgid "It could be called like this::" msgstr "" "它可以被如此呼叫:\n" "\n" "::" -#: ../../tutorial/controlflow.rst:692 +#: ../../tutorial/controlflow.rst:699 msgid "and of course it would print:" msgstr "" "輸出結果如下:\n" "\n" "::" -#: ../../tutorial/controlflow.rst:705 +#: ../../tutorial/controlflow.rst:712 msgid "" "Note that the order in which the keyword arguments are printed is guaranteed " "to match the order in which they were provided in the function call." msgstr "注意,關鍵字引數的輸出順序與呼叫函式時被提供的順序必定一致。" -#: ../../tutorial/controlflow.rst:709 +#: ../../tutorial/controlflow.rst:716 msgid "Special parameters" msgstr "特殊參數" -#: ../../tutorial/controlflow.rst:711 +#: ../../tutorial/controlflow.rst:718 msgid "" "By default, arguments may be passed to a Python function either by position " "or explicitly by keyword. For readability and performance, it makes sense to " @@ -843,11 +863,11 @@ msgstr "" "及效能,限制引數的傳遞方式是合理的,如此,開發者只需查看函式定義,即可確定各" "項目是按位置,按位置或關鍵字,還是按關鍵字傳遞。" -#: ../../tutorial/controlflow.rst:717 +#: ../../tutorial/controlflow.rst:724 msgid "A function definition may look like:" msgstr "函式定義可能如以下樣式:" -#: ../../tutorial/controlflow.rst:728 +#: ../../tutorial/controlflow.rst:735 msgid "" "where ``/`` and ``*`` are optional. If used, these symbols indicate the kind " "of parameter by how the arguments may be passed to the function: positional-" @@ -858,22 +878,22 @@ msgstr "" "類:僅限位置、位置或關鍵字、僅限關鍵字。關鍵字參數也稱為附名參數 (named " "parameters)。" -#: ../../tutorial/controlflow.rst:735 +#: ../../tutorial/controlflow.rst:742 msgid "Positional-or-Keyword Arguments" msgstr "位置或關鍵字引數 (Positional-or-Keyword Arguments)" -#: ../../tutorial/controlflow.rst:737 +#: ../../tutorial/controlflow.rst:744 msgid "" "If ``/`` and ``*`` are not present in the function definition, arguments may " "be passed to a function by position or by keyword." msgstr "" "若函式定義中未使用 ``/`` 和 ``*`` 時,引數可以按位置或關鍵字傳遞給函式。" -#: ../../tutorial/controlflow.rst:742 +#: ../../tutorial/controlflow.rst:749 msgid "Positional-Only Parameters" msgstr "僅限位置參數 (Positional-Only Parameters)" -#: ../../tutorial/controlflow.rst:744 +#: ../../tutorial/controlflow.rst:751 msgid "" "Looking at this in a bit more detail, it is possible to mark certain " "parameters as *positional-only*. If *positional-only*, the parameters' order " @@ -888,17 +908,17 @@ msgstr "" "``/``\\ (斜線)之前。\\ ``/`` 用於在邏輯上分開僅限位置參數與其餘參數。如果函" "式定義中沒有 ``/``\\ ,則表示沒有任何僅限位置參數。" -#: ../../tutorial/controlflow.rst:752 +#: ../../tutorial/controlflow.rst:759 msgid "" "Parameters following the ``/`` may be *positional-or-keyword* or *keyword-" "only*." msgstr "``/`` 後面的參數可以是\\ *位置或關鍵字*\\ 或\\ *僅限關鍵字*\\ 參數。" -#: ../../tutorial/controlflow.rst:756 +#: ../../tutorial/controlflow.rst:763 msgid "Keyword-Only Arguments" msgstr "僅限關鍵字引數 (Keyword-Only Arguments)" -#: ../../tutorial/controlflow.rst:758 +#: ../../tutorial/controlflow.rst:765 msgid "" "To mark parameters as *keyword-only*, indicating the parameters must be " "passed by keyword argument, place an ``*`` in the arguments list just before " @@ -907,11 +927,11 @@ msgstr "" "要把參數標記為\\ *僅限關鍵字*\\ ,表明參數必須以關鍵字引數傳遞,必須在引數列" "表中第一個\\ *僅限關鍵字*\\ 參數前放上 ``*``\\ 。" -#: ../../tutorial/controlflow.rst:764 +#: ../../tutorial/controlflow.rst:771 msgid "Function Examples" msgstr "函式範例" -#: ../../tutorial/controlflow.rst:766 +#: ../../tutorial/controlflow.rst:773 msgid "" "Consider the following example function definitions paying close attention " "to the markers ``/`` and ``*``::" @@ -920,7 +940,7 @@ msgstr "" "\n" "::" -#: ../../tutorial/controlflow.rst:782 +#: ../../tutorial/controlflow.rst:789 msgid "" "The first function definition, ``standard_arg``, the most familiar form, " "places no restrictions on the calling convention and arguments may be passed " @@ -931,7 +951,7 @@ msgstr "" "\n" "::" -#: ../../tutorial/controlflow.rst:792 +#: ../../tutorial/controlflow.rst:799 msgid "" "The second function ``pos_only_arg`` is restricted to only use positional " "parameters as there is a ``/`` in the function definition::" @@ -940,7 +960,7 @@ msgstr "" "\n" "::" -#: ../../tutorial/controlflow.rst:803 +#: ../../tutorial/controlflow.rst:810 msgid "" "The third function ``kwd_only_args`` only allows keyword arguments as " "indicated by a ``*`` in the function definition::" @@ -949,7 +969,7 @@ msgstr "" "\n" "::" -#: ../../tutorial/controlflow.rst:814 +#: ../../tutorial/controlflow.rst:821 msgid "" "And the last uses all three calling conventions in the same function " "definition::" @@ -958,7 +978,7 @@ msgstr "" "\n" "::" -#: ../../tutorial/controlflow.rst:834 +#: ../../tutorial/controlflow.rst:841 msgid "" "Finally, consider this function definition which has a potential collision " "between the positional argument ``name`` and ``**kwds`` which has ``name`` " @@ -969,7 +989,7 @@ msgstr "" "\n" "::" -#: ../../tutorial/controlflow.rst:839 +#: ../../tutorial/controlflow.rst:846 msgid "" "There is no possible call that will make it return ``True`` as the keyword " "``'name'`` will always bind to the first parameter. For example::" @@ -979,7 +999,7 @@ msgstr "" "\n" "::" -#: ../../tutorial/controlflow.rst:848 +#: ../../tutorial/controlflow.rst:855 msgid "" "But using ``/`` (positional only arguments), it is possible since it allows " "``name`` as a positional argument and ``'name'`` as a key in the keyword " @@ -990,17 +1010,17 @@ msgstr "" "\n" "::" -#: ../../tutorial/controlflow.rst:856 +#: ../../tutorial/controlflow.rst:863 msgid "" "In other words, the names of positional-only parameters can be used in " "``**kwds`` without ambiguity." msgstr "換句話說,僅限位置參數的名稱可以在 ``**kwds`` 中使用,而不產生歧義。" -#: ../../tutorial/controlflow.rst:861 +#: ../../tutorial/controlflow.rst:868 msgid "Recap" msgstr "回顧" -#: ../../tutorial/controlflow.rst:863 +#: ../../tutorial/controlflow.rst:870 msgid "" "The use case will determine which parameters to use in the function " "definition::" @@ -1009,11 +1029,11 @@ msgstr "" "\n" "::" -#: ../../tutorial/controlflow.rst:867 +#: ../../tutorial/controlflow.rst:874 msgid "As guidance:" msgstr "說明:" -#: ../../tutorial/controlflow.rst:869 +#: ../../tutorial/controlflow.rst:876 msgid "" "Use positional-only if you want the name of the parameters to not be " "available to the user. This is useful when parameter names have no real " @@ -1025,7 +1045,7 @@ msgstr "" "想控制引數在函式呼叫的排列順序,或同時使用位置參數和任意關鍵字時,這種方式很" "有用。" -#: ../../tutorial/controlflow.rst:874 +#: ../../tutorial/controlflow.rst:881 msgid "" "Use keyword-only when names have meaning and the function definition is more " "understandable by being explicit with names or you want to prevent users " @@ -1034,7 +1054,7 @@ msgstr "" "當參數名稱有意義,且明確的名稱可讓函式定義更易理解,或是你不希望使用者依賴引" "數被傳遞時的位置時,請使用僅限關鍵字。" -#: ../../tutorial/controlflow.rst:877 +#: ../../tutorial/controlflow.rst:884 msgid "" "For an API, use positional-only to prevent breaking API changes if the " "parameter's name is modified in the future." @@ -1042,11 +1062,11 @@ msgstr "" "對於應用程式介面 (API),使用僅限位置,以防止未來參數名稱被修改時造成 API 的中" "斷性變更。" -#: ../../tutorial/controlflow.rst:883 +#: ../../tutorial/controlflow.rst:890 msgid "Arbitrary Argument Lists" msgstr "任意引數列表 (Arbitrary Argument Lists)" -#: ../../tutorial/controlflow.rst:888 +#: ../../tutorial/controlflow.rst:895 msgid "" "Finally, the least frequently used option is to specify that a function can " "be called with an arbitrary number of arguments. These arguments will be " @@ -1059,7 +1079,7 @@ msgstr "" "\n" "::" -#: ../../tutorial/controlflow.rst:897 +#: ../../tutorial/controlflow.rst:904 msgid "" "Normally, these *variadic* arguments will be last in the list of formal " "parameters, because they scoop up all remaining input arguments that are " @@ -1073,11 +1093,11 @@ msgstr "" "\n" "::" -#: ../../tutorial/controlflow.rst:914 +#: ../../tutorial/controlflow.rst:921 msgid "Unpacking Argument Lists" msgstr "拆解引數列表(Unpacking Argument Lists)" -#: ../../tutorial/controlflow.rst:916 +#: ../../tutorial/controlflow.rst:923 msgid "" "The reverse situation occurs when the arguments are already in a list or " "tuple but need to be unpacked for a function call requiring separate " @@ -1093,7 +1113,7 @@ msgstr "" "\n" "::" -#: ../../tutorial/controlflow.rst:932 +#: ../../tutorial/controlflow.rst:939 msgid "" "In the same fashion, dictionaries can deliver keyword arguments with the " "``**``\\ -operator::" @@ -1102,11 +1122,11 @@ msgstr "" "\n" "::" -#: ../../tutorial/controlflow.rst:948 +#: ../../tutorial/controlflow.rst:955 msgid "Lambda Expressions" msgstr "Lambda 運算式" -#: ../../tutorial/controlflow.rst:950 +#: ../../tutorial/controlflow.rst:957 msgid "" "Small anonymous functions can be created with the :keyword:`lambda` keyword. " "This function returns the sum of its two arguments: ``lambda a, b: a+b``. " @@ -1123,7 +1143,7 @@ msgstr "" "\n" "::" -#: ../../tutorial/controlflow.rst:967 +#: ../../tutorial/controlflow.rst:974 msgid "" "The above example uses a lambda expression to return a function. Another " "use is to pass a small function as an argument::" @@ -1133,17 +1153,17 @@ msgstr "" "\n" "::" -#: ../../tutorial/controlflow.rst:979 +#: ../../tutorial/controlflow.rst:986 msgid "Documentation Strings" msgstr "說明文件字串 (Documentation Strings)" -#: ../../tutorial/controlflow.rst:986 +#: ../../tutorial/controlflow.rst:993 msgid "" "Here are some conventions about the content and formatting of documentation " "strings." msgstr "以下是關於說明文件字串內容和格式的慣例。" -#: ../../tutorial/controlflow.rst:989 +#: ../../tutorial/controlflow.rst:996 msgid "" "The first line should always be a short, concise summary of the object's " "purpose. For brevity, it should not explicitly state the object's name or " @@ -1155,7 +1175,7 @@ msgstr "" "的名稱或型別,因為有其他方法可以達到相同目的(除非該名稱剛好是一個描述函式運" "算的動詞)。這一行應以大寫字母開頭,以句號結尾。" -#: ../../tutorial/controlflow.rst:995 +#: ../../tutorial/controlflow.rst:1002 msgid "" "If there are more lines in the documentation string, the second line should " "be blank, visually separating the summary from the rest of the description. " @@ -1165,7 +1185,7 @@ msgstr "" "文件字串為多行時,第二行應為空白行,在視覺上將摘要與其餘描述分開。後面幾行可" "包含一或多個段落,描述此物件的呼叫慣例、副作用等。" -#: ../../tutorial/controlflow.rst:1000 +#: ../../tutorial/controlflow.rst:1007 msgid "" "The Python parser does not strip indentation from multi-line string literals " "in Python, so tools that process documentation have to strip indentation if " @@ -1187,18 +1207,18 @@ msgstr "" "出現了,這些行的全部前導空白字元都應被去除。展開 tab 鍵後(通常為八個空格)," "應測試空白字元量是否等價。" -#: ../../tutorial/controlflow.rst:1012 +#: ../../tutorial/controlflow.rst:1019 msgid "Here is an example of a multi-line docstring::" msgstr "" "下面是多行說明字串的一個範例:\n" "\n" "::" -#: ../../tutorial/controlflow.rst:1030 +#: ../../tutorial/controlflow.rst:1037 msgid "Function Annotations" msgstr "函式註釋 (Function Annotations)" -#: ../../tutorial/controlflow.rst:1038 +#: ../../tutorial/controlflow.rst:1045 msgid "" ":ref:`Function annotations ` are completely optional metadata " "information about the types used by user-defined functions (see :pep:`3107` " @@ -1207,7 +1227,7 @@ msgstr "" ":ref:`函式註釋 `\\ 是選擇性的元資料(metadata)資訊,描述使用者定義" "函式所使用的型別(更多資訊詳見 :pep:`3107` 和 :pep:`484`\\ )。" -#: ../../tutorial/controlflow.rst:1042 +#: ../../tutorial/controlflow.rst:1049 msgid "" ":term:`Annotations ` are stored in the :attr:" "`__annotations__` attribute of the function as a dictionary and have no " @@ -1227,11 +1247,11 @@ msgstr "" "\n" "::" -#: ../../tutorial/controlflow.rst:1064 +#: ../../tutorial/controlflow.rst:1071 msgid "Intermezzo: Coding Style" msgstr "間奏曲:程式碼風格 (Coding Style)" -#: ../../tutorial/controlflow.rst:1069 +#: ../../tutorial/controlflow.rst:1076 msgid "" "Now that you are about to write longer, more complex pieces of Python, it is " "a good time to talk about *coding style*. Most languages can be written (or " @@ -1244,7 +1264,7 @@ msgstr "" "式比其他的更具可讀性。能讓其他人輕鬆閱讀你的程式碼永遠是一個好主意,而使用優" "良的編碼樣式對此有極大的幫助。" -#: ../../tutorial/controlflow.rst:1075 +#: ../../tutorial/controlflow.rst:1082 msgid "" "For Python, :pep:`8` has emerged as the style guide that most projects " "adhere to; it promotes a very readable and eye-pleasing coding style. Every " @@ -1254,11 +1274,11 @@ msgstr "" "對於 Python,大多數的專案都遵循 :pep:`8` 的樣式指南;它推行的編碼樣式相當可讀" "且賞心悅目。每個 Python 開發者都應該花點時間研讀;這裡是該指南的核心重點:" -#: ../../tutorial/controlflow.rst:1080 +#: ../../tutorial/controlflow.rst:1087 msgid "Use 4-space indentation, and no tabs." msgstr "用 4 個空格縮排,不要用 tab 鍵。" -#: ../../tutorial/controlflow.rst:1082 +#: ../../tutorial/controlflow.rst:1089 msgid "" "4 spaces are a good compromise between small indentation (allows greater " "nesting depth) and large indentation (easier to read). Tabs introduce " @@ -1267,11 +1287,11 @@ msgstr "" "4 個空格是小縮排(容許更大的巢套深度)和大縮排(較易閱讀)之間的折衷方案。" "Tab 鍵會造成混亂,最好別用。" -#: ../../tutorial/controlflow.rst:1086 +#: ../../tutorial/controlflow.rst:1093 msgid "Wrap lines so that they don't exceed 79 characters." msgstr "換行,使一行不超過 79 個字元。" -#: ../../tutorial/controlflow.rst:1088 +#: ../../tutorial/controlflow.rst:1095 msgid "" "This helps users with small displays and makes it possible to have several " "code files side-by-side on larger displays." @@ -1279,21 +1299,21 @@ msgstr "" "換行能讓使用小顯示器的使用者方便閱讀,也可以在較大顯示器上並排陳列多個程式碼" "檔案。" -#: ../../tutorial/controlflow.rst:1091 +#: ../../tutorial/controlflow.rst:1098 msgid "" "Use blank lines to separate functions and classes, and larger blocks of code " "inside functions." msgstr "用空行分隔函式和 class(類別),及函式內較大塊的程式碼。" -#: ../../tutorial/controlflow.rst:1094 +#: ../../tutorial/controlflow.rst:1101 msgid "When possible, put comments on a line of their own." msgstr "如果可以,把註解放在單獨一行。" -#: ../../tutorial/controlflow.rst:1096 +#: ../../tutorial/controlflow.rst:1103 msgid "Use docstrings." msgstr "使用說明字串。" -#: ../../tutorial/controlflow.rst:1098 +#: ../../tutorial/controlflow.rst:1105 msgid "" "Use spaces around operators and after commas, but not directly inside " "bracketing constructs: ``a = f(1, 2) + g(3, 4)``." @@ -1301,7 +1321,7 @@ msgstr "" "運算子前後、逗號後要加空格,但不要直接放在括號內側:\\ ``a = f(1, 2) + g(3, " "4)``\\ 。" -#: ../../tutorial/controlflow.rst:1101 +#: ../../tutorial/controlflow.rst:1108 msgid "" "Name your classes and functions consistently; the convention is to use " "``UpperCamelCase`` for classes and ``lowercase_with_underscores`` for " @@ -1313,7 +1333,7 @@ msgstr "" "底線)。永遠用 ``self`` 作為 method 第一個引數的名稱(關於 class 和 method," "詳見 :ref:`tut-firstclasses`\\ )。" -#: ../../tutorial/controlflow.rst:1106 +#: ../../tutorial/controlflow.rst:1113 msgid "" "Don't use fancy encodings if your code is meant to be used in international " "environments. Python's default, UTF-8, or even plain ASCII work best in any " @@ -1322,7 +1342,7 @@ msgstr "" "若程式碼是為了用於國際環境時,不要用花俏的編碼。Python 預設的 UTF-8 或甚至普" "通的 ASCII,就可以勝任各種情況。" -#: ../../tutorial/controlflow.rst:1110 +#: ../../tutorial/controlflow.rst:1117 msgid "" "Likewise, don't use non-ASCII characters in identifiers if there is only the " "slightest chance people speaking a different language will read or maintain " @@ -1331,11 +1351,11 @@ msgstr "" "同樣地,若不同語言使用者閱讀或維護程式碼的可能性微乎其微,就不要在命名時使用" "非 ASCII 字元。" -#: ../../tutorial/controlflow.rst:1116 +#: ../../tutorial/controlflow.rst:1123 msgid "Footnotes" msgstr "註解" -#: ../../tutorial/controlflow.rst:1117 +#: ../../tutorial/controlflow.rst:1124 msgid "" "Actually, *call by object reference* would be a better description, since if " "a mutable object is passed, the caller will see any changes the callee makes " @@ -1353,54 +1373,68 @@ msgstr "statement(陳述式)" msgid "for" msgstr "for" -#: ../../tutorial/controlflow.rst:444 ../../tutorial/controlflow.rst:981 +#: ../../tutorial/controlflow.rst:451 ../../tutorial/controlflow.rst:988 msgid "documentation strings" msgstr "ddocumentation strings(說明字串)" -#: ../../tutorial/controlflow.rst:444 ../../tutorial/controlflow.rst:981 +#: ../../tutorial/controlflow.rst:451 ../../tutorial/controlflow.rst:988 msgid "docstrings" msgstr "docstrings(說明字串)" -#: ../../tutorial/controlflow.rst:444 ../../tutorial/controlflow.rst:981 +#: ../../tutorial/controlflow.rst:451 ../../tutorial/controlflow.rst:988 msgid "strings, documentation" msgstr "strings(字串), documentation(說明文件)" -#: ../../tutorial/controlflow.rst:885 +#: ../../tutorial/controlflow.rst:892 msgid "* (asterisk)" msgstr "* (星號)" -#: ../../tutorial/controlflow.rst:885 ../../tutorial/controlflow.rst:929 +#: ../../tutorial/controlflow.rst:892 ../../tutorial/controlflow.rst:936 msgid "in function calls" msgstr "於函式呼叫中" -#: ../../tutorial/controlflow.rst:929 +#: ../../tutorial/controlflow.rst:936 msgid "**" msgstr "**" -#: ../../tutorial/controlflow.rst:1033 +#: ../../tutorial/controlflow.rst:1040 msgid "function" msgstr "function(函式)" -#: ../../tutorial/controlflow.rst:1033 +#: ../../tutorial/controlflow.rst:1040 msgid "annotations" msgstr "annotations(註釋)" -#: ../../tutorial/controlflow.rst:1033 +#: ../../tutorial/controlflow.rst:1040 msgid "->" msgstr "->" -#: ../../tutorial/controlflow.rst:1033 +#: ../../tutorial/controlflow.rst:1040 msgid "function annotations" msgstr "function annotations(函式註釋)" -#: ../../tutorial/controlflow.rst:1033 +#: ../../tutorial/controlflow.rst:1040 msgid ": (colon)" msgstr ": (冒號)" -#: ../../tutorial/controlflow.rst:1067 +#: ../../tutorial/controlflow.rst:1074 msgid "coding" msgstr "coding(程式編寫)" -#: ../../tutorial/controlflow.rst:1067 +#: ../../tutorial/controlflow.rst:1074 msgid "style" msgstr "style(風格)" + +#~ msgid "" +#~ "Loop statements may have an :keyword:`!else` clause; it is executed when " +#~ "the loop terminates through exhaustion of the iterable (with :keyword:" +#~ "`for`) or when the condition becomes false (with :keyword:`while`), but " +#~ "not when the loop is terminated by a :keyword:`break` statement. This is " +#~ "exemplified by the following loop, which searches for prime numbers::" +#~ msgstr "" +#~ "迴圈陳述式可以帶有一個 :keyword:`!else` 子句。當迴圈用盡所有的 iterable " +#~ "(在 :keyword:`for` 中)或條件為假(在 :keyword:`while` 中)時,這個子句會" +#~ "被執行;但迴圈被 :keyword:`break` 陳述式終止時則不會執行。底下尋找質數的迴" +#~ "圈即示範了這個行為:\n" +#~ "\n" +#~ "::" diff --git a/tutorial/introduction.po b/tutorial/introduction.po index 8edf83b47d..d96b75e3c6 100644 --- a/tutorial/introduction.po +++ b/tutorial/introduction.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-17 17:39+0800\n" +"POT-Creation-Date: 2023-07-24 00:03+0000\n" "PO-Revision-Date: 2022-10-16 03:20+0800\n" "Last-Translator: Steven Hsu \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -91,12 +91,12 @@ msgid "Numbers" msgstr "數字 (Number)" #: ../../tutorial/introduction.rst:53 +#, fuzzy msgid "" "The interpreter acts as a simple calculator: you can type an expression at " "it and it will write the value. Expression syntax is straightforward: the " -"operators ``+``, ``-``, ``*`` and ``/`` work just like in most other " -"languages (for example, Pascal or C); parentheses (``()``) can be used for " -"grouping. For example::" +"operators ``+``, ``-``, ``*`` and ``/`` can be used to perform arithmetic; " +"parentheses (``()``) can be used for grouping. For example::" msgstr "" "直譯器如同一台簡單的計算機:你可以輸入一個 expression(運算式),它會寫出該式" "的值。Expression 的語法可以使用:運算子 ``+``、``-``、``*`` 和 ``/`` 的行為如" diff --git a/tutorial/modules.po b/tutorial/modules.po index 76876ade7d..14e3459cad 100644 --- a/tutorial/modules.po +++ b/tutorial/modules.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-05-09 00:15+0000\n" +"POT-Creation-Date: 2023-07-24 00:03+0000\n" "PO-Revision-Date: 2022-10-23 20:30+0800\n" "Last-Translator: Phil Lin \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -701,6 +701,16 @@ msgstr "" #: ../../tutorial/modules.rst:515 msgid "" +"Be aware that submodules might become shadowed by locally defined names. For " +"example, if you added a ``reverse`` function to the :file:`sound/effects/" +"__init__.py` file, the ``from sound.effects import *`` would only import the " +"two submodules ``echo`` and ``surround``, but *not* the ``reverse`` " +"submodule, because it is shadowed by the locally defined ``reverse`` " +"function::" +msgstr "" + +#: ../../tutorial/modules.rst:531 +msgid "" "If ``__all__`` is not defined, the statement ``from sound.effects import *`` " "does *not* import all submodules from the package :mod:`sound.effects` into " "the current namespace; it only ensures that the package :mod:`sound.effects` " @@ -720,7 +730,7 @@ msgstr "" "\n" "::" -#: ../../tutorial/modules.rst:528 +#: ../../tutorial/modules.rst:544 msgid "" "In this example, the :mod:`echo` and :mod:`surround` modules are imported in " "the current namespace because they are defined in the :mod:`sound.effects` " @@ -731,7 +741,7 @@ msgstr "" "`surround` 模組被 import 進當前的命名空間,因為它們是在 :mod:`sound.effects` " "套件裡定義的。(當 ``__all__`` 有被定義時,這規則也有效。)" -#: ../../tutorial/modules.rst:533 +#: ../../tutorial/modules.rst:549 msgid "" "Although certain modules are designed to export only names that follow " "certain patterns when you use ``import *``, it is still considered bad " @@ -740,7 +750,7 @@ msgstr "" "雖然,有些特定模組的設計,讓你使用 ``import *`` 時,該模組只會輸出遵循特定樣" "式的名稱,但在正式環境 (production) 的程式碼中這仍然被視為是不良習慣。" -#: ../../tutorial/modules.rst:537 +#: ../../tutorial/modules.rst:553 msgid "" "Remember, there is nothing wrong with using ``from package import " "specific_submodule``! In fact, this is the recommended notation unless the " @@ -750,11 +760,11 @@ msgstr "" "記住,使用 ``from package import specific_submodule`` 不會有任何問題!實際" "上,這是推薦用法,除非 import 的模組需要用到的子模組和其他套件的子模組同名。" -#: ../../tutorial/modules.rst:546 +#: ../../tutorial/modules.rst:562 msgid "Intra-package References" msgstr "套件內引用" -#: ../../tutorial/modules.rst:548 +#: ../../tutorial/modules.rst:564 msgid "" "When packages are structured into subpackages (as with the :mod:`sound` " "package in the example), you can use absolute imports to refer to submodules " @@ -767,7 +777,7 @@ msgstr "" "filters.vocoder` 模組中使用 :mod:`sound.effects` 中的 :mod:`echo` 模組時,可" "以用 ``from sound.effects import echo``\\ 。" -#: ../../tutorial/modules.rst:554 +#: ../../tutorial/modules.rst:570 msgid "" "You can also write relative imports, with the ``from module import name`` " "form of import statement. These imports use leading dots to indicate the " @@ -780,7 +790,7 @@ msgstr "" "\n" "::" -#: ../../tutorial/modules.rst:563 +#: ../../tutorial/modules.rst:579 msgid "" "Note that relative imports are based on the name of the current module. " "Since the name of the main module is always ``\"__main__\"``, modules " @@ -791,11 +801,11 @@ msgstr "" "``\"__main__\"``\\ ,所以如果一個模組預期被用作 Python 應用程式的主模組,那它" "必須永遠使用絕對 import。" -#: ../../tutorial/modules.rst:569 +#: ../../tutorial/modules.rst:585 msgid "Packages in Multiple Directories" msgstr "多目錄中的套件" -#: ../../tutorial/modules.rst:571 +#: ../../tutorial/modules.rst:587 msgid "" "Packages support one more special attribute, :attr:`__path__`. This is " "initialized to be a list containing the name of the directory holding the " @@ -808,17 +818,17 @@ msgstr "" "執行之前。這個變數可以被修改,但這樣做會影響將來對套件內的模組和子套件的搜" "尋。" -#: ../../tutorial/modules.rst:577 +#: ../../tutorial/modules.rst:593 msgid "" "While this feature is not often needed, it can be used to extend the set of " "modules found in a package." msgstr "雖然這個特色不太常被需要,但它可用於擴充套件中的模組集合。" -#: ../../tutorial/modules.rst:582 +#: ../../tutorial/modules.rst:598 msgid "Footnotes" msgstr "註解" -#: ../../tutorial/modules.rst:583 +#: ../../tutorial/modules.rst:599 msgid "" "In fact function definitions are also 'statements' that are 'executed'; the " "execution of a module-level function definition adds the function name to " diff --git a/whatsnew/2.6.po b/whatsnew/2.6.po index 4f2e1ecf15..a241c7b6a9 100644 --- a/whatsnew/2.6.po +++ b/whatsnew/2.6.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-22 00:04+0000\n" +"POT-Creation-Date: 2023-07-24 00:03+0000\n" "PO-Revision-Date: 2018-05-23 16:20+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -2550,8 +2550,8 @@ msgstr "" #: ../../whatsnew/2.6.rst:2291 msgid "" -"The :mod:`select` module now has wrapper functions for the Linux :c:func:" -"`epoll` and BSD :c:func:`kqueue` system calls. :meth:`modify` method was " +"The :mod:`select` module now has wrapper functions for the Linux :c:func:`!" +"epoll` and BSD :c:func:`!kqueue` system calls. :meth:`modify` method was " "added to the existing :class:`poll` objects; ``pollobj.modify(fd, " "eventmask)`` takes a file descriptor or file object and an event mask, " "modifying the recorded event mask for that file. (Contributed by Christian " @@ -2597,8 +2597,8 @@ msgid "" "Event loops will use this by opening a pipe to create two descriptors, one " "for reading and one for writing. The writable descriptor will be passed to :" "func:`set_wakeup_fd`, and the readable descriptor will be added to the list " -"of descriptors monitored by the event loop via :c:func:`select` or :c:func:" -"`poll`. On receiving a signal, a byte will be written and the main event " +"of descriptors monitored by the event loop via :c:func:`!select` or :c:func:" +"`!poll`. On receiving a signal, a byte will be written and the main event " "loop will be woken up, avoiding the need to poll." msgstr "" @@ -3328,7 +3328,8 @@ msgstr "" msgid "" "Python now must be compiled with C89 compilers (after 19 years!). This " "means that the Python source tree has dropped its own implementations of :c:" -"func:`memmove` and :c:func:`strerror`, which are in the C89 standard library." +"func:`!memmove` and :c:func:`!strerror`, which are in the C89 standard " +"library." msgstr "" #: ../../whatsnew/2.6.rst:2988 diff --git a/whatsnew/2.7.po b/whatsnew/2.7.po index 5acaae329c..6f410de620 100644 --- a/whatsnew/2.7.po +++ b/whatsnew/2.7.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-22 00:04+0000\n" +"POT-Creation-Date: 2023-07-24 00:03+0000\n" "PO-Revision-Date: 2018-05-23 16:20+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -436,7 +436,7 @@ msgstr "" msgid "" "This means Python now supports three different modules for parsing command-" "line arguments: :mod:`getopt`, :mod:`optparse`, and :mod:`argparse`. The :" -"mod:`getopt` module closely resembles the C library's :c:func:`getopt` " +"mod:`getopt` module closely resembles the C library's :c:func:`!getopt` " "function, so it remains useful if you're writing a Python prototype that " "will eventually be rewritten in C. :mod:`optparse` becomes redundant, but " "there are no plans to remove it because there are many scripts still using " diff --git a/whatsnew/3.10.po b/whatsnew/3.10.po index 92de6a244f..33862813af 100644 --- a/whatsnew/3.10.po +++ b/whatsnew/3.10.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-22 00:04+0000\n" +"POT-Creation-Date: 2023-07-24 00:03+0000\n" "PO-Revision-Date: 2023-06-26 03:02+0800\n" "Last-Translator: Matt Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -1134,8 +1134,8 @@ msgid "New Modules" msgstr "新模組" #: ../../whatsnew/3.10.rst:890 -msgid "None yet." -msgstr "還沒有出現。" +msgid "None." +msgstr "" #: ../../whatsnew/3.10.rst:894 msgid "Improved Modules" @@ -3872,6 +3872,9 @@ msgstr "" "為了 Python 最佳化,已刪除 ``PyThreadState.use_tracing`` 成員。(由 Mark " "Shannon 在 :issue:`43760` 中貢獻。)" +#~ msgid "None yet." +#~ msgstr "還沒有出現。" + #~ msgid "" #~ "Add :data:`~os.O_EVTONLY`, :data:`~os.O_FSYNC`, :data:`~os.O_SYMLINK` " #~ "and :data:`~os.O_NOFOLLOW_ANY` for macOS. (Contributed by Dong-hee Na in :" diff --git a/whatsnew/3.11.po b/whatsnew/3.11.po index 427107075d..406819d375 100644 --- a/whatsnew/3.11.po +++ b/whatsnew/3.11.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-22 00:04+0000\n" +"POT-Creation-Date: 2023-07-24 00:03+0000\n" "PO-Revision-Date: 2023-05-28 18:21+0800\n" "Last-Translator: Matt Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -4228,14 +4228,11 @@ msgstr "(由 Christian Heimes 於 :issue:`45459` 中所貢獻。)" #: ../../whatsnew/3.11.rst:2230 msgid "" -"Added the :c:data:`PyType_GetModuleByDef` function, used to get the module " +"Added the :c:func:`PyType_GetModuleByDef` function, used to get the module " "in which a method was defined, in cases where this information is not " "available directly (via :c:type:`PyCMethod`). (Contributed by Petr Viktorin " "in :issue:`46613`.)" msgstr "" -"新增 :c:data:`PyType_GetModuleByDef` 函式,它將被用於取得定義一個方法的模組," -"以免這項資訊無法直接被取得(透過 :c:type:`PyCMethod`)。(由 Petr Viktorin " -"於 :issue:`46613` 中所貢獻。)" #: ../../whatsnew/3.11.rst:2235 msgid "" @@ -5130,6 +5127,16 @@ msgstr "" "詳情請見 :pep:`624` 與\\ :pep:`搬遷指南 <624#alternative-apis>`。(由 Inada " "Naoki 於 :issue:`44029` 中所貢獻。)" +#~ msgid "" +#~ "Added the :c:data:`PyType_GetModuleByDef` function, used to get the " +#~ "module in which a method was defined, in cases where this information is " +#~ "not available directly (via :c:type:`PyCMethod`). (Contributed by Petr " +#~ "Viktorin in :issue:`46613`.)" +#~ msgstr "" +#~ "新增 :c:data:`PyType_GetModuleByDef` 函式,它將被用於取得定義一個方法的模" +#~ "組,以免這項資訊無法直接被取得(透過 :c:type:`PyCMethod`)。(由 Petr " +#~ "Viktorin 於 :issue:`46613` 中所貢獻。)" + #~ msgid "" #~ "Add :attr:`datetime.UTC`, a convenience alias for :attr:`datetime." #~ "timezone.utc`. (Contributed by Kabir Kwatra in :gh:`91973`.)" diff --git a/whatsnew/3.12.po b/whatsnew/3.12.po index 706df84a29..733d5754b4 100644 --- a/whatsnew/3.12.po +++ b/whatsnew/3.12.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-22 11:09+0000\n" +"POT-Creation-Date: 2023-07-24 00:03+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -94,21 +94,24 @@ msgid ":pep:`623`: Remove wstr from Unicode" msgstr "" #: ../../whatsnew/3.12.rst:87 -msgid ":pep:`632`: Remove the ``distutils`` package" +msgid "" +":pep:`632`: Remove the ``distutils`` package. See `the migration guide " +"`_ for advice on its " +"replacement." msgstr "" -#: ../../whatsnew/3.12.rst:90 +#: ../../whatsnew/3.12.rst:92 msgid "Improved Error Messages" msgstr "" -#: ../../whatsnew/3.12.rst:92 +#: ../../whatsnew/3.12.rst:94 msgid "" "Modules from the standard library are now potentially suggested as part of " "the error messages displayed by the interpreter when a :exc:`NameError` is " "raised to the top level. Contributed by Pablo Galindo in :gh:`98254`." msgstr "" -#: ../../whatsnew/3.12.rst:101 +#: ../../whatsnew/3.12.rst:103 msgid "" "Improve the error suggestion for :exc:`NameError` exceptions for instances. " "Now if a :exc:`NameError` is raised in a method and the instance has an " @@ -117,14 +120,14 @@ msgid "" "scope. Contributed by Pablo Galindo in :gh:`99139`." msgstr "" -#: ../../whatsnew/3.12.rst:122 +#: ../../whatsnew/3.12.rst:124 msgid "" "Improve the :exc:`SyntaxError` error message when the user types ``import x " "from y`` instead of ``from y import x``. Contributed by Pablo Galindo in :gh:" "`98931`." msgstr "" -#: ../../whatsnew/3.12.rst:132 +#: ../../whatsnew/3.12.rst:134 msgid "" ":exc:`ImportError` exceptions raised from failed ``from import " "`` statements now include suggestions for the value of ```` " @@ -132,15 +135,15 @@ msgid "" "in :gh:`91058`." msgstr "" -#: ../../whatsnew/3.12.rst:143 ../../whatsnew/3.12.rst:1592 +#: ../../whatsnew/3.12.rst:145 ../../whatsnew/3.12.rst:1594 msgid "New Features" msgstr "新增特性" -#: ../../whatsnew/3.12.rst:148 +#: ../../whatsnew/3.12.rst:150 msgid "PEP 701: Syntactic formalization of f-strings" msgstr "" -#: ../../whatsnew/3.12.rst:150 +#: ../../whatsnew/3.12.rst:152 msgid "" ":pep:`701` lifts some restrictions on the usage of f-strings. Expression " "components inside f-strings can now be any valid Python expression including " @@ -149,7 +152,7 @@ msgid "" "in detail:" msgstr "" -#: ../../whatsnew/3.12.rst:155 +#: ../../whatsnew/3.12.rst:157 msgid "" "Quote reuse: in Python 3.11, reusing the same quotes as the containing f-" "string raises a :exc:`SyntaxError`, forcing the user to either use other " @@ -157,7 +160,7 @@ msgid "" "uses single quotes). In Python 3.12, you can now do things like this:" msgstr "" -#: ../../whatsnew/3.12.rst:164 +#: ../../whatsnew/3.12.rst:166 msgid "" "Note that before this change there was no explicit limit in how f-strings " "can be nested, but the fact that string quotes cannot be reused inside the " @@ -165,13 +168,13 @@ msgid "" "arbitrarily. In fact, this is the most nested f-string that could be written:" msgstr "" -#: ../../whatsnew/3.12.rst:172 +#: ../../whatsnew/3.12.rst:174 msgid "" "As now f-strings can contain any valid Python expression inside expression " "components, it is now possible to nest f-strings arbitrarily:" msgstr "" -#: ../../whatsnew/3.12.rst:178 +#: ../../whatsnew/3.12.rst:180 msgid "" "Multi-line expressions and comments: In Python 3.11, f-strings expressions " "must be defined in a single line even if outside f-strings expressions could " @@ -180,7 +183,7 @@ msgid "" "spanning multiple lines and include comments on them:" msgstr "" -#: ../../whatsnew/3.12.rst:191 +#: ../../whatsnew/3.12.rst:193 msgid "" "Backslashes and unicode characters: before Python 3.12 f-string expressions " "couldn't contain any ``\\`` character. This also affected unicode escaped " @@ -189,11 +192,11 @@ msgid "" "can define expressions like this:" msgstr "" -#: ../../whatsnew/3.12.rst:204 +#: ../../whatsnew/3.12.rst:206 msgid "See :pep:`701` for more details." msgstr "詳情請見 :pep:`701`。" -#: ../../whatsnew/3.12.rst:206 +#: ../../whatsnew/3.12.rst:208 msgid "" "As a positive side-effect of how this feature has been implemented (by " "parsing f-strings with the PEG parser (see :pep:`617`), now error messages " @@ -202,7 +205,7 @@ msgid "" "`SyntaxError`:" msgstr "" -#: ../../whatsnew/3.12.rst:219 +#: ../../whatsnew/3.12.rst:221 msgid "" "but the error message doesn't include the exact location of the error within " "the line and also has the expression artificially surrounded by parentheses. " @@ -210,25 +213,25 @@ msgid "" "can be more precise and show the entire line:" msgstr "" -#: ../../whatsnew/3.12.rst:231 +#: ../../whatsnew/3.12.rst:233 msgid "" "(Contributed by Pablo Galindo, Batuhan Taskaya, Lysandros Nikolaou, Cristián " "Maureira-Fredes and Marta Gómez in :gh:`102856`. PEP written by Pablo " "Galindo, Batuhan Taskaya, Lysandros Nikolaou and Marta Gómez)." msgstr "" -#: ../../whatsnew/3.12.rst:238 +#: ../../whatsnew/3.12.rst:240 msgid "PEP 709: Comprehension inlining" msgstr "" -#: ../../whatsnew/3.12.rst:240 +#: ../../whatsnew/3.12.rst:242 msgid "" "Dictionary, list, and set comprehensions are now inlined, rather than " "creating a new single-use function object for each execution of the " "comprehension. This speeds up execution of a comprehension by up to 2x." msgstr "" -#: ../../whatsnew/3.12.rst:244 +#: ../../whatsnew/3.12.rst:246 msgid "" "Comprehension iteration variables remain isolated; they don't overwrite a " "variable of the same name in the outer scope, nor are they visible after the " @@ -236,24 +239,24 @@ msgid "" "manipulation, not via separate function scope." msgstr "" -#: ../../whatsnew/3.12.rst:249 +#: ../../whatsnew/3.12.rst:251 msgid "Inlining does result in a few visible behavior changes:" msgstr "" -#: ../../whatsnew/3.12.rst:251 +#: ../../whatsnew/3.12.rst:253 msgid "" "There is no longer a separate frame for the comprehension in tracebacks, and " "tracing/profiling no longer shows the comprehension as a function call." msgstr "" -#: ../../whatsnew/3.12.rst:253 +#: ../../whatsnew/3.12.rst:255 msgid "" "Calling :func:`locals` inside a comprehension now includes variables from " "outside the comprehension, and no longer includes the synthetic ``.0`` " "variable for the comprehension \"argument\"." msgstr "" -#: ../../whatsnew/3.12.rst:256 +#: ../../whatsnew/3.12.rst:258 msgid "" "A comprehension iterating directly over ``locals()`` (e.g. ``[k for k in " "locals()]``) may see \"RuntimeError: dictionary changed size during " @@ -263,22 +266,22 @@ msgid "" "[k for k in keys]``." msgstr "" -#: ../../whatsnew/3.12.rst:263 +#: ../../whatsnew/3.12.rst:265 msgid "Contributed by Carl Meyer and Vladimir Matveev in :pep:`709`." msgstr "" -#: ../../whatsnew/3.12.rst:266 +#: ../../whatsnew/3.12.rst:268 msgid "PEP 688: Making the buffer protocol accessible in Python" msgstr "" -#: ../../whatsnew/3.12.rst:268 +#: ../../whatsnew/3.12.rst:270 msgid "" ":pep:`688` introduces a way to use the :ref:`buffer protocol " "` from Python code. Classes that implement the :meth:`~object." "__buffer__` method are now usable as buffer types." msgstr "" -#: ../../whatsnew/3.12.rst:272 +#: ../../whatsnew/3.12.rst:274 msgid "" "The new :class:`collections.abc.Buffer` ABC provides a standard way to " "represent buffer objects, for example in type annotations. The new :class:" @@ -286,46 +289,46 @@ msgid "" "customize buffer creation. (Contributed by Jelle Zijlstra in :gh:`102500`.)" msgstr "" -#: ../../whatsnew/3.12.rst:279 +#: ../../whatsnew/3.12.rst:281 msgid "New Features Related to Type Hints" msgstr "" -#: ../../whatsnew/3.12.rst:281 +#: ../../whatsnew/3.12.rst:283 msgid "" "This section covers major changes affecting :pep:`484` type hints and the :" "mod:`typing` module." msgstr "" -#: ../../whatsnew/3.12.rst:287 +#: ../../whatsnew/3.12.rst:289 msgid "PEP 692: Using ``TypedDict`` for more precise ``**kwargs`` typing" msgstr "" -#: ../../whatsnew/3.12.rst:289 +#: ../../whatsnew/3.12.rst:291 msgid "" "Typing ``**kwargs`` in a function signature as introduced by :pep:`484` " "allowed for valid annotations only in cases where all of the ``**kwargs`` " "were of the same type." msgstr "" -#: ../../whatsnew/3.12.rst:293 +#: ../../whatsnew/3.12.rst:295 msgid "" "This PEP specifies a more precise way of typing ``**kwargs`` by relying on " "typed dictionaries::" msgstr "" -#: ../../whatsnew/3.12.rst:304 +#: ../../whatsnew/3.12.rst:306 msgid "See :pep:`692` for more details." msgstr "" -#: ../../whatsnew/3.12.rst:306 +#: ../../whatsnew/3.12.rst:308 msgid "(Contributed by Franek Magiera in :gh:`103629`.)" msgstr "" -#: ../../whatsnew/3.12.rst:309 +#: ../../whatsnew/3.12.rst:311 msgid "PEP 698: Override Decorator for Static Typing" msgstr "" -#: ../../whatsnew/3.12.rst:311 +#: ../../whatsnew/3.12.rst:313 msgid "" "A new decorator :func:`typing.override` has been added to the :mod:`typing` " "module. It indicates to type checkers that the method is intended to " @@ -334,51 +337,51 @@ msgid "" "class does not in fact do so." msgstr "" -#: ../../whatsnew/3.12.rst:317 +#: ../../whatsnew/3.12.rst:319 msgid "Example::" msgstr "" -#: ../../whatsnew/3.12.rst:335 +#: ../../whatsnew/3.12.rst:337 msgid "(Contributed by Steven Troxler in :gh:`101561`.)" msgstr "" -#: ../../whatsnew/3.12.rst:340 +#: ../../whatsnew/3.12.rst:342 msgid "PEP 695: Type Parameter Syntax" msgstr "" -#: ../../whatsnew/3.12.rst:342 +#: ../../whatsnew/3.12.rst:344 msgid "" "Generic classes and functions under :pep:`484` were declared using a verbose " "syntax that left the scope of type parameters unclear and required explicit " "declarations of variance." msgstr "" -#: ../../whatsnew/3.12.rst:346 +#: ../../whatsnew/3.12.rst:348 msgid "" ":pep:`695` introduces a new, more compact and explicit way to create :ref:" "`generic classes ` and :ref:`functions `::" msgstr "" -#: ../../whatsnew/3.12.rst:359 +#: ../../whatsnew/3.12.rst:361 msgid "" "In addition, the PEP introduces a new way to declare :ref:`type aliases " "` using the :keyword:`type` statement, which creates an " "instance of :class:`~typing.TypeAliasType`::" msgstr "" -#: ../../whatsnew/3.12.rst:365 +#: ../../whatsnew/3.12.rst:367 msgid "Type aliases can also be :ref:`generic `::" msgstr "" -#: ../../whatsnew/3.12.rst:369 +#: ../../whatsnew/3.12.rst:371 msgid "" "The new syntax allows declaring :class:`~typing.TypeVarTuple` and :class:" "`~typing.ParamSpec` parameters, as well as :class:`~typing.TypeVar` " "parameters with bounds or constraints::" msgstr "" -#: ../../whatsnew/3.12.rst:378 +#: ../../whatsnew/3.12.rst:380 msgid "" "The value of type aliases and the bound and constraints of type variables " "created through this syntax are evaluated only on demand (see :ref:`lazy-" @@ -386,7 +389,7 @@ msgid "" "defined later in the file." msgstr "" -#: ../../whatsnew/3.12.rst:383 +#: ../../whatsnew/3.12.rst:385 msgid "" "Type parameters declared through a type parameter list are visible within " "the scope of the declaration and any nested scopes, but not in the outer " @@ -396,7 +399,7 @@ msgid "" "detailed description of the runtime semantics of type parameters." msgstr "" -#: ../../whatsnew/3.12.rst:390 +#: ../../whatsnew/3.12.rst:392 msgid "" "In order to support these scoping semantics, a new kind of scope is " "introduced, the :ref:`annotation scope `. Annotation " @@ -405,21 +408,21 @@ msgid "" "` will also be evaluated in annotation scopes." msgstr "" -#: ../../whatsnew/3.12.rst:396 +#: ../../whatsnew/3.12.rst:398 msgid "See :pep:`695` for more details." msgstr "詳情請見 :pep:`695`。" -#: ../../whatsnew/3.12.rst:398 +#: ../../whatsnew/3.12.rst:400 msgid "" "(PEP written by Eric Traut. Implementation by Jelle Zijlstra, Eric Traut, " "and others in :gh:`103764`.)" msgstr "" -#: ../../whatsnew/3.12.rst:402 +#: ../../whatsnew/3.12.rst:404 msgid "Other Language Changes" msgstr "其他語言更動" -#: ../../whatsnew/3.12.rst:404 +#: ../../whatsnew/3.12.rst:406 msgid "" "Add :ref:`perf_profiling` through the new environment variable :envvar:" "`PYTHONPERFSUPPORT`, the new command-line option :option:`-X perf <-X>`, as " @@ -430,7 +433,7 @@ msgid "" "in :gh:`96123`.)" msgstr "" -#: ../../whatsnew/3.12.rst:414 +#: ../../whatsnew/3.12.rst:416 msgid "" "The extraction methods in :mod:`tarfile`, and :func:`shutil.unpack_archive`, " "have a new a *filter* argument that allows limiting tar features than may be " @@ -440,32 +443,32 @@ msgid "" "`706`.)" msgstr "" -#: ../../whatsnew/3.12.rst:422 +#: ../../whatsnew/3.12.rst:424 msgid "" ":class:`types.MappingProxyType` instances are now hashable if the underlying " "mapping is hashable. (Contributed by Serhiy Storchaka in :gh:`87995`.)" msgstr "" -#: ../../whatsnew/3.12.rst:426 +#: ../../whatsnew/3.12.rst:428 msgid "" ":class:`memoryview` now supports the half-float type (the \"e\" format " "code). (Contributed by Dong-hee Na and Antoine Pitrou in :gh:`90751`.)" msgstr "" -#: ../../whatsnew/3.12.rst:429 +#: ../../whatsnew/3.12.rst:431 msgid "" "The parser now raises :exc:`SyntaxError` when parsing source code containing " "null bytes. (Contributed by Pablo Galindo in :gh:`96670`.)" msgstr "" -#: ../../whatsnew/3.12.rst:432 +#: ../../whatsnew/3.12.rst:434 msgid "" ":func:`ast.parse` now raises :exc:`SyntaxError` instead of :exc:`ValueError` " "when parsing source code containing null bytes. (Contributed by Pablo " "Galindo in :gh:`96670`.)" msgstr "" -#: ../../whatsnew/3.12.rst:436 +#: ../../whatsnew/3.12.rst:438 msgid "" "The Garbage Collector now runs only on the eval breaker mechanism of the " "Python bytecode evaluation loop instead of object allocations. The GC can " @@ -475,7 +478,7 @@ msgid "" "`97922`.)" msgstr "" -#: ../../whatsnew/3.12.rst:443 +#: ../../whatsnew/3.12.rst:445 msgid "" "A backslash-character pair that is not a valid escape sequence now generates " "a :exc:`SyntaxWarning`, instead of :exc:`DeprecationWarning`. For example, " @@ -486,7 +489,7 @@ msgid "" "`SyntaxWarning`. (Contributed by Victor Stinner in :gh:`98401`.)" msgstr "" -#: ../../whatsnew/3.12.rst:452 +#: ../../whatsnew/3.12.rst:454 msgid "" "Octal escapes with value larger than ``0o377`` (ex: ``\"\\477\"``), " "deprecated in Python 3.11, now produce a :exc:`SyntaxWarning`, instead of :" @@ -494,14 +497,14 @@ msgid "" "a :exc:`SyntaxError`. (Contributed by Victor Stinner in :gh:`98401`.)" msgstr "" -#: ../../whatsnew/3.12.rst:458 +#: ../../whatsnew/3.12.rst:460 msgid "" "All builtin and extension callables expecting boolean parameters now accept " "arguments of any type instead of just :class:`bool` and :class:`int`. " "(Contributed by Serhiy Storchaka in :gh:`60203`.)" msgstr "" -#: ../../whatsnew/3.12.rst:462 +#: ../../whatsnew/3.12.rst:464 msgid "" "Variables used in the target part of comprehensions that are not stored to " "can now be used in assignment expressions (``:=``). For example, in ``[(b := " @@ -511,28 +514,28 @@ msgid "" "(Contributed by Nikita Sobolev in :gh:`100581`.)" msgstr "" -#: ../../whatsnew/3.12.rst:469 +#: ../../whatsnew/3.12.rst:471 msgid "" ":class:`slice` objects are now hashable, allowing them to be used as dict " "keys and set items. (Contributed by Will Bradshaw, Furkan Onder, and Raymond " "Hettinger in :gh:`101264`.)" msgstr "" -#: ../../whatsnew/3.12.rst:472 +#: ../../whatsnew/3.12.rst:474 msgid "" ":func:`sum` now uses Neumaier summation to improve accuracy when summing " "floats or mixed ints and floats. (Contributed by Raymond Hettinger in :gh:" "`100425`.)" msgstr "" -#: ../../whatsnew/3.12.rst:476 +#: ../../whatsnew/3.12.rst:478 msgid "" "Exceptions raised in a typeobject's ``__set_name__`` method are no longer " "wrapped by a :exc:`RuntimeError`. Context information is added to the " "exception as a :pep:`678` note. (Contributed by Irit Katriel in :gh:`77757`.)" msgstr "" -#: ../../whatsnew/3.12.rst:480 +#: ../../whatsnew/3.12.rst:482 msgid "" "When a ``try-except*`` construct handles the entire :exc:`ExceptionGroup` " "and raises one other exception, that exception is no longer wrapped in an :" @@ -540,33 +543,33 @@ msgid "" "Katriel in :gh:`103590`.)" msgstr "" -#: ../../whatsnew/3.12.rst:487 +#: ../../whatsnew/3.12.rst:489 msgid "New Modules" msgstr "" -#: ../../whatsnew/3.12.rst:489 -msgid "None yet." +#: ../../whatsnew/3.12.rst:491 +msgid "None." msgstr "" -#: ../../whatsnew/3.12.rst:493 +#: ../../whatsnew/3.12.rst:495 msgid "Improved Modules" msgstr "" -#: ../../whatsnew/3.12.rst:496 +#: ../../whatsnew/3.12.rst:498 msgid "array" msgstr "array" -#: ../../whatsnew/3.12.rst:498 +#: ../../whatsnew/3.12.rst:500 msgid "" "The :class:`array.array` class now supports subscripting, making it a :term:" "`generic type`. (Contributed by Jelle Zijlstra in :gh:`98658`.)" msgstr "" -#: ../../whatsnew/3.12.rst:502 +#: ../../whatsnew/3.12.rst:504 msgid "asyncio" msgstr "asyncio" -#: ../../whatsnew/3.12.rst:504 +#: ../../whatsnew/3.12.rst:506 msgid "" "The performance of writing to sockets in :mod:`asyncio` has been " "significantly improved. ``asyncio`` now avoids unnecessary copying when " @@ -574,7 +577,7 @@ msgid "" "supports it. (Contributed by Kumar Aditya in :gh:`91166`.)" msgstr "" -#: ../../whatsnew/3.12.rst:509 +#: ../../whatsnew/3.12.rst:511 msgid "" "Added :func:`asyncio.eager_task_factory` and :func:`asyncio." "create_eager_task_factory` functions to allow opting an event loop in to " @@ -582,7 +585,7 @@ msgid "" "Jacob Bower & Itamar O in :gh:`102853`, :gh:`104140`, and :gh:`104138`)" msgstr "" -#: ../../whatsnew/3.12.rst:514 +#: ../../whatsnew/3.12.rst:516 msgid "" "On Linux, :mod:`asyncio` uses :class:`~asyncio.PidfdChildWatcher` by default " "if :func:`os.pidfd_open` is available and functional instead of :class:" @@ -590,7 +593,7 @@ msgid "" "`98024`.)" msgstr "" -#: ../../whatsnew/3.12.rst:519 +#: ../../whatsnew/3.12.rst:521 msgid "" "The child watcher classes :class:`~asyncio.MultiLoopChildWatcher`, :class:" "`~asyncio.FastChildWatcher`, :class:`~asyncio.AbstractChildWatcher` and :" @@ -602,7 +605,7 @@ msgid "" "`94597`.)" msgstr "" -#: ../../whatsnew/3.12.rst:528 +#: ../../whatsnew/3.12.rst:530 msgid "" ":func:`asyncio.set_child_watcher`, :func:`asyncio.get_child_watcher`, :meth:" "`asyncio.AbstractEventLoopPolicy.set_child_watcher` and :meth:`asyncio." @@ -610,57 +613,57 @@ msgid "" "removed in Python 3.14. (Contributed by Kumar Aditya in :gh:`94597`.)" msgstr "" -#: ../../whatsnew/3.12.rst:534 +#: ../../whatsnew/3.12.rst:536 msgid "" "Add *loop_factory* parameter to :func:`asyncio.run` to allow specifying a " "custom event loop factory. (Contributed by Kumar Aditya in :gh:`99388`.)" msgstr "" -#: ../../whatsnew/3.12.rst:538 +#: ../../whatsnew/3.12.rst:540 msgid "" "Add C implementation of :func:`asyncio.current_task` for 4x-6x speedup. " "(Contributed by Itamar Ostricher and Pranav Thulasiram Bhat in :gh:`100344`.)" msgstr "" -#: ../../whatsnew/3.12.rst:541 +#: ../../whatsnew/3.12.rst:543 msgid "" ":func:`asyncio.iscoroutine` now returns ``False`` for generators as :mod:" "`asyncio` does not support legacy generator-based coroutines. (Contributed " "by Kumar Aditya in :gh:`102748`.)" msgstr "" -#: ../../whatsnew/3.12.rst:545 +#: ../../whatsnew/3.12.rst:547 msgid "" ":func:`asyncio.wait` and :func:`asyncio.as_completed` now accepts generators " "yielding tasks. (Contributed by Kumar Aditya in :gh:`78530`.)" msgstr "" -#: ../../whatsnew/3.12.rst:550 +#: ../../whatsnew/3.12.rst:552 msgid "calendar" msgstr "calendar" -#: ../../whatsnew/3.12.rst:552 +#: ../../whatsnew/3.12.rst:554 msgid "" "Add enums :data:`~calendar.Month` and :data:`~calendar.Day`. (Contributed by " "Prince Roshan in :gh:`103636`.)" msgstr "" -#: ../../whatsnew/3.12.rst:556 +#: ../../whatsnew/3.12.rst:558 msgid "csv" msgstr "csv" -#: ../../whatsnew/3.12.rst:558 +#: ../../whatsnew/3.12.rst:560 msgid "" "Add :const:`~csv.QUOTE_NOTNULL` and :const:`~csv.QUOTE_STRINGS` flags to " "provide finer grained control of ``None`` and empty strings by :class:`~csv." "writer` objects." msgstr "" -#: ../../whatsnew/3.12.rst:563 +#: ../../whatsnew/3.12.rst:565 msgid "dis" msgstr "dis" -#: ../../whatsnew/3.12.rst:565 +#: ../../whatsnew/3.12.rst:567 msgid "" "Pseudo instruction opcodes (which are used by the compiler but do not appear " "in executable bytecode) are now exposed in the :mod:`dis` module. :opcode:" @@ -669,35 +672,35 @@ msgid "" "(Contributed by Irit Katriel in :gh:`94216`.)" msgstr "" -#: ../../whatsnew/3.12.rst:574 +#: ../../whatsnew/3.12.rst:576 msgid "fractions" msgstr "fractions" -#: ../../whatsnew/3.12.rst:576 +#: ../../whatsnew/3.12.rst:578 msgid "" "Objects of type :class:`fractions.Fraction` now support float-style " "formatting. (Contributed by Mark Dickinson in :gh:`100161`.)" msgstr "" -#: ../../whatsnew/3.12.rst:580 +#: ../../whatsnew/3.12.rst:582 msgid "inspect" msgstr "inspect" -#: ../../whatsnew/3.12.rst:582 +#: ../../whatsnew/3.12.rst:584 msgid "" "Add :func:`inspect.markcoroutinefunction` to mark sync functions that return " "a :term:`coroutine` for use with :func:`inspect.iscoroutinefunction`. " "(Contributed Carlton Gibson in :gh:`99247`.)" msgstr "" -#: ../../whatsnew/3.12.rst:586 +#: ../../whatsnew/3.12.rst:588 msgid "" "Add :func:`inspect.getasyncgenstate` and :func:`inspect.getasyncgenlocals` " "for determining the current state of asynchronous generators. (Contributed " "by Thomas Krennwallner in :issue:`35759`.)" msgstr "" -#: ../../whatsnew/3.12.rst:590 +#: ../../whatsnew/3.12.rst:592 msgid "" "The performance of :func:`inspect.getattr_static` has been considerably " "improved. Most calls to the function should be at least 2x faster than they " @@ -705,60 +708,60 @@ msgid "" "Waygood in :gh:`103193`.)" msgstr "" -#: ../../whatsnew/3.12.rst:596 +#: ../../whatsnew/3.12.rst:598 msgid "itertools" msgstr "itertools" -#: ../../whatsnew/3.12.rst:598 +#: ../../whatsnew/3.12.rst:600 msgid "" "Added :class:`itertools.batched()` for collecting into even-sized tuples " "where the last batch may be shorter than the rest. (Contributed by Raymond " "Hettinger in :gh:`98363`.)" msgstr "" -#: ../../whatsnew/3.12.rst:603 +#: ../../whatsnew/3.12.rst:605 msgid "math" msgstr "math" -#: ../../whatsnew/3.12.rst:605 +#: ../../whatsnew/3.12.rst:607 msgid "" "Added :func:`math.sumprod` for computing a sum of products. (Contributed by " "Raymond Hettinger in :gh:`100485`.)" msgstr "" -#: ../../whatsnew/3.12.rst:608 +#: ../../whatsnew/3.12.rst:610 msgid "" "Extended :func:`math.nextafter` to include a *steps* argument for moving up " "or down multiple steps at a time. (By Matthias Goergens, Mark Dickinson, and " "Raymond Hettinger in :gh:`94906`.)" msgstr "" -#: ../../whatsnew/3.12.rst:613 +#: ../../whatsnew/3.12.rst:615 msgid "os" msgstr "os" -#: ../../whatsnew/3.12.rst:615 +#: ../../whatsnew/3.12.rst:617 msgid "" "Add :const:`os.PIDFD_NONBLOCK` to open a file descriptor for a process with :" "func:`os.pidfd_open` in non-blocking mode. (Contributed by Kumar Aditya in :" "gh:`93312`.)" msgstr "" -#: ../../whatsnew/3.12.rst:619 +#: ../../whatsnew/3.12.rst:621 msgid "" ":class:`os.DirEntry` now includes an :meth:`os.DirEntry.is_junction` method " "to check if the entry is a junction. (Contributed by Charles Machalow in :gh:" "`99547`.)" msgstr "" -#: ../../whatsnew/3.12.rst:623 +#: ../../whatsnew/3.12.rst:625 msgid "" "Add :func:`os.listdrives`, :func:`os.listvolumes` and :func:`os.listmounts` " "functions on Windows for enumerating drives, volumes and mount points. " "(Contributed by Steve Dower in :gh:`102519`.)" msgstr "" -#: ../../whatsnew/3.12.rst:627 +#: ../../whatsnew/3.12.rst:629 msgid "" ":func:`os.stat` and :func:`os.lstat` are now more accurate on Windows. The " "``st_birthtime`` field will now be filled with the creation time of the " @@ -771,27 +774,27 @@ msgid "" "`99726`.)" msgstr "" -#: ../../whatsnew/3.12.rst:638 +#: ../../whatsnew/3.12.rst:640 msgid "os.path" msgstr "os.path" -#: ../../whatsnew/3.12.rst:640 +#: ../../whatsnew/3.12.rst:642 msgid "" "Add :func:`os.path.isjunction` to check if a given path is a junction. " "(Contributed by Charles Machalow in :gh:`99547`.)" msgstr "" -#: ../../whatsnew/3.12.rst:643 +#: ../../whatsnew/3.12.rst:645 msgid "" "Add :func:`os.path.splitroot` to split a path into a triad ``(drive, root, " "tail)``. (Contributed by Barney Gale in :gh:`101000`.)" msgstr "" -#: ../../whatsnew/3.12.rst:647 +#: ../../whatsnew/3.12.rst:649 msgid "pathlib" msgstr "pathlib" -#: ../../whatsnew/3.12.rst:649 +#: ../../whatsnew/3.12.rst:651 msgid "" "Add support for subclassing :class:`pathlib.PurePath` and :class:`~pathlib." "Path`, plus their Posix- and Windows-specific variants. Subclasses may " @@ -799,14 +802,14 @@ msgid "" "information between path instances." msgstr "" -#: ../../whatsnew/3.12.rst:654 +#: ../../whatsnew/3.12.rst:656 msgid "" "Add :meth:`~pathlib.Path.walk` for walking the directory trees and " "generating all file or directory names within them, similar to :func:`os." "walk`. (Contributed by Stanislav Zmiev in :gh:`90385`.)" msgstr "" -#: ../../whatsnew/3.12.rst:658 +#: ../../whatsnew/3.12.rst:660 msgid "" "Add *walk_up* optional parameter to :meth:`pathlib.PurePath.relative_to` to " "allow the insertion of ``..`` entries in the result; this behavior is more " @@ -814,13 +817,13 @@ msgid "" "issue:`40358`.)" msgstr "" -#: ../../whatsnew/3.12.rst:663 +#: ../../whatsnew/3.12.rst:665 msgid "" "Add :meth:`pathlib.Path.is_junction` as a proxy to :func:`os.path." "isjunction`. (Contributed by Charles Machalow in :gh:`99547`.)" msgstr "" -#: ../../whatsnew/3.12.rst:666 +#: ../../whatsnew/3.12.rst:668 msgid "" "Add *case_sensitive* optional parameter to :meth:`pathlib.Path.glob`, :meth:" "`pathlib.Path.rglob` and :meth:`pathlib.PurePath.match` for matching the " @@ -828,38 +831,38 @@ msgid "" "process." msgstr "" -#: ../../whatsnew/3.12.rst:671 +#: ../../whatsnew/3.12.rst:673 msgid "pdb" msgstr "pdb" -#: ../../whatsnew/3.12.rst:673 +#: ../../whatsnew/3.12.rst:675 msgid "" "Add convenience variables to hold values temporarily for debug session and " "provide quick access to values like the current frame or the return value. " "(Contributed by Tian Gao in :gh:`103693`.)" msgstr "" -#: ../../whatsnew/3.12.rst:679 +#: ../../whatsnew/3.12.rst:681 msgid "random" msgstr "random" -#: ../../whatsnew/3.12.rst:681 +#: ../../whatsnew/3.12.rst:683 msgid "" "Added :func:`random.binomialvariate`. (Contributed by Raymond Hettinger in :" "gh:`81620`.)" msgstr "" -#: ../../whatsnew/3.12.rst:684 +#: ../../whatsnew/3.12.rst:686 msgid "" "Added a default of ``lamb=1.0`` to :func:`random.expovariate`. (Contributed " "by Raymond Hettinger in :gh:`100234`.)" msgstr "" -#: ../../whatsnew/3.12.rst:688 +#: ../../whatsnew/3.12.rst:690 msgid "shutil" msgstr "shutil" -#: ../../whatsnew/3.12.rst:690 +#: ../../whatsnew/3.12.rst:692 msgid "" ":func:`shutil.make_archive` now passes the *root_dir* argument to custom " "archivers which support it. In this case it no longer temporarily changes " @@ -867,7 +870,7 @@ msgid "" "archiving. (Contributed by Serhiy Storchaka in :gh:`74696`.)" msgstr "" -#: ../../whatsnew/3.12.rst:696 +#: ../../whatsnew/3.12.rst:698 msgid "" ":func:`shutil.rmtree` now accepts a new argument *onexc* which is an error " "handler like *onerror* but which expects an exception instance rather than a " @@ -875,14 +878,14 @@ msgid "" "Python 3.14. (Contributed by Irit Katriel in :gh:`102828`.)" msgstr "" -#: ../../whatsnew/3.12.rst:702 +#: ../../whatsnew/3.12.rst:704 msgid "" ":func:`shutil.which` now consults the *PATHEXT* environment variable to find " "matches within *PATH* on Windows even when the given *cmd* includes a " "directory component. (Contributed by Charles Machalow in :gh:`103179`.)" msgstr "" -#: ../../whatsnew/3.12.rst:707 +#: ../../whatsnew/3.12.rst:709 msgid "" ":func:`shutil.which` will call ``NeedCurrentDirectoryForExePathW`` when " "querying for executables on Windows to determine if the current working " @@ -890,24 +893,24 @@ msgid "" "Machalow in :gh:`103179`.)" msgstr "" -#: ../../whatsnew/3.12.rst:712 +#: ../../whatsnew/3.12.rst:714 msgid "" ":func:`shutil.which` will return a path matching the *cmd* with a component " "from ``PATHEXT`` prior to a direct match elsewhere in the search path on " "Windows. (Contributed by Charles Machalow in :gh:`103179`.)" msgstr "" -#: ../../whatsnew/3.12.rst:718 +#: ../../whatsnew/3.12.rst:720 msgid "sqlite3" msgstr "sqlite3" -#: ../../whatsnew/3.12.rst:720 +#: ../../whatsnew/3.12.rst:722 msgid "" "Add a :ref:`command-line interface `. (Contributed by Erlend E. " "Aasland in :gh:`77617`.)" msgstr "" -#: ../../whatsnew/3.12.rst:723 +#: ../../whatsnew/3.12.rst:725 msgid "" "Add the :attr:`~sqlite3.Connection.autocommit` attribute to :class:`~sqlite3." "Connection` and the *autocommit* parameter to :func:`~sqlite3.connect` to " @@ -915,36 +918,36 @@ msgid "" "control-autocommit>`. (Contributed by Erlend E. Aasland in :gh:`83638`.)" msgstr "" -#: ../../whatsnew/3.12.rst:730 +#: ../../whatsnew/3.12.rst:732 msgid "" "Add *entrypoint* keyword-only parameter to :meth:`~sqlite3.Connection." "load_extension`, for overriding the SQLite extension entry point. " "(Contributed by Erlend E. Aasland in :gh:`103015`.)" msgstr "" -#: ../../whatsnew/3.12.rst:735 +#: ../../whatsnew/3.12.rst:737 msgid "" "Add :meth:`~sqlite3.Connection.getconfig` and :meth:`~sqlite3.Connection." "setconfig` to :class:`~sqlite3.Connection` to make configuration changes to " "a database connection. (Contributed by Erlend E. Aasland in :gh:`103489`.)" msgstr "" -#: ../../whatsnew/3.12.rst:741 +#: ../../whatsnew/3.12.rst:743 msgid "statistics" msgstr "statistics" -#: ../../whatsnew/3.12.rst:743 +#: ../../whatsnew/3.12.rst:745 msgid "" "Extended :func:`statistics.correlation` to include as a ``ranked`` method " "for computing the Spearman correlation of ranked data. (Contributed by " "Raymond Hettinger in :gh:`95861`.)" msgstr "" -#: ../../whatsnew/3.12.rst:748 +#: ../../whatsnew/3.12.rst:750 msgid "sys" msgstr "sys" -#: ../../whatsnew/3.12.rst:750 +#: ../../whatsnew/3.12.rst:752 msgid "" "Add :func:`sys.activate_stack_trampoline` and :func:`sys." "deactivate_stack_trampoline` for activating and deactivating stack profiler " @@ -954,7 +957,7 @@ msgid "" "Shannon in :gh:`96123`.)" msgstr "" -#: ../../whatsnew/3.12.rst:759 +#: ../../whatsnew/3.12.rst:761 msgid "" "Add :data:`sys.last_exc` which holds the last unhandled exception that was " "raised (for post-mortem debugging use cases). Deprecate the three fields " @@ -963,34 +966,34 @@ msgid "" "Katriel in :gh:`102778`.)" msgstr "" -#: ../../whatsnew/3.12.rst:765 ../../whatsnew/3.12.rst:1502 +#: ../../whatsnew/3.12.rst:767 ../../whatsnew/3.12.rst:1504 msgid "" ":func:`sys._current_exceptions` now returns a mapping from thread-id to an " "exception instance, rather than to a ``(typ, exc, tb)`` tuple. (Contributed " "by Irit Katriel in :gh:`103176`.)" msgstr "" -#: ../../whatsnew/3.12.rst:770 +#: ../../whatsnew/3.12.rst:772 msgid "tempfile" msgstr "tempfile" -#: ../../whatsnew/3.12.rst:772 +#: ../../whatsnew/3.12.rst:774 msgid "" "The :class:`tempfile.NamedTemporaryFile` function has a new optional " "parameter *delete_on_close* (Contributed by Evgeny Zorin in :gh:`58451`.)" msgstr "" -#: ../../whatsnew/3.12.rst:774 +#: ../../whatsnew/3.12.rst:776 msgid "" ":func:`tempfile.mkdtemp` now always returns an absolute path, even if the " "argument provided to the *dir* parameter is a relative path." msgstr "" -#: ../../whatsnew/3.12.rst:780 +#: ../../whatsnew/3.12.rst:782 msgid "threading" msgstr "threading" -#: ../../whatsnew/3.12.rst:782 +#: ../../whatsnew/3.12.rst:784 msgid "" "Add :func:`threading.settrace_all_threads` and :func:`threading." "setprofile_all_threads` that allow to set tracing and profiling functions in " @@ -998,11 +1001,11 @@ msgid "" "Galindo in :gh:`93503`.)" msgstr "" -#: ../../whatsnew/3.12.rst:788 +#: ../../whatsnew/3.12.rst:790 msgid "tkinter" msgstr "tkinter" -#: ../../whatsnew/3.12.rst:790 +#: ../../whatsnew/3.12.rst:792 msgid "" "``tkinter.Canvas.coords()`` now flattens its arguments. It now accepts not " "only coordinates as separate arguments (``x1, y1, x2, y2, ...``) and a " @@ -1012,11 +1015,11 @@ msgid "" "in :gh:`94473`.)" msgstr "" -#: ../../whatsnew/3.12.rst:799 +#: ../../whatsnew/3.12.rst:801 msgid "tokenize" msgstr "tokenize" -#: ../../whatsnew/3.12.rst:801 +#: ../../whatsnew/3.12.rst:803 msgid "" "The :mod:`tokenize` module includes the changes introduced in :pep:`701`. " "( Contributed by Marta Gómez Macías and Pablo Galindo in :gh:`102856`.) See :" @@ -1024,22 +1027,22 @@ msgid "" "to the :mod:`tokenize` module." msgstr "" -#: ../../whatsnew/3.12.rst:807 +#: ../../whatsnew/3.12.rst:809 msgid "types" msgstr "types" -#: ../../whatsnew/3.12.rst:809 +#: ../../whatsnew/3.12.rst:811 msgid "" "Add :func:`types.get_original_bases` to allow for further introspection of :" "ref:`user-defined-generics` when subclassed. (Contributed by James Hilton-" "Balfe and Alex Waygood in :gh:`101827`.)" msgstr "" -#: ../../whatsnew/3.12.rst:814 +#: ../../whatsnew/3.12.rst:816 msgid "typing" msgstr "typing" -#: ../../whatsnew/3.12.rst:816 +#: ../../whatsnew/3.12.rst:818 msgid "" ":func:`isinstance` checks against :func:`runtime-checkable protocols ` now use :func:`inspect.getattr_static` rather than :func:" @@ -1052,7 +1055,7 @@ msgid "" "affected by this change. (Contributed by Alex Waygood in :gh:`102433`.)" msgstr "" -#: ../../whatsnew/3.12.rst:827 +#: ../../whatsnew/3.12.rst:829 msgid "" "The members of a runtime-checkable protocol are now considered \"frozen\" at " "runtime as soon as the class has been created. Monkey-patching attributes " @@ -1060,13 +1063,13 @@ msgid "" "on :func:`isinstance` checks comparing objects to the protocol. For example::" msgstr "" -#: ../../whatsnew/3.12.rst:849 +#: ../../whatsnew/3.12.rst:851 msgid "" "This change was made in order to speed up ``isinstance()`` checks against " "runtime-checkable protocols." msgstr "" -#: ../../whatsnew/3.12.rst:852 +#: ../../whatsnew/3.12.rst:854 msgid "" "The performance profile of :func:`isinstance` checks against :func:`runtime-" "checkable protocols ` has changed significantly. " @@ -1077,71 +1080,71 @@ msgid "" "in :gh:`74690` and :gh:`103193`.)" msgstr "" -#: ../../whatsnew/3.12.rst:860 +#: ../../whatsnew/3.12.rst:862 msgid "" "All :data:`typing.TypedDict` and :data:`typing.NamedTuple` classes now have " "the ``__orig_bases__`` attribute. (Contributed by Adrian Garcia Badaracco " "in :gh:`103699`.)" msgstr "" -#: ../../whatsnew/3.12.rst:864 +#: ../../whatsnew/3.12.rst:866 msgid "" "Add ``frozen_default`` parameter to :func:`typing.dataclass_transform`. " "(Contributed by Erik De Bonte in :gh:`99957`.)" msgstr "" -#: ../../whatsnew/3.12.rst:868 +#: ../../whatsnew/3.12.rst:870 msgid "unicodedata" msgstr "unicodedata" -#: ../../whatsnew/3.12.rst:870 +#: ../../whatsnew/3.12.rst:872 msgid "" "The Unicode database has been updated to version 15.0.0. (Contributed by " "Benjamin Peterson in :gh:`96734`)." msgstr "" -#: ../../whatsnew/3.12.rst:874 +#: ../../whatsnew/3.12.rst:876 msgid "unittest" msgstr "unittest" -#: ../../whatsnew/3.12.rst:876 +#: ../../whatsnew/3.12.rst:878 msgid "" "Added ``--durations`` command line option, showing the N slowest test cases::" msgstr "" -#: ../../whatsnew/3.12.rst:892 +#: ../../whatsnew/3.12.rst:894 msgid "(Contributed by Giampaolo Rodola in :issue:`4080`)" msgstr "" -#: ../../whatsnew/3.12.rst:895 +#: ../../whatsnew/3.12.rst:897 msgid "uuid" msgstr "uuid" -#: ../../whatsnew/3.12.rst:897 +#: ../../whatsnew/3.12.rst:899 msgid "" "Add a :ref:`command-line interface `. (Contributed by Adam Chhina " "in :gh:`88597`.)" msgstr "" -#: ../../whatsnew/3.12.rst:902 +#: ../../whatsnew/3.12.rst:904 msgid "Optimizations" msgstr "" -#: ../../whatsnew/3.12.rst:904 +#: ../../whatsnew/3.12.rst:906 msgid "" "Removed ``wstr`` and ``wstr_length`` members from Unicode objects. It " "reduces object size by 8 or 16 bytes on 64bit platform. (:pep:`623`) " "(Contributed by Inada Naoki in :gh:`92536`.)" msgstr "" -#: ../../whatsnew/3.12.rst:908 +#: ../../whatsnew/3.12.rst:910 msgid "" "Added experimental support for using the BOLT binary optimizer in the build " "process, which improves performance by 1-5%. (Contributed by Kevin " "Modzelewski in :gh:`90536` and tuned by Dong-hee Na in :gh:`101525`)" msgstr "" -#: ../../whatsnew/3.12.rst:912 +#: ../../whatsnew/3.12.rst:914 msgid "" "Speed up the regular expression substitution (functions :func:`re.sub` and :" "func:`re.subn` and corresponding :class:`!re.Pattern` methods) for " @@ -1149,13 +1152,13 @@ msgid "" "by Serhiy Storchaka in :gh:`91524`.)" msgstr "" -#: ../../whatsnew/3.12.rst:917 +#: ../../whatsnew/3.12.rst:919 msgid "" "Speed up :class:`asyncio.Task` creation by deferring expensive string " "formatting. (Contributed by Itamar O in :gh:`103793`.)" msgstr "" -#: ../../whatsnew/3.12.rst:920 +#: ../../whatsnew/3.12.rst:922 msgid "" "The :func:`tokenize.tokenize` and :func:`tokenize.generate_tokens` functions " "are up to 64% faster as a side effect of the changes required to cover :pep:" @@ -1163,18 +1166,18 @@ msgid "" "Pablo Galindo in :gh:`102856`.)" msgstr "" -#: ../../whatsnew/3.12.rst:925 +#: ../../whatsnew/3.12.rst:927 msgid "" "Speed up :func:`super` method calls and attribute loads via the new :opcode:" "`LOAD_SUPER_ATTR` instruction. (Contributed by Carl Meyer and Vladimir " "Matveev in :gh:`103497`.)" msgstr "" -#: ../../whatsnew/3.12.rst:931 +#: ../../whatsnew/3.12.rst:933 msgid "CPython bytecode changes" msgstr "" -#: ../../whatsnew/3.12.rst:933 +#: ../../whatsnew/3.12.rst:935 msgid "" "Remove the :opcode:`LOAD_METHOD` instruction. It has been merged into :" "opcode:`LOAD_ATTR`. :opcode:`LOAD_ATTR` will now behave like the old :opcode:" @@ -1182,20 +1185,20 @@ msgid "" "by Ken Jin in :gh:`93429`.)" msgstr "" -#: ../../whatsnew/3.12.rst:938 +#: ../../whatsnew/3.12.rst:940 msgid "" "Remove the :opcode:`!JUMP_IF_FALSE_OR_POP` and :opcode:`!" "JUMP_IF_TRUE_OR_POP` instructions. (Contributed by Irit Katriel in :gh:" "`102859`.)" msgstr "" -#: ../../whatsnew/3.12.rst:941 +#: ../../whatsnew/3.12.rst:943 msgid "" "Add the :opcode:`LOAD_FAST_AND_CLEAR` instruction as part of the " "implementation of :pep:`709`. (Contributed by Carl Meyer in :gh:`101441`.)" msgstr "" -#: ../../whatsnew/3.12.rst:944 +#: ../../whatsnew/3.12.rst:946 msgid "" "Add the :opcode:`LOAD_FROM_DICT_OR_DEREF`, :opcode:" "`LOAD_FROM_DICT_OR_GLOBALS`, and :opcode:`LOAD_LOCALS` opcodes as part of " @@ -1204,136 +1207,150 @@ msgid "" "`LOAD_FROM_DICT_OR_DEREF`. (Contributed by Jelle Zijlstra in :gh:`103764`.)" msgstr "" -#: ../../whatsnew/3.12.rst:950 +#: ../../whatsnew/3.12.rst:952 msgid "" "Add the :opcode:`LOAD_SUPER_ATTR` instruction. (Contributed by Carl Meyer " "and Vladimir Matveev in :gh:`103497`.)" msgstr "" -#: ../../whatsnew/3.12.rst:954 +#: ../../whatsnew/3.12.rst:956 msgid "Demos and Tools" msgstr "" -#: ../../whatsnew/3.12.rst:956 +#: ../../whatsnew/3.12.rst:958 msgid "" "Remove the ``Tools/demo/`` directory which contained old demo scripts. A " "copy can be found in the `old-demos project `_. (Contributed by Victor Stinner in :gh:`97681`.)" msgstr "" -#: ../../whatsnew/3.12.rst:961 +#: ../../whatsnew/3.12.rst:963 msgid "" "Remove outdated example scripts of the ``Tools/scripts/`` directory. A copy " "can be found in the `old-demos project `_. (Contributed by Victor Stinner in :gh:`97669`.)" msgstr "" -#: ../../whatsnew/3.12.rst:968 ../../whatsnew/3.12.rst:1867 +#: ../../whatsnew/3.12.rst:970 ../../whatsnew/3.12.rst:1869 msgid "Deprecated" msgstr "" -#: ../../whatsnew/3.12.rst:970 +#: ../../whatsnew/3.12.rst:972 msgid "" -":class:`typing.Hashable` and :class:`typing.Sized` aliases for :class:" -"`collections.abc.Hashable` and :class:`collections.abc.Sized`. (:gh:`94309`.)" +":mod:`asyncio`: The :meth:`~asyncio.get_event_loop` method of the default " +"event loop policy now emits a :exc:`DeprecationWarning` if there is no " +"current event loop set and it decides to create one. (Contributed by Serhiy " +"Storchaka and Guido van Rossum in :gh:`100160`.)" msgstr "" -#: ../../whatsnew/3.12.rst:973 +#: ../../whatsnew/3.12.rst:977 msgid "" -"The :mod:`sqlite3` :ref:`default adapters and converters ` are now deprecated. Instead, use the :ref:`sqlite3-adapter-" -"converter-recipes` and tailor them to your needs. (Contributed by Erlend E. " -"Aasland in :gh:`90016`.)" +":mod:`calendar`: ``calendar.January`` and ``calendar.February`` constants " +"are deprecated and replaced by :data:`calendar.Month.JANUARY` and :data:" +"`calendar.Month.FEBRUARY`. (Contributed by Prince Roshan in :gh:`103636`.)" msgstr "" -#: ../../whatsnew/3.12.rst:979 +#: ../../whatsnew/3.12.rst:981 msgid "" -"In :meth:`~sqlite3.Cursor.execute`, :exc:`DeprecationWarning` is now emitted " -"when :ref:`named placeholders ` are used together with " -"parameters supplied as a :term:`sequence` instead of as a :class:`dict`. " -"Starting from Python 3.14, using named placeholders with parameters supplied " -"as a sequence will raise a :exc:`~sqlite3.ProgrammingError`. (Contributed by " -"Erlend E. Aasland in :gh:`101698`.)" +":mod:`datetime`: :class:`datetime.datetime`'s :meth:`~datetime.datetime." +"utcnow` and :meth:`~datetime.datetime.utcfromtimestamp` are deprecated and " +"will be removed in a future version. Instead, use timezone-aware objects to " +"represent datetimes in UTC: respectively, call :meth:`~datetime.datetime." +"now` and :meth:`~datetime.datetime.fromtimestamp` with the *tz* parameter " +"set to :const:`datetime.UTC`. (Contributed by Paul Ganssle in :gh:`103857`.)" msgstr "" -#: ../../whatsnew/3.12.rst:986 +#: ../../whatsnew/3.12.rst:989 msgid "" -"The 3-arg signatures (type, value, traceback) of :meth:`~coroutine.throw`, :" -"meth:`~generator.throw` and :meth:`~agen.athrow` are deprecated and may be " -"removed in a future version of Python. Use the single-arg versions of these " -"functions instead. (Contributed by Ofey Chan in :gh:`89874`.)" +":mod:`os`: The ``st_ctime`` fields return by :func:`os.stat` and :func:`os." +"lstat` on Windows are deprecated. In a future release, they will contain the " +"last metadata change time, consistent with other platforms. For now, they " +"still contain the creation time, which is also available in the new " +"``st_birthtime`` field. (Contributed by Steve Dower in :gh:`99726`.)" msgstr "" -#: ../../whatsnew/3.12.rst:991 +#: ../../whatsnew/3.12.rst:995 msgid "" -":exc:`DeprecationWarning` is now raised when ``__package__`` on a module " -"differs from ``__spec__.parent`` (previously it was :exc:`ImportWarning`). " -"(Contributed by Brett Cannon in :gh:`65961`.)" +":mod:`shutil`: The *onerror* argument of :func:`shutil.rmtree` is deprecated " +"as will be removed in Python 3.14. Use *onexc* instead. (Contributed by Irit " +"Katriel in :gh:`102828`.)" msgstr "" -#: ../../whatsnew/3.12.rst:996 -msgid "" -"The :meth:`~asyncio.get_event_loop` method of the default event loop policy " -"now emits a :exc:`DeprecationWarning` if there is no current event loop set " -"and it decides to create one. (Contributed by Serhiy Storchaka and Guido van " -"Rossum in :gh:`100160`.)" +#: ../../whatsnew/3.12.rst:1010 +msgid ":mod:`sqlite3`:" msgstr "" -#: ../../whatsnew/3.12.rst:1001 +#: ../../whatsnew/3.12.rst:999 msgid "" -"The :mod:`xml.etree.ElementTree` module now emits :exc:`DeprecationWarning` " -"when testing the truth value of an :class:`xml.etree.ElementTree.Element`. " -"Before, the Python implementation emitted :exc:`FutureWarning`, and the C " -"implementation emitted nothing." +":ref:`default adapters and converters ` are now " +"deprecated. Instead, use the :ref:`sqlite3-adapter-converter-recipes` and " +"tailor them to your needs. (Contributed by Erlend E. Aasland in :gh:`90016`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1006 +#: ../../whatsnew/3.12.rst:1005 msgid "" -"In accordance with :pep:`699`, the ``ma_version_tag`` field in :c:type:" -"`PyDictObject` is deprecated for extension modules. Accessing this field " -"will generate a compiler warning at compile time. This field will be removed " -"in Python 3.14. (Contributed by Ramvikrams and Kumar Aditya in :gh:`101193`. " -"PEP by Ken Jin.)" +"In :meth:`~sqlite3.Cursor.execute`, :exc:`DeprecationWarning` is now emitted " +"when :ref:`named placeholders ` are used together with " +"parameters supplied as a :term:`sequence` instead of as a :class:`dict`. " +"Starting from Python 3.14, using named placeholders with parameters supplied " +"as a sequence will raise a :exc:`~sqlite3.ProgrammingError`. (Contributed by " +"Erlend E. Aasland in :gh:`101698`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1011 +#: ../../whatsnew/3.12.rst:1012 msgid "" -"The ``st_ctime`` fields return by :func:`os.stat` and :func:`os.lstat` on " -"Windows are deprecated. In a future release, they will contain the last " -"metadata change time, consistent with other platforms. For now, they still " -"contain the creation time, which is also available in the new " -"``st_birthtime`` field. (Contributed by Steve Dower in :gh:`99726`.)" +":mod:`sys`: The :data:`sys.last_type`, :data:`sys.last_value` and :data:`sys." +"last_traceback` fields are deprecated. Use :data:`sys.last_exc` instead. " +"(Contributed by Irit Katriel in :gh:`102778`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1017 +#: ../../whatsnew/3.12.rst:1016 msgid "" -"The :data:`sys.last_type`, :data:`sys.last_value` and :data:`sys." -"last_traceback` fields are deprecated. Use :data:`sys.last_exc` instead. " -"(Contributed by Irit Katriel in :gh:`102778`.)" +":mod:`tarfile`: Extracting tar archives without specifying *filter* is " +"deprecated until Python 3.14, when ``'data'`` filter will become the " +"default. See :ref:`tarfile-extraction-filter` for details." msgstr "" -#: ../../whatsnew/3.12.rst:1021 +#: ../../whatsnew/3.12.rst:1020 msgid "" -"The *onerror* argument of :func:`shutil.rmtree` is deprecated as will be " -"removed in Python 3.14. Use *onexc* instead. (Contributed by Irit Katriel " -"in :gh:`102828`.)" +":mod:`typing`: :class:`typing.Hashable` and :class:`typing.Sized` aliases " +"for :class:`collections.abc.Hashable` and :class:`collections.abc.Sized`. (:" +"gh:`94309`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1024 +#: ../../whatsnew/3.12.rst:1023 msgid "" -"Extracting tar archives without specifying *filter* is deprecated until " -"Python 3.14, when ``'data'`` filter will become the default. See :ref:" -"`tarfile-extraction-filter` for details." +":mod:`xml.etree.ElementTree`: The module now emits :exc:`DeprecationWarning` " +"when testing the truth value of an :class:`xml.etree.ElementTree.Element`. " +"Before, the Python implementation emitted :exc:`FutureWarning`, and the C " +"implementation emitted nothing." msgstr "" #: ../../whatsnew/3.12.rst:1028 msgid "" -"``calendar.January`` and ``calendar.February`` constants are deprecated and " -"replaced by :data:`calendar.Month.JANUARY` and :data:`calendar.Month." -"FEBRUARY`. (Contributed by Prince Roshan in :gh:`103636`.)" +"The 3-arg signatures (type, value, traceback) of :meth:`~coroutine.throw`, :" +"meth:`~generator.throw` and :meth:`~agen.athrow` are deprecated and may be " +"removed in a future version of Python. Use the single-arg versions of these " +"functions instead. (Contributed by Ofey Chan in :gh:`89874`.)" +msgstr "" + +#: ../../whatsnew/3.12.rst:1033 +msgid "" +":exc:`DeprecationWarning` is now raised when ``__package__`` on a module " +"differs from ``__spec__.parent`` (previously it was :exc:`ImportWarning`). " +"(Contributed by Brett Cannon in :gh:`65961`.)" +msgstr "" + +#: ../../whatsnew/3.12.rst:1038 +msgid "" +"In accordance with :pep:`699`, the ``ma_version_tag`` field in :c:type:" +"`PyDictObject` is deprecated for extension modules. Accessing this field " +"will generate a compiler warning at compile time. This field will be removed " +"in Python 3.14. (Contributed by Ramvikrams and Kumar Aditya in :gh:`101193`. " +"PEP by Ken Jin.)" msgstr "" -#: ../../whatsnew/3.12.rst:1032 +#: ../../whatsnew/3.12.rst:1043 msgid "" "The bitwise inversion operator (``~``) on bool is deprecated. It will throw " "an error in Python 3.14. Use ``not`` for logical negation of bools instead. " @@ -1342,249 +1359,294 @@ msgid "" "by Tim Hoffmann in :gh:`103487`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1038 -msgid "" -":class:`datetime.datetime`'s :meth:`~datetime.datetime.utcnow` and :meth:" -"`~datetime.datetime.utcfromtimestamp` are deprecated and will be removed in " -"a future version. Instead, use timezone-aware objects to represent datetimes " -"in UTC: respectively, call :meth:`~datetime.datetime.now` and :meth:" -"`~datetime.datetime.fromtimestamp` with the *tz* parameter set to :const:" -"`datetime.UTC`. (Contributed by Paul Ganssle in :gh:`103857`.)" -msgstr "" - -#: ../../whatsnew/3.12.rst:1049 +#: ../../whatsnew/3.12.rst:1050 msgid "Pending Removal in Python 3.13" msgstr "" -#: ../../whatsnew/3.12.rst:1051 +#: ../../whatsnew/3.12.rst:1052 msgid "" "The following modules and APIs have been deprecated in earlier Python " "releases, and will be removed in Python 3.13." msgstr "" -#: ../../whatsnew/3.12.rst:1054 +#: ../../whatsnew/3.12.rst:1055 msgid "Modules (see :pep:`594`):" msgstr "" -#: ../../whatsnew/3.12.rst:1056 +#: ../../whatsnew/3.12.rst:1057 msgid ":mod:`aifc`" msgstr ":mod:`aifc`" -#: ../../whatsnew/3.12.rst:1057 +#: ../../whatsnew/3.12.rst:1058 msgid ":mod:`audioop`" msgstr ":mod:`audioop`" -#: ../../whatsnew/3.12.rst:1058 +#: ../../whatsnew/3.12.rst:1059 msgid ":mod:`cgi`" msgstr ":mod:`cgi`" -#: ../../whatsnew/3.12.rst:1059 +#: ../../whatsnew/3.12.rst:1060 msgid ":mod:`cgitb`" msgstr ":mod:`cgitb`" -#: ../../whatsnew/3.12.rst:1060 +#: ../../whatsnew/3.12.rst:1061 msgid ":mod:`chunk`" msgstr ":mod:`chunk`" -#: ../../whatsnew/3.12.rst:1061 +#: ../../whatsnew/3.12.rst:1062 msgid ":mod:`crypt`" msgstr ":mod:`crypt`" -#: ../../whatsnew/3.12.rst:1062 +#: ../../whatsnew/3.12.rst:1063 msgid ":mod:`imghdr`" msgstr ":mod:`imghdr`" -#: ../../whatsnew/3.12.rst:1063 +#: ../../whatsnew/3.12.rst:1064 msgid ":mod:`mailcap`" msgstr ":mod:`mailcap`" -#: ../../whatsnew/3.12.rst:1064 +#: ../../whatsnew/3.12.rst:1065 msgid ":mod:`msilib`" msgstr ":mod:`msilib`" -#: ../../whatsnew/3.12.rst:1065 +#: ../../whatsnew/3.12.rst:1066 msgid ":mod:`nis`" msgstr ":mod:`nis`" -#: ../../whatsnew/3.12.rst:1066 +#: ../../whatsnew/3.12.rst:1067 msgid ":mod:`nntplib`" msgstr ":mod:`nntplib`" -#: ../../whatsnew/3.12.rst:1067 +#: ../../whatsnew/3.12.rst:1068 msgid ":mod:`ossaudiodev`" msgstr ":mod:`ossaudiodev`" -#: ../../whatsnew/3.12.rst:1068 +#: ../../whatsnew/3.12.rst:1069 msgid ":mod:`pipes`" msgstr ":mod:`pipes`" -#: ../../whatsnew/3.12.rst:1069 +#: ../../whatsnew/3.12.rst:1070 msgid ":mod:`sndhdr`" msgstr ":mod:`sndhdr`" -#: ../../whatsnew/3.12.rst:1070 +#: ../../whatsnew/3.12.rst:1071 msgid ":mod:`spwd`" msgstr ":mod:`spwd`" -#: ../../whatsnew/3.12.rst:1071 +#: ../../whatsnew/3.12.rst:1072 msgid ":mod:`sunau`" msgstr ":mod:`sunau`" -#: ../../whatsnew/3.12.rst:1072 +#: ../../whatsnew/3.12.rst:1073 msgid ":mod:`telnetlib`" msgstr ":mod:`telnetlib`" -#: ../../whatsnew/3.12.rst:1073 +#: ../../whatsnew/3.12.rst:1074 msgid ":mod:`uu`" msgstr ":mod:`uu`" -#: ../../whatsnew/3.12.rst:1074 +#: ../../whatsnew/3.12.rst:1075 msgid ":mod:`xdrlib`" msgstr ":mod:`xdrlib`" -#: ../../whatsnew/3.12.rst:1076 +#: ../../whatsnew/3.12.rst:1077 msgid "APIs:" msgstr "" -#: ../../whatsnew/3.12.rst:1078 +#: ../../whatsnew/3.12.rst:1079 msgid ":class:`!configparser.LegacyInterpolation` (:gh:`90765`)" msgstr ":class:`!configparser.LegacyInterpolation` (:gh:`90765`)" -#: ../../whatsnew/3.12.rst:1079 +#: ../../whatsnew/3.12.rst:1080 msgid ":func:`locale.getdefaultlocale` (:gh:`90817`)" msgstr ":func:`locale.getdefaultlocale` (:gh:`90817`)" -#: ../../whatsnew/3.12.rst:1080 +#: ../../whatsnew/3.12.rst:1081 msgid ":meth:`!turtle.RawTurtle.settiltangle` (:gh:`50096`)" msgstr ":meth:`!turtle.RawTurtle.settiltangle` (:gh:`50096`)" -#: ../../whatsnew/3.12.rst:1081 +#: ../../whatsnew/3.12.rst:1082 msgid ":func:`!unittest.findTestCases` (:gh:`50096`)" msgstr ":func:`!unittest.findTestCases` (:gh:`50096`)" -#: ../../whatsnew/3.12.rst:1082 +#: ../../whatsnew/3.12.rst:1083 msgid ":func:`!unittest.getTestCaseNames` (:gh:`50096`)" msgstr ":func:`!unittest.getTestCaseNames` (:gh:`50096`)" -#: ../../whatsnew/3.12.rst:1083 +#: ../../whatsnew/3.12.rst:1084 msgid ":func:`!unittest.makeSuite` (:gh:`50096`)" msgstr ":func:`!unittest.makeSuite` (:gh:`50096`)" -#: ../../whatsnew/3.12.rst:1084 +#: ../../whatsnew/3.12.rst:1085 msgid ":meth:`!unittest.TestProgram.usageExit` (:gh:`67048`)" msgstr ":meth:`!unittest.TestProgram.usageExit` (:gh:`67048`)" -#: ../../whatsnew/3.12.rst:1085 +#: ../../whatsnew/3.12.rst:1086 msgid ":class:`!webbrowser.MacOSX` (:gh:`86421`)" msgstr ":class:`!webbrowser.MacOSX` (:gh:`86421`)" -#: ../../whatsnew/3.12.rst:1086 +#: ../../whatsnew/3.12.rst:1087 msgid ":class:`classmethod` descriptor chaining (:gh:`89519`)" msgstr "" -#: ../../whatsnew/3.12.rst:1089 +#: ../../whatsnew/3.12.rst:1090 msgid "Pending Removal in Python 3.14" msgstr "" -#: ../../whatsnew/3.12.rst:1091 +#: ../../whatsnew/3.12.rst:1092 +msgid "" +":mod:`argparse`: The *type*, *choices*, and *metavar* parameters of :class:`!" +"argparse.BooleanOptionalAction` are deprecated and will be removed in 3.14. " +"(Contributed by Nikita Sobolev in :gh:`92248`.)" +msgstr "" + +#: ../../whatsnew/3.12.rst:1097 +msgid "" +":mod:`ast`: The following :mod:`ast` features have been deprecated in " +"documentation since Python 3.8, now cause a :exc:`DeprecationWarning` to be " +"emitted at runtime when they are accessed or used, and will be removed in " +"Python 3.14:" +msgstr "" + +#: ../../whatsnew/3.12.rst:1101 +msgid ":class:`!ast.Num`" +msgstr ":class:`!ast.Num`" + +#: ../../whatsnew/3.12.rst:1102 +msgid ":class:`!ast.Str`" +msgstr ":class:`!ast.Str`" + +#: ../../whatsnew/3.12.rst:1103 +msgid ":class:`!ast.Bytes`" +msgstr ":class:`!ast.Bytes`" + +#: ../../whatsnew/3.12.rst:1104 +msgid ":class:`!ast.NameConstant`" +msgstr ":class:`!ast.NameConstant`" + +#: ../../whatsnew/3.12.rst:1105 +msgid ":class:`!ast.Ellipsis`" +msgstr ":class:`!ast.Ellipsis`" + +#: ../../whatsnew/3.12.rst:1107 +msgid "" +"Use :class:`ast.Constant` instead. (Contributed by Serhiy Storchaka in :gh:" +"`90953`.)" +msgstr "" + +#: ../../whatsnew/3.12.rst:1110 +msgid "" +":mod:`collections.abc`: Deprecated :class:`collections.abc.ByteString`. " +"Prefer :class:`Sequence` or :class:`collections.abc.Buffer`. For use in " +"typing, prefer a union, like ``bytes | bytearray``, or :class:`collections." +"abc.Buffer`. (Contributed by Shantanu Jain in :gh:`91896`.)" +msgstr "" + +#: ../../whatsnew/3.12.rst:1115 +msgid "" +":mod:`email`: Deprecated the *isdst* parameter in :func:`email.utils." +"localtime`. (Contributed by Alan Williams in :gh:`72346`.)" +msgstr "" + +#: ../../whatsnew/3.12.rst:1118 msgid "" -"Deprecated the following :mod:`importlib.abc` classes, scheduled for removal " -"in Python 3.14:" +":mod:`importlib.abc`: Deprecated the following classes, scheduled for " +"removal in Python 3.14:" msgstr "" -#: ../../whatsnew/3.12.rst:1094 +#: ../../whatsnew/3.12.rst:1121 msgid ":class:`!importlib.abc.ResourceReader`" msgstr ":class:`!importlib.abc.ResourceReader`" -#: ../../whatsnew/3.12.rst:1095 +#: ../../whatsnew/3.12.rst:1122 msgid ":class:`!importlib.abc.Traversable`" msgstr ":class:`!importlib.abc.Traversable`" -#: ../../whatsnew/3.12.rst:1096 +#: ../../whatsnew/3.12.rst:1123 msgid ":class:`!importlib.abc.TraversableResources`" msgstr ":class:`!importlib.abc.TraversableResources`" -#: ../../whatsnew/3.12.rst:1098 +#: ../../whatsnew/3.12.rst:1125 msgid "Use :mod:`importlib.resources.abc` classes instead:" msgstr "" -#: ../../whatsnew/3.12.rst:1100 +#: ../../whatsnew/3.12.rst:1127 msgid ":class:`importlib.resources.abc.Traversable`" msgstr ":class:`importlib.resources.abc.Traversable`" -#: ../../whatsnew/3.12.rst:1101 +#: ../../whatsnew/3.12.rst:1128 msgid ":class:`importlib.resources.abc.TraversableResources`" msgstr ":class:`importlib.resources.abc.TraversableResources`" -#: ../../whatsnew/3.12.rst:1103 +#: ../../whatsnew/3.12.rst:1130 msgid "(Contributed by Jason R. Coombs and Hugo van Kemenade in :gh:`93963`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1105 +#: ../../whatsnew/3.12.rst:1132 msgid "" -"Deprecated :class:`collections.abc.ByteString`. Prefer :class:`Sequence` or :" -"class:`collections.abc.Buffer`. For use in typing, prefer a union, like " -"``bytes | bytearray``, or :class:`collections.abc.Buffer`. (Contributed by " -"Shantanu Jain in :gh:`91896`.)" +":mod:`itertools`: The module had undocumented, inefficient, historically " +"buggy, and inconsistent support for copy, deepcopy, and pickle operations. " +"This will be removed in 3.14 for a significant reduction in code volume and " +"maintenance burden. (Contributed by Raymond Hettinger in :gh:`101588`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1110 +#: ../../whatsnew/3.12.rst:1138 msgid "" -":class:`typing.ByteString`, deprecated since Python 3.9, now causes a :exc:" -"`DeprecationWarning` to be emitted when it is used." +":mod:`multiprocessing`: The default :mod:`multiprocessing` start method will " +"change to a safer one on Linux, BSDs, and other non-macOS POSIX platforms " +"where ``'fork'`` is currently the default (:gh:`84559`). Adding a runtime " +"warning about this was deemed too disruptive as the majority of code is not " +"expected to care. Use the :func:`~multiprocessing.get_context` or :func:" +"`~multiprocessing.set_start_method` APIs to explicitly specify when your " +"code *requires* ``'fork'``. See :ref:`multiprocessing-start-methods`." msgstr "" -#: ../../whatsnew/3.12.rst:1113 +#: ../../whatsnew/3.12.rst:1146 msgid "" -"Creating immutable types (:c:macro:`Py_TPFLAGS_IMMUTABLETYPE`) with mutable " -"bases using the C API." +":mod:`pkgutil`: :func:`pkgutil.find_loader` and :func:`pkgutil.get_loader` " +"now raise :exc:`DeprecationWarning`; use :func:`importlib.util.find_spec` " +"instead. (Contributed by Nikita Sobolev in :gh:`97850`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1116 +#: ../../whatsnew/3.12.rst:1151 msgid "" -"Deprecated the *isdst* parameter in :func:`email.utils.localtime`. " -"(Contributed by Alan Williams in :gh:`72346`.)" +":mod:`pty`: The module has two undocumented ``master_open()`` and " +"``slave_open()`` functions that have been deprecated since Python 2 but only " +"gained a proper :exc:`DeprecationWarning` in 3.12. Remove them in 3.14." msgstr "" -#: ../../whatsnew/3.12.rst:1119 +#: ../../whatsnew/3.12.rst:1155 msgid "" -"``__package__`` and ``__cached__`` will cease to be set or taken into " -"consideration by the import system (:gh:`97879`)." +":mod:`shutil`: The *onerror* argument of :func:`shutil.rmtree` is deprecated " +"in 3.12, and will be removed in 3.14." msgstr "" -#: ../../whatsnew/3.12.rst:1122 +#: ../../whatsnew/3.12.rst:1158 msgid "" -"Testing the truth value of an :class:`xml.etree.ElementTree.Element` is " -"deprecated and will raise an exception in Python 3.14." +":mod:`typing`: :class:`typing.ByteString`, deprecated since Python 3.9, now " +"causes a :exc:`DeprecationWarning` to be emitted when it is used." msgstr "" -#: ../../whatsnew/3.12.rst:1125 +#: ../../whatsnew/3.12.rst:1161 msgid "" -"The default :mod:`multiprocessing` start method will change to a safer one " -"on Linux, BSDs, and other non-macOS POSIX platforms where ``'fork'`` is " -"currently the default (:gh:`84559`). Adding a runtime warning about this was " -"deemed too disruptive as the majority of code is not expected to care. Use " -"the :func:`~multiprocessing.get_context` or :func:`~multiprocessing." -"set_start_method` APIs to explicitly specify when your code *requires* " -"``'fork'``. See :ref:`multiprocessing-start-methods`." +":mod:`xml.etree.ElementTree`: Testing the truth value of an :class:`xml." +"etree.ElementTree.Element` is deprecated and will raise an exception in " +"Python 3.14." msgstr "" -#: ../../whatsnew/3.12.rst:1133 +#: ../../whatsnew/3.12.rst:1164 msgid "" -":mod:`pty` has two undocumented ``master_open()`` and ``slave_open()`` " -"functions that have been deprecated since Python 2 but only gained a proper :" -"exc:`DeprecationWarning` in 3.12. Remove them in 3.14." +"Creating immutable types (:c:macro:`Py_TPFLAGS_IMMUTABLETYPE`) with mutable " +"bases using the C API." msgstr "" -#: ../../whatsnew/3.12.rst:1137 +#: ../../whatsnew/3.12.rst:1167 msgid "" -":mod:`itertools` had undocumented, inefficient, historically buggy, and " -"inconsistent support for copy, deepcopy, and pickle operations. This will be " -"removed in 3.14 for a significant reduction in code volume and maintenance " -"burden. (Contributed by Raymond Hettinger in :gh:`101588`.)" +"``__package__`` and ``__cached__`` will cease to be set or taken into " +"consideration by the import system (:gh:`97879`)." msgstr "" -#: ../../whatsnew/3.12.rst:1143 +#: ../../whatsnew/3.12.rst:1170 msgid "" "Accessing ``co_lnotab`` was deprecated in :pep:`626` since 3.10 and was " "planned to be removed in 3.12 but it only got a proper :exc:" @@ -1592,74 +1654,21 @@ msgid "" "Sobolev in :gh:`101866`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1149 -msgid "" -"The *onerror* argument of :func:`shutil.rmtree` is deprecated in 3.12, and " -"will be removed in 3.14." -msgstr "" - -#: ../../whatsnew/3.12.rst:1152 -msgid "" -"The *type*, *choices*, and *metavar* parameters of :class:`!argparse." -"BooleanOptionalAction` are deprecated and will be removed in 3.14. " -"(Contributed by Nikita Sobolev in :gh:`92248`.)" -msgstr "" - -#: ../../whatsnew/3.12.rst:1157 -msgid "" -":func:`pkgutil.find_loader` and :func:`pkgutil.get_loader` now raise :exc:" -"`DeprecationWarning`; use :func:`importlib.util.find_spec` instead. " -"(Contributed by Nikita Sobolev in :gh:`97850`.)" -msgstr "" - -#: ../../whatsnew/3.12.rst:1162 -msgid "" -"The following :mod:`ast` features have been deprecated in documentation " -"since Python 3.8, now cause a :exc:`DeprecationWarning` to be emitted at " -"runtime when they are accessed or used, and will be removed in Python 3.14:" -msgstr "" - -#: ../../whatsnew/3.12.rst:1166 -msgid ":class:`!ast.Num`" -msgstr ":class:`!ast.Num`" - -#: ../../whatsnew/3.12.rst:1167 -msgid ":class:`!ast.Str`" -msgstr ":class:`!ast.Str`" - -#: ../../whatsnew/3.12.rst:1168 -msgid ":class:`!ast.Bytes`" -msgstr ":class:`!ast.Bytes`" - -#: ../../whatsnew/3.12.rst:1169 -msgid ":class:`!ast.NameConstant`" -msgstr ":class:`!ast.NameConstant`" - -#: ../../whatsnew/3.12.rst:1170 -msgid ":class:`!ast.Ellipsis`" -msgstr ":class:`!ast.Ellipsis`" - -#: ../../whatsnew/3.12.rst:1172 -msgid "" -"Use :class:`ast.Constant` instead. (Contributed by Serhiy Storchaka in :gh:" -"`90953`.)" -msgstr "" - -#: ../../whatsnew/3.12.rst:1176 +#: ../../whatsnew/3.12.rst:1177 msgid "Pending Removal in Future Versions" msgstr "" -#: ../../whatsnew/3.12.rst:1178 +#: ../../whatsnew/3.12.rst:1179 msgid "" "The following APIs were deprecated in earlier Python versions and will be " "removed, although there is currently no date scheduled for their removal." msgstr "" -#: ../../whatsnew/3.12.rst:1181 +#: ../../whatsnew/3.12.rst:1182 msgid ":class:`typing.Text` (:gh:`92332`)" msgstr ":class:`typing.Text` (:gh:`92332`)" -#: ../../whatsnew/3.12.rst:1183 +#: ../../whatsnew/3.12.rst:1184 msgid "" "Currently Python accepts numeric literals immediately followed by keywords, " "for example ``0in x``, ``1or x``, ``0if 1else 2``. It allows confusing and " @@ -1671,26 +1680,57 @@ msgid "" "syntax error. (:gh:`87999`)" msgstr "" -#: ../../whatsnew/3.12.rst:1194 ../../whatsnew/3.12.rst:1949 +#: ../../whatsnew/3.12.rst:1195 ../../whatsnew/3.12.rst:1951 msgid "Removed" msgstr "" -#: ../../whatsnew/3.12.rst:1196 +#: ../../whatsnew/3.12.rst:1197 +msgid "" +"``asynchat`` and ``asyncore``: These two modules have been removed according " +"to the schedule in :pep:`594`, having been deprecated in Python 3.6. Use :" +"mod:`asyncio` instead. (Contributed by Nikita Sobolev in :gh:`96580`.)" +msgstr "" + +#: ../../whatsnew/3.12.rst:1203 +msgid "" +":mod:`configparser`: Several names deprecated in the :mod:`configparser` way " +"back in 3.2 have been removed per :gh:`89336`:" +msgstr "" + +#: ../../whatsnew/3.12.rst:1206 +msgid "" +":class:`configparser.ParsingError` no longer has a ``filename`` attribute or " +"argument. Use the ``source`` attribute and argument instead." +msgstr "" + +#: ../../whatsnew/3.12.rst:1208 +msgid "" +":mod:`configparser` no longer has a ``SafeConfigParser`` class. Use the " +"shorter :class:`~configparser.ConfigParser` name instead." +msgstr "" + +#: ../../whatsnew/3.12.rst:1210 msgid "" -"Remove the ``distutils`` package. It was deprecated in Python 3.10 by :pep:" -"`632` \"Deprecate distutils module\". For projects still using ``distutils`` " -"and cannot be updated to something else, the ``setuptools`` project can be " -"installed: it still provides ``distutils``. (Contributed by Victor Stinner " -"in :gh:`92584`.)" +":class:`configparser.ConfigParser` no longer has a ``readfp`` method. Use :" +"meth:`~configparser.ConfigParser.read_file` instead." msgstr "" -#: ../../whatsnew/3.12.rst:1202 +#: ../../whatsnew/3.12.rst:1213 msgid "" -"Remove the bundled setuptools wheel from :mod:`ensurepip`, and stop " -"installing setuptools in environments created by :mod:`venv`." +"``distutils``: Remove the ``distutils`` package. It was deprecated in Python " +"3.10 by :pep:`632` \"Deprecate distutils module\". For projects still using " +"``distutils`` and cannot be updated to something else, the ``setuptools`` " +"project can be installed: it still provides ``distutils``. (Contributed by " +"Victor Stinner in :gh:`92584`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1205 +#: ../../whatsnew/3.12.rst:1219 +msgid "" +":mod:`ensurepip`: Remove the bundled setuptools wheel from :mod:`ensurepip`, " +"and stop installing setuptools in environments created by :mod:`venv`." +msgstr "" + +#: ../../whatsnew/3.12.rst:1222 msgid "" "``pip (>= 22.1)`` does not require setuptools to be installed in the " "environment. ``setuptools``-based (and ``distutils``-based) packages can " @@ -1698,7 +1738,7 @@ msgid "" "the build environment it uses for building a package." msgstr "" -#: ../../whatsnew/3.12.rst:1211 +#: ../../whatsnew/3.12.rst:1228 msgid "" "``easy_install``, ``pkg_resources``, ``setuptools`` and ``distutils`` are no " "longer provided by default in environments created with ``venv`` or " @@ -1708,222 +1748,250 @@ msgid "" "(typically, using pip)." msgstr "" -#: ../../whatsnew/3.12.rst:1218 +#: ../../whatsnew/3.12.rst:1235 msgid "(Contributed by Pradyun Gedam in :gh:`95299`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1220 -msgid "Removed many old deprecated :mod:`unittest` features:" +#: ../../whatsnew/3.12.rst:1237 +msgid "" +":mod:`ftplib`: Remove the ``FTP_TLS.ssl_version`` class attribute: use the " +"*context* parameter instead. (Contributed by Victor Stinner in :gh:`94172`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1222 -msgid "A number of :class:`~unittest.TestCase` method aliases:" +#: ../../whatsnew/3.12.rst:1241 +msgid "" +":mod:`gzip`: Remove the ``filename`` attribute of :class:`gzip.GzipFile`, " +"deprecated since Python 2.6, use the :attr:`~gzip.GzipFile.name` attribute " +"instead. In write mode, the ``filename`` attribute added ``'.gz'`` file " +"extension if it was not present. (Contributed by Victor Stinner in :gh:" +"`94196`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1225 -msgid "Deprecated alias" +#: ../../whatsnew/3.12.rst:1247 +msgid "" +":mod:`hashlib`: Remove the pure Python implementation of :func:`hashlib." +"pbkdf2_hmac()`, deprecated in Python 3.10. Python 3.10 and newer requires " +"OpenSSL 1.1.1 (:pep:`644`): this OpenSSL version provides a C implementation " +"of :func:`~hashlib.pbkdf2_hmac()` which is faster. (Contributed by Victor " +"Stinner in :gh:`94199`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1225 -msgid "Method Name" +#: ../../whatsnew/3.12.rst:1253 +msgid "" +":mod:`importlib`: Many previously deprecated cleanups in :mod:`importlib` " +"have now been completed:" msgstr "" -#: ../../whatsnew/3.12.rst:1225 -msgid "Deprecated in" +#: ../../whatsnew/3.12.rst:1256 +msgid "" +"References to, and support for :meth:`!module_repr()` has been removed. " +"(Contributed by Barry Warsaw in :gh:`97850`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1227 -msgid "``failUnless``" -msgstr "``failUnless``" - -#: ../../whatsnew/3.12.rst:1227 ../../whatsnew/3.12.rst:1234 -msgid ":meth:`.assertTrue`" -msgstr ":meth:`.assertTrue`" +#: ../../whatsnew/3.12.rst:1259 +msgid "" +"``importlib.util.set_package`` has been removed. (Contributed by Brett " +"Cannon in :gh:`65961`.)" +msgstr "" -#: ../../whatsnew/3.12.rst:1227 ../../whatsnew/3.12.rst:1228 -#: ../../whatsnew/3.12.rst:1229 ../../whatsnew/3.12.rst:1230 -#: ../../whatsnew/3.12.rst:1231 ../../whatsnew/3.12.rst:1232 -#: ../../whatsnew/3.12.rst:1233 -msgid "3.1" -msgstr "3.1" +#: ../../whatsnew/3.12.rst:1262 +msgid "" +"Support for ``find_loader()`` and ``find_module()`` APIs have been removed. " +"(Contributed by Barry Warsaw in :gh:`98040`.)" +msgstr "" -#: ../../whatsnew/3.12.rst:1228 -msgid "``failIf``" -msgstr "``failIf``" +#: ../../whatsnew/3.12.rst:1265 +msgid "" +"``importlib.abc.Finder``, ``pkgutil.ImpImporter``, and ``pkgutil.ImpLoader`` " +"have been removed. (Contributed by Barry Warsaw in :gh:`98040`.)" +msgstr "" -#: ../../whatsnew/3.12.rst:1228 -msgid ":meth:`.assertFalse`" -msgstr ":meth:`.assertFalse`" +#: ../../whatsnew/3.12.rst:1268 +msgid "" +"The :mod:`!imp` module has been removed. (Contributed by Barry Warsaw in :" +"gh:`98040`.)" +msgstr "" -#: ../../whatsnew/3.12.rst:1229 -msgid "``failUnlessEqual``" -msgstr "``failUnlessEqual``" +#: ../../whatsnew/3.12.rst:1271 +msgid "Replace removed :mod:`!imp` functions with :mod:`importlib` functions:" +msgstr "" -#: ../../whatsnew/3.12.rst:1229 ../../whatsnew/3.12.rst:1235 -msgid ":meth:`.assertEqual`" -msgstr ":meth:`.assertEqual`" +#: ../../whatsnew/3.12.rst:1274 +msgid "imp" +msgstr "imp" -#: ../../whatsnew/3.12.rst:1230 -msgid "``failIfEqual``" -msgstr "``failIfEqual``" +#: ../../whatsnew/3.12.rst:1274 +msgid "importlib" +msgstr "importlib" -#: ../../whatsnew/3.12.rst:1230 ../../whatsnew/3.12.rst:1236 -msgid ":meth:`.assertNotEqual`" -msgstr ":meth:`.assertNotEqual`" +#: ../../whatsnew/3.12.rst:1276 +msgid "``imp.NullImporter``" +msgstr "``imp.NullImporter``" -#: ../../whatsnew/3.12.rst:1231 -msgid "``failUnlessAlmostEqual``" -msgstr "``failUnlessAlmostEqual``" +#: ../../whatsnew/3.12.rst:1276 +msgid "Insert ``None`` into ``sys.path_importer_cache``" +msgstr "" -#: ../../whatsnew/3.12.rst:1231 ../../whatsnew/3.12.rst:1237 -msgid ":meth:`.assertAlmostEqual`" -msgstr ":meth:`.assertAlmostEqual`" +#: ../../whatsnew/3.12.rst:1277 +msgid "``imp.cache_from_source()``" +msgstr "``imp.cache_from_source()``" -#: ../../whatsnew/3.12.rst:1232 -msgid "``failIfAlmostEqual``" -msgstr "``failIfAlmostEqual``" +#: ../../whatsnew/3.12.rst:1277 +msgid ":func:`importlib.util.cache_from_source`" +msgstr ":func:`importlib.util.cache_from_source`" -#: ../../whatsnew/3.12.rst:1232 ../../whatsnew/3.12.rst:1238 -msgid ":meth:`.assertNotAlmostEqual`" -msgstr ":meth:`.assertNotAlmostEqual`" +#: ../../whatsnew/3.12.rst:1278 +msgid "``imp.find_module()``" +msgstr "``imp.find_module()``" -#: ../../whatsnew/3.12.rst:1233 -msgid "``failUnlessRaises``" -msgstr "``failUnlessRaises``" +#: ../../whatsnew/3.12.rst:1278 +msgid ":func:`importlib.util.find_spec`" +msgstr ":func:`importlib.util.find_spec`" -#: ../../whatsnew/3.12.rst:1233 -msgid ":meth:`.assertRaises`" -msgstr ":meth:`.assertRaises`" +#: ../../whatsnew/3.12.rst:1279 +msgid "``imp.get_magic()``" +msgstr "``imp.get_magic()``" -#: ../../whatsnew/3.12.rst:1234 -msgid "``assert_``" -msgstr "``assert_``" +#: ../../whatsnew/3.12.rst:1279 +msgid ":attr:`importlib.util.MAGIC_NUMBER`" +msgstr ":attr:`importlib.util.MAGIC_NUMBER`" -#: ../../whatsnew/3.12.rst:1234 ../../whatsnew/3.12.rst:1235 -#: ../../whatsnew/3.12.rst:1236 ../../whatsnew/3.12.rst:1237 -#: ../../whatsnew/3.12.rst:1238 ../../whatsnew/3.12.rst:1239 -#: ../../whatsnew/3.12.rst:1240 -msgid "3.2" -msgstr "3.2" +#: ../../whatsnew/3.12.rst:1280 +msgid "``imp.get_suffixes()``" +msgstr "``imp.get_suffixes()``" -#: ../../whatsnew/3.12.rst:1235 -msgid "``assertEquals``" -msgstr "``assertEquals``" +#: ../../whatsnew/3.12.rst:1280 +msgid "" +":attr:`importlib.machinery.SOURCE_SUFFIXES`, :attr:`importlib.machinery." +"EXTENSION_SUFFIXES`, and :attr:`importlib.machinery.BYTECODE_SUFFIXES`" +msgstr "" -#: ../../whatsnew/3.12.rst:1236 -msgid "``assertNotEquals``" -msgstr "``assertNotEquals``" +#: ../../whatsnew/3.12.rst:1281 +msgid "``imp.get_tag()``" +msgstr "``imp.get_tag()``" -#: ../../whatsnew/3.12.rst:1237 -msgid "``assertAlmostEquals``" -msgstr "``assertAlmostEquals``" +#: ../../whatsnew/3.12.rst:1281 +msgid ":attr:`sys.implementation.cache_tag `" +msgstr ":attr:`sys.implementation.cache_tag `" -#: ../../whatsnew/3.12.rst:1238 -msgid "``assertNotAlmostEquals``" -msgstr "``assertNotAlmostEquals``" +#: ../../whatsnew/3.12.rst:1282 +msgid "``imp.load_module()``" +msgstr "``imp.load_module()``" -#: ../../whatsnew/3.12.rst:1239 -msgid "``assertRegexpMatches``" -msgstr "``assertRegexpMatches``" +#: ../../whatsnew/3.12.rst:1282 +msgid ":func:`importlib.import_module`" +msgstr ":func:`importlib.import_module`" -#: ../../whatsnew/3.12.rst:1239 -msgid ":meth:`.assertRegex`" -msgstr ":meth:`.assertRegex`" +#: ../../whatsnew/3.12.rst:1283 +msgid "``imp.new_module(name)``" +msgstr "``imp.new_module(name)``" -#: ../../whatsnew/3.12.rst:1240 -msgid "``assertRaisesRegexp``" -msgstr "``assertRaisesRegexp``" +#: ../../whatsnew/3.12.rst:1283 +msgid "``types.ModuleType(name)``" +msgstr "``types.ModuleType(name)``" -#: ../../whatsnew/3.12.rst:1240 -msgid ":meth:`.assertRaisesRegex`" -msgstr ":meth:`.assertRaisesRegex`" +#: ../../whatsnew/3.12.rst:1284 +msgid "``imp.reload()``" +msgstr "``imp.reload()``" -#: ../../whatsnew/3.12.rst:1241 -msgid "``assertNotRegexpMatches``" -msgstr "``assertNotRegexpMatches``" +#: ../../whatsnew/3.12.rst:1284 +msgid ":func:`importlib.reload`" +msgstr ":func:`importlib.reload`" -#: ../../whatsnew/3.12.rst:1241 -msgid ":meth:`.assertNotRegex`" -msgstr ":meth:`.assertNotRegex`" +#: ../../whatsnew/3.12.rst:1285 +msgid "``imp.source_from_cache()``" +msgstr "``imp.source_from_cache()``" -#: ../../whatsnew/3.12.rst:1241 -msgid "3.5" -msgstr "3.5" +#: ../../whatsnew/3.12.rst:1285 +msgid ":func:`importlib.util.source_from_cache`" +msgstr ":func:`importlib.util.source_from_cache`" -#: ../../whatsnew/3.12.rst:1244 -msgid "" -"You can use https://github.com/isidentical/teyit to automatically modernise " -"your unit tests." +#: ../../whatsnew/3.12.rst:1288 +msgid "Replace ``imp.load_source()`` with::" msgstr "" -#: ../../whatsnew/3.12.rst:1247 -msgid "" -"Undocumented and broken :class:`~unittest.TestCase` method " -"``assertDictContainsSubset`` (deprecated in Python 3.2)." +#: ../../whatsnew/3.12.rst:1303 +msgid "Removed :mod:`!imp` functions and attributes with no replacements:" msgstr "" -#: ../../whatsnew/3.12.rst:1250 -msgid "" -"Undocumented :meth:`TestLoader.loadTestsFromModule ` parameter *use_load_tests* (deprecated and ignored " -"since Python 3.2)." +#: ../../whatsnew/3.12.rst:1305 +msgid "undocumented functions:" msgstr "" -#: ../../whatsnew/3.12.rst:1254 -msgid "" -"An alias of the :class:`~unittest.TextTestResult` class: ``_TextTestResult`` " -"(deprecated in Python 3.2)." -msgstr "" +#: ../../whatsnew/3.12.rst:1307 +msgid "``imp.init_builtin()``" +msgstr "``imp.init_builtin()``" -#: ../../whatsnew/3.12.rst:1257 -msgid "(Contributed by Serhiy Storchaka in :issue:`45162`.)" +#: ../../whatsnew/3.12.rst:1308 +msgid "``imp.load_compiled()``" +msgstr "``imp.load_compiled()``" + +#: ../../whatsnew/3.12.rst:1309 +msgid "``imp.load_dynamic()``" +msgstr "``imp.load_dynamic()``" + +#: ../../whatsnew/3.12.rst:1310 +msgid "``imp.load_package()``" +msgstr "``imp.load_package()``" + +#: ../../whatsnew/3.12.rst:1312 +msgid "" +"``imp.lock_held()``, ``imp.acquire_lock()``, ``imp.release_lock()``: the " +"locking scheme has changed in Python 3.3 to per-module locks." msgstr "" -#: ../../whatsnew/3.12.rst:1259 +#: ../../whatsnew/3.12.rst:1314 msgid "" -"Several names deprecated in the :mod:`configparser` way back in 3.2 have " -"been removed per :gh:`89336`:" +"``imp.find_module()`` constants: ``SEARCH_ERROR``, ``PY_SOURCE``, " +"``PY_COMPILED``, ``C_EXTENSION``, ``PY_RESOURCE``, ``PKG_DIRECTORY``, " +"``C_BUILTIN``, ``PY_FROZEN``, ``PY_CODERESOURCE``, ``IMP_HOOK``." msgstr "" -#: ../../whatsnew/3.12.rst:1262 +#: ../../whatsnew/3.12.rst:1318 msgid "" -":class:`configparser.ParsingError` no longer has a ``filename`` attribute or " -"argument. Use the ``source`` attribute and argument instead." +":mod:`io`: Remove ``io.OpenWrapper`` and ``_pyio.OpenWrapper``, deprecated " +"in Python 3.10: just use :func:`open` instead. The :func:`open` (:func:`io." +"open`) function is a built-in function. Since Python 3.10, :func:`!_pyio." +"open` is also a static method. (Contributed by Victor Stinner in :gh:" +"`94169`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1264 +#: ../../whatsnew/3.12.rst:1324 msgid "" -":mod:`configparser` no longer has a ``SafeConfigParser`` class. Use the " -"shorter :class:`~configparser.ConfigParser` name instead." +":mod:`locale`: Remove the :func:`!locale.format` function, deprecated in " +"Python 3.7: use :func:`locale.format_string` instead. (Contributed by Victor " +"Stinner in :gh:`94226`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1266 +#: ../../whatsnew/3.12.rst:1328 msgid "" -":class:`configparser.ConfigParser` no longer has a ``readfp`` method. Use :" -"meth:`~configparser.ConfigParser.read_file` instead." +"``smtpd``: The module has been removed according to the schedule in :pep:" +"`594`, having been deprecated in Python 3.4.7 and 3.5.4. Use aiosmtpd_ PyPI " +"module or any other :mod:`asyncio`-based server instead. (Contributed by " +"Oleg Iarygin in :gh:`93243`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1269 +#: ../../whatsnew/3.12.rst:1336 msgid "" -"The following undocumented :mod:`sqlite3` features, deprecated in Python " -"3.10, are now removed:" +":mod:`sqlite3`: The following undocumented :mod:`sqlite3` features, " +"deprecated in Python 3.10, are now removed:" msgstr "" -#: ../../whatsnew/3.12.rst:1272 +#: ../../whatsnew/3.12.rst:1339 msgid "``sqlite3.enable_shared_cache()``" msgstr "``sqlite3.enable_shared_cache()``" -#: ../../whatsnew/3.12.rst:1273 +#: ../../whatsnew/3.12.rst:1340 msgid "``sqlite3.OptimizedUnicode``" msgstr "``sqlite3.OptimizedUnicode``" -#: ../../whatsnew/3.12.rst:1275 +#: ../../whatsnew/3.12.rst:1342 msgid "" "If a shared cache must be used, open the database in URI mode using the " "``cache=shared`` query parameter." msgstr "" -#: ../../whatsnew/3.12.rst:1278 +#: ../../whatsnew/3.12.rst:1345 msgid "" "The ``sqlite3.OptimizedUnicode`` text factory has been an alias for :class:" "`str` since Python 3.3. Code that previously set the text factory to " @@ -1931,50 +1999,22 @@ msgid "" "default value which is also ``str``." msgstr "" -#: ../../whatsnew/3.12.rst:1283 +#: ../../whatsnew/3.12.rst:1350 msgid "(Contributed by Erlend E. Aasland in :gh:`92548`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1285 -msgid "" -"``smtpd`` has been removed according to the schedule in :pep:`594`, having " -"been deprecated in Python 3.4.7 and 3.5.4. Use aiosmtpd_ PyPI module or any " -"other :mod:`asyncio`-based server instead. (Contributed by Oleg Iarygin in :" -"gh:`93243`.)" -msgstr "" - -#: ../../whatsnew/3.12.rst:1293 -msgid "" -"``asynchat`` and ``asyncore`` have been removed according to the schedule " -"in :pep:`594`, having been deprecated in Python 3.6. Use :mod:`asyncio` " -"instead. (Contributed by Nikita Sobolev in :gh:`96580`.)" +#: ../../whatsnew/3.12.rst:1352 +msgid ":mod:`ssl`:" msgstr "" -#: ../../whatsnew/3.12.rst:1299 -msgid "" -"Remove ``io.OpenWrapper`` and ``_pyio.OpenWrapper``, deprecated in Python " -"3.10: just use :func:`open` instead. The :func:`open` (:func:`io.open`) " -"function is a built-in function. Since Python 3.10, :func:`!_pyio.open` is " -"also a static method. (Contributed by Victor Stinner in :gh:`94169`.)" -msgstr "" - -#: ../../whatsnew/3.12.rst:1305 +#: ../../whatsnew/3.12.rst:1354 msgid "" "Remove the :func:`!ssl.RAND_pseudo_bytes` function, deprecated in Python " "3.6: use :func:`os.urandom` or :func:`ssl.RAND_bytes` instead. (Contributed " "by Victor Stinner in :gh:`94199`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1309 -msgid "" -":mod:`gzip`: Remove the ``filename`` attribute of :class:`gzip.GzipFile`, " -"deprecated since Python 2.6, use the :attr:`~gzip.GzipFile.name` attribute " -"instead. In write mode, the ``filename`` attribute added ``'.gz'`` file " -"extension if it was not present. (Contributed by Victor Stinner in :gh:" -"`94196`.)" -msgstr "" - -#: ../../whatsnew/3.12.rst:1315 +#: ../../whatsnew/3.12.rst:1358 msgid "" "Remove the :func:`!ssl.match_hostname` function. It was deprecated in Python " "3.7. OpenSSL performs hostname matching since Python 3.7, Python no longer " @@ -1982,39 +2022,7 @@ msgid "" "Stinner in :gh:`94199`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1321 -msgid "" -"Remove the :func:`!locale.format` function, deprecated in Python 3.7: use :" -"func:`locale.format_string` instead. (Contributed by Victor Stinner in :gh:" -"`94226`.)" -msgstr "" - -#: ../../whatsnew/3.12.rst:1325 -msgid "" -":mod:`hashlib`: Remove the pure Python implementation of :func:`hashlib." -"pbkdf2_hmac()`, deprecated in Python 3.10. Python 3.10 and newer requires " -"OpenSSL 1.1.1 (:pep:`644`): this OpenSSL version provides a C implementation " -"of :func:`~hashlib.pbkdf2_hmac()` which is faster. (Contributed by Victor " -"Stinner in :gh:`94199`.)" -msgstr "" - -#: ../../whatsnew/3.12.rst:1331 -msgid "" -":mod:`xml.etree.ElementTree`: Remove the ``ElementTree.Element.copy()`` " -"method of the pure Python implementation, deprecated in Python 3.10, use " -"the :func:`copy.copy` function instead. The C implementation of :mod:`xml." -"etree.ElementTree` has no ``copy()`` method, only a ``__copy__()`` method. " -"(Contributed by Victor Stinner in :gh:`94383`.)" -msgstr "" - -#: ../../whatsnew/3.12.rst:1337 -msgid "" -":mod:`zipimport`: Remove ``find_loader()`` and ``find_module()`` methods, " -"deprecated in Python 3.10: use the ``find_spec()`` method instead. See :pep:" -"`451` for the rationale. (Contributed by Victor Stinner in :gh:`94379`.)" -msgstr "" - -#: ../../whatsnew/3.12.rst:1342 +#: ../../whatsnew/3.12.rst:1364 msgid "" "Remove the :func:`!ssl.wrap_socket` function, deprecated in Python 3.7: " "instead, create a :class:`ssl.SSLContext` object and call its :class:`ssl." @@ -2025,185 +2033,205 @@ msgid "" "Validation. (Contributed by Victor Stinner in :gh:`94199`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1351 -msgid "" -"Many previously deprecated cleanups in :mod:`importlib` have now been " -"completed:" +#: ../../whatsnew/3.12.rst:1373 +msgid ":mod:`unittest`: Removed many old deprecated :mod:`unittest` features:" msgstr "" -#: ../../whatsnew/3.12.rst:1354 -msgid "" -"References to, and support for :meth:`!module_repr()` has been removed. " -"(Contributed by Barry Warsaw in :gh:`97850`.)" +#: ../../whatsnew/3.12.rst:1375 +msgid "A number of :class:`~unittest.TestCase` method aliases:" msgstr "" -#: ../../whatsnew/3.12.rst:1357 -msgid "" -"``importlib.util.set_package`` has been removed. (Contributed by Brett " -"Cannon in :gh:`65961`.)" +#: ../../whatsnew/3.12.rst:1378 +msgid "Deprecated alias" msgstr "" -#: ../../whatsnew/3.12.rst:1360 -msgid "" -"Support for ``find_loader()`` and ``find_module()`` APIs have been removed. " -"(Contributed by Barry Warsaw in :gh:`98040`.)" +#: ../../whatsnew/3.12.rst:1378 +msgid "Method Name" msgstr "" -#: ../../whatsnew/3.12.rst:1363 -msgid "" -"``importlib.abc.Finder``, ``pkgutil.ImpImporter``, and ``pkgutil.ImpLoader`` " -"have been removed. (Contributed by Barry Warsaw in :gh:`98040`.)" +#: ../../whatsnew/3.12.rst:1378 +msgid "Deprecated in" msgstr "" -#: ../../whatsnew/3.12.rst:1366 -msgid "" -"The :mod:`!imp` module has been removed. (Contributed by Barry Warsaw in :" -"gh:`98040`.)" -msgstr "" +#: ../../whatsnew/3.12.rst:1380 +msgid "``failUnless``" +msgstr "``failUnless``" -#: ../../whatsnew/3.12.rst:1369 -msgid "Replace removed :mod:`!imp` functions with :mod:`importlib` functions:" -msgstr "" +#: ../../whatsnew/3.12.rst:1380 ../../whatsnew/3.12.rst:1387 +msgid ":meth:`.assertTrue`" +msgstr ":meth:`.assertTrue`" -#: ../../whatsnew/3.12.rst:1372 -msgid "imp" -msgstr "imp" +#: ../../whatsnew/3.12.rst:1380 ../../whatsnew/3.12.rst:1381 +#: ../../whatsnew/3.12.rst:1382 ../../whatsnew/3.12.rst:1383 +#: ../../whatsnew/3.12.rst:1384 ../../whatsnew/3.12.rst:1385 +#: ../../whatsnew/3.12.rst:1386 +msgid "3.1" +msgstr "3.1" -#: ../../whatsnew/3.12.rst:1372 -msgid "importlib" -msgstr "importlib" +#: ../../whatsnew/3.12.rst:1381 +msgid "``failIf``" +msgstr "``failIf``" -#: ../../whatsnew/3.12.rst:1374 -msgid "``imp.NullImporter``" -msgstr "``imp.NullImporter``" +#: ../../whatsnew/3.12.rst:1381 +msgid ":meth:`.assertFalse`" +msgstr ":meth:`.assertFalse`" -#: ../../whatsnew/3.12.rst:1374 -msgid "Insert ``None`` into ``sys.path_importer_cache``" -msgstr "" +#: ../../whatsnew/3.12.rst:1382 +msgid "``failUnlessEqual``" +msgstr "``failUnlessEqual``" -#: ../../whatsnew/3.12.rst:1375 -msgid "``imp.cache_from_source()``" -msgstr "``imp.cache_from_source()``" +#: ../../whatsnew/3.12.rst:1382 ../../whatsnew/3.12.rst:1388 +msgid ":meth:`.assertEqual`" +msgstr ":meth:`.assertEqual`" -#: ../../whatsnew/3.12.rst:1375 -msgid ":func:`importlib.util.cache_from_source`" -msgstr ":func:`importlib.util.cache_from_source`" +#: ../../whatsnew/3.12.rst:1383 +msgid "``failIfEqual``" +msgstr "``failIfEqual``" -#: ../../whatsnew/3.12.rst:1376 -msgid "``imp.find_module()``" -msgstr "``imp.find_module()``" +#: ../../whatsnew/3.12.rst:1383 ../../whatsnew/3.12.rst:1389 +msgid ":meth:`.assertNotEqual`" +msgstr ":meth:`.assertNotEqual`" -#: ../../whatsnew/3.12.rst:1376 -msgid ":func:`importlib.util.find_spec`" -msgstr ":func:`importlib.util.find_spec`" +#: ../../whatsnew/3.12.rst:1384 +msgid "``failUnlessAlmostEqual``" +msgstr "``failUnlessAlmostEqual``" -#: ../../whatsnew/3.12.rst:1377 -msgid "``imp.get_magic()``" -msgstr "``imp.get_magic()``" +#: ../../whatsnew/3.12.rst:1384 ../../whatsnew/3.12.rst:1390 +msgid ":meth:`.assertAlmostEqual`" +msgstr ":meth:`.assertAlmostEqual`" -#: ../../whatsnew/3.12.rst:1377 -msgid ":attr:`importlib.util.MAGIC_NUMBER`" -msgstr ":attr:`importlib.util.MAGIC_NUMBER`" +#: ../../whatsnew/3.12.rst:1385 +msgid "``failIfAlmostEqual``" +msgstr "``failIfAlmostEqual``" -#: ../../whatsnew/3.12.rst:1378 -msgid "``imp.get_suffixes()``" -msgstr "``imp.get_suffixes()``" +#: ../../whatsnew/3.12.rst:1385 ../../whatsnew/3.12.rst:1391 +msgid ":meth:`.assertNotAlmostEqual`" +msgstr ":meth:`.assertNotAlmostEqual`" + +#: ../../whatsnew/3.12.rst:1386 +msgid "``failUnlessRaises``" +msgstr "``failUnlessRaises``" + +#: ../../whatsnew/3.12.rst:1386 +msgid ":meth:`.assertRaises`" +msgstr ":meth:`.assertRaises`" + +#: ../../whatsnew/3.12.rst:1387 +msgid "``assert_``" +msgstr "``assert_``" -#: ../../whatsnew/3.12.rst:1378 -msgid "" -":attr:`importlib.machinery.SOURCE_SUFFIXES`, :attr:`importlib.machinery." -"EXTENSION_SUFFIXES`, and :attr:`importlib.machinery.BYTECODE_SUFFIXES`" -msgstr "" +#: ../../whatsnew/3.12.rst:1387 ../../whatsnew/3.12.rst:1388 +#: ../../whatsnew/3.12.rst:1389 ../../whatsnew/3.12.rst:1390 +#: ../../whatsnew/3.12.rst:1391 ../../whatsnew/3.12.rst:1392 +#: ../../whatsnew/3.12.rst:1393 +msgid "3.2" +msgstr "3.2" -#: ../../whatsnew/3.12.rst:1379 -msgid "``imp.get_tag()``" -msgstr "``imp.get_tag()``" +#: ../../whatsnew/3.12.rst:1388 +msgid "``assertEquals``" +msgstr "``assertEquals``" -#: ../../whatsnew/3.12.rst:1379 -msgid ":attr:`sys.implementation.cache_tag `" -msgstr ":attr:`sys.implementation.cache_tag `" +#: ../../whatsnew/3.12.rst:1389 +msgid "``assertNotEquals``" +msgstr "``assertNotEquals``" -#: ../../whatsnew/3.12.rst:1380 -msgid "``imp.load_module()``" -msgstr "``imp.load_module()``" +#: ../../whatsnew/3.12.rst:1390 +msgid "``assertAlmostEquals``" +msgstr "``assertAlmostEquals``" -#: ../../whatsnew/3.12.rst:1380 -msgid ":func:`importlib.import_module`" -msgstr ":func:`importlib.import_module`" +#: ../../whatsnew/3.12.rst:1391 +msgid "``assertNotAlmostEquals``" +msgstr "``assertNotAlmostEquals``" -#: ../../whatsnew/3.12.rst:1381 -msgid "``imp.new_module(name)``" -msgstr "``imp.new_module(name)``" +#: ../../whatsnew/3.12.rst:1392 +msgid "``assertRegexpMatches``" +msgstr "``assertRegexpMatches``" -#: ../../whatsnew/3.12.rst:1381 -msgid "``types.ModuleType(name)``" -msgstr "``types.ModuleType(name)``" +#: ../../whatsnew/3.12.rst:1392 +msgid ":meth:`.assertRegex`" +msgstr ":meth:`.assertRegex`" -#: ../../whatsnew/3.12.rst:1382 -msgid "``imp.reload()``" -msgstr "``imp.reload()``" +#: ../../whatsnew/3.12.rst:1393 +msgid "``assertRaisesRegexp``" +msgstr "``assertRaisesRegexp``" -#: ../../whatsnew/3.12.rst:1382 -msgid ":func:`importlib.reload`" -msgstr ":func:`importlib.reload`" +#: ../../whatsnew/3.12.rst:1393 +msgid ":meth:`.assertRaisesRegex`" +msgstr ":meth:`.assertRaisesRegex`" -#: ../../whatsnew/3.12.rst:1383 -msgid "``imp.source_from_cache()``" -msgstr "``imp.source_from_cache()``" +#: ../../whatsnew/3.12.rst:1394 +msgid "``assertNotRegexpMatches``" +msgstr "``assertNotRegexpMatches``" -#: ../../whatsnew/3.12.rst:1383 -msgid ":func:`importlib.util.source_from_cache`" -msgstr ":func:`importlib.util.source_from_cache`" +#: ../../whatsnew/3.12.rst:1394 +msgid ":meth:`.assertNotRegex`" +msgstr ":meth:`.assertNotRegex`" -#: ../../whatsnew/3.12.rst:1386 -msgid "Replace ``imp.load_source()`` with::" +#: ../../whatsnew/3.12.rst:1394 +msgid "3.5" +msgstr "3.5" + +#: ../../whatsnew/3.12.rst:1397 +msgid "" +"You can use https://github.com/isidentical/teyit to automatically modernise " +"your unit tests." msgstr "" -#: ../../whatsnew/3.12.rst:1401 -msgid "Removed :mod:`!imp` functions and attributes with no replacements:" +#: ../../whatsnew/3.12.rst:1400 +msgid "" +"Undocumented and broken :class:`~unittest.TestCase` method " +"``assertDictContainsSubset`` (deprecated in Python 3.2)." msgstr "" #: ../../whatsnew/3.12.rst:1403 -msgid "undocumented functions:" +msgid "" +"Undocumented :meth:`TestLoader.loadTestsFromModule ` parameter *use_load_tests* (deprecated and ignored " +"since Python 3.2)." msgstr "" -#: ../../whatsnew/3.12.rst:1405 -msgid "``imp.init_builtin()``" -msgstr "``imp.init_builtin()``" - -#: ../../whatsnew/3.12.rst:1406 -msgid "``imp.load_compiled()``" -msgstr "``imp.load_compiled()``" - #: ../../whatsnew/3.12.rst:1407 -msgid "``imp.load_dynamic()``" -msgstr "``imp.load_dynamic()``" - -#: ../../whatsnew/3.12.rst:1408 -msgid "``imp.load_package()``" -msgstr "``imp.load_package()``" +msgid "" +"An alias of the :class:`~unittest.TextTestResult` class: ``_TextTestResult`` " +"(deprecated in Python 3.2)." +msgstr "" #: ../../whatsnew/3.12.rst:1410 -msgid "" -"``imp.lock_held()``, ``imp.acquire_lock()``, ``imp.release_lock()``: the " -"locking scheme has changed in Python 3.3 to per-module locks." +msgid "(Contributed by Serhiy Storchaka in :issue:`45162`.)" msgstr "" #: ../../whatsnew/3.12.rst:1412 msgid "" -"``imp.find_module()`` constants: ``SEARCH_ERROR``, ``PY_SOURCE``, " -"``PY_COMPILED``, ``C_EXTENSION``, ``PY_RESOURCE``, ``PKG_DIRECTORY``, " -"``C_BUILTIN``, ``PY_FROZEN``, ``PY_CODERESOURCE``, ``IMP_HOOK``." +":mod:`webbrowser`: Remove support for obsolete browsers from :mod:" +"`webbrowser`. Removed browsers include: Grail, Mosaic, Netscape, Galeon, " +"Skipstone, Iceape, Firebird, and Firefox versions 35 and below (:gh:" +"`102871`)." msgstr "" #: ../../whatsnew/3.12.rst:1416 msgid "" +":mod:`xml.etree.ElementTree`: Remove the ``ElementTree.Element.copy()`` " +"method of the pure Python implementation, deprecated in Python 3.10, use " +"the :func:`copy.copy` function instead. The C implementation of :mod:`xml." +"etree.ElementTree` has no ``copy()`` method, only a ``__copy__()`` method. " +"(Contributed by Victor Stinner in :gh:`94383`.)" +msgstr "" + +#: ../../whatsnew/3.12.rst:1422 +msgid "" +":mod:`zipimport`: Remove ``find_loader()`` and ``find_module()`` methods, " +"deprecated in Python 3.10: use the ``find_spec()`` method instead. See :pep:" +"`451` for the rationale. (Contributed by Victor Stinner in :gh:`94379`.)" +msgstr "" + +#: ../../whatsnew/3.12.rst:1427 +msgid "" "Removed the ``suspicious`` rule from the documentation Makefile, and removed " "``Doc/tools/rstlint.py``, both in favor of `sphinx-lint `_. (Contributed by Julien Palard in :gh:`98179`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1421 +#: ../../whatsnew/3.12.rst:1432 msgid "" "Remove the *keyfile* and *certfile* parameters from the :mod:`ftplib`, :mod:" "`imaplib`, :mod:`poplib` and :mod:`smtplib` modules, and the *key_file*, " @@ -2213,34 +2241,21 @@ msgid "" "in :gh:`94172`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1429 -msgid "" -":mod:`ftplib`: Remove the ``FTP_TLS.ssl_version`` class attribute: use the " -"*context* parameter instead. (Contributed by Victor Stinner in :gh:`94172`.)" -msgstr "" - -#: ../../whatsnew/3.12.rst:1433 -msgid "" -"Remove support for obsolete browsers from :mod:`webbrowser`. Removed " -"browsers include: Grail, Mosaic, Netscape, Galeon, Skipstone, Iceape, " -"Firebird, and Firefox versions 35 and below (:gh:`102871`)." -msgstr "" - -#: ../../whatsnew/3.12.rst:1441 ../../whatsnew/3.12.rst:1745 +#: ../../whatsnew/3.12.rst:1443 ../../whatsnew/3.12.rst:1747 msgid "Porting to Python 3.12" msgstr "" -#: ../../whatsnew/3.12.rst:1443 +#: ../../whatsnew/3.12.rst:1445 msgid "" "This section lists previously described changes and other bugfixes that may " "require changes to your code." msgstr "" -#: ../../whatsnew/3.12.rst:1447 +#: ../../whatsnew/3.12.rst:1449 msgid "Changes in the Python API" msgstr "" -#: ../../whatsnew/3.12.rst:1449 +#: ../../whatsnew/3.12.rst:1451 msgid "" "More strict rules are now applied for numerical group references and group " "names in regular expressions. Only sequence of ASCII digits is now accepted " @@ -2249,7 +2264,7 @@ msgid "" "(Contributed by Serhiy Storchaka in :gh:`91760`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1456 +#: ../../whatsnew/3.12.rst:1458 msgid "" "Removed ``randrange()`` functionality deprecated since Python 3.10. " "Formerly, ``randrange(10.0)`` losslessly converted to ``randrange(10)``. " @@ -2261,7 +2276,7 @@ msgid "" "`86388`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1464 +#: ../../whatsnew/3.12.rst:1466 msgid "" ":class:`argparse.ArgumentParser` changed encoding and error handler for " "reading arguments from file (e.g. ``fromfile_prefix_chars`` option) from " @@ -2271,21 +2286,21 @@ msgid "" "on Windows." msgstr "" -#: ../../whatsnew/3.12.rst:1470 +#: ../../whatsnew/3.12.rst:1472 msgid "" "Removed the ``asyncore``-based ``smtpd`` module deprecated in Python 3.4.7 " "and 3.5.4. A recommended replacement is the :mod:`asyncio`-based aiosmtpd_ " "PyPI module." msgstr "" -#: ../../whatsnew/3.12.rst:1474 +#: ../../whatsnew/3.12.rst:1476 msgid "" ":func:`shlex.split`: Passing ``None`` for *s* argument now raises an " "exception, rather than reading :data:`sys.stdin`. The feature was deprecated " "in Python 3.9. (Contributed by Victor Stinner in :gh:`94352`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1479 +#: ../../whatsnew/3.12.rst:1481 msgid "" "The :mod:`os` module no longer accepts bytes-like paths, like :class:" "`bytearray` and :class:`memoryview` types: only the exact :class:`bytes` " @@ -2293,7 +2308,7 @@ msgid "" "`98393`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1484 +#: ../../whatsnew/3.12.rst:1486 msgid "" ":func:`syslog.openlog` and :func:`syslog.closelog` now fail if used in " "subinterpreters. :func:`syslog.syslog` may still be used in subinterpreters, " @@ -2305,7 +2320,7 @@ msgid "" "(Contributed by Dong-hee Na in :gh:`99127`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1493 +#: ../../whatsnew/3.12.rst:1495 msgid "" "The undocumented locking behavior of :func:`~functools.cached_property` is " "removed, because it locked across all instances of the class, leading to " @@ -2317,14 +2332,14 @@ msgid "" "property getter function or around multi-threaded access points." msgstr "" -#: ../../whatsnew/3.12.rst:1506 +#: ../../whatsnew/3.12.rst:1508 msgid "" "When extracting tar files using :mod:`tarfile` or :func:`shutil." "unpack_archive`, pass the *filter* argument to limit features that may be " "surprising or dangerous. See :ref:`tarfile-extraction-filter` for details." msgstr "" -#: ../../whatsnew/3.12.rst:1511 +#: ../../whatsnew/3.12.rst:1513 msgid "" "The output of the :func:`tokenize.tokenize` and :func:`tokenize." "generate_tokens` functions is now changed due to the changes introduced in :" @@ -2336,45 +2351,45 @@ msgid "" "``f\"start {1+1} end\"`` the old version of the tokenizer emitted::" msgstr "" -#: ../../whatsnew/3.12.rst:1522 +#: ../../whatsnew/3.12.rst:1524 msgid "while the new version emits::" msgstr "" -#: ../../whatsnew/3.12.rst:1534 +#: ../../whatsnew/3.12.rst:1536 msgid "" "Additionally, there may be some minor behavioral changes as a consecuence of " "the changes required to support :pep:`701`. Some of these changes include:" msgstr "" -#: ../../whatsnew/3.12.rst:1537 +#: ../../whatsnew/3.12.rst:1539 msgid "" "The ``type`` attribute of the tokens emitted when tokenizing some invalid " "Python characters such as ``!`` has changed from ``ERRORTOKEN`` to ``OP``." msgstr "" -#: ../../whatsnew/3.12.rst:1540 +#: ../../whatsnew/3.12.rst:1542 msgid "" "Incomplete single-line strings now also raise :exc:`tokenize.TokenError` as " "incomplete multiline strings do." msgstr "" -#: ../../whatsnew/3.12.rst:1543 +#: ../../whatsnew/3.12.rst:1545 msgid "" "Some incomplete or invalid Python code now raises :exc:`tokenize.TokenError` " "instead of returning arbitrary ``ERRORTOKEN`` tokens when tokenizing it." msgstr "" -#: ../../whatsnew/3.12.rst:1546 +#: ../../whatsnew/3.12.rst:1548 msgid "" "Mixing tabs and spaces as indentation in the same file is not supported " "anymore and will raise a :exc:`TabError`." msgstr "" -#: ../../whatsnew/3.12.rst:1550 +#: ../../whatsnew/3.12.rst:1552 msgid "Build Changes" msgstr "" -#: ../../whatsnew/3.12.rst:1552 +#: ../../whatsnew/3.12.rst:1554 msgid "" "Python no longer uses ``setup.py`` to build shared C extension modules. " "Build parameters like headers and libraries are detected in ``configure`` " @@ -2383,21 +2398,21 @@ msgid "" "in :gh:`93939`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1558 +#: ../../whatsnew/3.12.rst:1560 msgid "" "``va_start()`` with two parameters, like ``va_start(args, format),`` is now " "required to build Python. ``va_start()`` is no longer called with a single " "parameter. (Contributed by Kumar Aditya in :gh:`93207`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1563 +#: ../../whatsnew/3.12.rst:1565 msgid "" "CPython now uses the ThinLTO option as the default link time optimization " "policy if the Clang compiler accepts the flag. (Contributed by Dong-hee Na " "in :gh:`89536`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1567 +#: ../../whatsnew/3.12.rst:1569 msgid "" "Add ``COMPILEALL_OPTS`` variable in Makefile to override :mod:`compileall` " "options (default: ``-j0``) in ``make install``. Also merged the 3 " @@ -2406,41 +2421,41 @@ msgid "" "`99289`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1573 +#: ../../whatsnew/3.12.rst:1575 msgid "Add platform triplets for 64-bit LoongArch:" msgstr "" -#: ../../whatsnew/3.12.rst:1575 +#: ../../whatsnew/3.12.rst:1577 msgid "loongarch64-linux-gnusf" msgstr "loongarch64-linux-gnusf" -#: ../../whatsnew/3.12.rst:1576 +#: ../../whatsnew/3.12.rst:1578 msgid "loongarch64-linux-gnuf32" msgstr "loongarch64-linux-gnuf32" -#: ../../whatsnew/3.12.rst:1577 +#: ../../whatsnew/3.12.rst:1579 msgid "loongarch64-linux-gnu" msgstr "loongarch64-linux-gnu" -#: ../../whatsnew/3.12.rst:1579 +#: ../../whatsnew/3.12.rst:1581 msgid "(Contributed by Zhang Na in :gh:`90656`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1581 +#: ../../whatsnew/3.12.rst:1583 msgid "``PYTHON_FOR_REGEN`` now require Python 3.10 or newer." msgstr "" -#: ../../whatsnew/3.12.rst:1583 +#: ../../whatsnew/3.12.rst:1585 msgid "" "Autoconf 2.71 and aclocal 1.16.4 is now required to regenerate :file:`!" "configure`. (Contributed by Christian Heimes in :gh:`89886`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1589 +#: ../../whatsnew/3.12.rst:1591 msgid "C API Changes" msgstr "" -#: ../../whatsnew/3.12.rst:1595 +#: ../../whatsnew/3.12.rst:1597 msgid "" ":pep:`697`: Introduced the :ref:`Unstable C API tier `, " "intended for low-level tools like debuggers and JIT compilers. This API may " @@ -2448,84 +2463,84 @@ msgid "" "contents are marked by the ``PyUnstable_`` prefix in names." msgstr "" -#: ../../whatsnew/3.12.rst:1601 +#: ../../whatsnew/3.12.rst:1603 msgid "Code object constructors:" msgstr "" -#: ../../whatsnew/3.12.rst:1603 +#: ../../whatsnew/3.12.rst:1605 msgid "``PyUnstable_Code_New()`` (renamed from ``PyCode_New``)" msgstr "" -#: ../../whatsnew/3.12.rst:1604 +#: ../../whatsnew/3.12.rst:1606 msgid "" "``PyUnstable_Code_NewWithPosOnlyArgs()`` (renamed from " "``PyCode_NewWithPosOnlyArgs``)" msgstr "" -#: ../../whatsnew/3.12.rst:1606 +#: ../../whatsnew/3.12.rst:1608 msgid "Extra storage for code objects (:pep:`523`):" msgstr "" -#: ../../whatsnew/3.12.rst:1608 +#: ../../whatsnew/3.12.rst:1610 msgid "" "``PyUnstable_Eval_RequestCodeExtraIndex()`` (renamed from " "``_PyEval_RequestCodeExtraIndex``)" msgstr "" -#: ../../whatsnew/3.12.rst:1609 +#: ../../whatsnew/3.12.rst:1611 msgid "``PyUnstable_Code_GetExtra()`` (renamed from ``_PyCode_GetExtra``)" msgstr "" -#: ../../whatsnew/3.12.rst:1610 +#: ../../whatsnew/3.12.rst:1612 msgid "``PyUnstable_Code_SetExtra()`` (renamed from ``_PyCode_SetExtra``)" msgstr "" -#: ../../whatsnew/3.12.rst:1612 +#: ../../whatsnew/3.12.rst:1614 msgid "" "The original names will continue to be available until the respective API " "changes." msgstr "" -#: ../../whatsnew/3.12.rst:1615 +#: ../../whatsnew/3.12.rst:1617 msgid "(Contributed by Petr Viktorin in :gh:`101101`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1617 +#: ../../whatsnew/3.12.rst:1619 msgid "" ":pep:`697`: Added API for extending types whose instance memory layout is " "opaque:" msgstr "" -#: ../../whatsnew/3.12.rst:1620 +#: ../../whatsnew/3.12.rst:1622 msgid "" ":c:member:`PyType_Spec.basicsize` can be zero or negative to specify " "inheriting or extending the base class size." msgstr "" -#: ../../whatsnew/3.12.rst:1622 +#: ../../whatsnew/3.12.rst:1624 msgid "" ":c:func:`PyObject_GetTypeData` and :c:func:`PyType_GetTypeDataSize` added to " "allow access to subclass-specific instance data." msgstr "" -#: ../../whatsnew/3.12.rst:1624 +#: ../../whatsnew/3.12.rst:1626 msgid "" ":c:macro:`Py_TPFLAGS_ITEMS_AT_END` and :c:func:`PyObject_GetItemData` added " "to allow safely extending certain variable-sized types, including :c:var:" "`PyType_Type`." msgstr "" -#: ../../whatsnew/3.12.rst:1627 +#: ../../whatsnew/3.12.rst:1629 msgid "" ":c:macro:`Py_RELATIVE_OFFSET` added to allow defining :c:type:`members " "` in terms of a subclass-specific struct." msgstr "" -#: ../../whatsnew/3.12.rst:1630 +#: ../../whatsnew/3.12.rst:1632 msgid "(Contributed by Petr Viktorin in :gh:`103509`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1632 +#: ../../whatsnew/3.12.rst:1634 msgid "" "Added the new :ref:`limited C API ` function :c:func:" "`PyType_FromMetaclass`, which generalizes the existing :c:func:" @@ -2533,29 +2548,29 @@ msgid "" "(Contributed by Wenzel Jakob in :gh:`93012`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1637 +#: ../../whatsnew/3.12.rst:1639 msgid "" "API for creating objects that can be called using :ref:`the vectorcall " "protocol ` was added to the :ref:`Limited API `:" msgstr "" -#: ../../whatsnew/3.12.rst:1641 +#: ../../whatsnew/3.12.rst:1643 msgid ":c:macro:`Py_TPFLAGS_HAVE_VECTORCALL`" msgstr "" -#: ../../whatsnew/3.12.rst:1642 +#: ../../whatsnew/3.12.rst:1644 msgid ":c:func:`PyVectorcall_NARGS`" msgstr ":c:func:`PyVectorcall_NARGS`" -#: ../../whatsnew/3.12.rst:1643 +#: ../../whatsnew/3.12.rst:1645 msgid ":c:func:`PyVectorcall_Call`" msgstr ":c:func:`PyVectorcall_Call`" -#: ../../whatsnew/3.12.rst:1644 +#: ../../whatsnew/3.12.rst:1646 msgid ":c:type:`vectorcallfunc`" msgstr ":c:type:`vectorcallfunc`" -#: ../../whatsnew/3.12.rst:1646 +#: ../../whatsnew/3.12.rst:1648 msgid "" "The :c:macro:`Py_TPFLAGS_HAVE_VECTORCALL` flag is now removed from a class " "when the class's :py:meth:`~object.__call__` method is reassigned. This " @@ -2566,7 +2581,7 @@ msgid "" "`93274`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1654 +#: ../../whatsnew/3.12.rst:1656 msgid "" "The :c:macro:`Py_TPFLAGS_MANAGED_DICT` and :c:macro:" "`Py_TPFLAGS_MANAGED_WEAKREF` flags have been added. This allows extensions " @@ -2574,32 +2589,32 @@ msgid "" "using less memory and with faster access." msgstr "" -#: ../../whatsnew/3.12.rst:1659 +#: ../../whatsnew/3.12.rst:1661 msgid "" "API for performing calls using :ref:`the vectorcall protocol ` " "was added to the :ref:`Limited API `:" msgstr "" -#: ../../whatsnew/3.12.rst:1663 +#: ../../whatsnew/3.12.rst:1665 msgid ":c:func:`PyObject_Vectorcall`" msgstr ":c:func:`PyObject_Vectorcall`" -#: ../../whatsnew/3.12.rst:1664 +#: ../../whatsnew/3.12.rst:1666 msgid ":c:func:`PyObject_VectorcallMethod`" msgstr ":c:func:`PyObject_VectorcallMethod`" -#: ../../whatsnew/3.12.rst:1665 +#: ../../whatsnew/3.12.rst:1667 msgid ":c:macro:`PY_VECTORCALL_ARGUMENTS_OFFSET`" msgstr "" -#: ../../whatsnew/3.12.rst:1667 +#: ../../whatsnew/3.12.rst:1669 msgid "" "This means that both the incoming and outgoing ends of the vector call " "protocol are now available in the :ref:`Limited API `. (Contributed " "by Wenzel Jakob in :gh:`98586`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1671 +#: ../../whatsnew/3.12.rst:1673 msgid "" "Added two new public functions, :c:func:`PyEval_SetProfileAllThreads` and :c:" "func:`PyEval_SetTraceAllThreads`, that allow to set tracing and profiling " @@ -2607,14 +2622,14 @@ msgid "" "(Contributed by Pablo Galindo in :gh:`93503`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1677 +#: ../../whatsnew/3.12.rst:1679 msgid "" "Added new function :c:func:`PyFunction_SetVectorcall` to the C API which " "sets the vectorcall field of a given :c:type:`PyFunctionObject`. " "(Contributed by Andrew Frost in :gh:`92257`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1681 +#: ../../whatsnew/3.12.rst:1683 msgid "" "The C API now permits registering callbacks via :c:func:" "`PyDict_AddWatcher`, :c:func:`PyDict_Watch` and related APIs to be called " @@ -2623,28 +2638,28 @@ msgid "" "`91052`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1687 +#: ../../whatsnew/3.12.rst:1689 msgid "" "Added :c:func:`PyType_AddWatcher` and :c:func:`PyType_Watch` API to register " "callbacks to receive notification on changes to a type. (Contributed by Carl " "Meyer in :gh:`91051`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1691 +#: ../../whatsnew/3.12.rst:1693 msgid "" "Added :c:func:`PyCode_AddWatcher` and :c:func:`PyCode_ClearWatcher` APIs to " "register callbacks to receive notification on creation and destruction of " "code objects. (Contributed by Itamar Ostricher in :gh:`91054`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1696 +#: ../../whatsnew/3.12.rst:1698 msgid "" "Add :c:func:`PyFrame_GetVar` and :c:func:`PyFrame_GetVarString` functions to " "get a frame variable by its name. (Contributed by Victor Stinner in :gh:" "`91248`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1700 +#: ../../whatsnew/3.12.rst:1702 msgid "" "Add :c:func:`PyErr_GetRaisedException` and :c:func:" "`PyErr_SetRaisedException` for saving and restoring the current exception. " @@ -2654,14 +2669,14 @@ msgid "" "(Contributed by Mark Shannon in :gh:`101578`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1708 +#: ../../whatsnew/3.12.rst:1710 msgid "" "Add ``_PyErr_ChainExceptions1``, which takes an exception instance, to " "replace the legacy-API ``_PyErr_ChainExceptions``, which is now deprecated. " "(Contributed by Mark Shannon in :gh:`101578`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1712 +#: ../../whatsnew/3.12.rst:1714 msgid "" "Add :c:func:`PyException_GetArgs` and :c:func:`PyException_SetArgs` as " "convenience functions for retrieving and modifying the :attr:`~BaseException." @@ -2669,91 +2684,91 @@ msgid "" "in :gh:`101578`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1717 +#: ../../whatsnew/3.12.rst:1719 msgid "" "Add :c:func:`PyErr_DisplayException`, which takes an exception instance, to " "replace the legacy-api :c:func:`!PyErr_Display`. (Contributed by Irit " "Katriel in :gh:`102755`)." msgstr "" -#: ../../whatsnew/3.12.rst:1721 +#: ../../whatsnew/3.12.rst:1723 msgid "" ":pep:`683`: Introduced Immortal Objects to Python which allows objects to " "bypass reference counts and introduced changes to the C-API:" msgstr "" -#: ../../whatsnew/3.12.rst:1724 +#: ../../whatsnew/3.12.rst:1726 msgid "``_Py_IMMORTAL_REFCNT``: The reference count that defines an object" msgstr "" -#: ../../whatsnew/3.12.rst:1725 +#: ../../whatsnew/3.12.rst:1727 msgid "as immortal." msgstr "" -#: ../../whatsnew/3.12.rst:1726 +#: ../../whatsnew/3.12.rst:1728 msgid "" "``_Py_IsImmortal`` Checks if an object has the immortal reference count." msgstr "" -#: ../../whatsnew/3.12.rst:1727 +#: ../../whatsnew/3.12.rst:1729 msgid "``PyObject_HEAD_INIT`` This will now initialize reference count to" msgstr "" -#: ../../whatsnew/3.12.rst:1728 +#: ../../whatsnew/3.12.rst:1730 msgid "``_Py_IMMORTAL_REFCNT`` when used with ``Py_BUILD_CORE``." msgstr "" -#: ../../whatsnew/3.12.rst:1729 +#: ../../whatsnew/3.12.rst:1731 msgid "``SSTATE_INTERNED_IMMORTAL`` An identifier for interned unicode objects" msgstr "" -#: ../../whatsnew/3.12.rst:1730 +#: ../../whatsnew/3.12.rst:1732 msgid "that are immortal." msgstr "" -#: ../../whatsnew/3.12.rst:1731 +#: ../../whatsnew/3.12.rst:1733 msgid "``SSTATE_INTERNED_IMMORTAL_STATIC`` An identifier for interned unicode" msgstr "" -#: ../../whatsnew/3.12.rst:1732 +#: ../../whatsnew/3.12.rst:1734 msgid "objects that are immortal and static" msgstr "" -#: ../../whatsnew/3.12.rst:1735 +#: ../../whatsnew/3.12.rst:1737 msgid "``sys.getunicodeinternedsize`` This returns the total number of unicode" msgstr "" -#: ../../whatsnew/3.12.rst:1734 +#: ../../whatsnew/3.12.rst:1736 msgid "" "objects that have been interned. This is now needed for refleak.py to " "correctly track reference counts and allocated blocks" msgstr "" -#: ../../whatsnew/3.12.rst:1737 +#: ../../whatsnew/3.12.rst:1739 msgid "(Contributed by Eddie Elizondo in :gh:`84436`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1739 +#: ../../whatsnew/3.12.rst:1741 msgid "" "In the limited C API version 3.12, :c:func:`Py_INCREF` and :c:func:" "`Py_DECREF` functions are now implemented as opaque function calls to hide " "implementation details. (Contributed by Victor Stinner in :gh:`105387`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1747 +#: ../../whatsnew/3.12.rst:1749 msgid "" "Legacy Unicode APIs based on ``Py_UNICODE*`` representation has been " "removed. Please migrate to APIs based on UTF-8 or ``wchar_t*``." msgstr "" -#: ../../whatsnew/3.12.rst:1750 +#: ../../whatsnew/3.12.rst:1752 msgid "" "Argument parsing functions like :c:func:`PyArg_ParseTuple` doesn't support " "``Py_UNICODE*`` based format (e.g. ``u``, ``Z``) anymore. Please migrate to " "other formats for Unicode like ``s``, ``z``, ``es``, and ``U``." msgstr "" -#: ../../whatsnew/3.12.rst:1754 +#: ../../whatsnew/3.12.rst:1756 msgid "" "``tp_weaklist`` for all static builtin types is always ``NULL``. This is an " "internal-only field on ``PyTypeObject`` but we're pointing out the change in " @@ -2762,7 +2777,7 @@ msgid "" "necessary, the (internal-only) ``_PyObject_GET_WEAKREFS_LISTPTR()`` macro." msgstr "" -#: ../../whatsnew/3.12.rst:1761 +#: ../../whatsnew/3.12.rst:1763 msgid "" "This internal-only :c:member:`PyTypeObject.tp_subclasses` may now not be a " "valid object pointer. Its type was changed to :c:expr:`void *` to reflect " @@ -2770,21 +2785,22 @@ msgid "" "only field directly." msgstr "" -#: ../../whatsnew/3.12.rst:1766 +#: ../../whatsnew/3.12.rst:1768 msgid "" "To get a list of subclasses, call the Python method :py:meth:`~class." "__subclasses__` (using :c:func:`PyObject_CallMethod`, for example)." msgstr "" -#: ../../whatsnew/3.12.rst:1770 +#: ../../whatsnew/3.12.rst:1772 msgid "" "Add support of more formatting options (left aligning, octals, uppercase " -"hexadecimals, ``intmax_t``, ``ptrdiff_t``, ``wchar_t`` C strings, variable " -"width and precision) in :c:func:`PyUnicode_FromFormat` and :c:func:" -"`PyUnicode_FromFormatV`. (Contributed by Serhiy Storchaka in :gh:`98836`.)" +"hexadecimals, :c:type:`intmax_t`, :c:type:`ptrdiff_t`, :c:type:`wchar_t` C " +"strings, variable width and precision) in :c:func:`PyUnicode_FromFormat` " +"and :c:func:`PyUnicode_FromFormatV`. (Contributed by Serhiy Storchaka in :gh:" +"`98836`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1776 +#: ../../whatsnew/3.12.rst:1778 msgid "" "An unrecognized format character in :c:func:`PyUnicode_FromFormat` and :c:" "func:`PyUnicode_FromFormatV` now sets a :exc:`SystemError`. In previous " @@ -2793,13 +2809,13 @@ msgid "" "Storchaka in :gh:`95781`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1782 +#: ../../whatsnew/3.12.rst:1784 msgid "" "Fixed wrong sign placement in :c:func:`PyUnicode_FromFormat` and :c:func:" "`PyUnicode_FromFormatV`. (Contributed by Philip Georgi in :gh:`95504`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1786 +#: ../../whatsnew/3.12.rst:1788 msgid "" "Extension classes wanting to add a ``__dict__`` or weak reference slot " "should use :c:macro:`Py_TPFLAGS_MANAGED_DICT` and :c:macro:" @@ -2813,7 +2829,7 @@ msgid "" "func:`PyObject_ClearWeakRefs`, as before." msgstr "" -#: ../../whatsnew/3.12.rst:1798 +#: ../../whatsnew/3.12.rst:1800 msgid "" "The :c:func:`PyUnicode_FSDecoder` function no longer accepts bytes-like " "paths, like :class:`bytearray` and :class:`memoryview` types: only the " @@ -2821,7 +2837,7 @@ msgid "" "Victor Stinner in :gh:`98393`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1803 +#: ../../whatsnew/3.12.rst:1805 msgid "" "The :c:macro:`Py_CLEAR`, :c:macro:`Py_SETREF` and :c:macro:`Py_XSETREF` " "macros now only evaluate their arguments once. If an argument has side " @@ -2829,7 +2845,7 @@ msgid "" "Stinner in :gh:`98724`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1808 +#: ../../whatsnew/3.12.rst:1810 msgid "" "The interpreter's error indicator is now always normalized. This means that :" "c:func:`PyErr_SetObject`, :c:func:`PyErr_SetString` and the other functions " @@ -2837,7 +2853,7 @@ msgid "" "(Contributed by Mark Shannon in :gh:`101578`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1813 +#: ../../whatsnew/3.12.rst:1815 msgid "" "``_Py_RefTotal`` is no longer authoritative and only kept around for ABI " "compatibility. Note that it is an internal global and only available on " @@ -2845,25 +2861,25 @@ msgid "" "``_Py_GetGlobalRefTotal()``." msgstr "" -#: ../../whatsnew/3.12.rst:1818 +#: ../../whatsnew/3.12.rst:1820 msgid "" "The following functions now select an appropriate metaclass for the newly " "created type:" msgstr "" -#: ../../whatsnew/3.12.rst:1821 +#: ../../whatsnew/3.12.rst:1823 msgid ":c:func:`PyType_FromSpec`" msgstr ":c:func:`PyType_FromSpec`" -#: ../../whatsnew/3.12.rst:1822 +#: ../../whatsnew/3.12.rst:1824 msgid ":c:func:`PyType_FromSpecWithBases`" msgstr ":c:func:`PyType_FromSpecWithBases`" -#: ../../whatsnew/3.12.rst:1823 +#: ../../whatsnew/3.12.rst:1825 msgid ":c:func:`PyType_FromModuleAndSpec`" msgstr ":c:func:`PyType_FromModuleAndSpec`" -#: ../../whatsnew/3.12.rst:1825 +#: ../../whatsnew/3.12.rst:1827 msgid "" "Creating classes whose metaclass overrides :c:member:`~PyTypeObject.tp_new` " "is deprecated, and in Python 3.14+ it will be disallowed. Note that these " @@ -2871,14 +2887,14 @@ msgid "" "initialization." msgstr "" -#: ../../whatsnew/3.12.rst:1830 +#: ../../whatsnew/3.12.rst:1832 msgid "" "Note that :c:func:`PyType_FromMetaclass` (added in Python 3.12) already " "disallows creating classes whose metaclass overrides ``tp_new`` (:meth:" "`~object.__new__` in Python)." msgstr "" -#: ../../whatsnew/3.12.rst:1834 +#: ../../whatsnew/3.12.rst:1836 msgid "" "Since ``tp_new`` overrides almost everything ``PyType_From*`` functions do, " "the two are incompatible with each other. The existing behavior -- ignoring " @@ -2887,17 +2903,17 @@ msgid "" "general workaround. One of the following may work for you:" msgstr "" -#: ../../whatsnew/3.12.rst:1841 +#: ../../whatsnew/3.12.rst:1843 msgid "If you control the metaclass, avoid using ``tp_new`` in it:" msgstr "" -#: ../../whatsnew/3.12.rst:1843 +#: ../../whatsnew/3.12.rst:1845 msgid "" "If initialization can be skipped, it can be done in :c:member:`~PyTypeObject." "tp_init` instead." msgstr "" -#: ../../whatsnew/3.12.rst:1845 +#: ../../whatsnew/3.12.rst:1847 msgid "" "If the metaclass doesn't need to be instantiated from Python, set its " "``tp_new`` to ``NULL`` using the :c:macro:" @@ -2905,20 +2921,20 @@ msgid "" "``PyType_From*`` functions." msgstr "" -#: ../../whatsnew/3.12.rst:1850 +#: ../../whatsnew/3.12.rst:1852 msgid "" "Avoid ``PyType_From*`` functions: if you don't need C-specific features " "(slots or setting the instance size), create types by :ref:`calling ` " "the metaclass." msgstr "" -#: ../../whatsnew/3.12.rst:1854 +#: ../../whatsnew/3.12.rst:1856 msgid "" "If you *know* the ``tp_new`` can be skipped safely, filter the deprecation " "warning out using :func:`warnings.catch_warnings` from Python." msgstr "" -#: ../../whatsnew/3.12.rst:1857 +#: ../../whatsnew/3.12.rst:1859 msgid "" ":c:var:`PyOS_InputHook` and :c:var:`PyOS_ReadlineFunctionPointer` are no " "longer called in :ref:`subinterpreters `. This is " @@ -2926,288 +2942,288 @@ msgid "" "callbacks have no way of recovering extension module state)." msgstr "" -#: ../../whatsnew/3.12.rst:1862 +#: ../../whatsnew/3.12.rst:1864 msgid "" "This also avoids situations where extensions may find themselves running in " "a subinterpreter that they don't support (or haven't yet been loaded in). " "See :gh:`104668` for more info." msgstr "" -#: ../../whatsnew/3.12.rst:1869 +#: ../../whatsnew/3.12.rst:1871 msgid "Deprecate global configuration variable:" msgstr "" -#: ../../whatsnew/3.12.rst:1871 +#: ../../whatsnew/3.12.rst:1873 msgid ":c:var:`Py_DebugFlag`: use :c:member:`PyConfig.parser_debug`" msgstr "" -#: ../../whatsnew/3.12.rst:1872 +#: ../../whatsnew/3.12.rst:1874 msgid ":c:var:`Py_VerboseFlag`: use :c:member:`PyConfig.verbose`" msgstr "" -#: ../../whatsnew/3.12.rst:1873 +#: ../../whatsnew/3.12.rst:1875 msgid ":c:var:`Py_QuietFlag`: use :c:member:`PyConfig.quiet`" msgstr "" -#: ../../whatsnew/3.12.rst:1874 +#: ../../whatsnew/3.12.rst:1876 msgid ":c:var:`Py_InteractiveFlag`: use :c:member:`PyConfig.interactive`" msgstr "" -#: ../../whatsnew/3.12.rst:1875 +#: ../../whatsnew/3.12.rst:1877 msgid ":c:var:`Py_InspectFlag`: use :c:member:`PyConfig.inspect`" msgstr "" -#: ../../whatsnew/3.12.rst:1876 +#: ../../whatsnew/3.12.rst:1878 msgid ":c:var:`Py_OptimizeFlag`: use :c:member:`PyConfig.optimization_level`" msgstr "" -#: ../../whatsnew/3.12.rst:1877 +#: ../../whatsnew/3.12.rst:1879 msgid ":c:var:`Py_NoSiteFlag`: use :c:member:`PyConfig.site_import`" msgstr "" -#: ../../whatsnew/3.12.rst:1878 +#: ../../whatsnew/3.12.rst:1880 msgid ":c:var:`Py_BytesWarningFlag`: use :c:member:`PyConfig.bytes_warning`" msgstr "" -#: ../../whatsnew/3.12.rst:1879 +#: ../../whatsnew/3.12.rst:1881 msgid ":c:var:`Py_FrozenFlag`: use :c:member:`PyConfig.pathconfig_warnings`" msgstr "" -#: ../../whatsnew/3.12.rst:1880 +#: ../../whatsnew/3.12.rst:1882 msgid "" ":c:var:`Py_IgnoreEnvironmentFlag`: use :c:member:`PyConfig.use_environment`" msgstr "" -#: ../../whatsnew/3.12.rst:1881 +#: ../../whatsnew/3.12.rst:1883 msgid "" ":c:var:`Py_DontWriteBytecodeFlag`: use :c:member:`PyConfig.write_bytecode`" msgstr "" -#: ../../whatsnew/3.12.rst:1882 +#: ../../whatsnew/3.12.rst:1884 msgid "" ":c:var:`Py_NoUserSiteDirectory`: use :c:member:`PyConfig.user_site_directory`" msgstr "" -#: ../../whatsnew/3.12.rst:1883 +#: ../../whatsnew/3.12.rst:1885 msgid "" ":c:var:`Py_UnbufferedStdioFlag`: use :c:member:`PyConfig.buffered_stdio`" msgstr "" -#: ../../whatsnew/3.12.rst:1884 +#: ../../whatsnew/3.12.rst:1886 msgid "" ":c:var:`Py_HashRandomizationFlag`: use :c:member:`PyConfig.use_hash_seed` " "and :c:member:`PyConfig.hash_seed`" msgstr "" -#: ../../whatsnew/3.12.rst:1886 +#: ../../whatsnew/3.12.rst:1888 msgid ":c:var:`Py_IsolatedFlag`: use :c:member:`PyConfig.isolated`" msgstr "" -#: ../../whatsnew/3.12.rst:1887 +#: ../../whatsnew/3.12.rst:1889 msgid "" ":c:var:`Py_LegacyWindowsFSEncodingFlag`: use :c:member:`PyPreConfig." "legacy_windows_fs_encoding`" msgstr "" -#: ../../whatsnew/3.12.rst:1888 +#: ../../whatsnew/3.12.rst:1890 msgid "" ":c:var:`Py_LegacyWindowsStdioFlag`: use :c:member:`PyConfig." "legacy_windows_stdio`" msgstr "" -#: ../../whatsnew/3.12.rst:1889 +#: ../../whatsnew/3.12.rst:1891 msgid "" ":c:var:`!Py_FileSystemDefaultEncoding`: use :c:member:`PyConfig." "filesystem_encoding`" msgstr "" -#: ../../whatsnew/3.12.rst:1890 +#: ../../whatsnew/3.12.rst:1892 msgid "" ":c:var:`!Py_HasFileSystemDefaultEncoding`: use :c:member:`PyConfig." "filesystem_encoding`" msgstr "" -#: ../../whatsnew/3.12.rst:1891 +#: ../../whatsnew/3.12.rst:1893 msgid "" ":c:var:`!Py_FileSystemDefaultEncodeErrors`: use :c:member:`PyConfig." "filesystem_errors`" msgstr "" -#: ../../whatsnew/3.12.rst:1892 +#: ../../whatsnew/3.12.rst:1894 msgid "" ":c:var:`!Py_UTF8Mode`: use :c:member:`PyPreConfig.utf8_mode` (see :c:func:" "`Py_PreInitialize`)" msgstr "" -#: ../../whatsnew/3.12.rst:1894 +#: ../../whatsnew/3.12.rst:1896 msgid "" "The :c:func:`Py_InitializeFromConfig` API should be used with :c:type:" "`PyConfig` instead. (Contributed by Victor Stinner in :gh:`77782`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1898 +#: ../../whatsnew/3.12.rst:1900 msgid "" "Creating immutable types (:c:macro:`Py_TPFLAGS_IMMUTABLETYPE`) with mutable " "bases is deprecated and will be disabled in Python 3.14." msgstr "" -#: ../../whatsnew/3.12.rst:1901 +#: ../../whatsnew/3.12.rst:1903 msgid "" "The ``structmember.h`` header is deprecated, though it continues to be " "available and there are no plans to remove it." msgstr "" -#: ../../whatsnew/3.12.rst:1904 +#: ../../whatsnew/3.12.rst:1906 msgid "" "Its contents are now available just by including ``Python.h``, with a ``Py`` " "prefix added if it was missing:" msgstr "" -#: ../../whatsnew/3.12.rst:1907 +#: ../../whatsnew/3.12.rst:1909 msgid "" ":c:struct:`PyMemberDef`, :c:func:`PyMember_GetOne` and :c:func:" "`PyMember_SetOne`" msgstr "" -#: ../../whatsnew/3.12.rst:1909 +#: ../../whatsnew/3.12.rst:1911 msgid "" "Type macros like :c:macro:`Py_T_INT`, :c:macro:`Py_T_DOUBLE`, etc. " "(previously ``T_INT``, ``T_DOUBLE``, etc.)" msgstr "" -#: ../../whatsnew/3.12.rst:1911 +#: ../../whatsnew/3.12.rst:1913 msgid "" "The flags :c:macro:`Py_READONLY` (previously ``READONLY``) and :c:macro:" "`Py_AUDIT_READ` (previously all uppercase)" msgstr "" -#: ../../whatsnew/3.12.rst:1914 +#: ../../whatsnew/3.12.rst:1916 msgid "Several items are not exposed from ``Python.h``:" msgstr "" -#: ../../whatsnew/3.12.rst:1916 +#: ../../whatsnew/3.12.rst:1918 msgid ":c:macro:`T_OBJECT` (use :c:macro:`Py_T_OBJECT_EX`)" msgstr "" -#: ../../whatsnew/3.12.rst:1917 +#: ../../whatsnew/3.12.rst:1919 msgid ":c:macro:`T_NONE` (previously undocumented, and pretty quirky)" msgstr "" -#: ../../whatsnew/3.12.rst:1918 +#: ../../whatsnew/3.12.rst:1920 msgid "The macro ``WRITE_RESTRICTED`` which does nothing." msgstr "" -#: ../../whatsnew/3.12.rst:1919 +#: ../../whatsnew/3.12.rst:1921 msgid "" "The macros ``RESTRICTED`` and ``READ_RESTRICTED``, equivalents of :c:macro:" "`Py_AUDIT_READ`." msgstr "" -#: ../../whatsnew/3.12.rst:1921 +#: ../../whatsnew/3.12.rst:1923 msgid "" "In some configurations, ```` is not included from ``Python.h``. It " "should be included manually when using ``offsetof()``." msgstr "" -#: ../../whatsnew/3.12.rst:1924 +#: ../../whatsnew/3.12.rst:1926 msgid "" "The deprecated header continues to provide its original contents under the " "original names. Your old code can stay unchanged, unless the extra include " "and non-namespaced macros bother you greatly." msgstr "" -#: ../../whatsnew/3.12.rst:1929 +#: ../../whatsnew/3.12.rst:1931 msgid "" "(Contributed in :gh:`47146` by Petr Viktorin, based on earlier work by " "Alexander Belopolsky and Matthias Braun.)" msgstr "" -#: ../../whatsnew/3.12.rst:1932 +#: ../../whatsnew/3.12.rst:1934 msgid "" ":c:func:`PyErr_Fetch` and :c:func:`PyErr_Restore` are deprecated. Use :c:" "func:`PyErr_GetRaisedException` and :c:func:`PyErr_SetRaisedException` " "instead. (Contributed by Mark Shannon in :gh:`101578`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1937 +#: ../../whatsnew/3.12.rst:1939 msgid "" ":c:func:`!PyErr_Display` is deprecated. Use :c:func:`PyErr_DisplayException` " "instead. (Contributed by Irit Katriel in :gh:`102755`)." msgstr "" -#: ../../whatsnew/3.12.rst:1940 +#: ../../whatsnew/3.12.rst:1942 msgid "" "``_PyErr_ChainExceptions`` is deprecated. Use ``_PyErr_ChainExceptions1`` " "instead. (Contributed by Irit Katriel in :gh:`102192`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1943 +#: ../../whatsnew/3.12.rst:1945 msgid "" "Using :c:func:`PyType_FromSpec`, :c:func:`PyType_FromSpecWithBases` or :c:" "func:`PyType_FromModuleAndSpec` to create a class whose metaclass overrides :" "c:member:`~PyTypeObject.tp_new` is deprecated. Call the metaclass instead." msgstr "" -#: ../../whatsnew/3.12.rst:1951 +#: ../../whatsnew/3.12.rst:1953 msgid "" "Remove the ``token.h`` header file. There was never any public tokenizer C " "API. The ``token.h`` header file was only designed to be used by Python " "internals. (Contributed by Victor Stinner in :gh:`92651`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1956 +#: ../../whatsnew/3.12.rst:1958 msgid "Legacy Unicode APIs have been removed. See :pep:`623` for detail." msgstr "" -#: ../../whatsnew/3.12.rst:1958 +#: ../../whatsnew/3.12.rst:1960 msgid ":c:macro:`!PyUnicode_WCHAR_KIND`" msgstr ":c:macro:`!PyUnicode_WCHAR_KIND`" -#: ../../whatsnew/3.12.rst:1959 +#: ../../whatsnew/3.12.rst:1961 msgid ":c:func:`!PyUnicode_AS_UNICODE`" msgstr ":c:func:`!PyUnicode_AS_UNICODE`" -#: ../../whatsnew/3.12.rst:1960 +#: ../../whatsnew/3.12.rst:1962 msgid ":c:func:`!PyUnicode_AsUnicode`" msgstr ":c:func:`!PyUnicode_AsUnicode`" -#: ../../whatsnew/3.12.rst:1961 +#: ../../whatsnew/3.12.rst:1963 msgid ":c:func:`!PyUnicode_AsUnicodeAndSize`" msgstr ":c:func:`!PyUnicode_AsUnicodeAndSize`" -#: ../../whatsnew/3.12.rst:1962 +#: ../../whatsnew/3.12.rst:1964 msgid ":c:func:`!PyUnicode_AS_DATA`" msgstr ":c:func:`!PyUnicode_AS_DATA`" -#: ../../whatsnew/3.12.rst:1963 +#: ../../whatsnew/3.12.rst:1965 msgid ":c:func:`!PyUnicode_FromUnicode`" msgstr ":c:func:`!PyUnicode_FromUnicode`" -#: ../../whatsnew/3.12.rst:1964 +#: ../../whatsnew/3.12.rst:1966 msgid ":c:func:`!PyUnicode_GET_SIZE`" msgstr ":c:func:`!PyUnicode_GET_SIZE`" -#: ../../whatsnew/3.12.rst:1965 +#: ../../whatsnew/3.12.rst:1967 msgid ":c:func:`!PyUnicode_GetSize`" msgstr ":c:func:`!PyUnicode_GetSize`" -#: ../../whatsnew/3.12.rst:1966 +#: ../../whatsnew/3.12.rst:1968 msgid ":c:func:`!PyUnicode_GET_DATA_SIZE`" msgstr ":c:func:`!PyUnicode_GET_DATA_SIZE`" -#: ../../whatsnew/3.12.rst:1968 +#: ../../whatsnew/3.12.rst:1970 msgid "" "Remove the ``PyUnicode_InternImmortal()`` function macro. (Contributed by " "Victor Stinner in :gh:`85858`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1971 +#: ../../whatsnew/3.12.rst:1973 msgid "" "Remove ``Jython`` compatibility hacks from several stdlib modules and tests. " "(Contributed by Nikita Sobolev in :gh:`99482`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1974 +#: ../../whatsnew/3.12.rst:1976 msgid "" "Remove ``_use_broken_old_ctypes_structure_semantics_`` flag from :mod:" "`ctypes` module. (Contributed by Nikita Sobolev in :gh:`99285`.)" diff --git a/whatsnew/3.3.po b/whatsnew/3.3.po index 533cde0905..0d5d3b7c0f 100644 --- a/whatsnew/3.3.po +++ b/whatsnew/3.3.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-22 00:04+0000\n" +"POT-Creation-Date: 2023-07-24 00:03+0000\n" "PO-Revision-Date: 2018-05-23 16:20+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -2905,9 +2905,9 @@ msgstr "struct" #: ../../whatsnew/3.3.rst:1987 msgid "" -"The :mod:`struct` module now supports ``ssize_t`` and ``size_t`` via the new " -"codes ``n`` and ``N``, respectively. (Contributed by Antoine Pitrou in :" -"issue:`3163`.)" +"The :mod:`struct` module now supports :c:type:`ssize_t` and :c:type:`size_t` " +"via the new codes ``n`` and ``N``, respectively. (Contributed by Antoine " +"Pitrou in :issue:`3163`.)" msgstr "" #: ../../whatsnew/3.3.rst:1993 diff --git a/whatsnew/3.5.po b/whatsnew/3.5.po index c9b941d61e..a079ea1c87 100644 --- a/whatsnew/3.5.po +++ b/whatsnew/3.5.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-23 00:04+0000\n" +"POT-Creation-Date: 2023-07-24 00:03+0000\n" "PO-Revision-Date: 2018-05-23 16:20+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -2790,8 +2790,8 @@ msgstr "" #: ../../whatsnew/3.5.rst:2194 msgid "" "A new :c:func:`PyErr_FormatV` function similar to :c:func:`PyErr_Format`, " -"but accepts a ``va_list`` argument. (Contributed by Antoine Pitrou in :issue:" -"`18711`.)" +"but accepts a :c:type:`va_list` argument. (Contributed by Antoine Pitrou in :" +"issue:`18711`.)" msgstr "" #: ../../whatsnew/3.5.rst:2198 diff --git a/whatsnew/3.9.po b/whatsnew/3.9.po index afddb424b6..5a561bed6e 100644 --- a/whatsnew/3.9.po +++ b/whatsnew/3.9.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-22 00:04+0000\n" +"POT-Creation-Date: 2023-07-24 00:03+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-" @@ -1620,10 +1620,10 @@ msgstr "" #: ../../whatsnew/3.9.rst:1118 msgid "" -"``array('u')`` now uses ``wchar_t`` as C type instead of ``Py_UNICODE``. " -"This change doesn't affect to its behavior because ``Py_UNICODE`` is alias " -"of ``wchar_t`` since Python 3.3. (Contributed by Inada Naoki in :issue:" -"`34538`.)" +"``array('u')`` now uses :c:type:`wchar_t` as C type instead of " +"``Py_UNICODE``. This change doesn't affect to its behavior because " +"``Py_UNICODE`` is alias of :c:type:`wchar_t` since Python 3.3. (Contributed " +"by Inada Naoki in :issue:`34538`.)" msgstr "" #: ../../whatsnew/3.9.rst:1123 @@ -1818,7 +1818,7 @@ msgstr "" msgid "" ":pep:`573`: Added :c:func:`PyType_FromModuleAndSpec` to associate a module " "with a class; :c:func:`PyType_GetModule` and :c:func:`PyType_GetModuleState` " -"to retrieve the module and its state; and :c:data:`PyCMethod` and :c:macro:" +"to retrieve the module and its state; and :c:type:`PyCMethod` and :c:macro:" "`METH_METHOD` to allow a method to access the class it was defined in. " "(Contributed by Marcel Plch and Petr Viktorin in :issue:`38787`.)" msgstr "" From 6dd0a6bccfe400155df56ecca7c097656ebcf9e1 Mon Sep 17 00:00:00 2001 From: Matt Wang Date: Mon, 24 Jul 2023 15:30:59 +0800 Subject: [PATCH 10/10] fix: resolve fuzzy entries --- c-api/call.po | 18 +- c-api/file.po | 3 +- c-api/gcsupport.po | 2 +- c-api/method.po | 3 +- c-api/refcounting.po | 3 +- c-api/stable.po | 3 +- c-api/typeobj.po | 18 +- c-api/unicode.po | 56 +++---- library/array.po | 5 +- library/asyncio-dev.po | 6 +- library/asyncio-eventloop.po | 5 +- library/asyncio-platforms.po | 3 +- library/constants.po | 10 +- library/ctypes.po | 9 +- library/ftplib.po | 9 +- library/gc.po | 3 +- library/os.po | 94 ++++------- library/platform.po | 3 +- library/struct.po | 10 +- library/sys.po | 13 +- library/tempfile.po | 6 +- library/urllib.request.po | 3 +- reference/lexical_analysis.po | 3 +- tutorial/controlflow.po | 10 +- tutorial/introduction.po | 5 +- whatsnew/3.10.po | 303 +++++++++------------------------- whatsnew/3.11.po | 178 +++----------------- 27 files changed, 217 insertions(+), 567 deletions(-) diff --git a/c-api/call.po b/c-api/call.po index 7a5dc34edc..d125073afb 100644 --- a/c-api/call.po +++ b/c-api/call.po @@ -131,7 +131,6 @@ msgstr "" "典),那麼實作 vectorcall 就沒有意義。" #: ../../c-api/call.rst:74 -#, fuzzy msgid "" "Classes can implement the vectorcall protocol by enabling the :c:macro:" "`Py_TPFLAGS_HAVE_VECTORCALL` flag and setting :c:member:`~PyTypeObject." @@ -139,7 +138,7 @@ msgid "" "*vectorcallfunc* appears. This is a pointer to a function with the following " "signature:" msgstr "" -"類別可以透過啟用 :const:`Py_TPFLAGS_HAVE_VECTORCALL` 旗標並將 :c:member:" +"類別可以透過啟用 :c:macro:`Py_TPFLAGS_HAVE_VECTORCALL` 旗標並將 :c:member:" "`~PyTypeObject.tp_vectorcall_offset` 設定為物件結構中有出現 *vectorcallfunc* " "的 offset 來實作 vectorcall 協定。這是一個指向具有以下簽章之函式的指標:" @@ -163,12 +162,11 @@ msgid "*nargsf* is the number of positional arguments plus possibly the" msgstr "*nargsf* 是位置引數的數量加上可能會有的" #: ../../c-api/call.rst:87 -#, fuzzy msgid "" ":c:macro:`PY_VECTORCALL_ARGUMENTS_OFFSET` flag. To get the actual number of " "positional arguments from *nargsf*, use :c:func:`PyVectorcall_NARGS`." msgstr "" -":const:`PY_VECTORCALL_ARGUMENTS_OFFSET` 旗標。如果要從 *nargsf* 獲得實際的位" +":c:macro:`PY_VECTORCALL_ARGUMENTS_OFFSET` 旗標。如果要從 *nargsf* 獲得實際的位" "置引數數量,請使用 :c:func:`PyVectorcall_NARGS`。" #: ../../c-api/call.rst:94 @@ -205,7 +203,6 @@ msgstr "" "``args[0]`` 被改變。" #: ../../c-api/call.rst:106 -#, fuzzy msgid "" "Whenever they can do so cheaply (without additional allocation), callers are " "encouraged to use :c:macro:`PY_VECTORCALL_ARGUMENTS_OFFSET`. Doing so will " @@ -213,7 +210,7 @@ msgid "" "include a prepended *self* argument) very efficiently." msgstr "" "當可以以幾乎無代價的方式(無需佔據額外的記憶體)來達成,那麼會推薦呼叫者使" -"用 :const:`PY_VECTORCALL_ARGUMENTS_OFFSET`。這樣做會讓如 bound method(繫結方" +"用 :c:macro:`PY_VECTORCALL_ARGUMENTS_OFFSET`。這樣做會讓如 bound method(繫結方" "法)之類的可呼叫函式非常有效地繼續向前呼叫(這類函式包含一個在首位的 *self* " "引數)。" @@ -315,7 +312,6 @@ msgstr "" "tuple 和 dict 格式給定。" #: ../../c-api/call.rst:175 -#, fuzzy msgid "" "This is a specialized function, intended to be put in the :c:member:" "`~PyTypeObject.tp_call` slot or be used in an implementation of ``tp_call``. " @@ -323,7 +319,7 @@ msgid "" "not fall back to ``tp_call``." msgstr "" "這是一個專門函式,其目的是被放入 :c:member:`~PyTypeObject.tp_call` 擴充槽或是" -"用於 ``tp_call`` 的實作。它不會檢查 :const:`Py_TPFLAGS_HAVE_VECTORCALL` 旗標" +"用於 ``tp_call`` 的實作。它不會檢查 :c:macro:`Py_TPFLAGS_HAVE_VECTORCALL` 旗標" "並且它不會退回 (fall back) 使用 ``tp_call``。" #: ../../c-api/call.rst:186 @@ -653,7 +649,6 @@ msgstr "" "方已經擁有一個要作為關鍵字引數的字典、但沒有作為位置引數的 tuple 時才被使用。" #: ../../c-api/call.rst:390 -#, fuzzy msgid "" "Call a method using the vectorcall calling convention. The name of the " "method is given as a Python string *name*. The object whose method is called " @@ -668,16 +663,15 @@ msgstr "" "*name* 的格式給定。被呼叫 method 的物件為 *args[0]*,而 *args* 陣列從 " "*args[1]* 開始的部分則代表呼叫的引數。必須傳入至少一個位置引數。*nargsf* 為包" "括 *args[0]* 在內的位置引數的數量,如果 ``args[0]`` 的值可能被臨時改變則要再" -"加上 :const:`PY_VECTORCALL_ARGUMENTS_OFFSET`。關鍵字引數可以像在 :c:func:" +"加上 :c:macro:`PY_VECTORCALL_ARGUMENTS_OFFSET`。關鍵字引數可以像在 :c:func:" "`PyObject_Vectorcall` 中一樣被傳入。" #: ../../c-api/call.rst:399 -#, fuzzy msgid "" "If the object has the :c:macro:`Py_TPFLAGS_METHOD_DESCRIPTOR` feature, this " "will call the unbound method object with the full *args* vector as arguments." msgstr "" -"如果物件具有 :const:`Py_TPFLAGS_METHOD_DESCRIPTOR` 特性,這將以完整的 *args* " +"如果物件具有 :c:macro:`Py_TPFLAGS_METHOD_DESCRIPTOR` 特性,這將以完整的 *args* " "向量作為引數來呼叫 unbound method(未繫結方法)物件。" #: ../../c-api/call.rst:410 diff --git a/c-api/file.po b/c-api/file.po index c4a6e48ba7..9637c1d229 100644 --- a/c-api/file.po +++ b/c-api/file.po @@ -160,14 +160,13 @@ msgstr "" "``setopencodehook``\\ 。" #: ../../c-api/file.rst:95 -#, fuzzy msgid "" "Write object *obj* to file object *p*. The only supported flag for *flags* " "is :c:macro:`Py_PRINT_RAW`; if given, the :func:`str` of the object is " "written instead of the :func:`repr`. Return ``0`` on success or ``-1`` on " "failure; the appropriate exception will be set." msgstr "" -"將物件 *obj* 寫入檔案物件 *p*。 *flags* 唯一支援的旗標是 :const:" +"將物件 *obj* 寫入檔案物件 *p*。 *flags* 唯一支援的旗標是 :c:macro:" "`Py_PRINT_RAW`;如果有給定,則寫入物件的 :func:`str` 而不是 :func:`repr`。在" "成功回傳 ``0`` 或在失敗回傳 ``-1``;將設定適當的例外。" diff --git a/c-api/gcsupport.po b/c-api/gcsupport.po index c6702ff165..13e0eb53de 100644 --- a/c-api/gcsupport.po +++ b/c-api/gcsupport.po @@ -43,7 +43,7 @@ msgstr "" #: ../../c-api/gcsupport.rst:24 msgid ":c:macro:`Py_TPFLAGS_HAVE_GC`" -msgstr "" +msgstr ":c:macro:`Py_TPFLAGS_HAVE_GC`" #: ../../c-api/gcsupport.rst:22 msgid "" diff --git a/c-api/method.po b/c-api/method.po index 76120a5eaf..749218e03a 100644 --- a/c-api/method.po +++ b/c-api/method.po @@ -25,13 +25,12 @@ msgid "Instance Method Objects" msgstr "實例方法物件 (Instance Method Objects)" #: ../../c-api/method.rst:10 -#, fuzzy msgid "" "An instance method is a wrapper for a :c:type:`PyCFunction` and the new way " "to bind a :c:type:`PyCFunction` to a class object. It replaces the former " "call ``PyMethod_New(func, NULL, class)``." msgstr "" -"實例方法是 :c:data:`PyCFunction` 的包裝器 (wrapper),也是將 :c:data:" +"實例方法是 :c:type:`PyCFunction` 的包裝器 (wrapper),也是將 :c:type:" "`PyCFunction` 繫結 (bind) 到類別物件的一種新方式。它替代了原先對 " "``PyMethod_New(func, NULL, class)`` 的呼叫。" diff --git a/c-api/refcounting.po b/c-api/refcounting.po index 7c866dae1b..7f9b3153dd 100644 --- a/c-api/refcounting.po +++ b/c-api/refcounting.po @@ -162,7 +162,6 @@ msgstr "" "`Py_XDECREF`。" #: ../../c-api/refcounting.rst:103 -#, fuzzy msgid "" "The deallocation function can cause arbitrary Python code to be invoked (e." "g. when a class instance with a :meth:`~object.__del__` method is " @@ -174,7 +173,7 @@ msgid "" "object in a temporary variable, update the list data structure, and then " "call :c:func:`Py_DECREF` for the temporary variable." msgstr "" -"釋放函式可以導致任意 Python 程式碼被調用(例如,當釋放具有 :meth:`__del__` 方" +"釋放函式可以導致任意 Python 程式碼被調用(例如,當釋放具有 :meth:`~object.__del__` 方" "法的類別實例時)。雖然此類程式碼中的例外不會被傳遞出來,但​​執行的程式碼可以自" "由存取所有 Python 全域變數。這意味著在調用 :c:func:`Py_DECREF` 之前,可從全域" "變數存取的任何物件都應處於一致狀態。例如,從 list 中刪除物件的程式碼應將已刪" diff --git a/c-api/stable.po b/c-api/stable.po index 3651b428d1..59f5a6d71c 100644 --- a/c-api/stable.po +++ b/c-api/stable.po @@ -140,7 +140,6 @@ msgstr "" "在包含 ``Python.h`` 之前定義此巨集以選擇只使用受限 API,並挑選受限 API 版本。" #: ../../c-api/stable.rst:77 -#, fuzzy msgid "" "Define ``Py_LIMITED_API`` to the value of :c:macro:`PY_VERSION_HEX` " "corresponding to the lowest Python version your extension supports. The " @@ -148,7 +147,7 @@ msgid "" "the specified one onward, and can use Limited API introduced up to that " "version." msgstr "" -"將 ``Py_LIMITED_API`` 定義為對應於你的擴充有支援的最低 Python 版本的 :c:data:" +"將 ``Py_LIMITED_API`` 定義為對應於你的擴充有支援的最低 Python 版本的 :c:macro:" "`PY_VERSION_HEX` 值。該擴充無需重新編譯即可與從指定版本開始的所有 Python 3 版" "本一起使用,並且可以使用過去版本有引入的受限 API。" diff --git a/c-api/typeobj.po b/c-api/typeobj.po index 6144091a33..3afafa2283 100644 --- a/c-api/typeobj.po +++ b/c-api/typeobj.po @@ -2336,54 +2336,48 @@ msgid "Comparison" msgstr "" #: ../../c-api/typeobj.rst:1519 -#, fuzzy msgid ":c:macro:`Py_LT`" -msgstr ":const:`Py_LT`" +msgstr ":c:macro:`Py_LT`" #: ../../c-api/typeobj.rst:1519 msgid "``<``" msgstr "``<``" #: ../../c-api/typeobj.rst:1521 -#, fuzzy msgid ":c:macro:`Py_LE`" -msgstr ":const:`Py_LE`" +msgstr ":c:macro:`Py_LE`" #: ../../c-api/typeobj.rst:1521 msgid "``<=``" msgstr "``<=``" #: ../../c-api/typeobj.rst:1523 -#, fuzzy msgid ":c:macro:`Py_EQ`" -msgstr ":const:`Py_EQ`" +msgstr ":c:macro:`Py_EQ`" #: ../../c-api/typeobj.rst:1523 msgid "``==``" msgstr "``==``" #: ../../c-api/typeobj.rst:1525 -#, fuzzy msgid ":c:macro:`Py_NE`" -msgstr ":const:`Py_NE`" +msgstr ":c:macro:`Py_NE`" #: ../../c-api/typeobj.rst:1525 msgid "``!=``" msgstr "``!=``" #: ../../c-api/typeobj.rst:1527 -#, fuzzy msgid ":c:macro:`Py_GT`" -msgstr ":const:`Py_GT`" +msgstr ":c:macro:`Py_GT`" #: ../../c-api/typeobj.rst:1527 msgid "``>``" msgstr "``>``" #: ../../c-api/typeobj.rst:1529 -#, fuzzy msgid ":c:macro:`Py_GE`" -msgstr ":const:`Py_GE`" +msgstr ":c:macro:`Py_GE`" #: ../../c-api/typeobj.rst:1529 msgid "``>=``" diff --git a/c-api/unicode.po b/c-api/unicode.po index cf79da2b43..ad1c353b75 100644 --- a/c-api/unicode.po +++ b/c-api/unicode.po @@ -22,7 +22,7 @@ msgstr "" #: ../../c-api/unicode.rst:6 msgid "Unicode Objects and Codecs" -msgstr "Unicode物件與編碼" +msgstr "Unicode 物件與編解碼器" #: ../../c-api/unicode.rst:12 msgid "Unicode Objects" @@ -458,7 +458,7 @@ msgstr "" #: ../../c-api/unicode.rst:428 msgid "``0``" -msgstr "" +msgstr "``0``" #: ../../c-api/unicode.rst:428 msgid "The conversion will be zero padded for numeric values." @@ -466,7 +466,7 @@ msgstr "" #: ../../c-api/unicode.rst:430 msgid "``-``" -msgstr "" +msgstr "``-``" #: ../../c-api/unicode.rst:430 msgid "" @@ -491,43 +491,43 @@ msgstr "" #: ../../c-api/unicode.rst:443 msgid "``l``" -msgstr "" +msgstr "``l``" #: ../../c-api/unicode.rst:443 msgid ":c:expr:`long` or :c:expr:`unsigned long`" -msgstr "" +msgstr ":c:expr:`long` 或 :c:expr:`unsigned long`" #: ../../c-api/unicode.rst:445 msgid "``ll``" -msgstr "" +msgstr "``ll``" #: ../../c-api/unicode.rst:445 msgid ":c:expr:`long long` or :c:expr:`unsigned long long`" -msgstr "" +msgstr ":c:expr:`long long` 或 :c:expr:`unsigned long long`" #: ../../c-api/unicode.rst:447 msgid "``j``" -msgstr "" +msgstr "``j``" #: ../../c-api/unicode.rst:447 msgid ":c:type:`intmax_t` or :c:type:`uintmax_t`" -msgstr "" +msgstr ":c:type:`intmax_t` 或 :c:type:`uintmax_t`" #: ../../c-api/unicode.rst:449 msgid "``z``" -msgstr "" +msgstr "``z``" #: ../../c-api/unicode.rst:449 msgid ":c:type:`size_t` or :c:type:`ssize_t`" -msgstr "" +msgstr ":c:type:`size_t` 或 :c:type:`ssize_t`" #: ../../c-api/unicode.rst:451 msgid "``t``" -msgstr "" +msgstr "``t``" #: ../../c-api/unicode.rst:451 msgid ":c:type:`ptrdiff_t`" -msgstr "" +msgstr ":c:type:`ptrdiff_t`" #: ../../c-api/unicode.rst:454 msgid "" @@ -553,7 +553,7 @@ msgstr "" #: ../../c-api/unicode.rst:467 msgid "``%``" -msgstr "" +msgstr "``%``" #: ../../c-api/unicode.rst:468 msgid "*n/a*" @@ -565,7 +565,7 @@ msgstr "" #: ../../c-api/unicode.rst:471 msgid "``d``, ``i``" -msgstr "" +msgstr "``d``, ``i``" #: ../../c-api/unicode.rst:472 ../../c-api/unicode.rst:476 #: ../../c-api/unicode.rst:480 ../../c-api/unicode.rst:484 @@ -579,7 +579,7 @@ msgstr "" #: ../../c-api/unicode.rst:475 msgid "``u``" -msgstr "" +msgstr "``u``" #: ../../c-api/unicode.rst:477 msgid "The decimal representation of an unsigned C integer." @@ -587,7 +587,7 @@ msgstr "" #: ../../c-api/unicode.rst:479 msgid "``o``" -msgstr "" +msgstr "``o``" #: ../../c-api/unicode.rst:481 msgid "The octal representation of an unsigned C integer." @@ -595,7 +595,7 @@ msgstr "" #: ../../c-api/unicode.rst:483 msgid "``x``" -msgstr "" +msgstr "``x``" #: ../../c-api/unicode.rst:485 msgid "The hexadecimal representation of an unsigned C integer (lowercase)." @@ -603,7 +603,7 @@ msgstr "" #: ../../c-api/unicode.rst:487 msgid "``X``" -msgstr "" +msgstr "``X``" #: ../../c-api/unicode.rst:489 msgid "The hexadecimal representation of an unsigned C integer (uppercase)." @@ -611,11 +611,11 @@ msgstr "" #: ../../c-api/unicode.rst:491 msgid "``c``" -msgstr "" +msgstr "``c``" #: ../../c-api/unicode.rst:492 msgid ":c:expr:`int`" -msgstr "" +msgstr ":c:expr:`int`" #: ../../c-api/unicode.rst:493 msgid "A single character." @@ -623,7 +623,7 @@ msgstr "" #: ../../c-api/unicode.rst:495 msgid "``s``" -msgstr "" +msgstr "``s``" #: ../../c-api/unicode.rst:496 msgid ":c:expr:`const char*` or :c:expr:`const wchar_t*`" @@ -1142,7 +1142,7 @@ msgstr "" #: ../../c-api/unicode.rst:946 msgid "UTF-8 Codecs" -msgstr "" +msgstr "UTF-8 編解碼器" #: ../../c-api/unicode.rst:948 msgid "These are the UTF-8 codec APIs:" @@ -1207,7 +1207,7 @@ msgstr "" #: ../../c-api/unicode.rst:1009 msgid "UTF-32 Codecs" -msgstr "" +msgstr "UTF-32 編解碼器" #: ../../c-api/unicode.rst:1011 msgid "These are the UTF-32 codec APIs:" @@ -1266,7 +1266,7 @@ msgstr "" #: ../../c-api/unicode.rst:1059 msgid "UTF-16 Codecs" -msgstr "" +msgstr "UTF-16 編解碼器" #: ../../c-api/unicode.rst:1061 msgid "These are the UTF-16 codec APIs:" @@ -1313,7 +1313,7 @@ msgstr "" #: ../../c-api/unicode.rst:1110 msgid "UTF-7 Codecs" -msgstr "" +msgstr "UTF-7 編解碼器" #: ../../c-api/unicode.rst:1112 msgid "These are the UTF-7 codec APIs:" @@ -1377,7 +1377,7 @@ msgstr "" #: ../../c-api/unicode.rst:1171 msgid "Latin-1 Codecs" -msgstr "" +msgstr "Latin-1 編解碼器" #: ../../c-api/unicode.rst:1173 msgid "" @@ -1400,7 +1400,7 @@ msgstr "" #: ../../c-api/unicode.rst:1191 msgid "ASCII Codecs" -msgstr "" +msgstr "ASCII 編解碼器" #: ../../c-api/unicode.rst:1193 msgid "" diff --git a/library/array.po b/library/array.po index 336ad5e0a8..d4376b7284 100644 --- a/library/array.po +++ b/library/array.po @@ -210,15 +210,14 @@ msgid "It can be 16 bits or 32 bits depending on the platform." msgstr "根據平台的不同,它有可能是 16 位元或者 32 位元。" #: ../../library/array.rst:53 -#, fuzzy msgid "" "``array('u')`` now uses :c:type:`wchar_t` as C type instead of deprecated " "``Py_UNICODE``. This change doesn't affect its behavior because " "``Py_UNICODE`` is alias of :c:type:`wchar_t` since Python 3.3." msgstr "" -"目前 ``array('u')`` 使用 ``wchar_t`` 取代已棄用的 ``Py_UNICODE`` 作為 C " +"目前 ``array('u')`` 使用 :c:type:`wchar_t` 取代已棄用的 ``Py_UNICODE`` 作為 C " "type。這個異動並沒有影響到它的作用,因爲自從 Python 3.3 開始 ``Py_UNICODE`` " -"即為 ``wchar_t`` 的別名。" +"即為 :c:type:`wchar_t` 的別名。" #: ../../library/array.rst:61 msgid "" diff --git a/library/asyncio-dev.po b/library/asyncio-dev.po index cf87ea1b7a..27f0911772 100644 --- a/library/asyncio-dev.po +++ b/library/asyncio-dev.po @@ -74,14 +74,13 @@ msgid "In addition to enabling the debug mode, consider also:" msgstr "除了啟用除錯模式外,還要考慮:" #: ../../library/asyncio-dev.rst:36 -#, fuzzy msgid "" "setting the log level of the :ref:`asyncio logger ` to :py:" "const:`logging.DEBUG`, for example the following snippet of code can be run " "at startup of the application::" msgstr "" "將 :ref:`asyncio logger(日誌記錄器) `\\ 的日誌級别設置為 :" -"py:data:`logging.DEBUG`,例如下面的程式片段可以在應用程式啟動時運行:\n" +"py:const:`logging.DEBUG`,例如下面的程式片段可以在應用程式啟動時運行:\n" "\n" "::" @@ -260,12 +259,11 @@ msgstr "" "logger 執行的。" #: ../../library/asyncio-dev.rst:145 -#, fuzzy msgid "" "The default log level is :py:const:`logging.INFO`, which can be easily " "adjusted::" msgstr "" -"日誌級別被預設為 :py:data:`logging.INFO`,它可以很容易地被調整:\n" +"日誌級別被預設為 :py:const:`logging.INFO`,它可以很容易地被調整:\n" "\n" "::" diff --git a/library/asyncio-eventloop.po b/library/asyncio-eventloop.po index 611e7918fa..05d60d7dee 100644 --- a/library/asyncio-eventloop.po +++ b/library/asyncio-eventloop.po @@ -1021,14 +1021,13 @@ msgid "The *host* parameter can be a sequence of strings." msgstr "" #: ../../library/asyncio-eventloop.rst:758 -#, fuzzy msgid "" "Added *ssl_handshake_timeout* and *start_serving* parameters. The socket " "option :py:const:`~socket.TCP_NODELAY` is set by default for all TCP " "connections." msgstr "" -"新增 *ssl_handshake_timeout* 與 *start_serving* 參數。\\ *path* 參數現在可為" -"一個 :class:`~pathlib.Path` 物件。" +"新增 *ssl_handshake_timeout* 與 *start_serving* 參數。所有 TCP 連線都預設有 " +":py:const:`~socket.TCP_NODELAY` socket 選項。" #: ../../library/asyncio-eventloop.rst:768 msgid "" diff --git a/library/asyncio-platforms.po b/library/asyncio-platforms.po index ffcffcbae3..c650699e29 100644 --- a/library/asyncio-platforms.po +++ b/library/asyncio-platforms.po @@ -66,13 +66,12 @@ msgid "All event loops on Windows do not support the following methods:" msgstr "Windows 上的所有事件迴圈都不支援以下 method(方法):" #: ../../library/asyncio-platforms.rst:38 -#, fuzzy msgid "" ":meth:`loop.create_unix_connection` and :meth:`loop.create_unix_server` are " "not supported. The :const:`socket.AF_UNIX` socket family is specific to Unix." msgstr "" "不支援 :meth:`loop.create_unix_connection` 和 :meth:`loop." -"create_unix_server`。:data:`socket.AF_UNIX` socket 系列常數僅限於 Unix 上使" +"create_unix_server`。:const:`socket.AF_UNIX` socket 系列常數僅限於 Unix 上使" "用。" #: ../../library/asyncio-platforms.rst:42 diff --git a/library/constants.po b/library/constants.po index e594040d2c..96a30cff11 100644 --- a/library/constants.po +++ b/library/constants.po @@ -46,7 +46,6 @@ msgstr "" "出 :exc:`SyntaxError`。" #: ../../library/constants.rst:22 -#, fuzzy msgid "" "An object frequently used to represent the absence of a value, as when " "default arguments are not passed to a function. Assignments to ``None`` are " @@ -55,10 +54,9 @@ msgid "" msgstr "" "型別 ``NoneType`` 的唯一值。``None`` 經常被使用來表達缺少值,例如未傳送預設的" "引數至函式時,相對應參數即會被賦予 ``None``。對於 ``None`` 的賦值是不合法的," -"並且會拋出 :exc:`SyntaxError`。``None`` 是型別 :data:`NoneType` 的唯一實例。" +"並且會拋出 :exc:`SyntaxError`。``None`` 是型別 :data:`~types.NoneType` 的唯一實例。" #: ../../library/constants.rst:30 -#, fuzzy msgid "" "A special value which should be returned by the binary special methods (e." "g. :meth:`~object.__eq__`, :meth:`~object.__lt__`, :meth:`~object.__add__`, :" @@ -69,10 +67,10 @@ msgid "" "boolean context. ``NotImplemented`` is the sole instance of the :data:`types." "NotImplementedType` type." msgstr "" -"會被二元特殊方法 (binary special methods)(如::meth:`__eq__`、:meth:" -"`__lt__`、:meth:`__add__`,:meth:`__rsub__` 等)所回傳的特殊值,代表著該運算" +"會被二元特殊方法 (binary special methods)(如::meth:`~object.__eq__`、:meth:" +"`~object.__lt__`、:meth:`~object.__add__`、:meth:`~object.__rsub__` 等)所回傳的特殊值,代表著該運算" "沒有針對其他型別的實作。同理也可以被原地二元特殊方法 (in-place binary " -"special methods) (如::meth:`__imul__`、:meth:`__iand__` 等)回傳。它不應該" +"special methods) (如::meth:`~object.__imul__`、:meth:`~object.__iand__` 等)回傳。它不應該" "被作為 boolean(布林)來解讀。``NotImplemented`` 是型別 :data:`types." "NotImplementedType` 的唯一實例。" diff --git a/library/ctypes.po b/library/ctypes.po index e3c849e3ca..db3176d87a 100644 --- a/library/ctypes.po +++ b/library/ctypes.po @@ -259,9 +259,8 @@ msgid ":class:`c_wchar`" msgstr ":class:`c_wchar`" #: ../../library/ctypes.rst:223 -#, fuzzy msgid ":c:type:`wchar_t`" -msgstr ":c:expr:`wchar_t`" +msgstr ":c:type:`wchar_t`" #: ../../library/ctypes.rst:223 msgid "1-character string" @@ -358,18 +357,16 @@ msgid ":class:`c_size_t`" msgstr ":class:`c_size_t`" #: ../../library/ctypes.rst:246 -#, fuzzy msgid ":c:type:`size_t`" -msgstr ":c:type:`time_t`" +msgstr ":c:type:`size_t`" #: ../../library/ctypes.rst:248 msgid ":class:`c_ssize_t`" msgstr ":class:`c_ssize_t`" #: ../../library/ctypes.rst:248 -#, fuzzy msgid ":c:type:`ssize_t` or :c:expr:`Py_ssize_t`" -msgstr ":c:expr:`ssize_t` 或 :c:expr:`Py_ssize_t`" +msgstr ":c:type:`ssize_t` 或 :c:expr:`Py_ssize_t`" #: ../../library/ctypes.rst:251 msgid ":class:`c_time_t`" diff --git a/library/ftplib.po b/library/ftplib.po index 3a311e7405..17e9b01527 100644 --- a/library/ftplib.po +++ b/library/ftplib.po @@ -127,13 +127,12 @@ msgstr "" "的)結構中。最佳實踐請參閱 :ref:`ssl-security`。" #: ../../library/ftplib.rst:105 -#, fuzzy msgid "" "The class now supports hostname check with :attr:`ssl.SSLContext." "check_hostname` and *Server Name Indication* (see :const:`ssl.HAS_SNI`)." msgstr "" "該類別現在支援使用 :attr:`ssl.SSLContext.check_hostname` 和 *Server Name " -"Indication* 進行主機名 (hostname) 檢查(參見 :data:`ssl.HAS_SNI`)。" +"Indication* 進行主機名 (hostname) 檢查(參見 :const:`ssl.HAS_SNI`)。" #: ../../library/ftplib.rst:116 msgid "The deprecated *keyfile* and *certfile* parameters have been removed." @@ -552,9 +551,8 @@ msgid "" msgstr ":class:`FTP_TLS` 類別繼承自 :class:`FTP`,並另外定義了這些的物件:" #: ../../library/ftplib.rst:434 -#, fuzzy msgid "The SSL version to use (defaults to :data:`ssl.PROTOCOL_SSLv23`)." -msgstr "要使用的 SSL 版本(預設為 :attr:`ssl.PROTOCOL_SSLv23`)。" +msgstr "要使用的 SSL 版本(預設為 :data:`ssl.PROTOCOL_SSLv23`)。" #: ../../library/ftplib.rst:438 msgid "" @@ -564,13 +562,12 @@ msgstr "" "根據 :attr:`ssl_version` 屬性中指定的內容,使用 TLS 或 SSL 設定安全控制連線。" #: ../../library/ftplib.rst:441 -#, fuzzy msgid "" "The method now supports hostname check with :attr:`ssl.SSLContext." "check_hostname` and *Server Name Indication* (see :const:`ssl.HAS_SNI`)." msgstr "" "該方法現在支援使用 :attr:`ssl.SSLContext.check_hostname` 和 *Server Name " -"Indication* 進行主機名檢查(參見 :data:`ssl.HAS_SNI`)。" +"Indication* 進行主機名檢查(參見 :const:`ssl.HAS_SNI`)。" #: ../../library/ftplib.rst:448 msgid "" diff --git a/library/gc.po b/library/gc.po index 4f9145d56e..94e621c177 100644 --- a/library/gc.po +++ b/library/gc.po @@ -365,12 +365,11 @@ msgstr "" "`DEBUG_UNCOLLECTABLE`,所有無法被回收的物件會被印出。" #: ../../library/gc.rst:261 -#, fuzzy msgid "" "Following :pep:`442`, objects with a :meth:`~object.__del__` method don't " "end up in :data:`gc.garbage` anymore." msgstr "" -"根據 :pep:`442`,帶有 :meth:`~object.__del__` method 的物件最終不會在 :attr:" +"根據 :pep:`442`,帶有 :meth:`~object.__del__` method 的物件最終不會在 :data:" "`gc.garbage` 內。" #: ../../library/gc.rst:267 diff --git a/library/os.po b/library/os.po index 5e6f3f0066..a28530af59 100644 --- a/library/os.po +++ b/library/os.po @@ -1253,7 +1253,6 @@ msgid "On Windows, this function is limited to pipes." msgstr "" #: ../../library/os.rst:1119 ../../library/os.rst:1597 -#, fuzzy msgid "Added support for pipes on Windows." msgstr "新增對 Windows 上 pipe 的支援。" @@ -2091,64 +2090,52 @@ msgid "" msgstr "" #: ../../library/os.rst:1963 -#, fuzzy msgid ":const:`stat.UF_NODUMP`" -msgstr ":data:`stat.UF_NODUMP`" +msgstr ":const:`stat.UF_NODUMP`" #: ../../library/os.rst:1964 -#, fuzzy msgid ":const:`stat.UF_IMMUTABLE`" -msgstr ":data:`stat.UF_IMMUTABLE`" +msgstr ":const:`stat.UF_IMMUTABLE`" #: ../../library/os.rst:1965 -#, fuzzy msgid ":const:`stat.UF_APPEND`" -msgstr ":data:`stat.UF_APPEND`" +msgstr ":const:`stat.UF_APPEND`" #: ../../library/os.rst:1966 -#, fuzzy msgid ":const:`stat.UF_OPAQUE`" -msgstr ":data:`stat.UF_OPAQUE`" +msgstr ":const:`stat.UF_OPAQUE`" #: ../../library/os.rst:1967 -#, fuzzy msgid ":const:`stat.UF_NOUNLINK`" -msgstr ":data:`stat.UF_NOUNLINK`" +msgstr ":const:`stat.UF_NOUNLINK`" #: ../../library/os.rst:1968 -#, fuzzy msgid ":const:`stat.UF_COMPRESSED`" -msgstr ":data:`stat.UF_COMPRESSED`" +msgstr ":const:`stat.UF_COMPRESSED`" #: ../../library/os.rst:1969 -#, fuzzy msgid ":const:`stat.UF_HIDDEN`" -msgstr ":data:`stat.UF_HIDDEN`" +msgstr ":const:`stat.UF_HIDDEN`" #: ../../library/os.rst:1970 -#, fuzzy msgid ":const:`stat.SF_ARCHIVED`" -msgstr ":data:`stat.SF_ARCHIVED`" +msgstr ":const:`stat.SF_ARCHIVED`" #: ../../library/os.rst:1971 -#, fuzzy msgid ":const:`stat.SF_IMMUTABLE`" -msgstr ":data:`stat.SF_IMMUTABLE`" +msgstr ":const:`stat.SF_IMMUTABLE`" #: ../../library/os.rst:1972 -#, fuzzy msgid ":const:`stat.SF_APPEND`" -msgstr ":data:`stat.SF_APPEND`" +msgstr ":const:`stat.SF_APPEND`" #: ../../library/os.rst:1973 -#, fuzzy msgid ":const:`stat.SF_NOUNLINK`" -msgstr ":data:`stat.SF_NOUNLINK`" +msgstr ":const:`stat.SF_NOUNLINK`" #: ../../library/os.rst:1974 -#, fuzzy msgid ":const:`stat.SF_SNAPSHOT`" -msgstr ":data:`stat.SF_SNAPSHOT`" +msgstr ":const:`stat.SF_SNAPSHOT`" #: ../../library/os.rst:1976 msgid "" @@ -2175,99 +2162,80 @@ msgid "" msgstr "" #: ../../library/os.rst:1995 -#, fuzzy msgid ":const:`stat.S_ISUID`" -msgstr ":data:`stat.S_ISUID`" +msgstr ":const:`stat.S_ISUID`" #: ../../library/os.rst:1996 -#, fuzzy msgid ":const:`stat.S_ISGID`" -msgstr ":data:`stat.S_ISGID`" +msgstr ":const:`stat.S_ISGID`" #: ../../library/os.rst:1997 -#, fuzzy msgid ":const:`stat.S_ENFMT`" -msgstr ":data:`stat.S_ENFMT`" +msgstr ":const:`stat.S_ENFMT`" #: ../../library/os.rst:1998 -#, fuzzy msgid ":const:`stat.S_ISVTX`" -msgstr ":data:`stat.S_ISVTX`" +msgstr ":const:`stat.S_ISVTX`" #: ../../library/os.rst:1999 -#, fuzzy msgid ":const:`stat.S_IREAD`" -msgstr ":data:`stat.S_IREAD`" +msgstr ":const:`stat.S_IREAD`" #: ../../library/os.rst:2000 -#, fuzzy msgid ":const:`stat.S_IWRITE`" -msgstr ":data:`stat.S_IWRITE`" +msgstr ":const:`stat.S_IWRITE`" #: ../../library/os.rst:2001 -#, fuzzy msgid ":const:`stat.S_IEXEC`" -msgstr ":data:`stat.S_IEXEC`" +msgstr ":const:`stat.S_IEXEC`" #: ../../library/os.rst:2002 -#, fuzzy msgid ":const:`stat.S_IRWXU`" -msgstr ":data:`stat.S_IRWXU`" +msgstr ":const:`stat.S_IRWXU`" #: ../../library/os.rst:2003 -#, fuzzy msgid ":const:`stat.S_IRUSR`" -msgstr ":data:`stat.S_IRUSR`" +msgstr ":const:`stat.S_IRUSR`" #: ../../library/os.rst:2004 -#, fuzzy msgid ":const:`stat.S_IWUSR`" -msgstr ":data:`stat.S_IWUSR`" +msgstr ":const:`stat.S_IWUSR`" #: ../../library/os.rst:2005 -#, fuzzy msgid ":const:`stat.S_IXUSR`" -msgstr ":data:`stat.S_IXUSR`" +msgstr ":const:`stat.S_IXUSR`" #: ../../library/os.rst:2006 -#, fuzzy msgid ":const:`stat.S_IRWXG`" -msgstr ":data:`stat.S_IRWXG`" +msgstr ":const:`stat.S_IRWXG`" #: ../../library/os.rst:2007 -#, fuzzy msgid ":const:`stat.S_IRGRP`" -msgstr ":data:`stat.S_IRGRP`" +msgstr ":const:`stat.S_IRGRP`" #: ../../library/os.rst:2008 -#, fuzzy msgid ":const:`stat.S_IWGRP`" -msgstr ":data:`stat.S_IWGRP`" +msgstr ":const:`stat.S_IWGRP`" #: ../../library/os.rst:2009 -#, fuzzy msgid ":const:`stat.S_IXGRP`" -msgstr ":data:`stat.S_IXGRP`" +msgstr ":const:`stat.S_IXGRP`" #: ../../library/os.rst:2010 -#, fuzzy msgid ":const:`stat.S_IRWXO`" -msgstr ":data:`stat.S_IRWXO`" +msgstr ":const:`stat.S_IRWXO`" #: ../../library/os.rst:2011 -#, fuzzy msgid ":const:`stat.S_IROTH`" -msgstr ":data:`stat.S_IROTH`" +msgstr ":const:`stat.S_IROTH`" #: ../../library/os.rst:2012 -#, fuzzy msgid ":const:`stat.S_IWOTH`" -msgstr ":data:`stat.S_IWOTH`" +msgstr ":const:`stat.S_IWOTH`" #: ../../library/os.rst:2013 -#, fuzzy msgid ":const:`stat.S_IXOTH`" -msgstr ":data:`stat.S_IXOTH`" +msgstr ":const:`stat.S_IXOTH`" #: ../../library/os.rst:2015 ../../library/os.rst:2043 #: ../../library/os.rst:3422 diff --git a/library/platform.po b/library/platform.po index f124d800e8..f1585c829f 100644 --- a/library/platform.po +++ b/library/platform.po @@ -84,12 +84,11 @@ msgstr "" "在 macOS(也許還有其他平臺)上,可執行檔案可能是包含多種架構的通用檔案。" #: ../../library/platform.rst:48 -#, fuzzy msgid "" "To get at the \"64-bitness\" of the current interpreter, it is more reliable " "to query the :data:`sys.maxsize` attribute::" msgstr "" -"要獲取當前直譯器的 \"64 位元性 (64-bitness)\",更可靠的做法是查詢 :attr:`sys." +"要獲取當前直譯器的 \"64 位元性 (64-bitness)\",更可靠的做法是查詢 :data:`sys." "maxsize` 屬性:\n" "\n" "::" diff --git a/library/struct.po b/library/struct.po index 7504d1edb1..3ca23ad674 100644 --- a/library/struct.po +++ b/library/struct.po @@ -492,9 +492,8 @@ msgid "``n``" msgstr "``n``" #: ../../library/struct.rst:234 -#, fuzzy msgid ":c:type:`ssize_t`" -msgstr ":c:expr:`ssize_t`" +msgstr ":c:type:`ssize_t`" #: ../../library/struct.rst:234 ../../library/struct.rst:236 msgid "\\(3)" @@ -505,9 +504,8 @@ msgid "``N``" msgstr "``N``" #: ../../library/struct.rst:236 -#, fuzzy msgid ":c:type:`size_t`" -msgstr ":c:expr:`size_t`" +msgstr ":c:type:`size_t`" #: ../../library/struct.rst:238 msgid "``e``" @@ -557,7 +555,7 @@ msgstr "" #: ../../library/struct.rst:244 msgid "\\(9)" -msgstr "" +msgstr "\\(9)" #: ../../library/struct.rst:246 msgid "``p``" @@ -565,7 +563,7 @@ msgstr "``p``" #: ../../library/struct.rst:246 msgid "\\(8)" -msgstr "" +msgstr "\\(8)" #: ../../library/struct.rst:248 msgid "``P``" diff --git a/library/sys.po b/library/sys.po index 5d2229b245..77368be496 100644 --- a/library/sys.po +++ b/library/sys.po @@ -224,9 +224,8 @@ msgid "" msgstr "" #: ../../library/sys.rst:169 -#, fuzzy msgid "See also the :data:`sys.stdlib_module_names` list." -msgstr "另請參閱 :attr:`sys.stdlib_module_names` 清單。" +msgstr "另請參閱 :data:`sys.stdlib_module_names` 清單。" #: ../../library/sys.rst:174 msgid "" @@ -802,14 +801,12 @@ msgid "" msgstr "" #: ../../library/sys.rst:538 -#, fuzzy msgid ":const:`warn_default_encoding`" -msgstr ":const:`default_max_str_digits`" +msgstr ":const:`warn_default_encoding`" #: ../../library/sys.rst:538 -#, fuzzy msgid ":option:`-X warn_default_encoding <-X>`" -msgstr ":option:`-X utf8 <-X>`" +msgstr ":option:`-X warn_default_encoding <-X>`" #: ../../library/sys.rst:541 msgid "Added ``quiet`` attribute for the new :option:`-q` flag." @@ -835,11 +832,10 @@ msgid "" msgstr "" #: ../../library/sys.rst:558 -#, fuzzy msgid "" "Added ``warn_default_encoding`` attribute for :option:`-X` " "``warn_default_encoding`` flag." -msgstr "新增 ``isolated`` 屬性,用於 :option:`-I` ``isolated`` 旗標。" +msgstr "新增 ``warn_default_encoding`` 屬性,用於 :option:`-X` ``warn_default_encoding`` 旗標。" #: ../../library/sys.rst:561 msgid "Added the ``safe_path`` attribute for :option:`-P` option." @@ -2494,7 +2490,6 @@ msgid "" msgstr "" #: ../../library/sys.rst:1750 -#, fuzzy msgid "See also the :data:`sys.builtin_module_names` list." msgstr "另請參閱 :attr:`sys.builtin_module_names` 清單。" diff --git a/library/tempfile.po b/library/tempfile.po index f2723977c3..1ab417eb37 100644 --- a/library/tempfile.po +++ b/library/tempfile.po @@ -120,12 +120,11 @@ msgstr "" "object,它的 :attr:`!file` 屬性為底層的真實檔案物件。" #: ../../library/tempfile.rst:62 -#, fuzzy msgid "" "The :py:const:`os.O_TMPFILE` flag is used if it is available and works " "(Linux-specific, requires Linux kernel 3.11 or later)." msgstr "" -"如果可用且可運作,則使用 :py:data:`os.O_TMPFILE` 旗標(僅限於 Linux,需要 " +"如果可用且可運作,則使用 :py:const:`os.O_TMPFILE` 旗標(僅限於 Linux,需要 " "3.11 版本以上的核心)。" #: ../../library/tempfile.rst:65 @@ -145,9 +144,8 @@ msgstr "" "`。" #: ../../library/tempfile.rst:72 -#, fuzzy msgid "The :py:const:`os.O_TMPFILE` flag is now used if available." -msgstr "如果可用,自此開始使用 :py:data:`os.O_TMPFILE` 旗標。" +msgstr "如果可用,自此開始使用 :py:const:`os.O_TMPFILE` 旗標。" #: ../../library/tempfile.rst:74 ../../library/tempfile.rst:139 #: ../../library/tempfile.rst:167 diff --git a/library/urllib.request.po b/library/urllib.request.po index f9394dbe42..1fe64855ad 100644 --- a/library/urllib.request.po +++ b/library/urllib.request.po @@ -218,12 +218,11 @@ msgid "*cafile* and *capath* were added." msgstr "新增 *cafile* 與 *capath*。" #: ../../library/urllib.request.rst:100 -#, fuzzy msgid "" "HTTPS virtual hosts are now supported if possible (that is, if :const:`ssl." "HAS_SNI` is true)." msgstr "" -"HTTPS 虛擬主機 (virtual hosts) 現已支援,只要 :data:`ssl.HAS_SNI` 的值為 " +"HTTPS 虛擬主機 (virtual hosts) 現已支援,只要 :const:`ssl.HAS_SNI` 的值為 " "true。" #: ../../library/urllib.request.rst:104 diff --git a/reference/lexical_analysis.po b/reference/lexical_analysis.po index acdc8d1467..53cd3fc8a7 100644 --- a/reference/lexical_analysis.po +++ b/reference/lexical_analysis.po @@ -606,9 +606,8 @@ msgid "" msgstr "" #: ../../reference/lexical_analysis.rst:554 -#, fuzzy msgid "Escape sequences" -msgstr "escape sequence(跳脫序列)" +msgstr "跳脫序列" #: ../../reference/lexical_analysis.rst:556 msgid "" diff --git a/tutorial/controlflow.po b/tutorial/controlflow.po index abb05753ea..17d4264089 100644 --- a/tutorial/controlflow.po +++ b/tutorial/controlflow.po @@ -28,13 +28,11 @@ msgid "More Control Flow Tools" msgstr "深入了解流程控制" #: ../../tutorial/controlflow.rst:7 -#, fuzzy msgid "" "As well as the :keyword:`while` statement just introduced, Python uses a few " "more that we will encounter in this chapter." msgstr "" -"除了剛才介紹的 :keyword:`while`,Python 擁有在其他程式語言中常用的流程控制語" -"法,並有一些不一樣的改變。" +"除了剛才介紹的 :keyword:`while`,這章節還會介紹一些 Python 的陳述式語法。" #: ../../tutorial/controlflow.rst:14 msgid ":keyword:`!if` Statements" @@ -197,21 +195,19 @@ msgstr "" "子句" #: ../../tutorial/controlflow.rst:166 -#, fuzzy msgid "" "The :keyword:`break` statement breaks out of the innermost enclosing :" "keyword:`for` or :keyword:`while` loop." msgstr "" -":keyword:`break` 陳述式,如同 C 語言,終止包含它的最內部 :keyword:`for` 或 :" +":keyword:`break` 陳述式,終止包含它的最內部 :keyword:`for` 或 :" "keyword:`while` 迴圈。" #: ../../tutorial/controlflow.rst:169 -#, fuzzy msgid "" "A :keyword:`!for` or :keyword:`!while` loop can include an :keyword:`!else` " "clause." msgstr "" -"迴圈內的 :keyword:`!break` 和 :keyword:`!continue` 陳述式及 :keyword:`!else` " +":keyword:`!for` 和 :keyword:`!while` 迴圈可帶有一個 :keyword:`!else` " "子句" #: ../../tutorial/controlflow.rst:171 diff --git a/tutorial/introduction.po b/tutorial/introduction.po index d96b75e3c6..9c7facf927 100644 --- a/tutorial/introduction.po +++ b/tutorial/introduction.po @@ -91,7 +91,6 @@ msgid "Numbers" msgstr "數字 (Number)" #: ../../tutorial/introduction.rst:53 -#, fuzzy msgid "" "The interpreter acts as a simple calculator: you can type an expression at " "it and it will write the value. Expression syntax is straightforward: the " @@ -99,8 +98,8 @@ msgid "" "parentheses (``()``) can be used for grouping. For example::" msgstr "" "直譯器如同一台簡單的計算機:你可以輸入一個 expression(運算式),它會寫出該式" -"的值。Expression 的語法可以使用:運算子 ``+``、``-``、``*`` 和 ``/`` 的行為如" -"同大多數的程式語言(例如:Pascal 或 C);括號 ``()`` 可以用來分群。例如:\n" +"的值。Expression 的語法可以使用:運算子 ``+``、``-``、``*`` 和 ``/`` 可以" +"用來執行運算;括號 ``()`` 可以用來分群。例如:\n" "\n" "::" diff --git a/whatsnew/3.10.po b/whatsnew/3.10.po index 33862813af..2fa09db3b8 100644 --- a/whatsnew/3.10.po +++ b/whatsnew/3.10.po @@ -1135,7 +1135,7 @@ msgstr "新模組" #: ../../whatsnew/3.10.rst:890 msgid "None." -msgstr "" +msgstr "無。" #: ../../whatsnew/3.10.rst:894 msgid "Improved Modules" @@ -1799,6 +1799,9 @@ msgid "" "and :const:`~os.O_NOFOLLOW_ANY` for macOS. (Contributed by Dong-hee Na in :" "issue:`43106`.)" msgstr "" +"為 macOS 新增 :const:`~os.O_EVTONLY`、:const:`~os.O_FSYNC`、:const:`~os." +"O_SYMLINK` 和 :const:`~os.O_NOFOLLOW_ANY`。(由 Dong-hee Na 在 :issue:" +"`43106` 中貢獻。)" #: ../../whatsnew/3.10.rst:1261 msgid "os.path" @@ -1929,6 +1932,9 @@ msgid "" "default instead of :mod:`pickle` protocol ``3`` when creating shelves. " "(Contributed by Zackery Spytz in :issue:`34204`.)" msgstr "" +"現在,:mod:`shelve` 模組在建立 shelve 時預設使用 :const:`pickle." +"DEFAULT_PROTOCOL`,而不是 :mod:`pickle` 的協議 ``3``。(由 Zackery Spytz " +"在 :issue:`34204` 中貢獻。)" #: ../../whatsnew/3.10.rst:1327 msgid "statistics" @@ -1995,6 +2001,10 @@ msgid "" "issue:`38820`, :issue:`43794`, :issue:`43788`, :issue:`43791`, :issue:" "`43799`, :issue:`43920`, :issue:`43789`, and :issue:`43811`.)" msgstr "" +"ssl 模組初步支援 OpenSSL 3.0.0 和新選項 :const:`~ssl." +"OP_IGNORE_UNEXPECTED_EOF`。(由 Christian Heimes 於 :issue:`38820`、:" +"issue:`43794`、:issue:`43788`、:issue:`43791`、:issue:`43799`、:issue:" +"`43920`、:issue:`43789` 和 :issue:`43811` 貢獻。)" #: ../../whatsnew/3.10.rst:1364 msgid "" @@ -2057,6 +2067,8 @@ msgid "" "A new verify flag :const:`~ssl.VERIFY_X509_PARTIAL_CHAIN` has been added. " "(Contributed by l0x in :issue:`40849`.)" msgstr "" +"新增驗證旗標 :const:`~ssl.VERIFY_X509_PARTIAL_CHAIN`。(由 l0x 在 :issue:" +"`40849` 中貢獻。)" #: ../../whatsnew/3.10.rst:1394 msgid "sqlite3" @@ -2103,6 +2115,9 @@ msgid "" "simulate (the default is still :const:`signal.SIGINT`). (Contributed by " "Antoine Pitrou in :issue:`43356`.)" msgstr "" +":func:`_thread.interrupt_main` 現在需要一個可選的信號編號來進行模擬(預設" +"值仍然是 :const:`signal.SIGINT`)。 (由 Antoine Pitrou 在 :issue:`43356` " +"中貢獻。)" #: ../../whatsnew/3.10.rst:1420 msgid "threading" @@ -2478,6 +2493,7 @@ msgstr "" "語法錯誤。(由 Serhiy Storchaka 在 :issue:`43833` 中貢獻。)" #: ../../whatsnew/3.10.rst:1608 +#, fuzzy msgid "" "Starting in this release, there will be a concerted effort to begin cleaning " "up old import semantics that were kept for Python 2.7 compatibility. " @@ -2493,6 +2509,16 @@ msgid "" "appropriate to help identify code which needs updating during this " "transition." msgstr "" +"從這個版本開始,我們將齊心協力開始清理為相容 Python 2.7 而保留的舊引入語" +"義。具體來說, :meth:`~importlib.abc.PathEntryFinder.find_loader`/:meth:" +"`~importlib.abc.Finder.find_module` (被 :meth:`~importlib.abc.Finder." +"find_spec` 取代)、 :meth:`~importlib.abc.Loader.load_module` (被 :meth:" +"`~importlib.abc.Loader.exec_module` 取代)、 :meth:`~importlib.abc.Loader." +"module_repr` (引入系統負責處理你)、``__package__`` 屬性(由 ``__spec__." +"parent`` 取代)、 ``__loader__`` 屬性(由 ``__spec__.loader`` 取代)和 " +"``__cached__`` 屬性(由 ``__spec__.cached`` 取代)將慢慢被刪除(以及 :mod:" +"`importlib` 中的其他類別和方法)。將酌情引發 :exc:`ImportWarning` 和/或 :" +"exc:`DeprecationWarning` 以幫助識別在此轉換期間需要更新的程式碼。" #: ../../whatsnew/3.10.rst:1625 msgid "" @@ -2552,6 +2578,12 @@ msgid "" "respectively. You can use :func:`importlib.util.spec_from_loader` to help in " "porting. (Contributed by Brett Cannon in :issue:`42134`.)" msgstr "" +"引入系統使用 :meth:`!importlib.abc.MetaPathFinder.find_module` 和 :!meth:" +"`importlib.abc.PathEntryFinder.find_module` 現在會觸發 :exc:" +"`ImportWarning`,因為 :meth:`importlib.abc.MetaPathFinder.find_spec` 和 :" +"meth:`importlib.abc.PathEntryFinder.find_spec` 分別是替代方案的首選。你可以使用 :" +"func:`importlib.util.spec_from_loader` 來幫助移植。(由 Brett Cannon 在 :" +"issue:`42134` 中貢獻。)" #: ../../whatsnew/3.10.rst:1657 msgid "" @@ -2561,6 +2593,10 @@ msgid "" "spec_from_loader` to help in porting. (Contributed by Brett Cannon in :issue:" "`43672`.)" msgstr "" +"引入系統使用 :meth:`!importlib.abc.PathEntryFinder.find_loader` 現在會觸" +"發 :exc:`ImportWarning`,因為 :meth:`importlib.abc.PathEntryFinder." +"find_spec` 是首選。你可以使用 :func:`importlib.util.spec_from_loader` 來幫" +"助移植。(由 Brett Cannon 在 :issue:`43672` 中貢獻。)" #: ../../whatsnew/3.10.rst:1663 msgid "" @@ -2576,6 +2612,17 @@ msgid "" "removal in Python 3.12 (previously they were documented as deprecated in " "Python 3.4). (Contributed by Brett Cannon in :issue:`42135`.)" msgstr "" +":meth:`!importlib.abc.MetaPathFinder.find_module` 的各種實作(:meth:" +"`!importlib.machinery.BuiltinImporter.find_module`、:meth:`!importlib." +"machinery.FrozenImporter.find_module`、:meth:`!importlib.machinery." +"WindowsRegistryFinder.find_module`、:meth:`!importlib.machinery.PathFinder." +"find_module`、:meth:`!importlib.abc.MetaPathFinder.find_module` )、:meth:" +"`!importlib.abc.PathEntryFinder.find_module` (:meth:`!importlib.machinery." +"FileFinder.find_module` ) 和 :meth:`!importlib.abc.PathEntryFinder." +"find_loader` (:meth:`!importlib.machinery.FileFinder.find_loader` ) 現在引" +"發 :exc:`DeprecationWarning` 並計劃在 Python 3.12 中刪除(之前它們已在 " +"Python 3.4 中被記錄為已棄用)。(由 Brett Cannon 在 :issue:`42135` 中貢" +"獻。)" #: ../../whatsnew/3.10.rst:1678 msgid "" @@ -2585,6 +2632,10 @@ msgid "" "should inherit from one of these two classes as appropriate instead. " "(Contributed by Brett Cannon in :issue:`42135`.)" msgstr "" +":class:`!importlib.abc.Finder` 已被棄用(包括其唯一方法 :" +"meth:`!find_module`)。:class:`importlib.abc.MetaPathFinder` 和 :" +"class:`importlib.abc.PathEntryFinder` 都不再從該類別繼承。使用者應該根據需" +"求來選擇其一以繼承。(由 Brett Cannon 在 :issue:`42135` 中貢獻。)" #: ../../whatsnew/3.10.rst:1685 msgid "" @@ -2596,6 +2647,12 @@ msgid "" "exc:`DeprecationWarning` in previous versions of Python). (Contributed by " "Brett Cannon in :issue:`43720`.)" msgstr "" +"棄用 :mod:`!imp`、:func:`!importlib.find_loader`、:func:`!importlib.util." +"set_package_wrapper`、:func:`!importlib.util.set_loader_wrapper`、:func:" +"`!importlib.util.module_for_loader`、:class:`!pkgutil.ImpImporter` 和 :" +"class:`!pkgutil.ImpLoader` 均已更新,將於 Python 3.12 列為預定的刪除版本" +"(它們開始在過去版本的 Python 中引發 :exc:`DeprecationWarning`) 。(由 " +"Brett Cannon 在 :issue:`43720` 中貢獻。)" #: ../../whatsnew/3.10.rst:1695 msgid "" @@ -2604,6 +2661,10 @@ msgid "" "Removal of the use of ``module_repr()`` is scheduled for Python 3.12. " "(Contributed by Brett Cannon in :issue:`42137`.)" msgstr "" +"引入系統現在在模組上使用 ``__spec__`` 屬性,然後才會回退使用 :meth:`!module_repr`" +" 作為模組的 ``__repr__()`` 方法。計劃" +"在 Python 3.12 中刪除 ``module_repr()`` 的使用。(由 Brett Cannon 在 :" +"issue:`42137` 中貢獻。)" #: ../../whatsnew/3.10.rst:1701 msgid "" @@ -2612,6 +2673,10 @@ msgid "" "module_repr` are deprecated and slated for removal in Python 3.12. " "(Contributed by Brett Cannon in :issue:`42136`.)" msgstr "" +":meth:`!importlib.abc.Loader.module_repr`、:meth:`!importlib.machinery." +"FrozenLoader.module_repr` 和 :meth:`!importlib.machinery.BuiltinLoader." +"module_repr` 已棄用並計劃在 Python 3.12 中刪除。(由 Brett Cannon 在 :" +"issue:`42136` 中貢獻。)" #: ../../whatsnew/3.10.rst:1707 msgid "" @@ -2726,6 +2791,11 @@ msgid "" "PROTOCOL_TLS` are deprecated in favor of :const:`~ssl.PROTOCOL_TLS_CLIENT` " "and :const:`~ssl.PROTOCOL_TLS_SERVER`" msgstr "" +":data:`~ssl.PROTOCOL_SSLv2`、:data:`~ssl.PROTOCOL_SSLv3`、:data:`~ssl." +"PROTOCOL_SSLv23`、:data:`~ssl.PROTOCOL_TLSv1`、:data:`~ssl." +"PROTOCOL_TLSv1_1`、:data:`~ssl.PROTOCOL_TLSv1_2` 和 :const:`~ssl." +"PROTOCOL_TLS` 已棄用,取而代之的是 :const:`~ssl.PROTOCOL_TLS_CLIENT` 和 :" +"const:`~ssl.PROTOCOL_TLS_SERVER`" #: ../../whatsnew/3.10.rst:1763 msgid "" @@ -3450,6 +3520,8 @@ msgid "" "Add a new :c:macro:`Py_TPFLAGS_DISALLOW_INSTANTIATION` type flag to disallow " "creating type instances. (Contributed by Victor Stinner in :issue:`43916`.)" msgstr "" +"新增 :c:macro:`Py_TPFLAGS_DISALLOW_INSTANTIATION` 型別旗標以禁止建立型別實" +"例。(由 Victor Stinner 在 :issue:`43916` 中貢獻。)" #: ../../whatsnew/3.10.rst:2131 msgid "" @@ -3457,6 +3529,9 @@ msgid "" "immutable type objects: type attributes cannot be set nor deleted. " "(Contributed by Victor Stinner and Erlend E. Aasland in :issue:`43908`.)" msgstr "" +"新增 :c:macro:`Py_TPFLAGS_IMMUTABLETYPE` 型別旗標用於建立不可變型別物件:無" +"法設定或刪除型別屬性。(由 Victor Stinner 和 Erlend E. Aasland 在 :issue:`43908` " +"中貢獻。)" #: ../../whatsnew/3.10.rst:2138 msgid "" @@ -3572,6 +3647,10 @@ msgid "" "is set instead. (Contributed by Victor Stinner and Erlend E. Aasland in :" "issue:`43908`.)" msgstr "" +"使用 :c:macro:`Py_TPFLAGS_IMMUTABLETYPE` 型別旗標來建立不可變型別物件。不要" +"依賴 :c:macro:`Py_TPFLAGS_HEAPTYPE` 來決定型別物件是否可變;應改為檢查是否" +"設定了 :c:macro:`Py_TPFLAGS_IMMUTABLETYPE`。(由 Victor Stinner 和 Erlend " +"E. Aasland 在 :issue:`35134` 中貢獻。)" #: ../../whatsnew/3.10.rst:2196 msgid "" @@ -3871,225 +3950,3 @@ msgid "" msgstr "" "為了 Python 最佳化,已刪除 ``PyThreadState.use_tracing`` 成員。(由 Mark " "Shannon 在 :issue:`43760` 中貢獻。)" - -#~ msgid "None yet." -#~ msgstr "還沒有出現。" - -#~ msgid "" -#~ "Add :data:`~os.O_EVTONLY`, :data:`~os.O_FSYNC`, :data:`~os.O_SYMLINK` " -#~ "and :data:`~os.O_NOFOLLOW_ANY` for macOS. (Contributed by Dong-hee Na in :" -#~ "issue:`43106`.)" -#~ msgstr "" -#~ "為 macOS 新增 :data:`~os.O_EVTONLY`、:data:`~os.O_FSYNC`、:data:`~os." -#~ "O_SYMLINK` 和 :data:`~os.O_NOFOLLOW_ANY`。(由 Dong-hee Na 在 :issue:" -#~ "`43106` 中貢獻。)" - -#~ msgid "" -#~ "The :mod:`shelve` module now uses :data:`pickle.DEFAULT_PROTOCOL` by " -#~ "default instead of :mod:`pickle` protocol ``3`` when creating shelves. " -#~ "(Contributed by Zackery Spytz in :issue:`34204`.)" -#~ msgstr "" -#~ "現在,:mod:`shelve` 模組在建立 shelve 時預設使用 :data:`pickle." -#~ "DEFAULT_PROTOCOL`,而不是 :mod:`pickle` 的協議 ``3``。(由 Zackery Spytz " -#~ "在 :issue:`34204` 中貢獻。)" - -#~ msgid "" -#~ "The ssl module has preliminary support for OpenSSL 3.0.0 and new option :" -#~ "data:`~ssl.OP_IGNORE_UNEXPECTED_EOF`. (Contributed by Christian Heimes " -#~ "in :issue:`38820`, :issue:`43794`, :issue:`43788`, :issue:`43791`, :issue:" -#~ "`43799`, :issue:`43920`, :issue:`43789`, and :issue:`43811`.)" -#~ msgstr "" -#~ "ssl 模組初步支援 OpenSSL 3.0.0 和新選項 :data:`~ssl." -#~ "OP_IGNORE_UNEXPECTED_EOF`。(由 Christian Heimes 於 :issue:`38820`、:" -#~ "issue:`43794`、:issue:`43788`、:issue:`43791`、:issue:`43799`、:issue:" -#~ "`43920`、:issue:`43789` 和 :issue:`43811` 貢獻。)" - -#~ msgid "" -#~ "A new verify flag :data:`~ssl.VERIFY_X509_PARTIAL_CHAIN` has been added. " -#~ "(Contributed by l0x in :issue:`40849`.)" -#~ msgstr "" -#~ "新增驗證旗標 :data:`~ssl.VERIFY_X509_PARTIAL_CHAIN`。(由 l0x 在 :issue:" -#~ "`40849` 中貢獻。)" - -#~ msgid "" -#~ ":func:`_thread.interrupt_main` now takes an optional signal number to " -#~ "simulate (the default is still :data:`signal.SIGINT`). (Contributed by " -#~ "Antoine Pitrou in :issue:`43356`.)" -#~ msgstr "" -#~ ":func:`_thread.interrupt_main` 現在需要一個可選的信號編號來進行模擬(預設" -#~ "值仍然是 :data:`signal.SIGINT`)。 (由 Antoine Pitrou 在 :issue:`43356` " -#~ "中貢獻。)" - -#~ msgid "" -#~ ":data:`~ssl.PROTOCOL_SSLv2`, :data:`~ssl.PROTOCOL_SSLv3`, :data:`~ssl." -#~ "PROTOCOL_SSLv23`, :data:`~ssl.PROTOCOL_TLSv1`, :data:`~ssl." -#~ "PROTOCOL_TLSv1_1`, :data:`~ssl.PROTOCOL_TLSv1_2`, and :data:`~ssl." -#~ "PROTOCOL_TLS` are deprecated in favor of :data:`~ssl.PROTOCOL_TLS_CLIENT` " -#~ "and :data:`~ssl.PROTOCOL_TLS_SERVER`" -#~ msgstr "" -#~ ":data:`~ssl.PROTOCOL_SSLv2`、:data:`~ssl.PROTOCOL_SSLv3`、:data:`~ssl." -#~ "PROTOCOL_SSLv23`、:data:`~ssl.PROTOCOL_TLSv1`、:data:`~ssl." -#~ "PROTOCOL_TLSv1_1`、:data:`~ssl.PROTOCOL_TLSv1_2` 和 :data:`~ssl." -#~ "PROTOCOL_TLS` 已棄用,取而代之的是 :data:`~ssl.PROTOCOL_TLS_CLIENT` 和 :" -#~ "data:`~ssl.PROTOCOL_TLS_SERVER`" - -#~ msgid "" -#~ "Add a new :c:data:`Py_TPFLAGS_DISALLOW_INSTANTIATION` type flag to " -#~ "disallow creating type instances. (Contributed by Victor Stinner in :" -#~ "issue:`43916`.)" -#~ msgstr "" -#~ "新增 :c:data:`Py_TPFLAGS_DISALLOW_INSTANTIATION` 型別旗標以禁止建立型別實" -#~ "例。(由 Victor Stinner 在 :issue:`43916` 中貢獻。)" - -#~ msgid "" -#~ "Add a new :c:data:`Py_TPFLAGS_IMMUTABLETYPE` type flag for creating " -#~ "immutable type objects: type attributes cannot be set nor deleted. " -#~ "(Contributed by Victor Stinner and Erlend E. Aasland in :issue:`43908`.)" -#~ msgstr "" -#~ "新增 :c:data:`Py_TPFLAGS_IMMUTABLETYPE` 型別旗標用於建立不可變型別物件:無" -#~ "法設定或刪除型別屬性。(由 Victor Stinner 和 Erlend E. Aasland 在 43908 號" -#~ "中貢獻。)" - -#~ msgid "" -#~ "Use the :c:data:`Py_TPFLAGS_IMMUTABLETYPE` type flag to create immutable " -#~ "type objects. Do not rely on :c:data:`Py_TPFLAGS_HEAPTYPE` to decide if a " -#~ "type object is mutable or not; check if :c:data:" -#~ "`Py_TPFLAGS_IMMUTABLETYPE` is set instead. (Contributed by Victor Stinner " -#~ "and Erlend E. Aasland in :issue:`43908`.)" -#~ msgstr "" -#~ "使用 :c:data:`Py_TPFLAGS_IMMUTABLETYPE` 型別旗標來建立不可變型別物件。不要" -#~ "依賴 :c:data:`Py_TPFLAGS_HEAPTYPE` 來決定型別物件是否可變;應改為檢查是否" -#~ "設定了 :c:data:`Py_TPFLAGS_IMMUTABLETYPE`。(由 Victor Stinner 和 Erlend " -#~ "E. Aasland 在 :issue:`35134` 中貢獻。)" - -#~ msgid "" -#~ "Starting in this release, there will be a concerted effort to begin " -#~ "cleaning up old import semantics that were kept for Python 2.7 " -#~ "compatibility. Specifically, :meth:`~importlib.abc.PathEntryFinder." -#~ "find_loader`/:meth:`~importlib.abc.Finder.find_module` (superseded by :" -#~ "meth:`~importlib.abc.Finder.find_spec`), :meth:`~importlib.abc.Loader." -#~ "load_module` (superseded by :meth:`~importlib.abc.Loader.exec_module`), :" -#~ "meth:`~importlib.abc.Loader.module_repr` (which the import system takes " -#~ "care of for you), the ``__package__`` attribute (superseded by ``__spec__." -#~ "parent``), the ``__loader__`` attribute (superseded by ``__spec__." -#~ "loader``), and the ``__cached__`` attribute (superseded by ``__spec__." -#~ "cached``) will slowly be removed (as well as other classes and methods " -#~ "in :mod:`importlib`). :exc:`ImportWarning` and/or :exc:" -#~ "`DeprecationWarning` will be raised as appropriate to help identify code " -#~ "which needs updating during this transition." -#~ msgstr "" -#~ "從這個版本開始,我們將齊心協力開始清理為相容 Python 2.7 而保留的舊引入語" -#~ "義。具體來說, :meth:`~importlib.abc.PathEntryFinder.find_loader`/:meth:" -#~ "`~importlib.abc.Finder.find_module` (被 :meth:`~importlib.abc.Finder." -#~ "find_spec` 取代)、 :meth:`~importlib.abc.Loader.load_module` (被 :meth:" -#~ "`~importlib.abc.Loader.exec_module` 取代)、 :meth:`~importlib.abc.Loader." -#~ "module_repr` (引入系統負責處理你)、``__package__`` 屬性(由 ``__spec__." -#~ "parent`` 取代)、 ``__loader__`` 屬性(由 ``__spec__.loader`` 取代)和 " -#~ "``__cached__`` 屬性(由 ``__spec__.cached`` 取代)將慢慢被刪除(以及 :mod:" -#~ "`importlib` 中的其他類別和方法)。將酌情引發 :exc:`ImportWarning` 和/或 :" -#~ "exc:`DeprecationWarning` 以幫助識別在此轉換期間需要更新的程式碼。" - -#~ msgid "" -#~ "The use of :meth:`importlib.abc.MetaPathFinder.find_module` and :meth:" -#~ "`importlib.abc.PathEntryFinder.find_module` by the import system now " -#~ "trigger an :exc:`ImportWarning` as :meth:`importlib.abc.MetaPathFinder." -#~ "find_spec` and :meth:`importlib.abc.PathEntryFinder.find_spec` are " -#~ "preferred, respectively. You can use :func:`importlib.util." -#~ "spec_from_loader` to help in porting. (Contributed by Brett Cannon in :" -#~ "issue:`42134`.)" -#~ msgstr "" -#~ "引入系統使用 :meth:`importlib.abc.MetaPathFinder.find_module` 和 :meth:" -#~ "`importlib.abc.PathEntryFinder.find_module` 現在會觸發 :exc:" -#~ "`ImportWarning` 作為 :meth:`importlib.abc.MetaPathFinder.find_spec` 和 :" -#~ "meth:`importlib.abc.PathEntryFinder.find_spec` 分別是首選。你可以使用 :" -#~ "func:`importlib.util.spec_from_loader` 來幫助移植。(由 Brett Cannon 在 :" -#~ "issue:`42134` 中貢獻。)" - -#~ msgid "" -#~ "The use of :meth:`importlib.abc.PathEntryFinder.find_loader` by the " -#~ "import system now triggers an :exc:`ImportWarning` as :meth:`importlib." -#~ "abc.PathEntryFinder.find_spec` is preferred. You can use :func:`importlib." -#~ "util.spec_from_loader` to help in porting. (Contributed by Brett Cannon " -#~ "in :issue:`43672`.)" -#~ msgstr "" -#~ "引入系統使用 :meth:`importlib.abc.PathEntryFinder.find_loader` 現在會觸" -#~ "發 :exc:`ImportWarning`,因為 :meth:`importlib.abc.PathEntryFinder." -#~ "find_spec` 是首選。你可以使用 :func:`importlib.util.spec_from_loader` 來幫" -#~ "助移植。(由 Brett Cannon 在 :issue:`43672` 中貢獻。)" - -#~ msgid "" -#~ "The various implementations of :meth:`importlib.abc.MetaPathFinder." -#~ "find_module` ( :meth:`importlib.machinery.BuiltinImporter.find_module`, :" -#~ "meth:`importlib.machinery.FrozenImporter.find_module`, :meth:`importlib." -#~ "machinery.WindowsRegistryFinder.find_module`, :meth:`importlib.machinery." -#~ "PathFinder.find_module`, :meth:`importlib.abc.MetaPathFinder." -#~ "find_module` ), :meth:`importlib.abc.PathEntryFinder.find_module` ( :meth:" -#~ "`importlib.machinery.FileFinder.find_module` ), and :meth:`importlib.abc." -#~ "PathEntryFinder.find_loader` ( :meth:`importlib.machinery.FileFinder." -#~ "find_loader` ) now raise :exc:`DeprecationWarning` and are slated for " -#~ "removal in Python 3.12 (previously they were documented as deprecated in " -#~ "Python 3.4). (Contributed by Brett Cannon in :issue:`42135`.)" -#~ msgstr "" -#~ ":meth:`importlib.abc.MetaPathFinder.find_module` 的各種實作(:meth:" -#~ "`importlib.machinery.BuiltinImporter.find_module`、:meth:`importlib." -#~ "machinery.FrozenImporter.find_module`、:meth:`importlib.machinery." -#~ "WindowsRegistryFinder.find_module`、:meth:`importlib.machinery.PathFinder." -#~ "find_module`、:meth:`importlib.abc.MetaPathFinder.find_module` )、:meth:" -#~ "`importlib.abc.PathEntryFinder.find_module` (:meth:`importlib.machinery." -#~ "FileFinder.find_module` ) 和 :meth:`importlib.abc.PathEntryFinder." -#~ "find_loader` (:meth:`importlib.machinery.FileFinder.find_loader` ) 現在引" -#~ "發 :exc:`DeprecationWarning` 並計劃在 Python 3.12 中刪除(之前它們已在 " -#~ "Python 3.4 中被記錄為已棄用)。(由 Brett Cannon 在 :issue:`42135` 中貢" -#~ "獻。)" - -#~ msgid "" -#~ ":class:`importlib.abc.Finder` is deprecated (including its sole method, :" -#~ "meth:`~importlib.abc.Finder.find_module`). Both :class:`importlib.abc." -#~ "MetaPathFinder` and :class:`importlib.abc.PathEntryFinder` no longer " -#~ "inherit from the class. Users should inherit from one of these two " -#~ "classes as appropriate instead. (Contributed by Brett Cannon in :issue:" -#~ "`42135`.)" -#~ msgstr "" -#~ ":class:`importlib.abc.Finder` 已被棄用(包括其唯一方法 :meth:`~importlib." -#~ "abc.Finder.find_module`)。:class:`importlib.abc.MetaPathFinder` 和 :" -#~ "class:`importlib.abc.PathEntryFinder` 都不再從該類別繼承。使用者應該根據需" -#~ "求來選擇其一以繼承。 (由 Brett Cannon 在 :issue:`42135` 中貢獻。)" - -#~ msgid "" -#~ "The deprecations of :mod:`imp`, :func:`importlib.find_loader`, :func:" -#~ "`importlib.util.set_package_wrapper`, :func:`importlib.util." -#~ "set_loader_wrapper`, :func:`importlib.util.module_for_loader`, :class:" -#~ "`pkgutil.ImpImporter`, and :class:`pkgutil.ImpLoader` have all been " -#~ "updated to list Python 3.12 as the slated version of removal (they began " -#~ "raising :exc:`DeprecationWarning` in previous versions of Python). " -#~ "(Contributed by Brett Cannon in :issue:`43720`.)" -#~ msgstr "" -#~ "棄用 :mod:`imp`、:func:`importlib.find_loader`、:func:`importlib.util." -#~ "set_package_wrapper`、:func:`importlib.util.set_loader_wrapper`、:func:" -#~ "`importlib.util.module_for_loader`、:class:`pkgutil.ImpImporter` 和 :" -#~ "class:`pkgutil.ImpLoader` 均已更新,將於 Python 3.12 列為預定的刪除版本" -#~ "(它們開始在過去版本的 Python 中引發 :exc:`DeprecationWarning`) 。(由 " -#~ "Brett Cannon 在 :issue:`43720` 中貢獻。)" - -#~ msgid "" -#~ "The import system now uses the ``__spec__`` attribute on modules before " -#~ "falling back on :meth:`~importlib.abc.Loader.module_repr` for a module's " -#~ "``__repr__()`` method. Removal of the use of ``module_repr()`` is " -#~ "scheduled for Python 3.12. (Contributed by Brett Cannon in :issue:" -#~ "`42137`.)" -#~ msgstr "" -#~ "引入系統現在在模組上使用 ``__spec__`` 屬性,然後才會回退使用 :meth:" -#~ "`~importlib.abc.Loader.module_repr` 作為模組的 ``__repr__()`` 方法。計劃" -#~ "在 Python 3.12 中刪除 ``module_repr()`` 的使用。(由 Brett Cannon 在 :" -#~ "issue:`42137` 中貢獻。)" - -#~ msgid "" -#~ ":meth:`importlib.abc.Loader.module_repr`, :meth:`importlib.machinery." -#~ "FrozenLoader.module_repr`, and :meth:`importlib.machinery.BuiltinLoader." -#~ "module_repr` are deprecated and slated for removal in Python 3.12. " -#~ "(Contributed by Brett Cannon in :issue:`42136`.)" -#~ msgstr "" -#~ ":meth:`importlib.abc.Loader.module_repr`、:meth:`importlib.machinery." -#~ "FrozenLoader.module_repr` 和 :meth:`importlib.machinery.BuiltinLoader." -#~ "module_repr` 已棄用並計劃在 Python 3.12 中刪除。(由 Brett Cannon 在 :" -#~ "issue:`42136` 中貢獻。)" diff --git a/whatsnew/3.11.po b/whatsnew/3.11.po index 406819d375..4b7eda8345 100644 --- a/whatsnew/3.11.po +++ b/whatsnew/3.11.po @@ -927,6 +927,8 @@ msgid "" "Add :const:`datetime.UTC`, a convenience alias for :attr:`datetime.timezone." "utc`. (Contributed by Kabir Kwatra in :gh:`91973`.)" msgstr "" +"新增 :const:`datetime.UTC`,一個 :attr:`datetime.timezone.utc` 的方便別名。" +"(由 Kabir Kwatra 於 :gh:`91973` 所貢獻。)" #: ../../whatsnew/3.11.rst:646 msgid "" @@ -1026,6 +1028,10 @@ msgid "" "the :const:`~re.ASCII` member of :class:`re.RegexFlag` rather than " "``'RegexFlag.ASCII'``." msgstr "" +"新增 :func:`~enum.global_enum` 列舉裝飾器,用來調整 :meth:`~object.__repr__` " +"和 :meth:`~object.__str__` 以模組成員形式而非列舉類別來顯示值。例如,:class:" +"`re.RegexFlag` 的 :const:`~re.ASCII` 成員的 ``'re.ASCII'``,而非 ``'RegexFlag." +"ASCII'``。" #: ../../whatsnew/3.11.rst:696 msgid "" @@ -1616,6 +1622,11 @@ msgid "" "affected by system clock changes. (Contributed by Victor Stinner in :issue:" "`41710`.)" msgstr "" +"在 Unix 上,如果 ``sem_clockwait()`` 函式在 C 函式庫(glibc 2.30 與其更新的版" +"本)中可被使用,則 :meth:`threading.Lock.acquire` 方法現在會使用單調時鐘 (:" +"const:`time. CLOCK_MONOTONIC`) 用於超時 (timeout),而不是使用系統時鐘 (:const:" +"`time.CLOCK_REALTIME`),以免受系統時鐘變化的影響。 由 Victor Stinner 在 :" +"issue:`41710` 中貢獻。)" #: ../../whatsnew/3.11.rst:1075 msgid "time" @@ -3235,6 +3246,10 @@ msgid "" "removed in Python 3.13. (Contributed by Serhiy Storchaka and Miro Hrončok " "in :gh:`92728`.)" msgstr "" +"在 :mod:`re` 模組中,:func:`!re.template` 函式和相應的 :const:`!re.TEMPLATE` " +"和 :const:`!re.T` 旗標被棄用,因為它們沒被記錄於文件中並且缺乏明顯的目的。它們" +"將在 Python 3.13 中被刪除。(由 Serhiy Storchaka 和 Miro Hrončok 在 :gh:" +"`92728` 中貢獻。)" #: ../../whatsnew/3.11.rst:1820 msgid "" @@ -4233,6 +4248,9 @@ msgid "" "available directly (via :c:type:`PyCMethod`). (Contributed by Petr Viktorin " "in :issue:`46613`.)" msgstr "" +"新增 :c:func:`PyType_GetModuleByDef` 函式,它將被用於取得定義一個方法的模組," +"以免這項資訊無法直接被取得(透過 :c:type:`PyCMethod`)。(由 Petr Viktorin " +"於 :issue:`46613` 中所貢獻。)" #: ../../whatsnew/3.11.rst:2235 msgid "" @@ -4416,6 +4434,10 @@ msgid "" "(:c:member:`PyTypeObject.tp_traverse`). (Contributed by Victor Stinner in :" "issue:`44263`.)" msgstr "" +"如果一個型別是以 :c:macro:`Py_TPFLAGS_HAVE_GC` 旗標來定義,但卻沒有遍歷函式 " +"(traverse function) (:c:member:`PyTypeObject.tp_traverse`),那 :c:func:" +"`PyType_Ready` 函式現在會引發一個錯誤。(由 Victor Stinner 於 :issue:`44263` " +"中貢獻。)" #: ../../whatsnew/3.11.rst:2354 msgid "" @@ -4424,6 +4446,9 @@ msgid "" "ref:`static types `. (Contributed by Erlend E. Aasland in :" "issue:`43908`)" msgstr "" +"帶有 :c:macro:`Py_TPFLAGS_IMMUTABLETYPE` 旗標的堆積型別現在可以繼承 :pep:`590` " +"向量呼叫協定 (vectorcall protocol)。以前這僅適用於 :ref:`static types " +"`。(由 Erlend E. Aasland 在 :issue:`43908` 中貢獻)。" #: ../../whatsnew/3.11.rst:2359 msgid "" @@ -5126,156 +5151,3 @@ msgid "" msgstr "" "詳情請見 :pep:`624` 與\\ :pep:`搬遷指南 <624#alternative-apis>`。(由 Inada " "Naoki 於 :issue:`44029` 中所貢獻。)" - -#~ msgid "" -#~ "Added the :c:data:`PyType_GetModuleByDef` function, used to get the " -#~ "module in which a method was defined, in cases where this information is " -#~ "not available directly (via :c:type:`PyCMethod`). (Contributed by Petr " -#~ "Viktorin in :issue:`46613`.)" -#~ msgstr "" -#~ "新增 :c:data:`PyType_GetModuleByDef` 函式,它將被用於取得定義一個方法的模" -#~ "組,以免這項資訊無法直接被取得(透過 :c:type:`PyCMethod`)。(由 Petr " -#~ "Viktorin 於 :issue:`46613` 中所貢獻。)" - -#~ msgid "" -#~ "Add :attr:`datetime.UTC`, a convenience alias for :attr:`datetime." -#~ "timezone.utc`. (Contributed by Kabir Kwatra in :gh:`91973`.)" -#~ msgstr "" -#~ "新增 :attr:`datetime.UTC`,一個 :attr:`datetime.timezone.utc` 的方便別名。" -#~ "(由 Kabir Kwatra 於 :gh:`91973` 所貢獻。)" - -#~ msgid "" -#~ "Added the :func:`~enum.global_enum` enum decorator, which adjusts :meth:" -#~ "`~object.__repr__` and :meth:`~object.__str__` to show values as members " -#~ "of their module rather than the enum class. For example, ``'re.ASCII'`` " -#~ "for the :data:`~re.ASCII` member of :class:`re.RegexFlag` rather than " -#~ "``'RegexFlag.ASCII'``." -#~ msgstr "" -#~ "新增 :func:`~enum.global_enum` 列舉裝飾器,用來調整 :meth:`~object." -#~ "__repr__` 和 :meth:`~object.__str__` 以模組成員形式而非列舉類別來顯示值。" -#~ "例如,:class:`re.RegexFlag` 的 :data:`~re.ASCII` 成員的 ``'re.ASCII'``,而" -#~ "非 ``'RegexFlag.ASCII'``。" - -#~ msgid "" -#~ "On Unix, if the ``sem_clockwait()`` function is available in the C " -#~ "library (glibc 2.30 and newer), the :meth:`threading.Lock.acquire` method " -#~ "now uses the monotonic clock (:data:`time.CLOCK_MONOTONIC`) for the " -#~ "timeout, rather than using the system clock (:data:`time." -#~ "CLOCK_REALTIME`), to not be affected by system clock changes. " -#~ "(Contributed by Victor Stinner in :issue:`41710`.)" -#~ msgstr "" -#~ "在 Unix 上,如果 ``sem_clockwait()`` 函式在 C 函式庫(glibc 2.30 與其更新" -#~ "的版本)中可被使用,則 :meth:`threading.Lock.acquire` 方法現在會使用單調時" -#~ "鐘 (:data:`time. CLOCK_MONOTONIC`) 用於超時 (timeout),而不是使用系統時鐘 " -#~ "(:data:`time.CLOCK_REALTIME`),以免受系統時鐘變化的影響。 由 Victor " -#~ "Stinner 在 :issue:`41710` 中貢獻。)" - -#~ msgid "" -#~ "In the :mod:`re` module, the :func:`!re.template` function and the " -#~ "corresponding :data:`!re.TEMPLATE` and :data:`!re.T` flags are " -#~ "deprecated, as they were undocumented and lacked an obvious purpose. They " -#~ "will be removed in Python 3.13. (Contributed by Serhiy Storchaka and Miro " -#~ "Hrončok in :gh:`92728`.)" -#~ msgstr "" -#~ "在 :mod:`re` 模組中,:func:`!re.template` 函式和相應的 :data:`!re." -#~ "TEMPLATE` 和 :data:`!re.T` 旗標被棄用,因為它們沒被記錄於文件中並且缺乏明" -#~ "顯的目的。它們將在 Python 3.13 中被刪除。(由 Serhiy Storchaka 和 Miro " -#~ "Hrončok 在 :gh:`92728` 中貢獻。)" - -#~ msgid "" -#~ "The :c:func:`PyType_Ready` function now raises an error if a type is " -#~ "defined with the :const:`Py_TPFLAGS_HAVE_GC` flag set but has no traverse " -#~ "function (:c:member:`PyTypeObject.tp_traverse`). (Contributed by Victor " -#~ "Stinner in :issue:`44263`.)" -#~ msgstr "" -#~ "如果一個型別是以 :const:`Py_TPFLAGS_HAVE_GC` 旗標來定義,但卻沒有遍歷函式 " -#~ "(traverse function) (:c:member:`PyTypeObject.tp_traverse`),那 :c:func:" -#~ "`PyType_Ready` 函式現在會引發一個錯誤。(由 Victor Stinner 於 :issue:" -#~ "`44263` 中貢獻。)" - -#~ msgid "" -#~ "Heap types with the :const:`Py_TPFLAGS_IMMUTABLETYPE` flag can now " -#~ "inherit the :pep:`590` vectorcall protocol. Previously, this was only " -#~ "possible for :ref:`static types `. (Contributed by Erlend " -#~ "E. Aasland in :issue:`43908`)" -#~ msgstr "" -#~ "帶有 :const:`Py_TPFLAGS_IMMUTABLETYPE` 旗標的堆積型別現在可以繼承 :pep:" -#~ "`590` 向量呼叫協定 (vectorcall protocol)。以前這僅適用於 :ref:`static " -#~ "types `。(由 Erlend E. Aasland 在 :issue:`43908` 中貢獻)。" - -#~ msgid "Release" -#~ msgstr "發行版本" - -#~ msgid "|release|" -#~ msgstr "|release|" - -#~ msgid "Date" -#~ msgstr "日期" - -#~ msgid "|today|" -#~ msgstr "|today|" - -#~ msgid "The :mod:`imp` module" -#~ msgstr ":mod:`imp` 模組" - -#~ msgid ":func:`importlib.find_loader`" -#~ msgstr ":func:`importlib.find_loader`" - -#~ msgid ":meth:`importlib.abc.Loader.module_repr`" -#~ msgstr ":meth:`importlib.abc.Loader.module_repr`" - -#~ msgid ":meth:`importlib.abc.MetaPathFinder.find_module`" -#~ msgstr ":meth:`importlib.abc.MetaPathFinder.find_module`" - -#~ msgid ":meth:`importlib.abc.PathEntryFinder.find_loader`" -#~ msgstr ":meth:`importlib.abc.PathEntryFinder.find_loader`" - -#~ msgid ":meth:`importlib.abc.PathEntryFinder.find_module`" -#~ msgstr ":meth:`importlib.abc.PathEntryFinder.find_module`" - -#~ msgid ":meth:`importlib.machinery.PathFinder.find_module`" -#~ msgstr ":meth:`importlib.machinery.PathFinder.find_module`" - -#~ msgid ":func:`importlib.util.module_for_loader`" -#~ msgstr ":func:`importlib.util.module_for_loader`" - -#~ msgid ":class:`pkgutil.ImpImporter`" -#~ msgstr ":class:`pkgutil.ImpImporter`" - -#~ msgid ":class:`pkgutil.ImpLoader`" -#~ msgstr ":class:`pkgutil.ImpLoader`" - -#~ msgid "" -#~ "Freelists for object structs can now be disabled. A new :program:" -#~ "`configure` option :option:`!--without-freelists` can be used to disable " -#~ "all freelists except empty tuple singleton. (Contributed by Christian " -#~ "Heimes in :issue:`45522`.)" -#~ msgstr "" -#~ "物件結構的空閒列表現在可被禁用。一個新的 :program:`configure` 選項 :" -#~ "option:`!—without-freelists` 可用於禁用除空元組單例之外的所有空閒列表。" -#~ "(由 Christian Heimes 在 :issue:`45522` 中貢獻。)" - -#~ msgid "These are not part of the :ref:`limited API `." -#~ msgstr "這些並非\\ :ref:`受限 API ` 的一部分。" - -#~ msgid "Notable Changes in 3.11.4" -#~ msgstr "3.11.4 中值得注意的變更" - -#~ msgid "tarfile" -#~ msgstr "tarfile" - -#~ msgid "" -#~ "The extraction methods in :mod:`tarfile`, and :func:`shutil." -#~ "unpack_archive`, have a new a *filter* argument that allows limiting tar " -#~ "features than may be surprising or dangerous, such as creating files " -#~ "outside the destination directory. See :ref:`tarfile-extraction-filter` " -#~ "for details. In Python 3.12, use without the *filter* argument will show " -#~ "a :exc:`DeprecationWarning`. In Python 3.14, the default will switch to " -#~ "``'data'``. (Contributed by Petr Viktorin in :pep:`706`.)" -#~ msgstr "" -#~ ":mod:`tarfile` 和 :func:`shutil.unpack_archive` 中的提取方法有一個新的 " -#~ "*filter* 引數,它僅允許有限的 tar 功能、停用一些危險的功能,例如在目標目錄" -#~ "之外建立檔案。詳細資訊請參閱 :ref:`tarfile-extraction-filter`。在 Python " -#~ "3.12 中,不帶 *filter* 引數使用將顯示 :exc:`DeprecationWarning`。在 " -#~ "Python 3.14 中會將預設切換為 ``'data'``。(由 Petr Viktorin 在 :pep:`706` " -#~ "中貢獻。)"