diff --git a/.scripts/poetry.lock b/.scripts/poetry.lock index 482702ad5f..60d477dd30 100644 --- a/.scripts/poetry.lock +++ b/.scripts/poetry.lock @@ -483,13 +483,13 @@ yaml = ["ruamel.yaml (==0.17.21)"] [[package]] name = "urllib3" -version = "2.2.2" +version = "2.2.3" description = "HTTP library with thread-safe connection pooling, file post, and more." optional = false python-versions = ">=3.8" files = [ - {file = "urllib3-2.2.2-py3-none-any.whl", hash = "sha256:a448b2f64d686155468037e1ace9f2d2199776e17f0a46610480d311f73e3472"}, - {file = "urllib3-2.2.2.tar.gz", hash = "sha256:dd505485549a7a552833da5e6063639d0d177c04f23bc3864e41e5dc5f612168"}, + {file = "urllib3-2.2.3-py3-none-any.whl", hash = "sha256:ca899ca043dcb1bafa3e262d73aa25c465bfb49e0bd9dd5d59f1d0acba2f8fac"}, + {file = "urllib3-2.2.3.tar.gz", hash = "sha256:e7d814a81dad81e6caf2ec9fdedb284ecc9c73076b62654547cc64ccdcae26e9"}, ] [package.extras] diff --git a/c-api/code.po b/c-api/code.po index c653263f0a..79fec6db3e 100644 --- a/c-api/code.po +++ b/c-api/code.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-23 07:52+0800\n" +"POT-Creation-Date: 2024-09-24 07:20+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-" @@ -128,9 +128,8 @@ msgstr "" #: ../../c-api/code.rst:99 msgid "" -"For efficiently iterating over the line numbers in a code object, use `the " -"API described in PEP 626 `_." +"For efficiently iterating over the line numbers in a code object, use :pep:" +"`the API described in PEP 626 <0626#out-of-process-debuggers-and-profilers>`." msgstr "" #: ../../c-api/code.rst:104 diff --git a/c-api/exceptions.po b/c-api/exceptions.po index 7709f0093c..c0ba0fe6ca 100644 --- a/c-api/exceptions.po +++ b/c-api/exceptions.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-23 07:52+0800\n" +"POT-Creation-Date: 2024-09-24 07:20+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-" @@ -1038,451 +1038,459 @@ msgid "" "all the variables:" msgstr "" -#: ../../c-api/exceptions.rst:1027 ../../c-api/exceptions.rst:1160 -#: ../../c-api/exceptions.rst:1205 +#: ../../c-api/exceptions.rst:1028 ../../c-api/exceptions.rst:1163 +#: ../../c-api/exceptions.rst:1208 msgid "C Name" msgstr "C 名稱" -#: ../../c-api/exceptions.rst:1027 ../../c-api/exceptions.rst:1205 +#: ../../c-api/exceptions.rst:1028 ../../c-api/exceptions.rst:1208 msgid "Python Name" msgstr "Python 名稱" -#: ../../c-api/exceptions.rst:1027 ../../c-api/exceptions.rst:1160 -#: ../../c-api/exceptions.rst:1205 +#: ../../c-api/exceptions.rst:1028 ../../c-api/exceptions.rst:1163 +#: ../../c-api/exceptions.rst:1208 msgid "Notes" msgstr "註解" -#: ../../c-api/exceptions.rst:1029 +#: ../../c-api/exceptions.rst:1030 msgid ":c:data:`PyExc_BaseException`" msgstr ":c:data:`PyExc_BaseException`" -#: ../../c-api/exceptions.rst:1029 +#: ../../c-api/exceptions.rst:1030 msgid ":exc:`BaseException`" msgstr ":exc:`BaseException`" -#: ../../c-api/exceptions.rst:1029 ../../c-api/exceptions.rst:1031 -#: ../../c-api/exceptions.rst:1033 ../../c-api/exceptions.rst:1079 -#: ../../c-api/exceptions.rst:1091 +#: ../../c-api/exceptions.rst:1030 ../../c-api/exceptions.rst:1032 +#: ../../c-api/exceptions.rst:1034 ../../c-api/exceptions.rst:1080 +#: ../../c-api/exceptions.rst:1092 msgid "[1]_" msgstr "[1]_" -#: ../../c-api/exceptions.rst:1031 +#: ../../c-api/exceptions.rst:1032 msgid ":c:data:`PyExc_Exception`" msgstr ":c:data:`PyExc_Exception`" -#: ../../c-api/exceptions.rst:1031 +#: ../../c-api/exceptions.rst:1032 msgid ":exc:`Exception`" msgstr ":exc:`Exception`" -#: ../../c-api/exceptions.rst:1033 +#: ../../c-api/exceptions.rst:1034 msgid ":c:data:`PyExc_ArithmeticError`" msgstr ":c:data:`PyExc_ArithmeticError`" -#: ../../c-api/exceptions.rst:1033 +#: ../../c-api/exceptions.rst:1034 msgid ":exc:`ArithmeticError`" msgstr ":exc:`ArithmeticError`" -#: ../../c-api/exceptions.rst:1035 +#: ../../c-api/exceptions.rst:1036 msgid ":c:data:`PyExc_AssertionError`" msgstr ":c:data:`PyExc_AssertionError`" -#: ../../c-api/exceptions.rst:1035 +#: ../../c-api/exceptions.rst:1036 msgid ":exc:`AssertionError`" msgstr ":exc:`AssertionError`" -#: ../../c-api/exceptions.rst:1037 +#: ../../c-api/exceptions.rst:1038 msgid ":c:data:`PyExc_AttributeError`" msgstr ":c:data:`PyExc_AttributeError`" -#: ../../c-api/exceptions.rst:1037 +#: ../../c-api/exceptions.rst:1038 msgid ":exc:`AttributeError`" msgstr ":exc:`AttributeError`" -#: ../../c-api/exceptions.rst:1039 +#: ../../c-api/exceptions.rst:1040 msgid ":c:data:`PyExc_BlockingIOError`" msgstr ":c:data:`PyExc_BlockingIOError`" -#: ../../c-api/exceptions.rst:1039 +#: ../../c-api/exceptions.rst:1040 msgid ":exc:`BlockingIOError`" msgstr ":exc:`BlockingIOError`" -#: ../../c-api/exceptions.rst:1041 +#: ../../c-api/exceptions.rst:1042 msgid ":c:data:`PyExc_BrokenPipeError`" msgstr ":c:data:`PyExc_BrokenPipeError`" -#: ../../c-api/exceptions.rst:1041 +#: ../../c-api/exceptions.rst:1042 msgid ":exc:`BrokenPipeError`" msgstr ":exc:`BrokenPipeError`" -#: ../../c-api/exceptions.rst:1043 +#: ../../c-api/exceptions.rst:1044 msgid ":c:data:`PyExc_BufferError`" msgstr ":c:data:`PyExc_BufferError`" -#: ../../c-api/exceptions.rst:1043 +#: ../../c-api/exceptions.rst:1044 msgid ":exc:`BufferError`" msgstr ":exc:`BufferError`" -#: ../../c-api/exceptions.rst:1045 +#: ../../c-api/exceptions.rst:1046 msgid ":c:data:`PyExc_ChildProcessError`" msgstr ":c:data:`PyExc_ChildProcessError`" -#: ../../c-api/exceptions.rst:1045 +#: ../../c-api/exceptions.rst:1046 msgid ":exc:`ChildProcessError`" msgstr ":exc:`ChildProcessError`" -#: ../../c-api/exceptions.rst:1047 +#: ../../c-api/exceptions.rst:1048 msgid ":c:data:`PyExc_ConnectionAbortedError`" msgstr ":c:data:`PyExc_ConnectionAbortedError`" -#: ../../c-api/exceptions.rst:1047 +#: ../../c-api/exceptions.rst:1048 msgid ":exc:`ConnectionAbortedError`" msgstr ":exc:`ConnectionAbortedError`" -#: ../../c-api/exceptions.rst:1049 +#: ../../c-api/exceptions.rst:1050 msgid ":c:data:`PyExc_ConnectionError`" msgstr ":c:data:`PyExc_ConnectionError`" -#: ../../c-api/exceptions.rst:1049 +#: ../../c-api/exceptions.rst:1050 msgid ":exc:`ConnectionError`" msgstr ":exc:`ConnectionError`" -#: ../../c-api/exceptions.rst:1051 +#: ../../c-api/exceptions.rst:1052 msgid ":c:data:`PyExc_ConnectionRefusedError`" msgstr ":c:data:`PyExc_ConnectionRefusedError`" -#: ../../c-api/exceptions.rst:1051 +#: ../../c-api/exceptions.rst:1052 msgid ":exc:`ConnectionRefusedError`" msgstr ":exc:`ConnectionRefusedError`" -#: ../../c-api/exceptions.rst:1053 +#: ../../c-api/exceptions.rst:1054 msgid ":c:data:`PyExc_ConnectionResetError`" msgstr ":c:data:`PyExc_ConnectionResetError`" -#: ../../c-api/exceptions.rst:1053 +#: ../../c-api/exceptions.rst:1054 msgid ":exc:`ConnectionResetError`" msgstr ":exc:`ConnectionResetError`" -#: ../../c-api/exceptions.rst:1055 +#: ../../c-api/exceptions.rst:1056 msgid ":c:data:`PyExc_EOFError`" msgstr ":c:data:`PyExc_EOFError`" -#: ../../c-api/exceptions.rst:1055 +#: ../../c-api/exceptions.rst:1056 msgid ":exc:`EOFError`" msgstr ":exc:`EOFError`" -#: ../../c-api/exceptions.rst:1057 +#: ../../c-api/exceptions.rst:1058 msgid ":c:data:`PyExc_FileExistsError`" msgstr ":c:data:`PyExc_FileExistsError`" -#: ../../c-api/exceptions.rst:1057 +#: ../../c-api/exceptions.rst:1058 msgid ":exc:`FileExistsError`" msgstr ":exc:`FileExistsError`" -#: ../../c-api/exceptions.rst:1059 +#: ../../c-api/exceptions.rst:1060 msgid ":c:data:`PyExc_FileNotFoundError`" msgstr ":c:data:`PyExc_FileNotFoundError`" -#: ../../c-api/exceptions.rst:1059 +#: ../../c-api/exceptions.rst:1060 msgid ":exc:`FileNotFoundError`" msgstr ":exc:`FileNotFoundError`" -#: ../../c-api/exceptions.rst:1061 +#: ../../c-api/exceptions.rst:1062 msgid ":c:data:`PyExc_FloatingPointError`" msgstr ":c:data:`PyExc_FloatingPointError`" -#: ../../c-api/exceptions.rst:1061 +#: ../../c-api/exceptions.rst:1062 msgid ":exc:`FloatingPointError`" msgstr ":exc:`FloatingPointError`" -#: ../../c-api/exceptions.rst:1063 +#: ../../c-api/exceptions.rst:1064 msgid ":c:data:`PyExc_GeneratorExit`" msgstr ":c:data:`PyExc_GeneratorExit`" -#: ../../c-api/exceptions.rst:1063 +#: ../../c-api/exceptions.rst:1064 msgid ":exc:`GeneratorExit`" msgstr ":exc:`GeneratorExit`" -#: ../../c-api/exceptions.rst:1065 +#: ../../c-api/exceptions.rst:1066 msgid ":c:data:`PyExc_ImportError`" msgstr ":c:data:`PyExc_ImportError`" -#: ../../c-api/exceptions.rst:1065 +#: ../../c-api/exceptions.rst:1066 msgid ":exc:`ImportError`" msgstr ":exc:`ImportError`" -#: ../../c-api/exceptions.rst:1067 +#: ../../c-api/exceptions.rst:1068 msgid ":c:data:`PyExc_IndentationError`" msgstr ":c:data:`PyExc_IndentationError`" -#: ../../c-api/exceptions.rst:1067 +#: ../../c-api/exceptions.rst:1068 msgid ":exc:`IndentationError`" msgstr ":exc:`IndentationError`" -#: ../../c-api/exceptions.rst:1069 +#: ../../c-api/exceptions.rst:1070 msgid ":c:data:`PyExc_IndexError`" msgstr ":c:data:`PyExc_IndexError`" -#: ../../c-api/exceptions.rst:1069 +#: ../../c-api/exceptions.rst:1070 msgid ":exc:`IndexError`" msgstr ":exc:`IndexError`" -#: ../../c-api/exceptions.rst:1071 +#: ../../c-api/exceptions.rst:1072 msgid ":c:data:`PyExc_InterruptedError`" msgstr ":c:data:`PyExc_InterruptedError`" -#: ../../c-api/exceptions.rst:1071 +#: ../../c-api/exceptions.rst:1072 msgid ":exc:`InterruptedError`" msgstr ":exc:`InterruptedError`" -#: ../../c-api/exceptions.rst:1073 +#: ../../c-api/exceptions.rst:1074 msgid ":c:data:`PyExc_IsADirectoryError`" msgstr ":c:data:`PyExc_IsADirectoryError`" -#: ../../c-api/exceptions.rst:1073 +#: ../../c-api/exceptions.rst:1074 msgid ":exc:`IsADirectoryError`" msgstr ":exc:`IsADirectoryError`" -#: ../../c-api/exceptions.rst:1075 +#: ../../c-api/exceptions.rst:1076 msgid ":c:data:`PyExc_KeyError`" msgstr ":c:data:`PyExc_KeyError`" -#: ../../c-api/exceptions.rst:1075 +#: ../../c-api/exceptions.rst:1076 msgid ":exc:`KeyError`" msgstr ":exc:`KeyError`" -#: ../../c-api/exceptions.rst:1077 +#: ../../c-api/exceptions.rst:1078 msgid ":c:data:`PyExc_KeyboardInterrupt`" msgstr ":c:data:`PyExc_KeyboardInterrupt`" -#: ../../c-api/exceptions.rst:1077 +#: ../../c-api/exceptions.rst:1078 msgid ":exc:`KeyboardInterrupt`" msgstr ":exc:`KeyboardInterrupt`" -#: ../../c-api/exceptions.rst:1079 +#: ../../c-api/exceptions.rst:1080 msgid ":c:data:`PyExc_LookupError`" msgstr ":c:data:`PyExc_LookupError`" -#: ../../c-api/exceptions.rst:1079 +#: ../../c-api/exceptions.rst:1080 msgid ":exc:`LookupError`" msgstr ":exc:`LookupError`" -#: ../../c-api/exceptions.rst:1081 +#: ../../c-api/exceptions.rst:1082 msgid ":c:data:`PyExc_MemoryError`" msgstr ":c:data:`PyExc_MemoryError`" -#: ../../c-api/exceptions.rst:1081 +#: ../../c-api/exceptions.rst:1082 msgid ":exc:`MemoryError`" msgstr ":exc:`MemoryError`" -#: ../../c-api/exceptions.rst:1083 +#: ../../c-api/exceptions.rst:1084 msgid ":c:data:`PyExc_ModuleNotFoundError`" msgstr ":c:data:`PyExc_ModuleNotFoundError`" -#: ../../c-api/exceptions.rst:1083 +#: ../../c-api/exceptions.rst:1084 msgid ":exc:`ModuleNotFoundError`" msgstr ":exc:`ModuleNotFoundError`" -#: ../../c-api/exceptions.rst:1085 +#: ../../c-api/exceptions.rst:1086 msgid ":c:data:`PyExc_NameError`" msgstr ":c:data:`PyExc_NameError`" -#: ../../c-api/exceptions.rst:1085 +#: ../../c-api/exceptions.rst:1086 msgid ":exc:`NameError`" msgstr ":exc:`NameError`" -#: ../../c-api/exceptions.rst:1087 +#: ../../c-api/exceptions.rst:1088 msgid ":c:data:`PyExc_NotADirectoryError`" msgstr ":c:data:`PyExc_NotADirectoryError`" -#: ../../c-api/exceptions.rst:1087 +#: ../../c-api/exceptions.rst:1088 msgid ":exc:`NotADirectoryError`" msgstr ":exc:`NotADirectoryError`" -#: ../../c-api/exceptions.rst:1089 +#: ../../c-api/exceptions.rst:1090 msgid ":c:data:`PyExc_NotImplementedError`" msgstr ":c:data:`PyExc_NotImplementedError`" -#: ../../c-api/exceptions.rst:1089 +#: ../../c-api/exceptions.rst:1090 msgid ":exc:`NotImplementedError`" msgstr ":exc:`NotImplementedError`" -#: ../../c-api/exceptions.rst:1091 +#: ../../c-api/exceptions.rst:1092 msgid ":c:data:`PyExc_OSError`" msgstr ":c:data:`PyExc_OSError`" -#: ../../c-api/exceptions.rst:1091 +#: ../../c-api/exceptions.rst:1092 msgid ":exc:`OSError`" msgstr ":exc:`OSError`" -#: ../../c-api/exceptions.rst:1093 +#: ../../c-api/exceptions.rst:1094 msgid ":c:data:`PyExc_OverflowError`" msgstr ":c:data:`PyExc_OverflowError`" -#: ../../c-api/exceptions.rst:1093 +#: ../../c-api/exceptions.rst:1094 msgid ":exc:`OverflowError`" msgstr ":exc:`OverflowError`" -#: ../../c-api/exceptions.rst:1095 +#: ../../c-api/exceptions.rst:1096 msgid ":c:data:`PyExc_PermissionError`" msgstr ":c:data:`PyExc_PermissionError`" -#: ../../c-api/exceptions.rst:1095 +#: ../../c-api/exceptions.rst:1096 msgid ":exc:`PermissionError`" msgstr ":exc:`PermissionError`" -#: ../../c-api/exceptions.rst:1097 +#: ../../c-api/exceptions.rst:1098 msgid ":c:data:`PyExc_ProcessLookupError`" msgstr ":c:data:`PyExc_ProcessLookupError`" -#: ../../c-api/exceptions.rst:1097 +#: ../../c-api/exceptions.rst:1098 msgid ":exc:`ProcessLookupError`" msgstr ":exc:`ProcessLookupError`" -#: ../../c-api/exceptions.rst:1099 +#: ../../c-api/exceptions.rst:1100 +msgid ":c:data:`PyExc_PythonFinalizationError`" +msgstr ":c:data:`PyExc_PythonFinalizationError`" + +#: ../../c-api/exceptions.rst:1100 +msgid ":exc:`PythonFinalizationError`" +msgstr ":exc:`PythonFinalizationError`" + +#: ../../c-api/exceptions.rst:1102 msgid ":c:data:`PyExc_RecursionError`" msgstr ":c:data:`PyExc_RecursionError`" -#: ../../c-api/exceptions.rst:1099 +#: ../../c-api/exceptions.rst:1102 msgid ":exc:`RecursionError`" msgstr ":exc:`RecursionError`" -#: ../../c-api/exceptions.rst:1101 +#: ../../c-api/exceptions.rst:1104 msgid ":c:data:`PyExc_ReferenceError`" msgstr ":c:data:`PyExc_ReferenceError`" -#: ../../c-api/exceptions.rst:1101 +#: ../../c-api/exceptions.rst:1104 msgid ":exc:`ReferenceError`" msgstr ":exc:`ReferenceError`" -#: ../../c-api/exceptions.rst:1103 +#: ../../c-api/exceptions.rst:1106 msgid ":c:data:`PyExc_RuntimeError`" msgstr ":c:data:`PyExc_RuntimeError`" -#: ../../c-api/exceptions.rst:1103 +#: ../../c-api/exceptions.rst:1106 msgid ":exc:`RuntimeError`" msgstr ":exc:`RuntimeError`" -#: ../../c-api/exceptions.rst:1105 +#: ../../c-api/exceptions.rst:1108 msgid ":c:data:`PyExc_StopAsyncIteration`" msgstr ":c:data:`PyExc_StopAsyncIteration`" -#: ../../c-api/exceptions.rst:1105 +#: ../../c-api/exceptions.rst:1108 msgid ":exc:`StopAsyncIteration`" msgstr ":exc:`StopAsyncIteration`" -#: ../../c-api/exceptions.rst:1107 +#: ../../c-api/exceptions.rst:1110 msgid ":c:data:`PyExc_StopIteration`" msgstr ":c:data:`PyExc_StopIteration`" -#: ../../c-api/exceptions.rst:1107 +#: ../../c-api/exceptions.rst:1110 msgid ":exc:`StopIteration`" msgstr ":exc:`StopIteration`" -#: ../../c-api/exceptions.rst:1109 +#: ../../c-api/exceptions.rst:1112 msgid ":c:data:`PyExc_SyntaxError`" msgstr ":c:data:`PyExc_SyntaxError`" -#: ../../c-api/exceptions.rst:1109 +#: ../../c-api/exceptions.rst:1112 msgid ":exc:`SyntaxError`" msgstr ":exc:`SyntaxError`" -#: ../../c-api/exceptions.rst:1111 +#: ../../c-api/exceptions.rst:1114 msgid ":c:data:`PyExc_SystemError`" msgstr ":c:data:`PyExc_SystemError`" -#: ../../c-api/exceptions.rst:1111 +#: ../../c-api/exceptions.rst:1114 msgid ":exc:`SystemError`" msgstr ":exc:`SystemError`" -#: ../../c-api/exceptions.rst:1113 +#: ../../c-api/exceptions.rst:1116 msgid ":c:data:`PyExc_SystemExit`" msgstr ":c:data:`PyExc_SystemExit`" -#: ../../c-api/exceptions.rst:1113 +#: ../../c-api/exceptions.rst:1116 msgid ":exc:`SystemExit`" msgstr ":exc:`SystemExit`" -#: ../../c-api/exceptions.rst:1115 +#: ../../c-api/exceptions.rst:1118 msgid ":c:data:`PyExc_TabError`" msgstr ":c:data:`PyExc_TabError`" -#: ../../c-api/exceptions.rst:1115 +#: ../../c-api/exceptions.rst:1118 msgid ":exc:`TabError`" msgstr ":exc:`TabError`" -#: ../../c-api/exceptions.rst:1117 +#: ../../c-api/exceptions.rst:1120 msgid ":c:data:`PyExc_TimeoutError`" msgstr ":c:data:`PyExc_TimeoutError`" -#: ../../c-api/exceptions.rst:1117 +#: ../../c-api/exceptions.rst:1120 msgid ":exc:`TimeoutError`" msgstr ":exc:`TimeoutError`" -#: ../../c-api/exceptions.rst:1119 +#: ../../c-api/exceptions.rst:1122 msgid ":c:data:`PyExc_TypeError`" msgstr ":c:data:`PyExc_TypeError`" -#: ../../c-api/exceptions.rst:1119 +#: ../../c-api/exceptions.rst:1122 msgid ":exc:`TypeError`" msgstr ":exc:`TypeError`" -#: ../../c-api/exceptions.rst:1121 +#: ../../c-api/exceptions.rst:1124 msgid ":c:data:`PyExc_UnboundLocalError`" msgstr ":c:data:`PyExc_UnboundLocalError`" -#: ../../c-api/exceptions.rst:1121 +#: ../../c-api/exceptions.rst:1124 msgid ":exc:`UnboundLocalError`" msgstr ":exc:`UnboundLocalError`" -#: ../../c-api/exceptions.rst:1123 +#: ../../c-api/exceptions.rst:1126 msgid ":c:data:`PyExc_UnicodeDecodeError`" msgstr ":c:data:`PyExc_UnicodeDecodeError`" -#: ../../c-api/exceptions.rst:1123 +#: ../../c-api/exceptions.rst:1126 msgid ":exc:`UnicodeDecodeError`" msgstr ":exc:`UnicodeDecodeError`" -#: ../../c-api/exceptions.rst:1125 +#: ../../c-api/exceptions.rst:1128 msgid ":c:data:`PyExc_UnicodeEncodeError`" msgstr ":c:data:`PyExc_UnicodeEncodeError`" -#: ../../c-api/exceptions.rst:1125 +#: ../../c-api/exceptions.rst:1128 msgid ":exc:`UnicodeEncodeError`" msgstr ":exc:`UnicodeEncodeError`" -#: ../../c-api/exceptions.rst:1127 +#: ../../c-api/exceptions.rst:1130 msgid ":c:data:`PyExc_UnicodeError`" msgstr ":c:data:`PyExc_UnicodeError`" -#: ../../c-api/exceptions.rst:1127 +#: ../../c-api/exceptions.rst:1130 msgid ":exc:`UnicodeError`" msgstr ":exc:`UnicodeError`" -#: ../../c-api/exceptions.rst:1129 +#: ../../c-api/exceptions.rst:1132 msgid ":c:data:`PyExc_UnicodeTranslateError`" msgstr ":c:data:`PyExc_UnicodeTranslateError`" -#: ../../c-api/exceptions.rst:1129 +#: ../../c-api/exceptions.rst:1132 msgid ":exc:`UnicodeTranslateError`" msgstr ":exc:`UnicodeTranslateError`" -#: ../../c-api/exceptions.rst:1131 +#: ../../c-api/exceptions.rst:1134 msgid ":c:data:`PyExc_ValueError`" msgstr ":c:data:`PyExc_ValueError`" -#: ../../c-api/exceptions.rst:1131 +#: ../../c-api/exceptions.rst:1134 msgid ":exc:`ValueError`" msgstr ":exc:`ValueError`" -#: ../../c-api/exceptions.rst:1133 +#: ../../c-api/exceptions.rst:1136 msgid ":c:data:`PyExc_ZeroDivisionError`" msgstr ":c:data:`PyExc_ZeroDivisionError`" -#: ../../c-api/exceptions.rst:1133 +#: ../../c-api/exceptions.rst:1136 msgid ":exc:`ZeroDivisionError`" msgstr ":exc:`ZeroDivisionError`" -#: ../../c-api/exceptions.rst:1136 +#: ../../c-api/exceptions.rst:1139 msgid "" ":c:data:`PyExc_BlockingIOError`, :c:data:`PyExc_BrokenPipeError`, :c:data:" "`PyExc_ChildProcessError`, :c:data:`PyExc_ConnectionError`, :c:data:" @@ -1502,57 +1510,57 @@ msgstr "" "`PyExc_PermissionError`, :c:data:`PyExc_ProcessLookupError` 和 :c:data:" "`PyExc_TimeoutError` 是在 :pep:`3151` 被引入。" -#: ../../c-api/exceptions.rst:1146 +#: ../../c-api/exceptions.rst:1149 msgid ":c:data:`PyExc_StopAsyncIteration` and :c:data:`PyExc_RecursionError`." msgstr ":c:data:`PyExc_StopAsyncIteration` 和 :c:data:`PyExc_RecursionError`。" -#: ../../c-api/exceptions.rst:1149 +#: ../../c-api/exceptions.rst:1152 msgid ":c:data:`PyExc_ModuleNotFoundError`." msgstr ":c:data:`PyExc_ModuleNotFoundError`。" -#: ../../c-api/exceptions.rst:1152 +#: ../../c-api/exceptions.rst:1155 msgid "These are compatibility aliases to :c:data:`PyExc_OSError`:" msgstr "" -#: ../../c-api/exceptions.rst:1162 +#: ../../c-api/exceptions.rst:1165 msgid ":c:data:`!PyExc_EnvironmentError`" msgstr ":c:data:`!PyExc_EnvironmentError`" -#: ../../c-api/exceptions.rst:1164 +#: ../../c-api/exceptions.rst:1167 msgid ":c:data:`!PyExc_IOError`" msgstr ":c:data:`!PyExc_IOError`" -#: ../../c-api/exceptions.rst:1166 +#: ../../c-api/exceptions.rst:1169 msgid ":c:data:`!PyExc_WindowsError`" msgstr ":c:data:`!PyExc_WindowsError`" -#: ../../c-api/exceptions.rst:1166 +#: ../../c-api/exceptions.rst:1169 msgid "[2]_" msgstr "[2]_" -#: ../../c-api/exceptions.rst:1169 +#: ../../c-api/exceptions.rst:1172 msgid "These aliases used to be separate exception types." msgstr "" -#: ../../c-api/exceptions.rst:1172 ../../c-api/exceptions.rst:1233 +#: ../../c-api/exceptions.rst:1175 ../../c-api/exceptions.rst:1236 msgid "Notes:" msgstr "註解:" -#: ../../c-api/exceptions.rst:1175 +#: ../../c-api/exceptions.rst:1178 msgid "This is a base class for other standard exceptions." msgstr "" -#: ../../c-api/exceptions.rst:1178 +#: ../../c-api/exceptions.rst:1181 msgid "" "Only defined on Windows; protect code that uses this by testing that the " "preprocessor macro ``MS_WINDOWS`` is defined." msgstr "" -#: ../../c-api/exceptions.rst:1184 +#: ../../c-api/exceptions.rst:1187 msgid "Standard Warning Categories" msgstr "" -#: ../../c-api/exceptions.rst:1186 +#: ../../c-api/exceptions.rst:1189 msgid "" "All standard Python warning categories are available as global variables " "whose names are ``PyExc_`` followed by the Python exception name. These have " @@ -1560,103 +1568,103 @@ msgid "" "here are all the variables:" msgstr "" -#: ../../c-api/exceptions.rst:1207 +#: ../../c-api/exceptions.rst:1210 msgid ":c:data:`PyExc_Warning`" msgstr ":c:data:`PyExc_Warning`" -#: ../../c-api/exceptions.rst:1207 +#: ../../c-api/exceptions.rst:1210 msgid ":exc:`Warning`" msgstr ":exc:`Warning`" -#: ../../c-api/exceptions.rst:1207 +#: ../../c-api/exceptions.rst:1210 msgid "[3]_" msgstr "[3]_" -#: ../../c-api/exceptions.rst:1209 +#: ../../c-api/exceptions.rst:1212 msgid ":c:data:`PyExc_BytesWarning`" msgstr ":c:data:`PyExc_BytesWarning`" -#: ../../c-api/exceptions.rst:1209 +#: ../../c-api/exceptions.rst:1212 msgid ":exc:`BytesWarning`" msgstr ":exc:`BytesWarning`" -#: ../../c-api/exceptions.rst:1211 +#: ../../c-api/exceptions.rst:1214 msgid ":c:data:`PyExc_DeprecationWarning`" msgstr ":c:data:`PyExc_DeprecationWarning`" -#: ../../c-api/exceptions.rst:1211 +#: ../../c-api/exceptions.rst:1214 msgid ":exc:`DeprecationWarning`" msgstr ":exc:`DeprecationWarning`" -#: ../../c-api/exceptions.rst:1213 +#: ../../c-api/exceptions.rst:1216 msgid ":c:data:`PyExc_FutureWarning`" msgstr ":c:data:`PyExc_FutureWarning`" -#: ../../c-api/exceptions.rst:1213 +#: ../../c-api/exceptions.rst:1216 msgid ":exc:`FutureWarning`" msgstr ":exc:`FutureWarning`" -#: ../../c-api/exceptions.rst:1215 +#: ../../c-api/exceptions.rst:1218 msgid ":c:data:`PyExc_ImportWarning`" msgstr ":c:data:`PyExc_ImportWarning`" -#: ../../c-api/exceptions.rst:1215 +#: ../../c-api/exceptions.rst:1218 msgid ":exc:`ImportWarning`" msgstr ":exc:`ImportWarning`" -#: ../../c-api/exceptions.rst:1217 +#: ../../c-api/exceptions.rst:1220 msgid ":c:data:`PyExc_PendingDeprecationWarning`" msgstr ":c:data:`PyExc_PendingDeprecationWarning`" -#: ../../c-api/exceptions.rst:1217 +#: ../../c-api/exceptions.rst:1220 msgid ":exc:`PendingDeprecationWarning`" msgstr ":exc:`PendingDeprecationWarning`" -#: ../../c-api/exceptions.rst:1219 +#: ../../c-api/exceptions.rst:1222 msgid ":c:data:`PyExc_ResourceWarning`" msgstr ":c:data:`PyExc_ResourceWarning`" -#: ../../c-api/exceptions.rst:1219 +#: ../../c-api/exceptions.rst:1222 msgid ":exc:`ResourceWarning`" msgstr ":exc:`ResourceWarning`" -#: ../../c-api/exceptions.rst:1221 +#: ../../c-api/exceptions.rst:1224 msgid ":c:data:`PyExc_RuntimeWarning`" msgstr ":c:data:`PyExc_RuntimeWarning`" -#: ../../c-api/exceptions.rst:1221 +#: ../../c-api/exceptions.rst:1224 msgid ":exc:`RuntimeWarning`" msgstr ":exc:`RuntimeWarning`" -#: ../../c-api/exceptions.rst:1223 +#: ../../c-api/exceptions.rst:1226 msgid ":c:data:`PyExc_SyntaxWarning`" msgstr ":c:data:`PyExc_SyntaxWarning`" -#: ../../c-api/exceptions.rst:1223 +#: ../../c-api/exceptions.rst:1226 msgid ":exc:`SyntaxWarning`" msgstr ":exc:`SyntaxWarning`" -#: ../../c-api/exceptions.rst:1225 +#: ../../c-api/exceptions.rst:1228 msgid ":c:data:`PyExc_UnicodeWarning`" msgstr ":c:data:`PyExc_UnicodeWarning`" -#: ../../c-api/exceptions.rst:1225 +#: ../../c-api/exceptions.rst:1228 msgid ":exc:`UnicodeWarning`" msgstr ":exc:`UnicodeWarning`" -#: ../../c-api/exceptions.rst:1227 +#: ../../c-api/exceptions.rst:1230 msgid ":c:data:`PyExc_UserWarning`" msgstr ":c:data:`PyExc_UserWarning`" -#: ../../c-api/exceptions.rst:1227 +#: ../../c-api/exceptions.rst:1230 msgid ":exc:`UserWarning`" msgstr ":exc:`UserWarning`" -#: ../../c-api/exceptions.rst:1230 +#: ../../c-api/exceptions.rst:1233 msgid ":c:data:`PyExc_ResourceWarning`." msgstr ":c:data:`PyExc_ResourceWarning`." -#: ../../c-api/exceptions.rst:1236 +#: ../../c-api/exceptions.rst:1239 msgid "This is a base class for other standard warning categories." msgstr "" @@ -1823,6 +1831,10 @@ msgstr "PyExc_PermissionError(C 變數)" msgid "PyExc_ProcessLookupError (C var)" msgstr "PyExc_ProcessLookupError(C 變數)" +#: ../../c-api/exceptions.rst:971 +msgid "PyExc_PythonFinalizationError (C var)" +msgstr "PyExc_PythonFinalizationError(C 變數)" + #: ../../c-api/exceptions.rst:971 msgid "PyExc_RecursionError (C var)" msgstr "PyExc_RecursionError(C 變數)" @@ -1895,58 +1907,58 @@ msgstr "PyExc_ValueError(C 變數)" msgid "PyExc_ZeroDivisionError (C var)" msgstr "PyExc_ZeroDivisionError(C 變數)" -#: ../../c-api/exceptions.rst:1154 +#: ../../c-api/exceptions.rst:1157 msgid "PyExc_EnvironmentError (C var)" msgstr "PyExc_EnvironmentError(C 變數)" -#: ../../c-api/exceptions.rst:1154 +#: ../../c-api/exceptions.rst:1157 msgid "PyExc_IOError (C var)" msgstr "PyExc_IOError(C 變數)" -#: ../../c-api/exceptions.rst:1154 +#: ../../c-api/exceptions.rst:1157 msgid "PyExc_WindowsError (C var)" msgstr "PyExc_WindowsError(C 變數)" -#: ../../c-api/exceptions.rst:1191 +#: ../../c-api/exceptions.rst:1194 msgid "PyExc_Warning (C var)" msgstr "PyExc_Warning(C 變數)" -#: ../../c-api/exceptions.rst:1191 +#: ../../c-api/exceptions.rst:1194 msgid "PyExc_BytesWarning (C var)" msgstr "PyExc_BytesWarning(C 變數)" -#: ../../c-api/exceptions.rst:1191 +#: ../../c-api/exceptions.rst:1194 msgid "PyExc_DeprecationWarning (C var)" msgstr "PyExc_DeprecationWarning(C 變數)" -#: ../../c-api/exceptions.rst:1191 +#: ../../c-api/exceptions.rst:1194 msgid "PyExc_FutureWarning (C var)" msgstr "PyExc_FutureWarning(C 變數)" -#: ../../c-api/exceptions.rst:1191 +#: ../../c-api/exceptions.rst:1194 msgid "PyExc_ImportWarning (C var)" msgstr "PyExc_ImportWarning(C 變數)" -#: ../../c-api/exceptions.rst:1191 +#: ../../c-api/exceptions.rst:1194 msgid "PyExc_PendingDeprecationWarning (C var)" msgstr "PyExc_PendingDeprecationWarning(C 變數)" -#: ../../c-api/exceptions.rst:1191 +#: ../../c-api/exceptions.rst:1194 msgid "PyExc_ResourceWarning (C var)" msgstr "PyExc_ResourceWarning(C 變數)" -#: ../../c-api/exceptions.rst:1191 +#: ../../c-api/exceptions.rst:1194 msgid "PyExc_RuntimeWarning (C var)" msgstr "PyExc_RuntimeWarning(C 變數)" -#: ../../c-api/exceptions.rst:1191 +#: ../../c-api/exceptions.rst:1194 msgid "PyExc_SyntaxWarning (C var)" msgstr "PyExc_SyntaxWarning(C 變數)" -#: ../../c-api/exceptions.rst:1191 +#: ../../c-api/exceptions.rst:1194 msgid "PyExc_UnicodeWarning (C var)" msgstr "PyExc_UnicodeWarning(C 變數)" -#: ../../c-api/exceptions.rst:1191 +#: ../../c-api/exceptions.rst:1194 msgid "PyExc_UserWarning (C var)" msgstr "PyExc_UserWarning(C 變數)" diff --git a/c-api/long.po b/c-api/long.po index 7abcaaf2c1..7c2be2dcee 100644 --- a/c-api/long.po +++ b/c-api/long.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-23 07:52+0800\n" +"POT-Creation-Date: 2024-09-24 07:20+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-" @@ -405,7 +405,7 @@ msgstr "" #: ../../c-api/long.rst:386 msgid "``0`` will never be returned." -msgstr "" +msgstr "``0`` 將永不被回傳。" #: ../../c-api/long.rst:388 msgid "Values are always copied as two's-complement." @@ -413,7 +413,7 @@ msgstr "" #: ../../c-api/long.rst:390 msgid "Usage example::" -msgstr "" +msgstr "使用範例: ::" #: ../../c-api/long.rst:392 msgid "" @@ -495,56 +495,56 @@ msgid "" "Py_ASNATIVEBYTES_UNSIGNED_BUFFER``." msgstr "" -#: ../../c-api/long.rst:456 +#: ../../c-api/long.rst:458 msgid "Flag" -msgstr "" +msgstr "旗標" -#: ../../c-api/long.rst:456 +#: ../../c-api/long.rst:458 msgid "Value" -msgstr "" +msgstr "數值" -#: ../../c-api/long.rst:458 +#: ../../c-api/long.rst:460 msgid "``-1``" -msgstr "" +msgstr "``-1``" -#: ../../c-api/long.rst:459 +#: ../../c-api/long.rst:461 msgid "``0``" -msgstr "" +msgstr "``0``" -#: ../../c-api/long.rst:460 +#: ../../c-api/long.rst:462 msgid "``1``" -msgstr "" +msgstr "``1``" -#: ../../c-api/long.rst:461 +#: ../../c-api/long.rst:463 msgid "``3``" -msgstr "" +msgstr "``3``" -#: ../../c-api/long.rst:462 +#: ../../c-api/long.rst:464 msgid "``4``" -msgstr "" +msgstr "``4``" -#: ../../c-api/long.rst:463 +#: ../../c-api/long.rst:465 msgid "``8``" -msgstr "" +msgstr "``8``" -#: ../../c-api/long.rst:464 +#: ../../c-api/long.rst:466 msgid "``16``" -msgstr "" +msgstr "``16``" -#: ../../c-api/long.rst:467 +#: ../../c-api/long.rst:469 msgid "" "Specifying ``Py_ASNATIVEBYTES_NATIVE_ENDIAN`` will override any other endian " "flags. Passing ``2`` is reserved." msgstr "" -#: ../../c-api/long.rst:470 +#: ../../c-api/long.rst:472 msgid "" "By default, sufficient buffer will be requested to include a sign bit. For " "example, when converting 128 with *n_bytes=1*, the function will return 2 " "(or more) in order to store a zero sign bit." msgstr "" -#: ../../c-api/long.rst:474 +#: ../../c-api/long.rst:476 msgid "" "If ``Py_ASNATIVEBYTES_UNSIGNED_BUFFER`` is specified, a zero sign bit will " "be omitted from size calculations. This allows, for example, 128 to fit in a " @@ -554,7 +554,7 @@ msgid "" "requested." msgstr "" -#: ../../c-api/long.rst:481 +#: ../../c-api/long.rst:483 msgid "" "Specifying ``Py_ASNATIVEBYTES_REJECT_NEGATIVE`` causes an exception to be " "set if *pylong* is negative. Without this flag, negative values will be " @@ -562,7 +562,7 @@ msgid "" "of whether ``Py_ASNATIVEBYTES_UNSIGNED_BUFFER`` was specified." msgstr "" -#: ../../c-api/long.rst:486 +#: ../../c-api/long.rst:488 msgid "" "If ``Py_ASNATIVEBYTES_ALLOW_INDEX`` is specified and a non-integer value is " "passed, its :meth:`~object.__index__` method will be called first. This may " @@ -572,7 +572,7 @@ msgid "" "`TypeError`." msgstr "" -#: ../../c-api/long.rst:495 +#: ../../c-api/long.rst:497 msgid "" "With the default *flags* (``-1``, or *UNSIGNED_BUFFER* without " "*REJECT_NEGATIVE*), multiple Python integers can map to a single value " @@ -580,22 +580,22 @@ msgid "" "buffer and set all its bits. This matches typical C cast behavior." msgstr "" -#: ../../c-api/long.rst:506 +#: ../../c-api/long.rst:508 msgid "" "On success, return a read only :term:`named tuple`, that holds information " "about Python's internal representation of integers. See :data:`sys.int_info` " "for description of individual fields." msgstr "" -#: ../../c-api/long.rst:510 +#: ../../c-api/long.rst:512 msgid "On failure, return ``NULL`` with an exception set." msgstr "在失敗時,會回傳 ``NULL`` 並設定例外。" -#: ../../c-api/long.rst:517 +#: ../../c-api/long.rst:519 msgid "Return 1 if *op* is compact, 0 otherwise." msgstr "" -#: ../../c-api/long.rst:519 +#: ../../c-api/long.rst:521 msgid "" "This function makes it possible for performance-critical code to implement a " "“fast path” for small integers. For compact values use :c:func:" @@ -603,23 +603,23 @@ msgid "" "`PyLong_As* ` function or :c:func:`PyLong_AsNativeBytes`." msgstr "" -#: ../../c-api/long.rst:525 +#: ../../c-api/long.rst:527 msgid "The speedup is expected to be negligible for most users." msgstr "" -#: ../../c-api/long.rst:527 +#: ../../c-api/long.rst:529 msgid "" "Exactly what values are considered compact is an implementation detail and " "is subject to change." msgstr "" -#: ../../c-api/long.rst:532 +#: ../../c-api/long.rst:534 msgid "" "If *op* is compact, as determined by :c:func:`PyUnstable_Long_IsCompact`, " "return its value." msgstr "" -#: ../../c-api/long.rst:535 +#: ../../c-api/long.rst:537 msgid "Otherwise, the return value is undefined." msgstr "" diff --git a/c-api/memory.po b/c-api/memory.po index 489366188e..e3b9669a9d 100644 --- a/c-api/memory.po +++ b/c-api/memory.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-23 07:52+0800\n" +"POT-Creation-Date: 2024-09-24 07:20+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,59 +135,70 @@ msgid "" "details on how every domain allocates memory or what internal functions each " "domain calls is considered an implementation detail, but for debugging " "purposes a simplified table can be found at :ref:`here `. There is no hard requirement to use the memory returned by the " -"allocation functions belonging to a given domain for only the purposes " -"hinted by that domain (although this is the recommended practice). For " -"example, one could use the memory returned by :c:func:`PyMem_RawMalloc` for " -"allocating Python objects or the memory returned by :c:func:" -"`PyObject_Malloc` for allocating memory for buffers." +"allocators>`. The APIs used to allocate and free a block of memory must be " +"from the same domain. For example, :c:func:`PyMem_Free` must be used to free " +"memory allocated using :c:func:`PyMem_Malloc`." msgstr "" -#: ../../c-api/memory.rst:112 +#: ../../c-api/memory.rst:109 msgid "The three allocation domains are:" msgstr "" -#: ../../c-api/memory.rst:114 +#: ../../c-api/memory.rst:111 msgid "" "Raw domain: intended for allocating memory for general-purpose memory " "buffers where the allocation *must* go to the system allocator or where the " "allocator can operate without the :term:`GIL`. The memory is requested " -"directly to the system." +"directly from the system. See :ref:`Raw Memory Interface `." msgstr "" -#: ../../c-api/memory.rst:119 +#: ../../c-api/memory.rst:116 msgid "" "\"Mem\" domain: intended for allocating memory for Python buffers and " "general-purpose memory buffers where the allocation must be performed with " -"the :term:`GIL` held. The memory is taken from the Python private heap." +"the :term:`GIL` held. The memory is taken from the Python private heap. See :" +"ref:`Memory Interface `." msgstr "" -#: ../../c-api/memory.rst:123 +#: ../../c-api/memory.rst:121 msgid "" -"Object domain: intended for allocating memory belonging to Python objects. " -"The memory is taken from the Python private heap." +"Object domain: intended for allocating memory for Python objects. The memory " +"is taken from the Python private heap. See :ref:`Object allocators " +"`." msgstr "" #: ../../c-api/memory.rst:126 msgid "" -"When freeing memory previously allocated by the allocating functions " -"belonging to a given domain,the matching specific deallocating functions " -"must be used. For example, :c:func:`PyMem_Free` must be used to free memory " -"allocated using :c:func:`PyMem_Malloc`." +"The :term:`free-threaded ` build requires that only Python " +"objects are allocated using the \"object\" domain and that all Python " +"objects are allocated using that domain. This differs from the prior Python " +"versions, where this was only a best practice and not a hard requirement." msgstr "" -#: ../../c-api/memory.rst:131 -msgid "Raw Memory Interface" +#: ../../c-api/memory.rst:130 +msgid "" +"For example, buffers (non-Python objects) should be allocated using :c:func:" +"`PyMem_Malloc`, :c:func:`PyMem_RawMalloc`, or :c:func:`malloc`, but not :c:" +"func:`PyObject_Malloc`." msgstr "" #: ../../c-api/memory.rst:133 +msgid "See :ref:`Memory Allocation APIs `." +msgstr "" + +#: ../../c-api/memory.rst:139 +msgid "Raw Memory Interface" +msgstr "" + +#: ../../c-api/memory.rst:141 msgid "" "The following function sets are wrappers to the system allocator. These " "functions are thread-safe, the :term:`GIL ` does " "not need to be held." msgstr "" -#: ../../c-api/memory.rst:137 +#: ../../c-api/memory.rst:145 msgid "" "The :ref:`default raw memory allocator ` uses the " "following functions: :c:func:`malloc`, :c:func:`calloc`, :c:func:`realloc` " @@ -195,63 +206,63 @@ msgid "" "requesting zero bytes." msgstr "" -#: ../../c-api/memory.rst:146 ../../c-api/memory.rst:217 -#: ../../c-api/memory.rst:325 +#: ../../c-api/memory.rst:154 ../../c-api/memory.rst:225 +#: ../../c-api/memory.rst:335 msgid "" "Allocates *n* bytes and returns a pointer of type :c:expr:`void*` to the " "allocated memory, or ``NULL`` if the request fails." msgstr "" -#: ../../c-api/memory.rst:149 +#: ../../c-api/memory.rst:157 msgid "" "Requesting zero bytes returns a distinct non-``NULL`` pointer if possible, " "as if ``PyMem_RawMalloc(1)`` had been called instead. The memory will not " "have been initialized in any way." msgstr "" -#: ../../c-api/memory.rst:156 ../../c-api/memory.rst:227 -#: ../../c-api/memory.rst:335 +#: ../../c-api/memory.rst:164 ../../c-api/memory.rst:235 +#: ../../c-api/memory.rst:345 msgid "" "Allocates *nelem* elements each whose size in bytes is *elsize* and returns " "a pointer of type :c:expr:`void*` to the allocated memory, or ``NULL`` if " "the request fails. The memory is initialized to zeros." msgstr "" -#: ../../c-api/memory.rst:160 +#: ../../c-api/memory.rst:168 msgid "" "Requesting zero elements or elements of size zero bytes returns a distinct " "non-``NULL`` pointer if possible, as if ``PyMem_RawCalloc(1, 1)`` had been " "called instead." msgstr "" -#: ../../c-api/memory.rst:169 ../../c-api/memory.rst:240 -#: ../../c-api/memory.rst:348 +#: ../../c-api/memory.rst:177 ../../c-api/memory.rst:248 +#: ../../c-api/memory.rst:358 msgid "" "Resizes the memory block pointed to by *p* to *n* bytes. The contents will " "be unchanged to the minimum of the old and the new sizes." msgstr "" -#: ../../c-api/memory.rst:172 +#: ../../c-api/memory.rst:180 msgid "" "If *p* is ``NULL``, the call is equivalent to ``PyMem_RawMalloc(n)``; else " "if *n* is equal to zero, the memory block is resized but is not freed, and " "the returned pointer is non-``NULL``." msgstr "" -#: ../../c-api/memory.rst:176 +#: ../../c-api/memory.rst:184 msgid "" "Unless *p* is ``NULL``, it must have been returned by a previous call to :c:" "func:`PyMem_RawMalloc`, :c:func:`PyMem_RawRealloc` or :c:func:" "`PyMem_RawCalloc`." msgstr "" -#: ../../c-api/memory.rst:180 +#: ../../c-api/memory.rst:188 msgid "" "If the request fails, :c:func:`PyMem_RawRealloc` returns ``NULL`` and *p* " "remains a valid pointer to the previous memory area." msgstr "" -#: ../../c-api/memory.rst:186 +#: ../../c-api/memory.rst:194 msgid "" "Frees the memory block pointed to by *p*, which must have been returned by a " "previous call to :c:func:`PyMem_RawMalloc`, :c:func:`PyMem_RawRealloc` or :c:" @@ -259,73 +270,73 @@ msgid "" "called before, undefined behavior occurs." msgstr "" -#: ../../c-api/memory.rst:191 ../../c-api/memory.rst:261 -#: ../../c-api/memory.rst:369 +#: ../../c-api/memory.rst:199 ../../c-api/memory.rst:269 +#: ../../c-api/memory.rst:379 msgid "If *p* is ``NULL``, no operation is performed." msgstr "" -#: ../../c-api/memory.rst:197 +#: ../../c-api/memory.rst:205 msgid "Memory Interface" msgstr "記憶體介面" -#: ../../c-api/memory.rst:199 ../../c-api/memory.rst:305 +#: ../../c-api/memory.rst:207 ../../c-api/memory.rst:315 msgid "" "The following function sets, modeled after the ANSI C standard, but " "specifying behavior when requesting zero bytes, are available for allocating " "and releasing memory from the Python heap." msgstr "" -#: ../../c-api/memory.rst:203 +#: ../../c-api/memory.rst:211 msgid "" "The :ref:`default memory allocator ` uses the :" "ref:`pymalloc memory allocator `." msgstr "" -#: ../../c-api/memory.rst:208 ../../c-api/memory.rst:320 +#: ../../c-api/memory.rst:216 ../../c-api/memory.rst:330 msgid "" "The :term:`GIL ` must be held when using these " "functions." msgstr "" -#: ../../c-api/memory.rst:213 +#: ../../c-api/memory.rst:221 msgid "" "The default allocator is now pymalloc instead of system :c:func:`malloc`." msgstr "" -#: ../../c-api/memory.rst:220 +#: ../../c-api/memory.rst:228 msgid "" "Requesting zero bytes returns a distinct non-``NULL`` pointer if possible, " "as if ``PyMem_Malloc(1)`` had been called instead. The memory will not have " "been initialized in any way." msgstr "" -#: ../../c-api/memory.rst:231 +#: ../../c-api/memory.rst:239 msgid "" "Requesting zero elements or elements of size zero bytes returns a distinct " "non-``NULL`` pointer if possible, as if ``PyMem_Calloc(1, 1)`` had been " "called instead." msgstr "" -#: ../../c-api/memory.rst:243 +#: ../../c-api/memory.rst:251 msgid "" "If *p* is ``NULL``, the call is equivalent to ``PyMem_Malloc(n)``; else if " "*n* is equal to zero, the memory block is resized but is not freed, and the " "returned pointer is non-``NULL``." msgstr "" -#: ../../c-api/memory.rst:247 +#: ../../c-api/memory.rst:255 msgid "" "Unless *p* is ``NULL``, it must have been returned by a previous call to :c:" "func:`PyMem_Malloc`, :c:func:`PyMem_Realloc` or :c:func:`PyMem_Calloc`." msgstr "" -#: ../../c-api/memory.rst:250 +#: ../../c-api/memory.rst:258 msgid "" "If the request fails, :c:func:`PyMem_Realloc` returns ``NULL`` and *p* " "remains a valid pointer to the previous memory area." msgstr "" -#: ../../c-api/memory.rst:256 +#: ../../c-api/memory.rst:264 msgid "" "Frees the memory block pointed to by *p*, which must have been returned by a " "previous call to :c:func:`PyMem_Malloc`, :c:func:`PyMem_Realloc` or :c:func:" @@ -333,20 +344,20 @@ msgid "" "undefined behavior occurs." msgstr "" -#: ../../c-api/memory.rst:263 +#: ../../c-api/memory.rst:271 msgid "" "The following type-oriented macros are provided for convenience. Note that " "*TYPE* refers to any C type." msgstr "" -#: ../../c-api/memory.rst:269 +#: ../../c-api/memory.rst:277 msgid "" "Same as :c:func:`PyMem_Malloc`, but allocates ``(n * sizeof(TYPE))`` bytes " "of memory. Returns a pointer cast to ``TYPE*``. The memory will not have " "been initialized in any way." msgstr "" -#: ../../c-api/memory.rst:276 +#: ../../c-api/memory.rst:284 msgid "" "Same as :c:func:`PyMem_Realloc`, but the memory block is resized to ``(n * " "sizeof(TYPE))`` bytes. Returns a pointer cast to ``TYPE*``. On return, *p* " @@ -354,17 +365,17 @@ msgid "" "failure." msgstr "" -#: ../../c-api/memory.rst:281 +#: ../../c-api/memory.rst:289 msgid "" "This is a C preprocessor macro; *p* is always reassigned. Save the original " "value of *p* to avoid losing memory when handling errors." msgstr "" -#: ../../c-api/memory.rst:287 +#: ../../c-api/memory.rst:295 msgid "Same as :c:func:`PyMem_Free`." msgstr "和 :c:func:`PyMem_Free` 相同。" -#: ../../c-api/memory.rst:289 +#: ../../c-api/memory.rst:297 msgid "" "In addition, the following macro sets are provided for calling the Python " "memory allocator directly, without involving the C API functions listed " @@ -372,35 +383,35 @@ msgid "" "across Python versions and is therefore deprecated in extension modules." msgstr "" -#: ../../c-api/memory.rst:294 +#: ../../c-api/memory.rst:302 msgid "``PyMem_MALLOC(size)``" msgstr "``PyMem_MALLOC(size)``" -#: ../../c-api/memory.rst:295 +#: ../../c-api/memory.rst:303 msgid "``PyMem_NEW(type, size)``" msgstr "``PyMem_NEW(type, size)``" -#: ../../c-api/memory.rst:296 +#: ../../c-api/memory.rst:304 msgid "``PyMem_REALLOC(ptr, size)``" msgstr "``PyMem_REALLOC(ptr, size)``" -#: ../../c-api/memory.rst:297 +#: ../../c-api/memory.rst:305 msgid "``PyMem_RESIZE(ptr, type, size)``" msgstr "``PyMem_RESIZE(ptr, type, size)``" -#: ../../c-api/memory.rst:298 +#: ../../c-api/memory.rst:306 msgid "``PyMem_FREE(ptr)``" msgstr "``PyMem_FREE(ptr)``" -#: ../../c-api/memory.rst:299 +#: ../../c-api/memory.rst:307 msgid "``PyMem_DEL(ptr)``" msgstr "``PyMem_DEL(ptr)``" -#: ../../c-api/memory.rst:303 +#: ../../c-api/memory.rst:313 msgid "Object allocators" msgstr "" -#: ../../c-api/memory.rst:310 +#: ../../c-api/memory.rst:320 msgid "" "There is no guarantee that the memory returned by these allocators can be " "successfully cast to a Python object when intercepting the allocating " @@ -408,47 +419,47 @@ msgid "" "Memory Allocators ` section." msgstr "" -#: ../../c-api/memory.rst:315 +#: ../../c-api/memory.rst:325 msgid "" "The :ref:`default object allocator ` uses the :" "ref:`pymalloc memory allocator `." msgstr "" -#: ../../c-api/memory.rst:328 +#: ../../c-api/memory.rst:338 msgid "" "Requesting zero bytes returns a distinct non-``NULL`` pointer if possible, " "as if ``PyObject_Malloc(1)`` had been called instead. The memory will not " "have been initialized in any way." msgstr "" -#: ../../c-api/memory.rst:339 +#: ../../c-api/memory.rst:349 msgid "" "Requesting zero elements or elements of size zero bytes returns a distinct " "non-``NULL`` pointer if possible, as if ``PyObject_Calloc(1, 1)`` had been " "called instead." msgstr "" -#: ../../c-api/memory.rst:351 +#: ../../c-api/memory.rst:361 msgid "" "If *p* is ``NULL``, the call is equivalent to ``PyObject_Malloc(n)``; else " "if *n* is equal to zero, the memory block is resized but is not freed, and " "the returned pointer is non-``NULL``." msgstr "" -#: ../../c-api/memory.rst:355 +#: ../../c-api/memory.rst:365 msgid "" "Unless *p* is ``NULL``, it must have been returned by a previous call to :c:" "func:`PyObject_Malloc`, :c:func:`PyObject_Realloc` or :c:func:" "`PyObject_Calloc`." msgstr "" -#: ../../c-api/memory.rst:358 +#: ../../c-api/memory.rst:368 msgid "" "If the request fails, :c:func:`PyObject_Realloc` returns ``NULL`` and *p* " "remains a valid pointer to the previous memory area." msgstr "" -#: ../../c-api/memory.rst:364 +#: ../../c-api/memory.rst:374 msgid "" "Frees the memory block pointed to by *p*, which must have been returned by a " "previous call to :c:func:`PyObject_Malloc`, :c:func:`PyObject_Realloc` or :c:" @@ -456,283 +467,283 @@ msgid "" "called before, undefined behavior occurs." msgstr "" -#: ../../c-api/memory.rst:375 +#: ../../c-api/memory.rst:385 msgid "Default Memory Allocators" msgstr "" -#: ../../c-api/memory.rst:377 +#: ../../c-api/memory.rst:387 msgid "Default memory allocators:" msgstr "" -#: ../../c-api/memory.rst:380 +#: ../../c-api/memory.rst:390 msgid "Configuration" msgstr "配置" -#: ../../c-api/memory.rst:380 +#: ../../c-api/memory.rst:390 msgid "Name" msgstr "名稱" -#: ../../c-api/memory.rst:380 +#: ../../c-api/memory.rst:390 msgid "PyMem_RawMalloc" msgstr "PyMem_RawMalloc" -#: ../../c-api/memory.rst:380 +#: ../../c-api/memory.rst:390 msgid "PyMem_Malloc" msgstr "PyMem_Malloc" -#: ../../c-api/memory.rst:380 +#: ../../c-api/memory.rst:390 msgid "PyObject_Malloc" msgstr "PyObject_Malloc" -#: ../../c-api/memory.rst:382 +#: ../../c-api/memory.rst:392 msgid "Release build" msgstr "" -#: ../../c-api/memory.rst:382 +#: ../../c-api/memory.rst:392 msgid "``\"pymalloc\"``" msgstr "``\"pymalloc\"``" -#: ../../c-api/memory.rst:382 ../../c-api/memory.rst:384 +#: ../../c-api/memory.rst:392 ../../c-api/memory.rst:394 msgid "``malloc``" msgstr "``malloc``" -#: ../../c-api/memory.rst:382 +#: ../../c-api/memory.rst:392 msgid "``pymalloc``" msgstr "``pymalloc``" -#: ../../c-api/memory.rst:383 +#: ../../c-api/memory.rst:393 msgid "Debug build" msgstr "" -#: ../../c-api/memory.rst:383 +#: ../../c-api/memory.rst:393 msgid "``\"pymalloc_debug\"``" msgstr "``\"pymalloc_debug\"``" -#: ../../c-api/memory.rst:383 ../../c-api/memory.rst:385 +#: ../../c-api/memory.rst:393 ../../c-api/memory.rst:395 msgid "``malloc`` + debug" msgstr "" -#: ../../c-api/memory.rst:383 +#: ../../c-api/memory.rst:393 msgid "``pymalloc`` + debug" msgstr "" -#: ../../c-api/memory.rst:384 +#: ../../c-api/memory.rst:394 msgid "Release build, without pymalloc" msgstr "" -#: ../../c-api/memory.rst:384 +#: ../../c-api/memory.rst:394 msgid "``\"malloc\"``" msgstr "``\"malloc\"``" -#: ../../c-api/memory.rst:385 +#: ../../c-api/memory.rst:395 msgid "Debug build, without pymalloc" msgstr "" -#: ../../c-api/memory.rst:385 +#: ../../c-api/memory.rst:395 msgid "``\"malloc_debug\"``" msgstr "``\"malloc_debug\"``" -#: ../../c-api/memory.rst:388 +#: ../../c-api/memory.rst:398 msgid "Legend:" msgstr "" -#: ../../c-api/memory.rst:390 +#: ../../c-api/memory.rst:400 msgid "Name: value for :envvar:`PYTHONMALLOC` environment variable." msgstr "" -#: ../../c-api/memory.rst:391 +#: ../../c-api/memory.rst:401 msgid "" "``malloc``: system allocators from the standard C library, C functions: :c:" "func:`malloc`, :c:func:`calloc`, :c:func:`realloc` and :c:func:`free`." msgstr "" -#: ../../c-api/memory.rst:393 +#: ../../c-api/memory.rst:403 msgid "``pymalloc``: :ref:`pymalloc memory allocator `." msgstr "" -#: ../../c-api/memory.rst:394 +#: ../../c-api/memory.rst:404 msgid "" "``mimalloc``: :ref:`mimalloc memory allocator `. The pymalloc " "allocator will be used if mimalloc support isn't available." msgstr "" -#: ../../c-api/memory.rst:396 +#: ../../c-api/memory.rst:406 msgid "" "\"+ debug\": with :ref:`debug hooks on the Python memory allocators `." msgstr "" -#: ../../c-api/memory.rst:398 +#: ../../c-api/memory.rst:408 msgid "\"Debug build\": :ref:`Python build in debug mode `." msgstr "" -#: ../../c-api/memory.rst:403 +#: ../../c-api/memory.rst:413 msgid "Customize Memory Allocators" msgstr "" -#: ../../c-api/memory.rst:409 +#: ../../c-api/memory.rst:419 msgid "" "Structure used to describe a memory block allocator. The structure has the " "following fields:" msgstr "" -#: ../../c-api/memory.rst:413 ../../c-api/memory.rst:660 +#: ../../c-api/memory.rst:423 ../../c-api/memory.rst:670 msgid "Field" msgstr "欄位" -#: ../../c-api/memory.rst:413 ../../c-api/memory.rst:660 +#: ../../c-api/memory.rst:423 ../../c-api/memory.rst:670 msgid "Meaning" msgstr "意義" -#: ../../c-api/memory.rst:415 ../../c-api/memory.rst:662 +#: ../../c-api/memory.rst:425 ../../c-api/memory.rst:672 msgid "``void *ctx``" msgstr "``void *ctx``" -#: ../../c-api/memory.rst:415 ../../c-api/memory.rst:662 +#: ../../c-api/memory.rst:425 ../../c-api/memory.rst:672 msgid "user context passed as first argument" msgstr "" -#: ../../c-api/memory.rst:417 +#: ../../c-api/memory.rst:427 msgid "``void* malloc(void *ctx, size_t size)``" msgstr "``void* malloc(void *ctx, size_t size)``" -#: ../../c-api/memory.rst:417 +#: ../../c-api/memory.rst:427 msgid "allocate a memory block" msgstr "" -#: ../../c-api/memory.rst:419 +#: ../../c-api/memory.rst:429 msgid "``void* calloc(void *ctx, size_t nelem, size_t elsize)``" msgstr "``void* calloc(void *ctx, size_t nelem, size_t elsize)``" -#: ../../c-api/memory.rst:419 +#: ../../c-api/memory.rst:429 msgid "allocate a memory block initialized with zeros" msgstr "" -#: ../../c-api/memory.rst:422 +#: ../../c-api/memory.rst:432 msgid "``void* realloc(void *ctx, void *ptr, size_t new_size)``" msgstr "``void* realloc(void *ctx, void *ptr, size_t new_size)``" -#: ../../c-api/memory.rst:422 +#: ../../c-api/memory.rst:432 msgid "allocate or resize a memory block" msgstr "" -#: ../../c-api/memory.rst:424 +#: ../../c-api/memory.rst:434 msgid "``void free(void *ctx, void *ptr)``" msgstr "``void free(void *ctx, void *ptr)``" -#: ../../c-api/memory.rst:424 +#: ../../c-api/memory.rst:434 msgid "free a memory block" msgstr "" -#: ../../c-api/memory.rst:427 +#: ../../c-api/memory.rst:437 msgid "" "The :c:type:`!PyMemAllocator` structure was renamed to :c:type:" "`PyMemAllocatorEx` and a new ``calloc`` field was added." msgstr "" -#: ../../c-api/memory.rst:434 +#: ../../c-api/memory.rst:444 msgid "Enum used to identify an allocator domain. Domains:" msgstr "" -#: ../../c-api/memory.rst:440 ../../c-api/memory.rst:449 -#: ../../c-api/memory.rst:458 +#: ../../c-api/memory.rst:450 ../../c-api/memory.rst:459 +#: ../../c-api/memory.rst:468 msgid "Functions:" msgstr "函式:" -#: ../../c-api/memory.rst:442 +#: ../../c-api/memory.rst:452 msgid ":c:func:`PyMem_RawMalloc`" msgstr ":c:func:`PyMem_RawMalloc`" -#: ../../c-api/memory.rst:443 +#: ../../c-api/memory.rst:453 msgid ":c:func:`PyMem_RawRealloc`" msgstr ":c:func:`PyMem_RawRealloc`" -#: ../../c-api/memory.rst:444 +#: ../../c-api/memory.rst:454 msgid ":c:func:`PyMem_RawCalloc`" msgstr ":c:func:`PyMem_RawCalloc`" -#: ../../c-api/memory.rst:445 +#: ../../c-api/memory.rst:455 msgid ":c:func:`PyMem_RawFree`" msgstr ":c:func:`PyMem_RawFree`" -#: ../../c-api/memory.rst:451 +#: ../../c-api/memory.rst:461 msgid ":c:func:`PyMem_Malloc`," msgstr ":c:func:`PyMem_Malloc`," -#: ../../c-api/memory.rst:452 +#: ../../c-api/memory.rst:462 msgid ":c:func:`PyMem_Realloc`" msgstr ":c:func:`PyMem_Realloc`" -#: ../../c-api/memory.rst:453 +#: ../../c-api/memory.rst:463 msgid ":c:func:`PyMem_Calloc`" msgstr ":c:func:`PyMem_Calloc`" -#: ../../c-api/memory.rst:454 +#: ../../c-api/memory.rst:464 msgid ":c:func:`PyMem_Free`" msgstr ":c:func:`PyMem_Free`" -#: ../../c-api/memory.rst:460 +#: ../../c-api/memory.rst:470 msgid ":c:func:`PyObject_Malloc`" msgstr ":c:func:`PyObject_Malloc`" -#: ../../c-api/memory.rst:461 +#: ../../c-api/memory.rst:471 msgid ":c:func:`PyObject_Realloc`" msgstr ":c:func:`PyObject_Realloc`" -#: ../../c-api/memory.rst:462 +#: ../../c-api/memory.rst:472 msgid ":c:func:`PyObject_Calloc`" msgstr ":c:func:`PyObject_Calloc`" -#: ../../c-api/memory.rst:463 +#: ../../c-api/memory.rst:473 msgid ":c:func:`PyObject_Free`" msgstr ":c:func:`PyObject_Free`" -#: ../../c-api/memory.rst:467 +#: ../../c-api/memory.rst:477 msgid "Get the memory block allocator of the specified domain." msgstr "" -#: ../../c-api/memory.rst:472 +#: ../../c-api/memory.rst:482 msgid "Set the memory block allocator of the specified domain." msgstr "" -#: ../../c-api/memory.rst:474 +#: ../../c-api/memory.rst:484 msgid "" "The new allocator must return a distinct non-``NULL`` pointer when " "requesting zero bytes." msgstr "" -#: ../../c-api/memory.rst:477 +#: ../../c-api/memory.rst:487 msgid "" "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 "" -#: ../../c-api/memory.rst:481 +#: ../../c-api/memory.rst:491 msgid "" "For the remaining domains, the allocator must also be thread-safe: the " "allocator may be called in different interpreters that do not share a " "``GIL``." msgstr "" -#: ../../c-api/memory.rst:485 +#: ../../c-api/memory.rst:495 msgid "" "If the new allocator is not a hook (does not call the previous allocator), " "the :c:func:`PyMem_SetupDebugHooks` function must be called to reinstall the " "debug hooks on top on the new allocator." msgstr "" -#: ../../c-api/memory.rst:489 +#: ../../c-api/memory.rst:499 msgid "" "See also :c:member:`PyPreConfig.allocator` and :ref:`Preinitialize Python " "with PyPreConfig `." msgstr "" -#: ../../c-api/memory.rst:494 +#: ../../c-api/memory.rst:504 msgid ":c:func:`PyMem_SetAllocator` does have the following contract:" msgstr "" -#: ../../c-api/memory.rst:496 +#: ../../c-api/memory.rst:506 msgid "" "It can be called after :c:func:`Py_PreInitialize` and before :c:func:" "`Py_InitializeFromConfig` to install a custom memory allocator. There are no " @@ -742,7 +753,7 @@ msgid "" "domains>` for more information." msgstr "" -#: ../../c-api/memory.rst:504 +#: ../../c-api/memory.rst:514 msgid "" "If called after Python has finish initializing (after :c:func:" "`Py_InitializeFromConfig` has been called) the allocator **must** wrap the " @@ -750,21 +761,21 @@ msgid "" "arbitrary one is **not supported**." msgstr "" -#: ../../c-api/memory.rst:509 +#: ../../c-api/memory.rst:519 msgid "All allocators must be thread-safe." msgstr "" -#: ../../c-api/memory.rst:515 +#: ../../c-api/memory.rst:525 msgid "" "Setup :ref:`debug hooks in the Python memory allocators ` " "to detect memory errors." msgstr "" -#: ../../c-api/memory.rst:522 +#: ../../c-api/memory.rst:532 msgid "Debug hooks on the Python memory allocators" msgstr "" -#: ../../c-api/memory.rst:524 +#: ../../c-api/memory.rst:534 msgid "" "When :ref:`Python is built in debug mode `, the :c:func:" "`PyMem_SetupDebugHooks` function is called at the :ref:`Python " @@ -772,19 +783,19 @@ msgid "" "allocators to detect memory errors." msgstr "" -#: ../../c-api/memory.rst:529 +#: ../../c-api/memory.rst:539 msgid "" "The :envvar:`PYTHONMALLOC` environment variable can be used to install debug " "hooks on a Python compiled in release mode (ex: ``PYTHONMALLOC=debug``)." msgstr "" -#: ../../c-api/memory.rst:532 +#: ../../c-api/memory.rst:542 msgid "" "The :c:func:`PyMem_SetupDebugHooks` function can be used to set debug hooks " "after calling :c:func:`PyMem_SetAllocator`." msgstr "" -#: ../../c-api/memory.rst:535 +#: ../../c-api/memory.rst:545 msgid "" "These debug hooks fill dynamically allocated memory blocks with special, " "recognizable bit patterns. Newly allocated memory is filled with the byte " @@ -794,25 +805,25 @@ msgid "" "these bytes are unlikely to be valid addresses, floats, or ASCII strings." msgstr "" -#: ../../c-api/memory.rst:542 +#: ../../c-api/memory.rst:552 msgid "Runtime checks:" msgstr "Runtime 檢查:" -#: ../../c-api/memory.rst:544 +#: ../../c-api/memory.rst:554 msgid "" "Detect API violations. For example, detect if :c:func:`PyObject_Free` is " "called on a memory block allocated by :c:func:`PyMem_Malloc`." msgstr "" -#: ../../c-api/memory.rst:546 +#: ../../c-api/memory.rst:556 msgid "Detect write before the start of the buffer (buffer underflow)." msgstr "" -#: ../../c-api/memory.rst:547 +#: ../../c-api/memory.rst:557 msgid "Detect write after the end of the buffer (buffer overflow)." msgstr "" -#: ../../c-api/memory.rst:548 +#: ../../c-api/memory.rst:558 msgid "" "Check that the :term:`GIL ` is held when allocator " "functions of :c:macro:`PYMEM_DOMAIN_OBJ` (ex: :c:func:`PyObject_Malloc`) " @@ -820,7 +831,7 @@ msgid "" "called." msgstr "" -#: ../../c-api/memory.rst:553 +#: ../../c-api/memory.rst:563 msgid "" "On error, the debug hooks use the :mod:`tracemalloc` module to get the " "traceback where a memory block was allocated. The traceback is only " @@ -828,7 +839,7 @@ msgid "" "memory block was traced." msgstr "" -#: ../../c-api/memory.rst:558 +#: ../../c-api/memory.rst:568 msgid "" "Let *S* = ``sizeof(size_t)``. ``2*S`` bytes are added at each end of each " "block of *N* bytes requested. The memory layout is like so, where p " @@ -838,49 +849,49 @@ msgid "" "from a Python slice):" msgstr "" -#: ../../c-api/memory.rst:564 +#: ../../c-api/memory.rst:574 msgid "``p[-2*S:-S]``" msgstr "``p[-2*S:-S]``" -#: ../../c-api/memory.rst:565 +#: ../../c-api/memory.rst:575 msgid "" "Number of bytes originally asked for. This is a size_t, big-endian (easier " "to read in a memory dump)." msgstr "" -#: ../../c-api/memory.rst:567 +#: ../../c-api/memory.rst:577 msgid "``p[-S]``" msgstr "``p[-S]``" -#: ../../c-api/memory.rst:568 +#: ../../c-api/memory.rst:578 msgid "API identifier (ASCII character):" msgstr "" -#: ../../c-api/memory.rst:570 +#: ../../c-api/memory.rst:580 msgid "``'r'`` for :c:macro:`PYMEM_DOMAIN_RAW`." msgstr "" -#: ../../c-api/memory.rst:571 +#: ../../c-api/memory.rst:581 msgid "``'m'`` for :c:macro:`PYMEM_DOMAIN_MEM`." msgstr "" -#: ../../c-api/memory.rst:572 +#: ../../c-api/memory.rst:582 msgid "``'o'`` for :c:macro:`PYMEM_DOMAIN_OBJ`." msgstr "" -#: ../../c-api/memory.rst:574 +#: ../../c-api/memory.rst:584 msgid "``p[-S+1:0]``" msgstr "``p[-S+1:0]``" -#: ../../c-api/memory.rst:575 +#: ../../c-api/memory.rst:585 msgid "Copies of PYMEM_FORBIDDENBYTE. Used to catch under- writes and reads." msgstr "" -#: ../../c-api/memory.rst:577 +#: ../../c-api/memory.rst:587 msgid "``p[0:N]``" msgstr "``p[0:N]``" -#: ../../c-api/memory.rst:578 +#: ../../c-api/memory.rst:588 msgid "" "The requested memory, filled with copies of PYMEM_CLEANBYTE, used to catch " "reference to uninitialized memory. When a realloc-like function is called " @@ -891,25 +902,25 @@ msgid "" "bytes are also filled with PYMEM_DEADBYTE." msgstr "" -#: ../../c-api/memory.rst:586 +#: ../../c-api/memory.rst:596 msgid "``p[N:N+S]``" msgstr "``p[N:N+S]``" -#: ../../c-api/memory.rst:587 +#: ../../c-api/memory.rst:597 msgid "Copies of PYMEM_FORBIDDENBYTE. Used to catch over- writes and reads." msgstr "" -#: ../../c-api/memory.rst:589 +#: ../../c-api/memory.rst:599 msgid "``p[N+S:N+2*S]``" msgstr "``p[N+S:N+2*S]``" -#: ../../c-api/memory.rst:590 +#: ../../c-api/memory.rst:600 msgid "" "Only used if the ``PYMEM_DEBUG_SERIALNO`` macro is defined (not defined by " "default)." msgstr "" -#: ../../c-api/memory.rst:593 +#: ../../c-api/memory.rst:603 msgid "" "A serial number, incremented by 1 on each call to a malloc-like or realloc-" "like function. Big-endian :c:type:`size_t`. If \"bad memory\" is detected " @@ -919,7 +930,7 @@ msgid "" "number is incremented, and exists so you can set such a breakpoint easily." msgstr "" -#: ../../c-api/memory.rst:600 +#: ../../c-api/memory.rst:610 msgid "" "A realloc-like or free-like function first checks that the " "PYMEM_FORBIDDENBYTE bytes at each end are intact. If they've been altered, " @@ -932,7 +943,7 @@ msgid "" "getting used)." msgstr "" -#: ../../c-api/memory.rst:609 +#: ../../c-api/memory.rst:619 msgid "" "The :c:func:`PyMem_SetupDebugHooks` function now also works on Python " "compiled in release mode. On error, the debug hooks now use :mod:" @@ -941,7 +952,7 @@ msgid "" "`PYMEM_DOMAIN_OBJ` and :c:macro:`PYMEM_DOMAIN_MEM` domains are called." msgstr "" -#: ../../c-api/memory.rst:617 +#: ../../c-api/memory.rst:627 msgid "" "Byte patterns ``0xCB`` (``PYMEM_CLEANBYTE``), ``0xDB`` (``PYMEM_DEADBYTE``) " "and ``0xFB`` (``PYMEM_FORBIDDENBYTE``) have been replaced with ``0xCD``, " @@ -949,11 +960,11 @@ msgid "" "``malloc()`` and ``free()``." msgstr "" -#: ../../c-api/memory.rst:627 +#: ../../c-api/memory.rst:637 msgid "The pymalloc allocator" msgstr "" -#: ../../c-api/memory.rst:629 +#: ../../c-api/memory.rst:639 msgid "" "Python has a *pymalloc* allocator optimized for small objects (smaller or " "equal to 512 bytes) with a short lifetime. It uses memory mappings called " @@ -962,75 +973,75 @@ msgid "" "`PyMem_RawRealloc` for allocations larger than 512 bytes." msgstr "" -#: ../../c-api/memory.rst:635 +#: ../../c-api/memory.rst:645 msgid "" "*pymalloc* is the :ref:`default allocator ` of " "the :c:macro:`PYMEM_DOMAIN_MEM` (ex: :c:func:`PyMem_Malloc`) and :c:macro:" "`PYMEM_DOMAIN_OBJ` (ex: :c:func:`PyObject_Malloc`) domains." msgstr "" -#: ../../c-api/memory.rst:639 +#: ../../c-api/memory.rst:649 msgid "The arena allocator uses the following functions:" msgstr "" -#: ../../c-api/memory.rst:641 +#: ../../c-api/memory.rst:651 msgid ":c:func:`!VirtualAlloc` and :c:func:`!VirtualFree` on Windows," msgstr "" -#: ../../c-api/memory.rst:642 +#: ../../c-api/memory.rst:652 msgid ":c:func:`!mmap` and :c:func:`!munmap` if available," msgstr "" -#: ../../c-api/memory.rst:643 +#: ../../c-api/memory.rst:653 msgid ":c:func:`malloc` and :c:func:`free` otherwise." msgstr "" -#: ../../c-api/memory.rst:645 +#: ../../c-api/memory.rst:655 msgid "" "This allocator is disabled if Python is configured with the :option:`--" "without-pymalloc` option. It can also be disabled at runtime using the :" "envvar:`PYTHONMALLOC` environment variable (ex: ``PYTHONMALLOC=malloc``)." msgstr "" -#: ../../c-api/memory.rst:650 +#: ../../c-api/memory.rst:660 msgid "Customize pymalloc Arena Allocator" msgstr "" -#: ../../c-api/memory.rst:656 +#: ../../c-api/memory.rst:666 msgid "" "Structure used to describe an arena allocator. The structure has three " "fields:" msgstr "" -#: ../../c-api/memory.rst:664 +#: ../../c-api/memory.rst:674 msgid "``void* alloc(void *ctx, size_t size)``" msgstr "``void* alloc(void *ctx, size_t size)``" -#: ../../c-api/memory.rst:664 +#: ../../c-api/memory.rst:674 msgid "allocate an arena of size bytes" msgstr "" -#: ../../c-api/memory.rst:666 +#: ../../c-api/memory.rst:676 msgid "``void free(void *ctx, void *ptr, size_t size)``" msgstr "``void free(void *ctx, void *ptr, size_t size)``" -#: ../../c-api/memory.rst:666 +#: ../../c-api/memory.rst:676 msgid "free an arena" msgstr "" -#: ../../c-api/memory.rst:671 +#: ../../c-api/memory.rst:681 msgid "Get the arena allocator." msgstr "" -#: ../../c-api/memory.rst:675 +#: ../../c-api/memory.rst:685 msgid "Set the arena allocator." msgstr "" -#: ../../c-api/memory.rst:680 +#: ../../c-api/memory.rst:690 msgid "The mimalloc allocator" msgstr "" -#: ../../c-api/memory.rst:684 +#: ../../c-api/memory.rst:694 msgid "" "Python supports the mimalloc allocator when the underlying platform support " "is available. mimalloc \"is a general purpose allocator with excellent " @@ -1038,46 +1049,46 @@ msgid "" "runtime systems of the Koka and Lean languages.\"" msgstr "" -#: ../../c-api/memory.rst:689 +#: ../../c-api/memory.rst:699 msgid "tracemalloc C API" msgstr "" -#: ../../c-api/memory.rst:695 +#: ../../c-api/memory.rst:705 msgid "Track an allocated memory block in the :mod:`tracemalloc` module." msgstr "" -#: ../../c-api/memory.rst:697 +#: ../../c-api/memory.rst:707 msgid "" "Return ``0`` on success, return ``-1`` on error (failed to allocate memory " "to store the trace). Return ``-2`` if tracemalloc is disabled." msgstr "" -#: ../../c-api/memory.rst:700 +#: ../../c-api/memory.rst:710 msgid "If memory block is already tracked, update the existing trace." msgstr "" -#: ../../c-api/memory.rst:704 +#: ../../c-api/memory.rst:714 msgid "" "Untrack an allocated memory block in the :mod:`tracemalloc` module. Do " "nothing if the block was not tracked." msgstr "" -#: ../../c-api/memory.rst:707 +#: ../../c-api/memory.rst:717 msgid "Return ``-2`` if tracemalloc is disabled, otherwise return ``0``." msgstr "" -#: ../../c-api/memory.rst:713 +#: ../../c-api/memory.rst:723 msgid "Examples" msgstr "範例" -#: ../../c-api/memory.rst:715 +#: ../../c-api/memory.rst:725 msgid "" "Here is the example from section :ref:`memoryoverview`, rewritten so that " "the I/O buffer is allocated from the Python heap by using the first function " "set::" msgstr "" -#: ../../c-api/memory.rst:718 +#: ../../c-api/memory.rst:728 msgid "" "PyObject *res;\n" "char *buf = (char *) PyMem_Malloc(BUFSIZ); /* for I/O */\n" @@ -1090,11 +1101,11 @@ msgid "" "return res;" msgstr "" -#: ../../c-api/memory.rst:728 +#: ../../c-api/memory.rst:738 msgid "The same code using the type-oriented function set::" msgstr "" -#: ../../c-api/memory.rst:730 +#: ../../c-api/memory.rst:740 msgid "" "PyObject *res;\n" "char *buf = PyMem_New(char, BUFSIZ); /* for I/O */\n" @@ -1107,7 +1118,7 @@ msgid "" "return res;" msgstr "" -#: ../../c-api/memory.rst:740 +#: ../../c-api/memory.rst:750 msgid "" "Note that in the two examples above, the buffer is always manipulated via " "functions belonging to the same set. Indeed, it is required to use the same " @@ -1117,7 +1128,7 @@ msgid "" "different allocators operating on different heaps. ::" msgstr "" -#: ../../c-api/memory.rst:747 +#: ../../c-api/memory.rst:757 msgid "" "char *buf1 = PyMem_New(char, BUFSIZ);\n" "char *buf2 = (char *) malloc(BUFSIZ);\n" @@ -1128,14 +1139,14 @@ msgid "" "free(buf1); /* Fatal -- should be PyMem_Del() */" msgstr "" -#: ../../c-api/memory.rst:755 +#: ../../c-api/memory.rst:765 msgid "" "In addition to the functions aimed at handling raw memory blocks from the " "Python heap, objects in Python are allocated and released with :c:macro:" "`PyObject_New`, :c:macro:`PyObject_NewVar` and :c:func:`PyObject_Del`." msgstr "" -#: ../../c-api/memory.rst:759 +#: ../../c-api/memory.rst:769 msgid "" "These will be explained in the next chapter on defining and implementing new " "object types in C." diff --git a/c-api/module.po b/c-api/module.po index cd977561d1..13cc3dc95a 100644 --- a/c-api/module.po +++ b/c-api/module.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-23 07:52+0800\n" +"POT-Creation-Date: 2024-09-24 07:20+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-" @@ -50,7 +50,7 @@ msgid "" msgstr "" #: ../../c-api/module.rst:46 ../../c-api/module.rst:270 -#: ../../c-api/module.rst:470 +#: ../../c-api/module.rst:472 msgid "Return ``NULL`` with an exception set on error." msgstr "在失敗時回傳 ``NULL`` 並設定例外。" @@ -468,17 +468,17 @@ msgid "" "defaults to ``Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED``." msgstr "" -#: ../../c-api/module.rst:426 +#: ../../c-api/module.rst:428 msgid "" "The module depends on the presence of the global interpreter lock (GIL), and " "may access global state without synchronization." msgstr "" -#: ../../c-api/module.rst:431 +#: ../../c-api/module.rst:433 msgid "The module is safe to run without an active GIL." msgstr "" -#: ../../c-api/module.rst:433 +#: ../../c-api/module.rst:435 msgid "" "This slot is ignored by Python builds not configured with :option:`--disable-" "gil`. Otherwise, it determines whether or not importing this module will " @@ -486,26 +486,26 @@ msgid "" "threaded-cpython` for more detail." msgstr "" -#: ../../c-api/module.rst:438 +#: ../../c-api/module.rst:440 msgid "" "Multiple ``Py_mod_gil`` slots may not be specified in one module definition." msgstr "" -#: ../../c-api/module.rst:440 +#: ../../c-api/module.rst:442 msgid "" "If ``Py_mod_gil`` is not specified, the import machinery defaults to " "``Py_MOD_GIL_USED``." msgstr "" -#: ../../c-api/module.rst:445 +#: ../../c-api/module.rst:447 msgid "See :PEP:`489` for more details on multi-phase initialization." msgstr "" -#: ../../c-api/module.rst:448 +#: ../../c-api/module.rst:450 msgid "Low-level module creation functions" msgstr "" -#: ../../c-api/module.rst:450 +#: ../../c-api/module.rst:452 msgid "" "The following functions are called under the hood when using multi-phase " "initialization. They can be used directly, for example when creating module " @@ -513,14 +513,14 @@ msgid "" "``PyModule_ExecDef`` must be called to fully initialize a module." msgstr "" -#: ../../c-api/module.rst:457 +#: ../../c-api/module.rst:459 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 :c:macro:`PYTHON_API_VERSION`." msgstr "" -#: ../../c-api/module.rst:465 +#: ../../c-api/module.rst:467 msgid "" "Create a new module object, given the definition in *def* and the ModuleSpec " "*spec*, assuming the API version *module_api_version*. If that version does " @@ -528,24 +528,24 @@ msgid "" "emitted." msgstr "" -#: ../../c-api/module.rst:474 +#: ../../c-api/module.rst:476 msgid "" "Most uses of this function should be using :c:func:`PyModule_FromDefAndSpec` " "instead; only use this if you are sure you need it." msgstr "" -#: ../../c-api/module.rst:481 +#: ../../c-api/module.rst:483 msgid "Process any execution slots (:c:data:`Py_mod_exec`) given in *def*." msgstr "" -#: ../../c-api/module.rst:487 +#: ../../c-api/module.rst:489 msgid "" "Set the docstring for *module* to *docstring*. This function is called " "automatically when creating a module from ``PyModuleDef``, using either " "``PyModule_Create`` or ``PyModule_FromDefAndSpec``." msgstr "" -#: ../../c-api/module.rst:496 +#: ../../c-api/module.rst:498 msgid "" "Add the functions from the ``NULL`` terminated *functions* array to " "*module*. Refer to the :c:type:`PyMethodDef` documentation for details on " @@ -557,11 +557,11 @@ msgid "" "``PyModule_FromDefAndSpec``." msgstr "" -#: ../../c-api/module.rst:508 +#: ../../c-api/module.rst:510 msgid "Support functions" msgstr "支援的函式" -#: ../../c-api/module.rst:510 +#: ../../c-api/module.rst:512 msgid "" "The module initialization function (if using single phase initialization) or " "a function called from a module execution slot (if using multi-phase " @@ -569,29 +569,29 @@ msgid "" "module state:" msgstr "" -#: ../../c-api/module.rst:517 +#: ../../c-api/module.rst:519 msgid "" "Add an object to *module* as *name*. This is a convenience function which " "can be used from the module's initialization function." msgstr "" -#: ../../c-api/module.rst:520 +#: ../../c-api/module.rst:522 msgid "" "On success, return ``0``. On error, raise an exception and return ``-1``." msgstr "" -#: ../../c-api/module.rst:522 +#: ../../c-api/module.rst:524 msgid "" "Return ``-1`` if *value* is ``NULL``. It must be called with an exception " "raised in this case." msgstr "" -#: ../../c-api/module.rst:525 ../../c-api/module.rst:572 -#: ../../c-api/module.rst:599 +#: ../../c-api/module.rst:527 ../../c-api/module.rst:574 +#: ../../c-api/module.rst:601 msgid "Example usage::" msgstr "用法範例: ::" -#: ../../c-api/module.rst:527 +#: ../../c-api/module.rst:529 msgid "" "static int\n" "add_spam(PyObject *module, int value)\n" @@ -617,13 +617,13 @@ msgstr "" " return res;\n" " }" -#: ../../c-api/module.rst:539 +#: ../../c-api/module.rst:541 msgid "" "The example can also be written without checking explicitly if *obj* is " "``NULL``::" msgstr "" -#: ../../c-api/module.rst:542 +#: ../../c-api/module.rst:544 msgid "" "static int\n" "add_spam(PyObject *module, int value)\n" @@ -643,13 +643,13 @@ msgstr "" " return res;\n" " }" -#: ../../c-api/module.rst:551 +#: ../../c-api/module.rst:553 msgid "" "Note that ``Py_XDECREF()`` should be used instead of ``Py_DECREF()`` in this " "case, since *obj* can be ``NULL``." msgstr "" -#: ../../c-api/module.rst:554 +#: ../../c-api/module.rst:556 msgid "" "The number of different *name* strings passed to this function should be " "kept small, usually by only using statically allocated strings as *name*. " @@ -659,7 +659,7 @@ msgid "" "internally to create a key object." msgstr "" -#: ../../c-api/module.rst:567 +#: ../../c-api/module.rst:569 msgid "" "Similar to :c:func:`PyModule_AddObjectRef`, but \"steals\" a reference to " "*value*. It can be called with a result of function that returns a new " @@ -667,39 +667,39 @@ msgid "" "variable." msgstr "" -#: ../../c-api/module.rst:574 +#: ../../c-api/module.rst:576 msgid "" "if (PyModule_Add(module, \"spam\", PyBytes_FromString(value)) < 0) {\n" " goto error;\n" "}" msgstr "" -#: ../../c-api/module.rst:583 +#: ../../c-api/module.rst:585 msgid "" "Similar to :c:func:`PyModule_AddObjectRef`, but steals a reference to " "*value* on success (if it returns ``0``)." msgstr "" -#: ../../c-api/module.rst:586 +#: ../../c-api/module.rst:588 msgid "" "The new :c:func:`PyModule_Add` or :c:func:`PyModule_AddObjectRef` functions " "are recommended, since it is easy to introduce reference leaks by misusing " "the :c:func:`PyModule_AddObject` function." msgstr "" -#: ../../c-api/module.rst:593 +#: ../../c-api/module.rst:595 msgid "" "Unlike other functions that steal references, ``PyModule_AddObject()`` only " "releases the reference to *value* **on success**." msgstr "" -#: ../../c-api/module.rst:596 +#: ../../c-api/module.rst:598 msgid "" "This means that its return value must be checked, and calling code must :c:" "func:`Py_XDECREF` *value* manually on error." msgstr "" -#: ../../c-api/module.rst:601 +#: ../../c-api/module.rst:603 msgid "" "PyObject *obj = PyBytes_FromString(value);\n" "if (PyModule_AddObject(module, \"spam\", obj) < 0) {\n" @@ -713,24 +713,24 @@ msgid "" "// Py_XDECREF(obj) is not needed here." msgstr "" -#: ../../c-api/module.rst:614 +#: ../../c-api/module.rst:616 msgid ":c:func:`PyModule_AddObject` is :term:`soft deprecated`." msgstr "" -#: ../../c-api/module.rst:619 +#: ../../c-api/module.rst:621 msgid "" "Add an integer constant to *module* as *name*. This convenience function " "can be used from the module's initialization function. Return ``-1`` with an " "exception set on error, ``0`` on success." msgstr "" -#: ../../c-api/module.rst:623 +#: ../../c-api/module.rst:625 msgid "" "This is a convenience function that calls :c:func:`PyLong_FromLong` and :c:" "func:`PyModule_AddObjectRef`; see their documentation for details." msgstr "" -#: ../../c-api/module.rst:629 +#: ../../c-api/module.rst:631 msgid "" "Add a string constant to *module* as *name*. This convenience function can " "be used from the module's initialization function. The string *value* must " @@ -738,14 +738,14 @@ msgid "" "on success." msgstr "" -#: ../../c-api/module.rst:634 +#: ../../c-api/module.rst:636 msgid "" "This is a convenience function that calls :c:func:" "`PyUnicode_InternFromString` and :c:func:`PyModule_AddObjectRef`; see their " "documentation for details." msgstr "" -#: ../../c-api/module.rst:641 +#: ../../c-api/module.rst:643 msgid "" "Add an int constant to *module*. The name and the value are taken from " "*macro*. For example ``PyModule_AddIntMacro(module, AF_INET)`` adds the int " @@ -753,11 +753,11 @@ msgid "" "with an exception set on error, ``0`` on success." msgstr "" -#: ../../c-api/module.rst:649 +#: ../../c-api/module.rst:651 msgid "Add a string constant to *module*." msgstr "" -#: ../../c-api/module.rst:653 +#: ../../c-api/module.rst:655 msgid "" "Add a type object to *module*. The type object is finalized by calling " "internally :c:func:`PyType_Ready`. The name of the type object is taken from " @@ -765,7 +765,7 @@ msgid "" "``-1`` with an exception set on error, ``0`` on success." msgstr "" -#: ../../c-api/module.rst:663 +#: ../../c-api/module.rst:665 msgid "" "Indicate that *module* does or does not support running without the global " "interpreter lock (GIL), using one of the values from :c:macro:`Py_mod_gil`. " @@ -776,25 +776,25 @@ msgid "" "Return ``-1`` with an exception set on error, ``0`` on success." msgstr "" -#: ../../c-api/module.rst:676 +#: ../../c-api/module.rst:678 msgid "Module lookup" msgstr "模組查找" -#: ../../c-api/module.rst:678 +#: ../../c-api/module.rst:680 msgid "" "Single-phase initialization creates singleton modules that can be looked up " "in the context of the current interpreter. This allows the module object to " "be retrieved later with only a reference to the module definition." msgstr "" -#: ../../c-api/module.rst:682 +#: ../../c-api/module.rst:684 msgid "" "These functions will not work on modules created using multi-phase " "initialization, since multiple such modules can be created from a single " "definition." msgstr "" -#: ../../c-api/module.rst:687 +#: ../../c-api/module.rst:689 msgid "" "Returns the module object that was created from *def* for the current " "interpreter. This method requires that the module object has been attached " @@ -803,18 +803,18 @@ msgid "" "to the interpreter state yet, it returns ``NULL``." msgstr "" -#: ../../c-api/module.rst:694 +#: ../../c-api/module.rst:696 msgid "" "Attaches the module object passed to the function to the interpreter state. " "This allows the module object to be accessible via :c:func:" "`PyState_FindModule`." msgstr "" -#: ../../c-api/module.rst:697 +#: ../../c-api/module.rst:699 msgid "Only effective on modules created using single-phase initialization." msgstr "" -#: ../../c-api/module.rst:699 +#: ../../c-api/module.rst:701 msgid "" "Python calls ``PyState_AddModule`` automatically after importing a module, " "so it is unnecessary (but harmless) to call it from module initialization " @@ -825,15 +825,15 @@ msgid "" "state updates)." msgstr "" -#: ../../c-api/module.rst:707 ../../c-api/module.rst:718 +#: ../../c-api/module.rst:709 ../../c-api/module.rst:720 msgid "The caller must hold the GIL." msgstr "" -#: ../../c-api/module.rst:709 +#: ../../c-api/module.rst:711 msgid "Return ``-1`` with an exception set on error, ``0`` on success." msgstr "成功時回傳 ``0``,在失敗時回傳 ``-1`` 並設定例外。" -#: ../../c-api/module.rst:715 +#: ../../c-api/module.rst:717 msgid "" "Removes the module object created from *def* from the interpreter state. " "Return ``-1`` with an exception set on error, ``0`` on success." diff --git a/c-api/monitoring.po b/c-api/monitoring.po index cd950f57fa..ef4d13984c 100644 --- a/c-api/monitoring.po +++ b/c-api/monitoring.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-23 07:52+0800\n" +"POT-Creation-Date: 2024-09-24 07:20+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -166,3 +166,120 @@ msgid "" "Monitoring states can be managed with the help of monitoring scopes. A scope " "would typically correspond to a python function." msgstr "" + +#: ../../c-api/monitoring.rst:138 +msgid "" +"Enter a monitored scope. ``event_types`` is an array of the event IDs for " +"events that may be fired from the scope. For example, the ID of a " +"``PY_START`` event is the value ``PY_MONITORING_EVENT_PY_START``, which is " +"numerically equal to the base-2 logarithm of ``sys.monitoring.events." +"PY_START``. ``state_array`` is an array with a monitoring state entry for " +"each event in ``event_types``, it is allocated by the user but populated by :" +"c:func:`!PyMonitoring_EnterScope` with information about the activation " +"state of the event. The size of ``event_types`` (and hence also of " +"``state_array``) is given in ``length``." +msgstr "" + +#: ../../c-api/monitoring.rst:148 +msgid "" +"The ``version`` argument is a pointer to a value which should be allocated " +"by the user together with ``state_array`` and initialized to 0, and then set " +"only by :c:func:`!PyMonitoring_EnterScope` itelf. It allows this function to " +"determine whether event states have changed since the previous call, and to " +"return quickly if they have not." +msgstr "" + +#: ../../c-api/monitoring.rst:154 +msgid "" +"The scopes referred to here are lexical scopes: a function, class or " +"method. :c:func:`!PyMonitoring_EnterScope` should be called whenever the " +"lexical scope is entered. Scopes can be reentered, reusing the same " +"*state_array* and *version*, in situations like when emulating a recursive " +"Python function. When a code-like's execution is paused, such as when " +"emulating a generator, the scope needs to be exited and re-entered." +msgstr "" + +#: ../../c-api/monitoring.rst:161 +msgid "The macros for *event_types* are:" +msgstr "" + +#: ../../c-api/monitoring.rst:169 +msgid "Macro" +msgstr "巨集" + +#: ../../c-api/monitoring.rst:169 +msgid "Event" +msgstr "" + +#: ../../c-api/monitoring.rst:171 +msgid ":monitoring-event:`BRANCH`" +msgstr ":monitoring-event:`BRANCH`" + +#: ../../c-api/monitoring.rst:172 +msgid ":monitoring-event:`CALL`" +msgstr ":monitoring-event:`CALL`" + +#: ../../c-api/monitoring.rst:173 +msgid ":monitoring-event:`C_RAISE`" +msgstr ":monitoring-event:`C_RAISE`" + +#: ../../c-api/monitoring.rst:174 +msgid ":monitoring-event:`C_RETURN`" +msgstr ":monitoring-event:`C_RETURN`" + +#: ../../c-api/monitoring.rst:175 +msgid ":monitoring-event:`EXCEPTION_HANDLED`" +msgstr ":monitoring-event:`EXCEPTION_HANDLED`" + +#: ../../c-api/monitoring.rst:176 +msgid ":monitoring-event:`INSTRUCTION`" +msgstr ":monitoring-event:`INSTRUCTION`" + +#: ../../c-api/monitoring.rst:177 +msgid ":monitoring-event:`JUMP`" +msgstr ":monitoring-event:`JUMP`" + +#: ../../c-api/monitoring.rst:178 +msgid ":monitoring-event:`LINE`" +msgstr ":monitoring-event:`LINE`" + +#: ../../c-api/monitoring.rst:179 +msgid ":monitoring-event:`PY_RESUME`" +msgstr ":monitoring-event:`PY_RESUME`" + +#: ../../c-api/monitoring.rst:180 +msgid ":monitoring-event:`PY_RETURN`" +msgstr ":monitoring-event:`PY_RETURN`" + +#: ../../c-api/monitoring.rst:181 +msgid ":monitoring-event:`PY_START`" +msgstr ":monitoring-event:`PY_START`" + +#: ../../c-api/monitoring.rst:182 +msgid ":monitoring-event:`PY_THROW`" +msgstr ":monitoring-event:`PY_THROW`" + +#: ../../c-api/monitoring.rst:183 +msgid ":monitoring-event:`PY_UNWIND`" +msgstr ":monitoring-event:`PY_UNWIND`" + +#: ../../c-api/monitoring.rst:184 +msgid ":monitoring-event:`PY_YIELD`" +msgstr ":monitoring-event:`PY_YIELD`" + +#: ../../c-api/monitoring.rst:185 +msgid ":monitoring-event:`RAISE`" +msgstr ":monitoring-event:`RAISE`" + +#: ../../c-api/monitoring.rst:186 +msgid ":monitoring-event:`RERAISE`" +msgstr ":monitoring-event:`RERAISE`" + +#: ../../c-api/monitoring.rst:187 +msgid ":monitoring-event:`STOP_ITERATION`" +msgstr ":monitoring-event:`STOP_ITERATION`" + +#: ../../c-api/monitoring.rst:192 +msgid "" +"Exit the last scope that was entered with :c:func:`!PyMonitoring_EnterScope`." +msgstr "" diff --git a/c-api/objbuffer.po b/c-api/objbuffer.po deleted file mode 100644 index c12f1984bb..0000000000 --- a/c-api/objbuffer.po +++ /dev/null @@ -1,105 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) 2001-2022, Python Software Foundation -# This file is distributed under the same license as the Python package. -# -# Translators: -# Liang-Bo Wang , 2015 -# Matt Wang , 2023 -msgid "" -msgstr "" -"Project-Id-Version: Python 3.13\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-06-20 18:08+0800\n" -"PO-Revision-Date: 2023-07-01 04:33+0800\n" -"Last-Translator: Matt Wang \n" -"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" -"tw)\n" -"Language: zh_TW\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Poedit 3.3.2\n" - -#: ../../c-api/objbuffer.rst:4 -msgid "Old Buffer Protocol" -msgstr "舊式緩衝協定 (Buffer Protocol)" - -#: ../../c-api/objbuffer.rst:8 -msgid "" -"These functions were part of the \"old buffer protocol\" API in Python 2. In " -"Python 3, this protocol doesn't exist anymore but the functions are still " -"exposed to ease porting 2.x code. They act as a compatibility wrapper " -"around the :ref:`new buffer protocol `, but they don't give " -"you control over the lifetime of the resources acquired when a buffer is " -"exported." -msgstr "" -"這些函式是 Python 2 中「舊式緩衝區協定」API 的一部分。在 Python 3 中,該協議" -"已經不存在,但這些函式仍有公開以供移植 2.x 程式碼。它們充當\\ :ref:`新式緩衝" -"區協定 `\\ 的相容性包裝器,但它們無法讓你控制匯出 (export) 緩" -"衝區時所獲取資源的生命週期。" - -#: ../../c-api/objbuffer.rst:15 -msgid "" -"Therefore, it is recommended that you call :c:func:`PyObject_GetBuffer` (or " -"the ``y*`` or ``w*`` :ref:`format codes ` with the :c:func:" -"`PyArg_ParseTuple` family of functions) to get a buffer view over an object, " -"and :c:func:`PyBuffer_Release` when the buffer view can be released." -msgstr "" -"因此,建議你呼叫 :c:func:`PyObject_GetBuffer` (或是以 ``y*`` 或 ``w*`` :ref:" -"`格式碼 (format code) ` 呼叫 :c:func:`PyArg_ParseTuple` 系列函" -"式)獲取物件的緩衝區視圖 (buffer view),以及緩衝區視圖可被釋放時呼叫 :c:func:" -"`PyBuffer_Release` 。" - -#: ../../c-api/objbuffer.rst:23 -msgid "" -"Returns a pointer to a read-only memory location usable as character-based " -"input. The *obj* argument must support the single-segment character buffer " -"interface. On success, returns ``0``, sets *buffer* to the memory location " -"and *buffer_len* to the buffer length. Returns ``-1`` and sets a :exc:" -"`TypeError` on error." -msgstr "" -"回傳一個指向可用作基於字元輸入之唯讀記憶體位置的指標。 *obj* 引數必須支援單一" -"片段 (single-segment) 字元緩衝區介面。成功時回傳 ``0``,並將 *buffer* 設定為" -"記憶體位置、將 *buffer_len* 設定為緩衝區長度。回傳 ``-1`` 並在錯誤時設定 :" -"exc:`TypeError`。" - -#: ../../c-api/objbuffer.rst:32 -msgid "" -"Returns a pointer to a read-only memory location containing arbitrary data. " -"The *obj* argument must support the single-segment readable buffer " -"interface. On success, returns ``0``, sets *buffer* to the memory location " -"and *buffer_len* to the buffer length. Returns ``-1`` and sets a :exc:" -"`TypeError` on error." -msgstr "" -"回傳一個指向包含任意資料之唯讀記憶體位置的指標。*obj* 引數必須支援單一片段可" -"讀緩衝區介面。成功時回傳 ``0``,並將 *buffer* 設定為記憶體位置、將 " -"*buffer_len* 設定為緩衝區長度。回傳 ``-1`` 並在錯誤時設定 :exc:`TypeError`。" - -#: ../../c-api/objbuffer.rst:41 -msgid "" -"Returns ``1`` if *o* supports the single-segment readable buffer interface. " -"Otherwise returns ``0``. This function always succeeds." -msgstr "" -"如果 *o* 支援單一片段可讀緩衝區介面,則回傳 ``1``,否則回傳 ``0``。這個函式一" -"定會執行成功的。" - -#: ../../c-api/objbuffer.rst:44 -msgid "" -"Note that this function tries to get and release a buffer, and exceptions " -"which occur while calling corresponding functions will get suppressed. To " -"get error reporting use :c:func:`PyObject_GetBuffer()` instead." -msgstr "" -"請注意,該函式嘗試獲取和釋放緩衝區,並且呼叫相應函式時發生的例外將被抑制。要" -"獲取錯誤報告,請改用 :c:func:`PyObject_GetBuffer()`。" - -#: ../../c-api/objbuffer.rst:51 -msgid "" -"Returns a pointer to a writable memory location. The *obj* argument must " -"support the single-segment, character buffer interface. On success, returns " -"``0``, sets *buffer* to the memory location and *buffer_len* to the buffer " -"length. Returns ``-1`` and sets a :exc:`TypeError` on error." -msgstr "" -"回傳指向可寫記憶體位置的指標。 *obj* 引數必須支援單一片段字元緩衝區介面。成功" -"時回傳 ``0``,並將 *buffer* 設定為記憶體位置,且將 *buffer_len* 設定為緩衝區" -"長度。回傳 ``-1`` 並在錯誤時設定 :exc:`TypeError`。" diff --git a/c-api/object.po b/c-api/object.po index a672a4c44f..039b7a3b69 100644 --- a/c-api/object.po +++ b/c-api/object.po @@ -48,75 +48,75 @@ msgstr "" #: ../../c-api/object.rst:22 ../../c-api/object.rst:27 msgid "``0``" -msgstr "" +msgstr "``0``" #: ../../c-api/object.rst:22 msgid ":py:data:`None`" -msgstr "" +msgstr ":py:data:`None`" #: ../../c-api/object.rst:23 ../../c-api/object.rst:28 msgid "``1``" -msgstr "" +msgstr "``1``" #: ../../c-api/object.rst:23 msgid ":py:data:`False`" -msgstr "" +msgstr ":py:data:`False`" #: ../../c-api/object.rst:24 msgid "``2``" -msgstr "" +msgstr "``2``" #: ../../c-api/object.rst:24 msgid ":py:data:`True`" -msgstr "" +msgstr ":py:data:`True`" #: ../../c-api/object.rst:25 msgid "``3``" -msgstr "" +msgstr "``3``" #: ../../c-api/object.rst:25 msgid ":py:data:`Ellipsis`" -msgstr "" +msgstr ":py:data:`Ellipsis`" #: ../../c-api/object.rst:26 msgid "``4``" -msgstr "" +msgstr "``4``" #: ../../c-api/object.rst:26 msgid ":py:data:`NotImplemented`" -msgstr "" +msgstr ":py:data:`NotImplemented`" #: ../../c-api/object.rst:27 msgid "``5``" -msgstr "" +msgstr "``5``" #: ../../c-api/object.rst:28 msgid "``6``" -msgstr "" +msgstr "``6``" #: ../../c-api/object.rst:29 msgid "``7``" -msgstr "" +msgstr "``7``" #: ../../c-api/object.rst:29 msgid "``''``" -msgstr "" +msgstr "``''``" #: ../../c-api/object.rst:30 msgid "``8``" -msgstr "" +msgstr "``8``" #: ../../c-api/object.rst:30 msgid "``b''``" -msgstr "" +msgstr "``b''``" #: ../../c-api/object.rst:31 msgid "``9``" -msgstr "" +msgstr "``9``" #: ../../c-api/object.rst:31 msgid "``()``" -msgstr "" +msgstr "``()``" #: ../../c-api/object.rst:34 msgid "" diff --git a/c-api/refcounting.po b/c-api/refcounting.po index 4f44c6bec2..d5cacea802 100644 --- a/c-api/refcounting.po +++ b/c-api/refcounting.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-23 07:52+0800\n" +"POT-Creation-Date: 2024-09-24 07:20+0000\n" "PO-Revision-Date: 2023-08-06 14:19+0800\n" "Last-Translator: Matt Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -35,7 +35,6 @@ msgid "Get the reference count of the Python object *o*." msgstr "取得物件 *o* 的參照計數。" #: ../../c-api/refcounting.rst:18 -#, fuzzy msgid "" "Note that the returned value may not actually reflect how many references to " "the object are actually held. For example, some objects are :term:" @@ -44,8 +43,8 @@ msgid "" "accurate, other than a value of 0 or 1." msgstr "" "請注意,回傳的值可能實際上並不反映實際保存了多少對該物件的參照。例如,某些物" -"件是「不滅的 (immortal)」,並且具有非常高的參照計數,不能反映實際的參照數量。" -"因此,除了 0 或 1 以外,不要依賴回傳值的準確性。" +"件是「\\ :term:`不滅的 (immortal) `\\ 」,並且具有非常高的參照計" +"數,不能反映實際的參照數量。因此,除了 0 或 1 以外,不要依賴回傳值的準確性。" #: ../../c-api/refcounting.rst:24 msgid "" @@ -72,11 +71,8 @@ msgstr "" #: ../../c-api/refcounting.rst:40 ../../c-api/refcounting.rst:53 #: ../../c-api/refcounting.rst:119 -#, fuzzy msgid "This function has no effect on :term:`immortal` objects." -msgstr "" -"請注意,此函式對\\ `不滅的 `_\\ 物件沒有影" -"響。" +msgstr "請注意,此函式對\\ :term:`不滅的 `\\ 物件沒有影響。" #: ../../c-api/refcounting.rst:44 ../../c-api/refcounting.rst:68 #: ../../c-api/refcounting.rst:147 @@ -102,7 +98,6 @@ msgstr "" "新的\\ :term:`強參照 `。" #: ../../c-api/refcounting.rst:59 -#, fuzzy msgid "When done using the object, release is by calling :c:func:`Py_DECREF`." msgstr "使用完該物件後,透過呼叫 :c:func:`Py_DECREF` 來釋放它。" @@ -114,12 +109,10 @@ msgstr "" "該物件不能為 ``NULL``;如果你不確定它不是 ``NULL``,請使用 :c:func:" "`Py_XINCREF`。" -#: ../../c-api/refcounting.rst:64 ../../c-api/refcounting.rst:132 -#, fuzzy +#: ../../c-api/refcounting.rst:64 msgid "" -"Do not expect this function to actually modify *o* in any way. For at least " -"`some objects `_, this function has no " -"effect." +"Do not expect this function to actually modify *o* in any way. For at least :" +"pep:`some objects <0683>`, this function has no effect." msgstr "" "不要期望此函式會以任何方式實際修改 *o*,至少對於\\ :pep:`某些物件 <0683>`\\ " "來說,此函式沒有任何效果。" @@ -225,6 +218,14 @@ msgstr "" "該物件不能為 ``NULL``;如果你不確定它不是 ``NULL``,請改用 :c:func:" "`Py_XDECREF`。" +#: ../../c-api/refcounting.rst:132 +msgid "" +"Do not expect this function to actually modify *o* in any way. For at least :" +"pep:`some objects <683>`, this function has no effect." +msgstr "" +"不要期望此函式會以任何方式實際修改 *o*,至少對於\\ :pep:`某些物件 <683>`\\ 來" +"說,此函式沒有任何效果。" + #: ../../c-api/refcounting.rst:138 msgid "" "The deallocation function can cause arbitrary Python code to be invoked (e." @@ -351,10 +352,3 @@ msgid "" msgstr "" ":c:macro:`Py_SETREF` 巨集的變體,請改用 :c:func:`Py_XDECREF` 而非 :c:func:" "`Py_DECREF`。" - -#~ msgid "" -#~ "Do not expect this function to actually modify *o* in any way. For at " -#~ "least :pep:`some objects <683>`, this function has no effect." -#~ msgstr "" -#~ "不要期望此函式會以任何方式實際修改 *o*,至少對於\\ :pep:`某些物件 " -#~ "<683>`\\ 來說,此函式沒有任何效果。" diff --git a/c-api/time.po b/c-api/time.po index d41ea7d002..7636335954 100644 --- a/c-api/time.po +++ b/c-api/time.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-23 07:52+0800\n" +"POT-Creation-Date: 2024-09-24 07:20+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -17,70 +17,70 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: ../../c-api/time.rst:4 +#: ../../c-api/time.rst:6 msgid "PyTime C API" msgstr "" -#: ../../c-api/time.rst:8 +#: ../../c-api/time.rst:10 msgid "" "The clock C API provides access to system clocks. It is similar to the " "Python :mod:`time` module." msgstr "" -#: ../../c-api/time.rst:11 +#: ../../c-api/time.rst:13 msgid "" "For C API related to the :mod:`datetime` module, see :ref:`datetimeobjects`." msgstr "" -#: ../../c-api/time.rst:15 +#: ../../c-api/time.rst:17 msgid "Types" msgstr "" -#: ../../c-api/time.rst:19 +#: ../../c-api/time.rst:21 msgid "" "A timestamp or duration in nanoseconds, represented as a signed 64-bit " "integer." msgstr "" -#: ../../c-api/time.rst:22 +#: ../../c-api/time.rst:24 msgid "" "The reference point for timestamps depends on the clock used. For example, :" "c:func:`PyTime_Time` returns timestamps relative to the UNIX epoch." msgstr "" -#: ../../c-api/time.rst:25 +#: ../../c-api/time.rst:27 msgid "" "The supported range is around [-292.3 years; +292.3 years]. Using the Unix " "epoch (January 1st, 1970) as reference, the supported date range is around " "[1677-09-21; 2262-04-11]. The exact limits are exposed as constants:" msgstr "" -#: ../../c-api/time.rst:32 +#: ../../c-api/time.rst:34 msgid "Minimum value of :c:type:`PyTime_t`." msgstr "" -#: ../../c-api/time.rst:36 +#: ../../c-api/time.rst:38 msgid "Maximum value of :c:type:`PyTime_t`." msgstr "" -#: ../../c-api/time.rst:40 +#: ../../c-api/time.rst:42 msgid "Clock Functions" msgstr "" -#: ../../c-api/time.rst:42 +#: ../../c-api/time.rst:44 msgid "" "The following functions take a pointer to a :c:expr:`PyTime_t` that they set " "to the value of a particular clock. Details of each clock are given in the " "documentation of the corresponding Python function." msgstr "" -#: ../../c-api/time.rst:47 +#: ../../c-api/time.rst:49 msgid "" "The functions return ``0`` on success, or ``-1`` (with an exception set) on " "failure." msgstr "" -#: ../../c-api/time.rst:50 +#: ../../c-api/time.rst:52 msgid "" "On integer overflow, they set the :c:data:`PyExc_OverflowError` exception " "and set ``*result`` to the value clamped to the ``[PyTime_MIN; PyTime_MAX]`` " @@ -88,45 +88,45 @@ msgid "" "misconfigured system time.)" msgstr "" -#: ../../c-api/time.rst:56 +#: ../../c-api/time.rst:58 msgid "" "As any other C API (unless otherwise specified), the functions must be " "called with the :term:`GIL` held." msgstr "" -#: ../../c-api/time.rst:61 +#: ../../c-api/time.rst:63 msgid "" "Read the monotonic clock. See :func:`time.monotonic` for important details " "on this clock." msgstr "" -#: ../../c-api/time.rst:66 +#: ../../c-api/time.rst:68 msgid "" "Read the performance counter. See :func:`time.perf_counter` for important " "details on this clock." msgstr "" -#: ../../c-api/time.rst:71 +#: ../../c-api/time.rst:73 msgid "" "Read the “wall clock” time. See :func:`time.time` for details important on " "this clock." msgstr "" -#: ../../c-api/time.rst:76 +#: ../../c-api/time.rst:78 msgid "Raw Clock Functions" msgstr "" -#: ../../c-api/time.rst:78 +#: ../../c-api/time.rst:80 msgid "" "Similar to clock functions, but don't set an exception on error and don't " "require the caller to hold the GIL." msgstr "" -#: ../../c-api/time.rst:81 +#: ../../c-api/time.rst:83 msgid "On success, the functions return ``0``." msgstr "" -#: ../../c-api/time.rst:83 +#: ../../c-api/time.rst:85 msgid "" "On failure, they set ``*result`` to ``0`` and return ``-1``, *without* " "setting an exception. To get the cause of the error, acquire the GIL and " @@ -134,33 +134,33 @@ msgid "" "succeed after the ``Raw`` one failed." msgstr "" -#: ../../c-api/time.rst:90 +#: ../../c-api/time.rst:92 msgid "" "Similar to :c:func:`PyTime_Monotonic`, but don't set an exception on error " "and don't require holding the GIL." msgstr "" -#: ../../c-api/time.rst:95 +#: ../../c-api/time.rst:97 msgid "" "Similar to :c:func:`PyTime_PerfCounter`, but don't set an exception on error " "and don't require holding the GIL." msgstr "" -#: ../../c-api/time.rst:100 +#: ../../c-api/time.rst:102 msgid "" "Similar to :c:func:`PyTime_Time`, but don't set an exception on error and " "don't require holding the GIL." msgstr "" -#: ../../c-api/time.rst:105 +#: ../../c-api/time.rst:107 msgid "Conversion functions" msgstr "" -#: ../../c-api/time.rst:109 +#: ../../c-api/time.rst:111 msgid "Convert a timestamp to a number of seconds as a C :c:expr:`double`." msgstr "" -#: ../../c-api/time.rst:111 +#: ../../c-api/time.rst:113 msgid "" "The function cannot fail, but note that :c:expr:`double` has limited " "accuracy for large values." diff --git a/c-api/unicode.po b/c-api/unicode.po index 44e3e7af19..1245ea48db 100644 --- a/c-api/unicode.po +++ b/c-api/unicode.po @@ -700,7 +700,7 @@ msgstr "" #: ../../c-api/unicode.rst:521 msgid "``T``" -msgstr "" +msgstr "``T``" #: ../../c-api/unicode.rst:523 msgid "" @@ -710,7 +710,7 @@ msgstr "" #: ../../c-api/unicode.rst:526 msgid "``#T``" -msgstr "" +msgstr "``#T``" #: ../../c-api/unicode.rst:528 msgid "" @@ -720,12 +720,11 @@ msgstr "" #: ../../c-api/unicode.rst:531 msgid "``N``" -msgstr "" +msgstr "``N``" #: ../../c-api/unicode.rst:532 ../../c-api/unicode.rst:537 -#, fuzzy msgid ":c:expr:`PyTypeObject*`" -msgstr ":c:expr:`PyObject*`" +msgstr ":c:expr:`PyTypeObject*`" #: ../../c-api/unicode.rst:533 msgid "" @@ -735,7 +734,7 @@ msgstr "" #: ../../c-api/unicode.rst:536 msgid "``#N``" -msgstr "" +msgstr "``#N``" #: ../../c-api/unicode.rst:538 msgid "" diff --git a/deprecations/c-api-pending-removal-in-3.14.po b/deprecations/c-api-pending-removal-in-3.14.po index acd9ed6272..aaa4c2db16 100644 --- a/deprecations/c-api-pending-removal-in-3.14.po +++ b/deprecations/c-api-pending-removal-in-3.14.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-08-17 00:03+0000\n" +"POT-Creation-Date: 2024-09-24 07:20+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -41,164 +41,167 @@ msgid "" msgstr "設定 Python 初始化的函式,Python 3.11 中已被棄用:" #: ../../deprecations/c-api-pending-removal-in-3.14.rst:12 -msgid "``PySys_SetArgvEx()``: set :c:member:`PyConfig.argv` instead." -msgstr "``PySys_SetArgvEx()``:請改以 :c:member:`PyConfig.argv` 設定。" - -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:13 -msgid "``PySys_SetArgv()``: set :c:member:`PyConfig.argv` instead." -msgstr "``PySys_SetArgv()``:請改以 :c:member:`PyConfig.argv` 設定。" +msgid ":c:func:`!PySys_SetArgvEx()`: Set :c:member:`PyConfig.argv` instead." +msgstr ":c:func:`!PySys_SetArgvEx()`:請改以 :c:member:`PyConfig.argv` 設定。" #: ../../deprecations/c-api-pending-removal-in-3.14.rst:14 -msgid "``Py_SetProgramName()``: set :c:member:`PyConfig.program_name` instead." +msgid ":c:func:`!PySys_SetArgv()`: Set :c:member:`PyConfig.argv` instead." +msgstr ":c:func:`!PySys_SetArgv()`:請改以 :c:member:`PyConfig.argv` 設定。" + +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:16 +msgid "" +":c:func:`!Py_SetProgramName()`: Set :c:member:`PyConfig.program_name` " +"instead." msgstr "" -"``Py_SetProgramName()``:請改以 :c:member:`PyConfig.program_name` 設定。" +":c:func:`!Py_SetProgramName()``:請改以 :c:member:`PyConfig.program_name` 設" +"定。" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:15 -msgid "``Py_SetPythonHome()``: set :c:member:`PyConfig.home` instead." -msgstr "``Py_SetPythonHome()``:請改以 :c:member:`PyConfig.home` 設定。" +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:18 +msgid ":c:func:`!Py_SetPythonHome()`: Set :c:member:`PyConfig.home` instead." +msgstr ":c:func:`!Py_SetPythonHome()`:請改以 :c:member:`PyConfig.home` 設定。" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:17 -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:45 +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:21 +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:71 msgid "" "The :c:func:`Py_InitializeFromConfig` API should be used with :c:type:" "`PyConfig` instead." msgstr "" ":c:func:`Py_InitializeFromConfig` API 應該與 :c:type:`PyConfig` 一起使用。" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:20 +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:24 msgid "Global configuration variables:" msgstr "全域設定變數:" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:22 -msgid ":c:var:`Py_DebugFlag`: use :c:member:`PyConfig.parser_debug` instead." +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:26 +msgid ":c:var:`Py_DebugFlag`: Use :c:member:`PyConfig.parser_debug` instead." msgstr ":c:var:`Py_DebugFlag`:請改用 :c:member:`PyConfig.parser_debug`。" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:23 -msgid ":c:var:`Py_VerboseFlag`: use :c:member:`PyConfig.verbose` instead." +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:28 +msgid ":c:var:`Py_VerboseFlag`: Use :c:member:`PyConfig.verbose` instead." msgstr ":c:var:`Py_VerboseFlag`:請改用 :c:member:`PyConfig.verbose`。" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:24 -msgid ":c:var:`Py_QuietFlag`: use :c:member:`PyConfig.quiet` instead." +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:30 +msgid ":c:var:`Py_QuietFlag`: Use :c:member:`PyConfig.quiet` instead." msgstr ":c:var:`Py_QuietFlag`:請改用 :c:member:`PyConfig.quiet`。" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:25 +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:32 msgid "" -":c:var:`Py_InteractiveFlag`: use :c:member:`PyConfig.interactive` instead." +":c:var:`Py_InteractiveFlag`: Use :c:member:`PyConfig.interactive` instead." msgstr ":c:var:`Py_InteractiveFlag`:請改用 :c:member:`PyConfig.interactive`。" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:26 -msgid ":c:var:`Py_InspectFlag`: use :c:member:`PyConfig.inspect` instead." +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:34 +msgid ":c:var:`Py_InspectFlag`: Use :c:member:`PyConfig.inspect` instead." msgstr ":c:var:`Py_InspectFlag`:請改用 :c:member:`PyConfig.inspect`。" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:27 +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:36 msgid "" -":c:var:`Py_OptimizeFlag`: use :c:member:`PyConfig.optimization_level` " +":c:var:`Py_OptimizeFlag`: Use :c:member:`PyConfig.optimization_level` " "instead." msgstr "" ":c:var:`Py_OptimizeFlag`:請改用 :c:member:`PyConfig.optimization_level`。" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:28 -msgid ":c:var:`Py_NoSiteFlag`: use :c:member:`PyConfig.site_import` instead." +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:38 +msgid ":c:var:`Py_NoSiteFlag`: Use :c:member:`PyConfig.site_import` instead." msgstr ":c:var:`Py_NoSiteFlag`:請改用 :c:member:`PyConfig.site_import`。" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:29 +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:40 msgid "" -":c:var:`Py_BytesWarningFlag`: use :c:member:`PyConfig.bytes_warning` instead." +":c:var:`Py_BytesWarningFlag`: Use :c:member:`PyConfig.bytes_warning` instead." msgstr "" ":c:var:`Py_BytesWarningFlag`:請改用 :c:member:`PyConfig.bytes_warning`。" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:30 +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:42 msgid "" -":c:var:`Py_FrozenFlag`: use :c:member:`PyConfig.pathconfig_warnings` instead." +":c:var:`Py_FrozenFlag`: Use :c:member:`PyConfig.pathconfig_warnings` instead." msgstr "" ":c:var:`Py_FrozenFlag`:請改用 :c:member:`PyConfig.pathconfig_warnings`。" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:31 +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:44 msgid "" -":c:var:`Py_IgnoreEnvironmentFlag`: use :c:member:`PyConfig.use_environment` " +":c:var:`Py_IgnoreEnvironmentFlag`: Use :c:member:`PyConfig.use_environment` " "instead." msgstr "" ":c:var:`Py_IgnoreEnvironmentFlag`:請改用 :c:member:`PyConfig." "use_environment`。" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:32 +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:46 msgid "" -":c:var:`Py_DontWriteBytecodeFlag`: use :c:member:`PyConfig.write_bytecode` " +":c:var:`Py_DontWriteBytecodeFlag`: Use :c:member:`PyConfig.write_bytecode` " "instead." msgstr "" ":c:var:`Py_DontWriteBytecodeFlag`:請改用 :c:member:`PyConfig." "write_bytecode`。" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:33 +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:48 msgid "" -":c:var:`Py_NoUserSiteDirectory`: use :c:member:`PyConfig." +":c:var:`Py_NoUserSiteDirectory`: Use :c:member:`PyConfig." "user_site_directory` instead." msgstr "" ":c:var:`Py_NoUserSiteDirectory`:請改用 :c:member:`PyConfig." "user_site_directory`。" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:34 +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:50 msgid "" -":c:var:`Py_UnbufferedStdioFlag`: use :c:member:`PyConfig.buffered_stdio` " +":c:var:`Py_UnbufferedStdioFlag`: Use :c:member:`PyConfig.buffered_stdio` " "instead." msgstr "" ":c:var:`Py_UnbufferedStdioFlag`:請改用 :c:member:`PyConfig.buffered_stdio`。" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:35 +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:52 msgid "" -":c:var:`Py_HashRandomizationFlag`: use :c:member:`PyConfig.use_hash_seed` " +":c:var:`Py_HashRandomizationFlag`: Use :c:member:`PyConfig.use_hash_seed` " "and :c:member:`PyConfig.hash_seed` instead." msgstr "" ":c:var:`Py_HashRandomizationFlag`:請改用 :c:member:`PyConfig.use_hash_seed` " "和 :c:member:`PyConfig.hash_seed`。" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:37 -msgid ":c:var:`Py_IsolatedFlag`: use :c:member:`PyConfig.isolated` instead." +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:55 +msgid ":c:var:`Py_IsolatedFlag`: Use :c:member:`PyConfig.isolated` instead." msgstr ":c:var:`Py_IsolatedFlag`:請改用 :c:member:`PyConfig.isolated`。" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:38 +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:57 msgid "" -":c:var:`Py_LegacyWindowsFSEncodingFlag`: use :c:member:`PyPreConfig." +":c:var:`Py_LegacyWindowsFSEncodingFlag`: Use :c:member:`PyPreConfig." "legacy_windows_fs_encoding` instead." msgstr "" ":c:var:`Py_LegacyWindowsFSEncodingFlag`:請改用 :c:member:`PyPreConfig." "legacy_windows_fs_encoding`。" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:39 +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:59 msgid "" -":c:var:`Py_LegacyWindowsStdioFlag`: use :c:member:`PyConfig." +":c:var:`Py_LegacyWindowsStdioFlag`: Use :c:member:`PyConfig." "legacy_windows_stdio` instead." msgstr "" ":c:var:`Py_LegacyWindowsStdioFlag`:請改用 :c:member:`PyConfig." "legacy_windows_stdio`。" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:40 +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:61 msgid "" -":c:var:`!Py_FileSystemDefaultEncoding`: use :c:member:`PyConfig." +":c:var:`!Py_FileSystemDefaultEncoding`: Use :c:member:`PyConfig." "filesystem_encoding` instead." msgstr "" ":c:var:`!Py_FileSystemDefaultEncoding`:請改用 :c:member:`PyConfig." "filesystem_encoding`。" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:41 +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:63 msgid "" -":c:var:`!Py_HasFileSystemDefaultEncoding`: use :c:member:`PyConfig." +":c:var:`!Py_HasFileSystemDefaultEncoding`: Use :c:member:`PyConfig." "filesystem_encoding` instead." msgstr "" ":c:var:`!Py_HasFileSystemDefaultEncoding`:請改用 :c:member:`PyConfig." "filesystem_encoding`。" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:42 +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:65 msgid "" -":c:var:`!Py_FileSystemDefaultEncodeErrors`: use :c:member:`PyConfig." +":c:var:`!Py_FileSystemDefaultEncodeErrors`: Use :c:member:`PyConfig." "filesystem_errors` instead." msgstr "" ":c:var:`!Py_FileSystemDefaultEncodeErrors`:請改用 :c:member:`PyConfig." "filesystem_errors`。" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:43 +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:67 msgid "" -":c:var:`!Py_UTF8Mode`: use :c:member:`PyPreConfig.utf8_mode` instead. (see :" +":c:var:`!Py_UTF8Mode`: Use :c:member:`PyPreConfig.utf8_mode` instead. (see :" "c:func:`Py_PreInitialize`)" msgstr "" ":c:var:`!Py_UTF8Mode`:請改用 :c:member:`PyPreConfig.utf8_mode`。(請見 :c:" diff --git a/deprecations/c-api-pending-removal-in-3.15.po b/deprecations/c-api-pending-removal-in-3.15.po index 20ea03215f..1c765579a9 100644 --- a/deprecations/c-api-pending-removal-in-3.15.po +++ b/deprecations/c-api-pending-removal-in-3.15.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-23 07:52+0800\n" +"POT-Creation-Date: 2024-09-24 07:20+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -26,63 +26,63 @@ msgstr "``libmpdecimal`` 的打包副本 (bundled copy)。" #: ../../deprecations/c-api-pending-removal-in-3.15.rst:5 msgid "" -":c:func:`PyImport_ImportModuleNoBlock`: use :c:func:`PyImport_ImportModule` " -"instead." +"The :c:func:`PyImport_ImportModuleNoBlock`: Use :c:func:" +"`PyImport_ImportModule` instead." msgstr "" ":c:func:`PyImport_ImportModuleNoBlock`:請改用 :c:func:" "`PyImport_ImportModule`。" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:6 -msgid ":c:func:`PyWeakref_GET_OBJECT`: use :c:func:`PyWeakref_GetRef` instead." -msgstr ":c:func:`PyWeakref_GET_OBJECT`:請改用 :c:func:`PyWeakref_GetRef`。" - #: ../../deprecations/c-api-pending-removal-in-3.15.rst:7 -msgid ":c:func:`PyWeakref_GetObject`: use :c:func:`PyWeakref_GetRef` instead." -msgstr ":c:func:`PyWeakref_GetObject`:請改用 :c:func:`PyWeakref_GetRef`。" - -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:8 -msgid ":c:type:`!Py_UNICODE_WIDE` type: use :c:type:`wchar_t` instead." -msgstr ":c:type:`!Py_UNICODE_WIDE` type:請改用 :c:type:`wchar_t`。" +msgid "" +":c:func:`PyWeakref_GetObject` and :c:func:`PyWeakref_GET_OBJECT`: Use :c:" +"func:`PyWeakref_GetRef` instead." +msgstr "" +":c:func:`PyWeakref_GetObject` 和 :c:func:`PyWeakref_GET_OBJECT`:請改用 :c:" +"func:`PyWeakref_GetRef`。" #: ../../deprecations/c-api-pending-removal-in-3.15.rst:9 -msgid ":c:type:`Py_UNICODE` type: use :c:type:`wchar_t` instead." -msgstr ":c:type:`Py_UNICODE` type:請改用 :c:type:`wchar_t`。" +msgid "" +":c:type:`Py_UNICODE` type and the :c:macro:`!Py_UNICODE_WIDE` macro: Use :c:" +"type:`wchar_t` instead." +msgstr "" +":c:type:`Py_UNICODE` 型別與 :c:macro:`!Py_UNICODE_WIDE` 巨集:請改用 :c:type:" +"`wchar_t`。" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:10 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:11 msgid "Python initialization functions:" msgstr "Python 初始化函式:" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:12 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:13 msgid "" -":c:func:`PySys_ResetWarnOptions`: clear :data:`sys.warnoptions` and :data:`!" +":c:func:`PySys_ResetWarnOptions`: Clear :data:`sys.warnoptions` and :data:`!" "warnings.filters` instead." msgstr "" ":c:func:`PySys_ResetWarnOptions`:請改為清除 :data:`sys.warnoptions` 和 :" "data:`!warnings.filters`。" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:14 -msgid ":c:func:`Py_GetExecPrefix`: get :data:`sys.exec_prefix` instead." +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:15 +msgid ":c:func:`Py_GetExecPrefix`: Get :data:`sys.exec_prefix` instead." msgstr ":c:func:`Py_GetExecPrefix`:請改用 :data:`sys.exec_prefix`。" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:15 -msgid ":c:func:`Py_GetPath`: get :data:`sys.path` instead." +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:17 +msgid ":c:func:`Py_GetPath`: Get :data:`sys.path` instead." msgstr ":c:func:`Py_GetPath`:請改用 :data:`sys.path`。" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:16 -msgid ":c:func:`Py_GetPrefix`: get :data:`sys.prefix` instead." +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:19 +msgid ":c:func:`Py_GetPrefix`: Get :data:`sys.prefix` instead." msgstr ":c:func:`Py_GetPrefix`:請改用 :data:`sys.prefix`。" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:17 -msgid ":c:func:`Py_GetProgramFullPath`: get :data:`sys.executable` instead." +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:21 +msgid ":c:func:`Py_GetProgramFullPath`: Get :data:`sys.executable` instead." msgstr ":c:func:`Py_GetProgramFullPath`:請改用 :data:`sys.executable`。" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:18 -msgid ":c:func:`Py_GetProgramName`: get :data:`sys.executable` instead." +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:23 +msgid ":c:func:`Py_GetProgramName`: Get :data:`sys.executable` instead." msgstr ":c:func:`Py_GetProgramName`:請改用 :data:`sys.executable`。" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:19 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:25 msgid "" -":c:func:`Py_GetPythonHome`: get :c:member:`PyConfig.home` or the :envvar:" +":c:func:`Py_GetPythonHome`: Get :c:member:`PyConfig.home` or the :envvar:" "`PYTHONHOME` environment variable instead." msgstr "" ":c:func:`Py_GetPythonHome`:請改用 :c:member:`PyConfig.home` 或 :envvar:" diff --git a/deprecations/c-api-pending-removal-in-future.po b/deprecations/c-api-pending-removal-in-future.po index 28b6ce87dc..a042b964bc 100644 --- a/deprecations/c-api-pending-removal-in-future.po +++ b/deprecations/c-api-pending-removal-in-future.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-08-17 00:03+0000\n" +"POT-Creation-Date: 2024-09-24 07:20+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -27,84 +27,85 @@ msgid "" msgstr "下列 API 已被棄用並將會被移除,不過目前尚未訂定移除日期。" #: ../../deprecations/c-api-pending-removal-in-future.rst:7 -msgid ":c:macro:`Py_TPFLAGS_HAVE_FINALIZE`: unneeded since Python 3.8." +msgid ":c:macro:`Py_TPFLAGS_HAVE_FINALIZE`: Unneeded since Python 3.8." msgstr ":c:macro:`Py_TPFLAGS_HAVE_FINALIZE`:自 Python 3.8 起不再需要" -#: ../../deprecations/c-api-pending-removal-in-future.rst:8 -msgid ":c:func:`PyErr_Fetch`: use :c:func:`PyErr_GetRaisedException` instead." +#: ../../deprecations/c-api-pending-removal-in-future.rst:9 +msgid ":c:func:`PyErr_Fetch`: Use :c:func:`PyErr_GetRaisedException` instead." msgstr ":c:func:`PyErr_Fetch`:請改用 :c:func:`PyErr_GetRaisedException`。" -#: ../../deprecations/c-api-pending-removal-in-future.rst:9 +#: ../../deprecations/c-api-pending-removal-in-future.rst:11 msgid "" -":c:func:`PyErr_NormalizeException`: use :c:func:`PyErr_GetRaisedException` " +":c:func:`PyErr_NormalizeException`: Use :c:func:`PyErr_GetRaisedException` " "instead." msgstr "" ":c:func:`PyErr_NormalizeException`:請改用 :c:func:" "`PyErr_GetRaisedException`。" -#: ../../deprecations/c-api-pending-removal-in-future.rst:10 +#: ../../deprecations/c-api-pending-removal-in-future.rst:13 msgid "" -":c:func:`PyErr_Restore`: use :c:func:`PyErr_SetRaisedException` instead." +":c:func:`PyErr_Restore`: Use :c:func:`PyErr_SetRaisedException` instead." msgstr ":c:func:`PyErr_Restore`:請改用 :c:func:`PyErr_SetRaisedException`。" -#: ../../deprecations/c-api-pending-removal-in-future.rst:11 +#: ../../deprecations/c-api-pending-removal-in-future.rst:15 msgid "" -":c:func:`PyModule_GetFilename`: use :c:func:`PyModule_GetFilenameObject` " +":c:func:`PyModule_GetFilename`: Use :c:func:`PyModule_GetFilenameObject` " "instead." msgstr "" ":c:func:`PyModule_GetFilename`:請改用 :c:func:`PyModule_GetFilenameObject`。" -#: ../../deprecations/c-api-pending-removal-in-future.rst:12 -msgid ":c:func:`PyOS_AfterFork`: use :c:func:`PyOS_AfterFork_Child` instead." +#: ../../deprecations/c-api-pending-removal-in-future.rst:17 +msgid ":c:func:`PyOS_AfterFork`: Use :c:func:`PyOS_AfterFork_Child` instead." msgstr ":c:func:`PyOS_AfterFork`:請改用 :c:func:`PyOS_AfterFork_Child`。" -#: ../../deprecations/c-api-pending-removal-in-future.rst:13 +#: ../../deprecations/c-api-pending-removal-in-future.rst:19 msgid "" -":c:func:`PySlice_GetIndicesEx`: use :c:func:`PySlice_Unpack` and :c:func:" +":c:func:`PySlice_GetIndicesEx`: Use :c:func:`PySlice_Unpack` and :c:func:" "`PySlice_AdjustIndices` instead." msgstr "" ":c:func:`PySlice_GetIndicesEx`:請改用 :c:func:`PySlice_Unpack` 和 :c:func:" "`PySlice_AdjustIndices`。" -#: ../../deprecations/c-api-pending-removal-in-future.rst:14 +#: ../../deprecations/c-api-pending-removal-in-future.rst:21 msgid "" -":c:func:`!PyUnicode_AsDecodedObject`: use :c:func:`PyCodec_Decode` instead." +":c:func:`!PyUnicode_AsDecodedObject`: Use :c:func:`PyCodec_Decode` instead." msgstr "" ":c:func:`!PyUnicode_AsDecodedObject`:請改用 :c:func:`PyCodec_Decode`。" -#: ../../deprecations/c-api-pending-removal-in-future.rst:15 +#: ../../deprecations/c-api-pending-removal-in-future.rst:23 msgid "" -":c:func:`!PyUnicode_AsDecodedUnicode`: use :c:func:`PyCodec_Decode` instead." +":c:func:`!PyUnicode_AsDecodedUnicode`: Use :c:func:`PyCodec_Decode` instead." msgstr "" ":c:func:`!PyUnicode_AsDecodedUnicode`:請改用 :c:func:`PyCodec_Decode`。" -#: ../../deprecations/c-api-pending-removal-in-future.rst:16 +#: ../../deprecations/c-api-pending-removal-in-future.rst:25 msgid "" -":c:func:`!PyUnicode_AsEncodedObject`: use :c:func:`PyCodec_Encode` instead." +":c:func:`!PyUnicode_AsEncodedObject`: Use :c:func:`PyCodec_Encode` instead." msgstr "" ":c:func:`!PyUnicode_AsEncodedObject`:請改用 :c:func:`PyCodec_Encode`。" -#: ../../deprecations/c-api-pending-removal-in-future.rst:17 +#: ../../deprecations/c-api-pending-removal-in-future.rst:27 msgid "" -":c:func:`!PyUnicode_AsEncodedUnicode`: use :c:func:`PyCodec_Encode` instead." +":c:func:`!PyUnicode_AsEncodedUnicode`: Use :c:func:`PyCodec_Encode` instead." msgstr "" ":c:func:`!PyUnicode_AsEncodedUnicode`:請改用 :c:func:`PyCodec_Encode`。" -#: ../../deprecations/c-api-pending-removal-in-future.rst:18 -msgid ":c:func:`PyUnicode_READY`: unneeded since Python 3.12" +#: ../../deprecations/c-api-pending-removal-in-future.rst:29 +msgid ":c:func:`PyUnicode_READY`: Unneeded since Python 3.12" msgstr ":c:func:`PyUnicode_READY`:自 Python 3.12 起不再需要" -#: ../../deprecations/c-api-pending-removal-in-future.rst:19 -msgid ":c:func:`!PyErr_Display`: use :c:func:`PyErr_DisplayException` instead." +#: ../../deprecations/c-api-pending-removal-in-future.rst:31 +msgid ":c:func:`!PyErr_Display`: Use :c:func:`PyErr_DisplayException` instead." msgstr ":c:func:`!PyErr_Display`:請改用 :c:func:`PyErr_DisplayException`。" -#: ../../deprecations/c-api-pending-removal-in-future.rst:20 +#: ../../deprecations/c-api-pending-removal-in-future.rst:33 msgid "" -":c:func:`!_PyErr_ChainExceptions`: use ``_PyErr_ChainExceptions1`` instead." +":c:func:`!_PyErr_ChainExceptions`: Use :c:func:`!_PyErr_ChainExceptions1` " +"instead." msgstr "" ":c:func:`!_PyErr_ChainExceptions`:請改用 ``_PyErr_ChainExceptions1``。" -#: ../../deprecations/c-api-pending-removal-in-future.rst:21 +#: ../../deprecations/c-api-pending-removal-in-future.rst:35 msgid "" ":c:member:`!PyBytesObject.ob_shash` member: call :c:func:`PyObject_Hash` " "instead." @@ -112,40 +113,40 @@ msgstr "" ":c:member:`!PyBytesObject.ob_shash` 成員:請改為呼叫 :c:func:" "`PyObject_Hash`。" -#: ../../deprecations/c-api-pending-removal-in-future.rst:23 +#: ../../deprecations/c-api-pending-removal-in-future.rst:37 msgid ":c:member:`!PyDictObject.ma_version_tag` member." msgstr ":c:member:`!PyDictObject.ma_version_tag` 成員。" -#: ../../deprecations/c-api-pending-removal-in-future.rst:24 +#: ../../deprecations/c-api-pending-removal-in-future.rst:38 msgid "Thread Local Storage (TLS) API:" msgstr "執行緒局部儲存 (Thread Local Storage, TLS) API:" -#: ../../deprecations/c-api-pending-removal-in-future.rst:26 +#: ../../deprecations/c-api-pending-removal-in-future.rst:40 msgid "" -":c:func:`PyThread_create_key`: use :c:func:`PyThread_tss_alloc` instead." +":c:func:`PyThread_create_key`: Use :c:func:`PyThread_tss_alloc` instead." msgstr ":c:func:`PyThread_create_key`:請改用 :c:func:`PyThread_tss_alloc`。" -#: ../../deprecations/c-api-pending-removal-in-future.rst:27 -msgid ":c:func:`PyThread_delete_key`: use :c:func:`PyThread_tss_free` instead." +#: ../../deprecations/c-api-pending-removal-in-future.rst:42 +msgid ":c:func:`PyThread_delete_key`: Use :c:func:`PyThread_tss_free` instead." msgstr ":c:func:`PyThread_delete_key`:請改用 :c:func:`PyThread_tss_free`。" -#: ../../deprecations/c-api-pending-removal-in-future.rst:28 +#: ../../deprecations/c-api-pending-removal-in-future.rst:44 msgid "" -":c:func:`PyThread_set_key_value`: use :c:func:`PyThread_tss_set` instead." +":c:func:`PyThread_set_key_value`: Use :c:func:`PyThread_tss_set` instead." msgstr ":c:func:`PyThread_set_key_value`:請改用 :c:func:`PyThread_tss_set`。" -#: ../../deprecations/c-api-pending-removal-in-future.rst:29 +#: ../../deprecations/c-api-pending-removal-in-future.rst:46 msgid "" -":c:func:`PyThread_get_key_value`: use :c:func:`PyThread_tss_get` instead." +":c:func:`PyThread_get_key_value`: Use :c:func:`PyThread_tss_get` instead." msgstr ":c:func:`PyThread_get_key_value`:請改用 :c:func:`PyThread_tss_get`。" -#: ../../deprecations/c-api-pending-removal-in-future.rst:30 +#: ../../deprecations/c-api-pending-removal-in-future.rst:48 msgid "" -":c:func:`PyThread_delete_key_value`: use :c:func:`PyThread_tss_delete` " +":c:func:`PyThread_delete_key_value`: Use :c:func:`PyThread_tss_delete` " "instead." msgstr "" ":c:func:`PyThread_delete_key_value`:請改用 :c:func:`PyThread_tss_delete`。" -#: ../../deprecations/c-api-pending-removal-in-future.rst:31 -msgid ":c:func:`PyThread_ReInitTLS`: unneeded since Python 3.7." +#: ../../deprecations/c-api-pending-removal-in-future.rst:50 +msgid ":c:func:`PyThread_ReInitTLS`: Unneeded since Python 3.7." msgstr ":c:func:`PyThread_ReInitTLS`:自 Python 3.7 起不再需要。" diff --git a/deprecations/index.po b/deprecations/index.po index 88748aa9dd..b4a60d6ccd 100644 --- a/deprecations/index.po +++ b/deprecations/index.po @@ -2,12 +2,11 @@ # This file is distributed under the same license as the Python package. # FIRST AUTHOR , YEAR. # -#, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-23 07:52+0800\n" +"POT-Creation-Date: 2024-09-24 07:20+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -289,142 +288,219 @@ msgid "Pending Removal in Python 3.15" msgstr "Python 3.15 中待移除的項目" #: ../../deprecations/pending-removal-in-3.15.rst:4 +msgid ":mod:`ctypes`:" +msgstr ":mod:`ctypes`:" + +#: ../../deprecations/pending-removal-in-3.15.rst:6 msgid "" -":class:`http.server.CGIHTTPRequestHandler` will be removed along with its " -"related ``--cgi`` flag to ``python -m http.server``. It was obsolete and " -"rarely used. No direct replacement exists. *Anything* is better than CGI " -"to interface a web server with a request handler." +"The undocumented :func:`!ctypes.SetPointerType` function has been deprecated " +"since Python 3.13." msgstr "" -":class:`http.server.CGIHTTPRequestHandler` 將會被移除,連同其相關的 ``--" -"cgi`` 旗標到 ``python -m http.server``。它已經過時且很少被使用。沒有直接的替" -"代方案。*任何東西*\\ 都比 CGI 更好的來介接一個帶有請求處理器的網頁伺服器。" +"自 Python 3.13 起,未記錄的 :func:`!ctypes.SetPointerType` 函式已被棄用。" #: ../../deprecations/pending-removal-in-3.15.rst:9 +msgid ":mod:`http.server`:" +msgstr ":mod:`http.server`:" + +#: ../../deprecations/pending-removal-in-3.15.rst:11 msgid "" -":class:`locale`: :func:`locale.getdefaultlocale` was deprecated in Python " -"3.11 and originally planned for removal in Python 3.13 (:gh:`90817`), but " -"removal has been postponed to Python 3.15. Use :func:`locale.setlocale`, :" -"func:`locale.getencoding` and :func:`locale.getlocale` instead. (Contributed " -"by Hugo van Kemenade in :gh:`111187`.)" +"The obsolete and rarely used :class:`~http.server.CGIHTTPRequestHandler` has " +"been deprecated since Python 3.13. No direct replacement exists. *Anything* " +"is better than CGI to interface a web server with a request handler." msgstr "" -":class:`locale`::func:`locale.getdefaultlocale` 已在 Python 3.11 中被棄用," -"原本計劃在 Python 3.13 中移除 (:gh:`90817`),但被延後至 Python 3.15。請改用 :" -"func:`locale.setlocale`、:func:`locale.getencoding` 和 :func:`locale." -"getlocale`。 (由 Hugo van Kemenade 於 :gh:`111187` 貢獻。)" +"過時且很少使用的 :class:`~http.server.CGIHTTPRequestHandler` 自 Python 3.13 " +"起已被棄用。不存在直接的替代。*任何東西*\\ 都比 CGI 更好地將 Web 伺服器與請求" +"處理程序介接起來。" -#: ../../deprecations/pending-removal-in-3.15.rst:16 +#: ../../deprecations/pending-removal-in-3.15.rst:17 msgid "" -":mod:`pathlib`: :meth:`pathlib.PurePath.is_reserved` is deprecated and " -"scheduled for removal in Python 3.15. Use :func:`os.path.isreserved` to " -"detect reserved paths on Windows." +"The :option:`!--cgi` flag to the :program:`python -m http.server` command-" +"line interface has been deprecated since Python 3.13." msgstr "" -":mod:`pathlib`::meth:`pathlib.PurePath.is_reserved` 已被棄用並計劃在 Python " -"3.15 中移除。請用 :func:`os.path.isreserved` 來偵測 Windows 上的保留路徑。" +"自 Python 3.13 起,:program:`python -m http.server` 命令列介面的 :option:`!--" +"cgi` 旗標已被棄用。" + +#: ../../deprecations/pending-removal-in-3.15.rst:20 +msgid ":class:`locale`:" +msgstr ":class:`locale`:" -#: ../../deprecations/pending-removal-in-3.15.rst:21 +#: ../../deprecations/pending-removal-in-3.15.rst:22 msgid "" -":mod:`platform`: :func:`~platform.java_ver` is deprecated and will be " -"removed in 3.15. It was largely untested, had a confusing API, and was only " -"useful for Jython support. (Contributed by Nikita Sobolev in :gh:`116349`.)" +"The :func:`~locale.getdefaultlocale` function has been deprecated since " +"Python 3.11. Its removal was originally planned for Python 3.13 (:gh:" +"`90817`), but has been postponed to Python 3.15. Use :func:`~locale." +"getlocale`, :func:`~locale.setlocale`, and :func:`~locale.getencoding` " +"instead. (Contributed by Hugo van Kemenade in :gh:`111187`.)" msgstr "" -":mod:`platform`::func:`~platform.java_ver` 已被棄用並將在 3.15 中移除。它幾" -"乎沒有被測試過,API 令人困惑並且只對 Jython 支援有用。 (由 Nikita Sobolev " -"於 :gh:`116349` 貢獻。)" +":func:`~locale.getdefaultlocale` 已在 Python 3.11 中被棄用,原本計劃在 " +"Python 3.13 中移除 (:gh:`90817`),但被延後至 Python 3.15。請改用 :func:" +"`~locale.getlocale`、:func:`~locale.setlocale` 和 :func:`~locale." +"getencoding`。 (由 Hugo van Kemenade 於 :gh:`111187` 貢獻。)" -#: ../../deprecations/pending-removal-in-3.15.rst:27 +#: ../../deprecations/pending-removal-in-3.15.rst:30 +msgid ":mod:`pathlib`:" +msgstr ":mod:`pathlib`:" + +#: ../../deprecations/pending-removal-in-3.15.rst:32 msgid "" -":mod:`threading`: Passing any arguments to :func:`threading.RLock` is now " -"deprecated. C version allows any numbers of args and kwargs, but they are " -"just ignored. Python version does not allow any arguments. All arguments " -"will be removed from :func:`threading.RLock` in Python 3.15. (Contributed by " -"Nikita Sobolev in :gh:`102029`.)" +":meth:`.PurePath.is_reserved` has been deprecated since Python 3.13. Use :" +"func:`os.path.isreserved` to detect reserved paths on Windows." msgstr "" -":mod:`threading`:對 :func:`threading.RLock` 傳遞任何引數現在已被棄用。C 版本" -"允許任意數量的引數和關鍵字引數,但它們會被忽略。Python 版本不允許任何引數。所" -"有引數將在 Python 3.15 中從 :func:`threading.RLock` 中移除。 (由 Nikita " -"Sobolev 於 :gh:`102029` 貢獻。)" - -#: ../../deprecations/pending-removal-in-3.15.rst:34 -msgid ":class:`typing.NamedTuple`:" -msgstr ":class:`typing.NamedTuple`:" +":meth:`.PurePath.is_reserved` 已自 Python 3.13 被棄用。請用 :func:`os.path." +"isreserved` 來偵測 Windows 上的保留路徑。" #: ../../deprecations/pending-removal-in-3.15.rst:36 +msgid ":mod:`platform`:" +msgstr ":mod:`platform`:" + +#: ../../deprecations/pending-removal-in-3.15.rst:38 msgid "" -"The undocumented keyword argument syntax for creating :class:`!NamedTuple` " -"classes (``NT = NamedTuple(\"NT\", x=int)``) is deprecated, and will be " -"disallowed in 3.15. Use the class-based syntax or the functional syntax " -"instead." +":func:`~platform.java_ver` has been deprecated since Python 3.13. This " +"function is only useful for Jython support, has a confusing API, and is " +"largely untested." msgstr "" -"用於建立 :class:`!NamedTuple` 類別的未以文件記錄之關鍵字引數語法 (``NT = " -"NamedTuple(\"NT\", x=int)``) 已棄用,並將在 3.15 中被禁止。請改用基於類別的語" -"法或函式語法 (functional syntax)。" - -#: ../../deprecations/pending-removal-in-3.15.rst:40 -msgid "" -"When using the functional syntax to create a :class:`!NamedTuple` class, " -"failing to pass a value to the *fields* parameter (``NT = " -"NamedTuple(\"NT\")``) is deprecated. Passing ``None`` to the *fields* " -"parameter (``NT = NamedTuple(\"NT\", None)``) is also deprecated. Both will " -"be disallowed in Python 3.15. To create a :class:`!NamedTuple` class with 0 " -"fields, use ``class NT(NamedTuple): pass`` or ``NT = NamedTuple(\"NT\", " -"[])``." -msgstr "" -"當使用函式語法來建立 :class:`!NamedTuple` 類別時,沒將值傳遞給 *fields* 參數" -"的方式 (``NT = NamedTuple(\"NT\")``) 已被棄用,將 ``None`` 傳遞給 *fields* 參" -"數(``NT = NamedTuple(\"NT\", None)``)也已被棄用。這兩者將在 Python 3.15 中" -"會被禁止。要建立一個沒有欄位的 :class:`!NamedTuple` 類別,請使用 ``class " -"NT(NamedTuple): pass`` 或 ``NT = NamedTuple(\"NT\", [])``。" - -#: ../../deprecations/pending-removal-in-3.15.rst:47 -msgid "" -":class:`typing.TypedDict`: When using the functional syntax to create a :" -"class:`!TypedDict` class, failing to pass a value to the *fields* parameter " -"(``TD = TypedDict(\"TD\")``) is deprecated. Passing ``None`` to the *fields* " -"parameter (``TD = TypedDict(\"TD\", None)``) is also deprecated. Both will " -"be disallowed in Python 3.15. To create a :class:`!TypedDict` class with 0 " -"fields, use ``class TD(TypedDict): pass`` or ``TD = TypedDict(\"TD\", {})``." -msgstr "" -":class:`typing.TypedDict`:當使用函式語法來建立 :class:`!TypedDict` 類別時," -"沒將值傳遞給 *fields* 參數的方式(``TD = TypedDict(\"TD\")``)已被棄用,將 " -"``None`` 傳遞給 *fields* 參數(``TD = TypedDict(\"TD\", None)``)也已被棄用。" -"這兩者將在 Python 3.15 中會被禁止。要建立一個沒有欄位的 :class:`!TypedDict` " -"類別,請使用 ``class TD(TypedDict): pass`` 或 ``TD = TypedDict(\"TD\", " -"{})``。" - -#: ../../deprecations/pending-removal-in-3.15.rst:54 -msgid "" -":mod:`wave`: Deprecate the ``getmark()``, ``setmark()`` and ``getmarkers()`` " -"methods of the :class:`wave.Wave_read` and :class:`wave.Wave_write` classes. " -"They will be removed in Python 3.15. (Contributed by Victor Stinner in :gh:" -"`105096`.)" -msgstr "" -":mod:`wave`:已棄用 :class:`wave.Wave_read` 和 :class:`wave.Wave_write` 類別" -"的 ``getmark()``、``setmark()`` 和 ``getmarkers()`` 方法。它們將在 Python " -"3.15 中被移除。 (由 Victor Stinner 於 :gh:`105096` 貢獻。)" +"自 Python 3.13 起,:func:`~platform.java_ver` 已被棄用。此函式僅對 Jython 支" +"援有用,具有令人困惑的 API,基本上未經測試。" + +#: ../../deprecations/pending-removal-in-3.15.rst:42 +msgid ":mod:`threading`:" +msgstr ":mod:`threading`:" + +#: ../../deprecations/pending-removal-in-3.15.rst:44 +msgid "" +":func:`~threading.RLock` will take no arguments in Python 3.15. Passing any " +"arguments has been deprecated since Python 3.14, as the Python version does " +"not permit any arguments, but the C version allows any number of positional " +"or keyword arguments, ignoring every argument." +msgstr "" +":func:`~threading.RLock` 在 Python 3.15 中將不接受任何引數。自 Python 3.14 " +"起,傳遞任何引數的用法已被棄用,因為 Python 版本不允許任何引數,但 C 版本允許" +"任意數量的位置或關鍵字引數,並忽略每個引數。" + +#: ../../deprecations/pending-removal-in-3.15.rst:50 +msgid ":mod:`typing`:" +msgstr ":mod:`typing`:" + +#: ../../deprecations/pending-removal-in-3.15.rst:52 +msgid "" +"The undocumented keyword argument syntax for creating :class:`~typing." +"NamedTuple` classes (e.g. ``Point = NamedTuple(\"Point\", x=int, y=int)``) " +"has been deprecated since Python 3.13. Use the class-based syntax or the " +"functional syntax instead." +msgstr "" +"用於建立 :class:`~typing.NamedTuple` 類別的未以文件記錄之關鍵字引數語法 " +"(``Point = NamedTuple(\"Point\", x=int, y=int)``) 已自 Python 3.13 棄用。請改" +"用基於類別的語法或函式語法 (functional syntax)。" + +#: ../../deprecations/pending-removal-in-3.15.rst:58 +msgid "" +"The :func:`typing.no_type_check_decorator` decorator function has been " +"deprecated since Python 3.13. After eight years in the :mod:`typing` module, " +"it has yet to be supported by any major type checker." +msgstr "" +"自 Python 3.13 起,:func:`typing.no_type_check_decorator` 裝飾器函式已被棄" +"用。在 :mod:`typing` 模組中使用了八年之後,它尚未得到任何主要型別檢查器的支" +"援。" + +#: ../../deprecations/pending-removal-in-3.15.rst:63 +msgid ":mod:`wave`:" +msgstr ":mod:`wave`:" + +#: ../../deprecations/pending-removal-in-3.15.rst:65 +msgid "" +"The :meth:`~wave.Wave_read.getmark`, :meth:`!setmark`, and :meth:`~wave." +"Wave_read.getmarkers` methods of the :class:`~wave.Wave_read` and :class:" +"`~wave.Wave_write` classes have been deprecated since Python 3.13." +msgstr "" +"已棄用 :class:`~wave.Wave_read` 和 :class:`~wave.Wave_write` 類別的 :meth:" +"`~wave.Wave_read.getmark`、:meth:`!setmark` 和 :meth:`~wave.Wave_read." +"getmarkers` 方法自 Python 3.13 被棄用。" #: ../../deprecations/pending-removal-in-3.16.rst:2 msgid "Pending Removal in Python 3.16" msgstr "Python 3.16 中待移除的項目" #: ../../deprecations/pending-removal-in-3.16.rst:4 +#: ../../deprecations/pending-removal-in-future.rst:12 +msgid ":mod:`builtins`:" +msgstr ":mod:`builtins`:" + +#: ../../deprecations/pending-removal-in-3.16.rst:6 +msgid "" +"Bitwise inversion on boolean types, ``~True`` or ``~False`` has been " +"deprecated since Python 3.12, as it produces surprising and unintuitive " +"results (``-2`` and ``-1``). Use ``not x`` instead for the logical negation " +"of a Boolean. In the rare case that you need the bitwise inversion of the " +"underlying integer, convert to ``int`` explicitly (``~int(x)``)." +msgstr "" +"自 Python 3.12 起,布林型別的位元反轉 ``~True`` 或 ``~False`` 已被棄用,因為" +"它會產生不預期且不直觀的結果(``-2`` 和 ``-1``)。使用 ``not x`` 代替布林值的" +"邏輯否定。在極少數情況下,你需要對底層的整數進行位元反轉,請明確轉換為 " +"``~int(x)`` (``~int(x)``)。" + +#: ../../deprecations/pending-removal-in-3.16.rst:13 +msgid ":mod:`array`:" +msgstr ":mod:`array`:" + +#: ../../deprecations/pending-removal-in-3.16.rst:15 msgid "" -":mod:`array`: :class:`array.array` ``'u'`` type (:c:type:`wchar_t`): use the " -"``'w'`` type instead (``Py_UCS4``)." +"The ``'u'`` format code (:c:type:`wchar_t`) has been deprecated in " +"documentation since Python 3.3 and at runtime since Python 3.13. Use the " +"``'w'`` format code (:c:type:`Py_UCS4`) for Unicode characters instead." msgstr "" -":mod:`array`::class:`array.array` ``'u'`` 型別 (:c:type:`wchar_t`):請改用 " -"``'w'`` 型別 (``Py_UCS4``)。" +"自 Python 3.3 起,``'u'`` 格式碼 (:c:type:`wchar_t`) 在文件中已被棄用,自 " +"Python 3.13 起在 runtime 已被棄用。請使用 ``'w'`` 格式碼 (:c:type:`Py_UCS4`) " +"來取代 Unicode 字元。" -#: ../../deprecations/pending-removal-in-3.16.rst:8 -msgid ":mod:`builtins`: ``~bool``, bitwise inversion on bool." -msgstr ":mod:`builtins`:``~bool``,對 bool 進行位元反轉。" +#: ../../deprecations/pending-removal-in-3.16.rst:21 +msgid ":mod:`shutil`:" +msgstr ":mod:`shutil`:" -#: ../../deprecations/pending-removal-in-3.16.rst:11 +#: ../../deprecations/pending-removal-in-3.16.rst:23 msgid "" -":mod:`symtable`: Deprecate :meth:`symtable.Class.get_methods` due to the " -"lack of interest. (Contributed by Bénédikt Tran in :gh:`119698`.)" +"The :class:`!ExecError` exception has been deprecated since Python 3.14. It " +"has not been used by any function in :mod:`!shutil` since Python 3.4, and is " +"now an alias of :exc:`RuntimeError`." msgstr "" -":mod:`symtable`:由於並沒有太多關注,已棄用 :meth:`symtable.Class." -"get_methods`。 (由 Bénédikt Tran 於 :gh:`119698` 貢獻。)" +"自 Python 3.14 起,:class:`!ExecError` 例外已被棄用。自 Python 3.4 以來,它尚" +"未被 :mod:`!shutil` 中的任何函式使用,現在是 :exc:`RuntimeError` 的別名。" + +#: ../../deprecations/pending-removal-in-3.16.rst:28 +msgid ":mod:`symtable`:" +msgstr ":mod:`symtable`:" + +#: ../../deprecations/pending-removal-in-3.16.rst:30 +msgid "" +"The :meth:`Class.get_methods ` method has been " +"deprecated since Python 3.14." +msgstr "" +"自 Python 3.14 起,:meth:`Class.get_methods ` 方" +"法已被棄用。" + +#: ../../deprecations/pending-removal-in-3.16.rst:33 +msgid ":mod:`sys`:" +msgstr ":mod:`sys`:" + +#: ../../deprecations/pending-removal-in-3.16.rst:35 +msgid "" +"The :func:`~sys._enablelegacywindowsfsencoding` function has been deprecated " +"since Python 3.13. Use the :envvar:`PYTHONLEGACYWINDOWSFSENCODING` " +"environment variable instead." +msgstr "" +"自 Python 3.13 起,:func:`~sys._enablelegacywindowsfsencoding` 函式已被棄用。" +"請改用 :envvar:`PYTHONLEGACYWINDOWSFSENCODING` 環境變數。" + +#: ../../deprecations/pending-removal-in-3.16.rst:39 +msgid ":mod:`tarfile`:" +msgstr ":mod:`tarfile`:" + +#: ../../deprecations/pending-removal-in-3.16.rst:41 +msgid "" +"The undocumented and unused :attr:`!TarFile.tarfile` attribute has been " +"deprecated since Python 3.13." +msgstr "" +"自 Python 3.13 起,未以文件記錄和未被使用的 :attr:`!TarFile.tarfile` 屬性已被" +"棄用。" #: ../../deprecations/c-api-pending-removal-in-future.rst:2 #: ../../deprecations/pending-removal-in-future.rst:2 @@ -447,10 +523,6 @@ msgstr ":mod:`argparse`:已棄用巢狀引數群組和巢狀互斥群組。" msgid ":mod:`array`'s ``'u'`` format code (:gh:`57281`)" msgstr ":mod:`array` 的 ``'u'`` 格式碼 (:gh:`57281`)" -#: ../../deprecations/pending-removal-in-future.rst:12 -msgid ":mod:`builtins`:" -msgstr ":mod:`builtins`:" - #: ../../deprecations/pending-removal-in-future.rst:14 msgid "``bool(NotImplemented)``." msgstr "``bool(NotImplemented)``。" @@ -871,164 +943,167 @@ msgid "" msgstr "設定 Python 初始化的函式,Python 3.11 中已被棄用:" #: ../../deprecations/c-api-pending-removal-in-3.14.rst:12 -msgid "``PySys_SetArgvEx()``: set :c:member:`PyConfig.argv` instead." -msgstr "``PySys_SetArgvEx()``:請改以 :c:member:`PyConfig.argv` 設定。" - -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:13 -msgid "``PySys_SetArgv()``: set :c:member:`PyConfig.argv` instead." -msgstr "``PySys_SetArgv()``:請改以 :c:member:`PyConfig.argv` 設定。" +msgid ":c:func:`!PySys_SetArgvEx()`: Set :c:member:`PyConfig.argv` instead." +msgstr ":c:func:`!PySys_SetArgvEx()`:請改以 :c:member:`PyConfig.argv` 設定。" #: ../../deprecations/c-api-pending-removal-in-3.14.rst:14 -msgid "``Py_SetProgramName()``: set :c:member:`PyConfig.program_name` instead." +msgid ":c:func:`!PySys_SetArgv()`: Set :c:member:`PyConfig.argv` instead." +msgstr ":c:func:`!PySys_SetArgv()`:請改以 :c:member:`PyConfig.argv` 設定。" + +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:16 +msgid "" +":c:func:`!Py_SetProgramName()`: Set :c:member:`PyConfig.program_name` " +"instead." msgstr "" -"``Py_SetProgramName()``:請改以 :c:member:`PyConfig.program_name` 設定。" +":c:func:`!Py_SetProgramName()``:請改以 :c:member:`PyConfig.program_name` 設" +"定。" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:15 -msgid "``Py_SetPythonHome()``: set :c:member:`PyConfig.home` instead." -msgstr "``Py_SetPythonHome()``:請改以 :c:member:`PyConfig.home` 設定。" +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:18 +msgid ":c:func:`!Py_SetPythonHome()`: Set :c:member:`PyConfig.home` instead." +msgstr ":c:func:`!Py_SetPythonHome()`:請改以 :c:member:`PyConfig.home` 設定。" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:17 -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:45 +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:21 +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:71 msgid "" "The :c:func:`Py_InitializeFromConfig` API should be used with :c:type:" "`PyConfig` instead." msgstr "" ":c:func:`Py_InitializeFromConfig` API 應該與 :c:type:`PyConfig` 一起使用。" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:20 +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:24 msgid "Global configuration variables:" msgstr "全域設定變數:" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:22 -msgid ":c:var:`Py_DebugFlag`: use :c:member:`PyConfig.parser_debug` instead." +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:26 +msgid ":c:var:`Py_DebugFlag`: Use :c:member:`PyConfig.parser_debug` instead." msgstr ":c:var:`Py_DebugFlag`:請改用 :c:member:`PyConfig.parser_debug`。" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:23 -msgid ":c:var:`Py_VerboseFlag`: use :c:member:`PyConfig.verbose` instead." +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:28 +msgid ":c:var:`Py_VerboseFlag`: Use :c:member:`PyConfig.verbose` instead." msgstr ":c:var:`Py_VerboseFlag`:請改用 :c:member:`PyConfig.verbose`。" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:24 -msgid ":c:var:`Py_QuietFlag`: use :c:member:`PyConfig.quiet` instead." +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:30 +msgid ":c:var:`Py_QuietFlag`: Use :c:member:`PyConfig.quiet` instead." msgstr ":c:var:`Py_QuietFlag`:請改用 :c:member:`PyConfig.quiet`。" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:25 +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:32 msgid "" -":c:var:`Py_InteractiveFlag`: use :c:member:`PyConfig.interactive` instead." +":c:var:`Py_InteractiveFlag`: Use :c:member:`PyConfig.interactive` instead." msgstr ":c:var:`Py_InteractiveFlag`:請改用 :c:member:`PyConfig.interactive`。" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:26 -msgid ":c:var:`Py_InspectFlag`: use :c:member:`PyConfig.inspect` instead." +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:34 +msgid ":c:var:`Py_InspectFlag`: Use :c:member:`PyConfig.inspect` instead." msgstr ":c:var:`Py_InspectFlag`:請改用 :c:member:`PyConfig.inspect`。" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:27 +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:36 msgid "" -":c:var:`Py_OptimizeFlag`: use :c:member:`PyConfig.optimization_level` " +":c:var:`Py_OptimizeFlag`: Use :c:member:`PyConfig.optimization_level` " "instead." msgstr "" ":c:var:`Py_OptimizeFlag`:請改用 :c:member:`PyConfig.optimization_level`。" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:28 -msgid ":c:var:`Py_NoSiteFlag`: use :c:member:`PyConfig.site_import` instead." +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:38 +msgid ":c:var:`Py_NoSiteFlag`: Use :c:member:`PyConfig.site_import` instead." msgstr ":c:var:`Py_NoSiteFlag`:請改用 :c:member:`PyConfig.site_import`。" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:29 +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:40 msgid "" -":c:var:`Py_BytesWarningFlag`: use :c:member:`PyConfig.bytes_warning` instead." +":c:var:`Py_BytesWarningFlag`: Use :c:member:`PyConfig.bytes_warning` instead." msgstr "" ":c:var:`Py_BytesWarningFlag`:請改用 :c:member:`PyConfig.bytes_warning`。" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:30 +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:42 msgid "" -":c:var:`Py_FrozenFlag`: use :c:member:`PyConfig.pathconfig_warnings` instead." +":c:var:`Py_FrozenFlag`: Use :c:member:`PyConfig.pathconfig_warnings` instead." msgstr "" ":c:var:`Py_FrozenFlag`:請改用 :c:member:`PyConfig.pathconfig_warnings`。" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:31 +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:44 msgid "" -":c:var:`Py_IgnoreEnvironmentFlag`: use :c:member:`PyConfig.use_environment` " +":c:var:`Py_IgnoreEnvironmentFlag`: Use :c:member:`PyConfig.use_environment` " "instead." msgstr "" ":c:var:`Py_IgnoreEnvironmentFlag`:請改用 :c:member:`PyConfig." "use_environment`。" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:32 +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:46 msgid "" -":c:var:`Py_DontWriteBytecodeFlag`: use :c:member:`PyConfig.write_bytecode` " +":c:var:`Py_DontWriteBytecodeFlag`: Use :c:member:`PyConfig.write_bytecode` " "instead." msgstr "" ":c:var:`Py_DontWriteBytecodeFlag`:請改用 :c:member:`PyConfig." "write_bytecode`。" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:33 +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:48 msgid "" -":c:var:`Py_NoUserSiteDirectory`: use :c:member:`PyConfig." +":c:var:`Py_NoUserSiteDirectory`: Use :c:member:`PyConfig." "user_site_directory` instead." msgstr "" ":c:var:`Py_NoUserSiteDirectory`:請改用 :c:member:`PyConfig." "user_site_directory`。" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:34 +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:50 msgid "" -":c:var:`Py_UnbufferedStdioFlag`: use :c:member:`PyConfig.buffered_stdio` " +":c:var:`Py_UnbufferedStdioFlag`: Use :c:member:`PyConfig.buffered_stdio` " "instead." msgstr "" ":c:var:`Py_UnbufferedStdioFlag`:請改用 :c:member:`PyConfig.buffered_stdio`。" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:35 +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:52 msgid "" -":c:var:`Py_HashRandomizationFlag`: use :c:member:`PyConfig.use_hash_seed` " +":c:var:`Py_HashRandomizationFlag`: Use :c:member:`PyConfig.use_hash_seed` " "and :c:member:`PyConfig.hash_seed` instead." msgstr "" ":c:var:`Py_HashRandomizationFlag`:請改用 :c:member:`PyConfig.use_hash_seed` " "和 :c:member:`PyConfig.hash_seed`。" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:37 -msgid ":c:var:`Py_IsolatedFlag`: use :c:member:`PyConfig.isolated` instead." +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:55 +msgid ":c:var:`Py_IsolatedFlag`: Use :c:member:`PyConfig.isolated` instead." msgstr ":c:var:`Py_IsolatedFlag`:請改用 :c:member:`PyConfig.isolated`。" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:38 +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:57 msgid "" -":c:var:`Py_LegacyWindowsFSEncodingFlag`: use :c:member:`PyPreConfig." +":c:var:`Py_LegacyWindowsFSEncodingFlag`: Use :c:member:`PyPreConfig." "legacy_windows_fs_encoding` instead." msgstr "" ":c:var:`Py_LegacyWindowsFSEncodingFlag`:請改用 :c:member:`PyPreConfig." "legacy_windows_fs_encoding`。" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:39 +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:59 msgid "" -":c:var:`Py_LegacyWindowsStdioFlag`: use :c:member:`PyConfig." +":c:var:`Py_LegacyWindowsStdioFlag`: Use :c:member:`PyConfig." "legacy_windows_stdio` instead." msgstr "" ":c:var:`Py_LegacyWindowsStdioFlag`:請改用 :c:member:`PyConfig." "legacy_windows_stdio`。" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:40 +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:61 msgid "" -":c:var:`!Py_FileSystemDefaultEncoding`: use :c:member:`PyConfig." +":c:var:`!Py_FileSystemDefaultEncoding`: Use :c:member:`PyConfig." "filesystem_encoding` instead." msgstr "" ":c:var:`!Py_FileSystemDefaultEncoding`:請改用 :c:member:`PyConfig." "filesystem_encoding`。" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:41 +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:63 msgid "" -":c:var:`!Py_HasFileSystemDefaultEncoding`: use :c:member:`PyConfig." +":c:var:`!Py_HasFileSystemDefaultEncoding`: Use :c:member:`PyConfig." "filesystem_encoding` instead." msgstr "" ":c:var:`!Py_HasFileSystemDefaultEncoding`:請改用 :c:member:`PyConfig." "filesystem_encoding`。" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:42 +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:65 msgid "" -":c:var:`!Py_FileSystemDefaultEncodeErrors`: use :c:member:`PyConfig." +":c:var:`!Py_FileSystemDefaultEncodeErrors`: Use :c:member:`PyConfig." "filesystem_errors` instead." msgstr "" ":c:var:`!Py_FileSystemDefaultEncodeErrors`:請改用 :c:member:`PyConfig." "filesystem_errors`。" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:43 +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:67 msgid "" -":c:var:`!Py_UTF8Mode`: use :c:member:`PyPreConfig.utf8_mode` instead. (see :" +":c:var:`!Py_UTF8Mode`: Use :c:member:`PyPreConfig.utf8_mode` instead. (see :" "c:func:`Py_PreInitialize`)" msgstr "" ":c:var:`!Py_UTF8Mode`:請改用 :c:member:`PyPreConfig.utf8_mode`。(請見 :c:" @@ -1040,63 +1115,63 @@ msgstr "``libmpdecimal`` 的打包副本 (bundled copy)。" #: ../../deprecations/c-api-pending-removal-in-3.15.rst:5 msgid "" -":c:func:`PyImport_ImportModuleNoBlock`: use :c:func:`PyImport_ImportModule` " -"instead." +"The :c:func:`PyImport_ImportModuleNoBlock`: Use :c:func:" +"`PyImport_ImportModule` instead." msgstr "" ":c:func:`PyImport_ImportModuleNoBlock`:請改用 :c:func:" "`PyImport_ImportModule`。" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:6 -msgid ":c:func:`PyWeakref_GET_OBJECT`: use :c:func:`PyWeakref_GetRef` instead." -msgstr ":c:func:`PyWeakref_GET_OBJECT`:請改用 :c:func:`PyWeakref_GetRef`。" - #: ../../deprecations/c-api-pending-removal-in-3.15.rst:7 -msgid ":c:func:`PyWeakref_GetObject`: use :c:func:`PyWeakref_GetRef` instead." -msgstr ":c:func:`PyWeakref_GetObject`:請改用 :c:func:`PyWeakref_GetRef`。" - -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:8 -msgid ":c:type:`!Py_UNICODE_WIDE` type: use :c:type:`wchar_t` instead." -msgstr ":c:type:`!Py_UNICODE_WIDE` type:請改用 :c:type:`wchar_t`。" +msgid "" +":c:func:`PyWeakref_GetObject` and :c:func:`PyWeakref_GET_OBJECT`: Use :c:" +"func:`PyWeakref_GetRef` instead." +msgstr "" +":c:func:`PyWeakref_GetObject` 和 :c:func:`PyWeakref_GET_OBJECT`:請改用 :c:" +"func:`PyWeakref_GetRef`。" #: ../../deprecations/c-api-pending-removal-in-3.15.rst:9 -msgid ":c:type:`Py_UNICODE` type: use :c:type:`wchar_t` instead." -msgstr ":c:type:`Py_UNICODE` type:請改用 :c:type:`wchar_t`。" +msgid "" +":c:type:`Py_UNICODE` type and the :c:macro:`!Py_UNICODE_WIDE` macro: Use :c:" +"type:`wchar_t` instead." +msgstr "" +":c:type:`Py_UNICODE` 型別與 :c:macro:`!Py_UNICODE_WIDE` 巨集:請改用 :c:type:" +"`wchar_t`。" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:10 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:11 msgid "Python initialization functions:" msgstr "Python 初始化函式:" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:12 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:13 msgid "" -":c:func:`PySys_ResetWarnOptions`: clear :data:`sys.warnoptions` and :data:`!" +":c:func:`PySys_ResetWarnOptions`: Clear :data:`sys.warnoptions` and :data:`!" "warnings.filters` instead." msgstr "" ":c:func:`PySys_ResetWarnOptions`:請改為清除 :data:`sys.warnoptions` 和 :" "data:`!warnings.filters`。" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:14 -msgid ":c:func:`Py_GetExecPrefix`: get :data:`sys.exec_prefix` instead." +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:15 +msgid ":c:func:`Py_GetExecPrefix`: Get :data:`sys.exec_prefix` instead." msgstr ":c:func:`Py_GetExecPrefix`:請改用 :data:`sys.exec_prefix`。" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:15 -msgid ":c:func:`Py_GetPath`: get :data:`sys.path` instead." +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:17 +msgid ":c:func:`Py_GetPath`: Get :data:`sys.path` instead." msgstr ":c:func:`Py_GetPath`:請改用 :data:`sys.path`。" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:16 -msgid ":c:func:`Py_GetPrefix`: get :data:`sys.prefix` instead." +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:19 +msgid ":c:func:`Py_GetPrefix`: Get :data:`sys.prefix` instead." msgstr ":c:func:`Py_GetPrefix`:請改用 :data:`sys.prefix`。" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:17 -msgid ":c:func:`Py_GetProgramFullPath`: get :data:`sys.executable` instead." +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:21 +msgid ":c:func:`Py_GetProgramFullPath`: Get :data:`sys.executable` instead." msgstr ":c:func:`Py_GetProgramFullPath`:請改用 :data:`sys.executable`。" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:18 -msgid ":c:func:`Py_GetProgramName`: get :data:`sys.executable` instead." +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:23 +msgid ":c:func:`Py_GetProgramName`: Get :data:`sys.executable` instead." msgstr ":c:func:`Py_GetProgramName`:請改用 :data:`sys.executable`。" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:19 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:25 msgid "" -":c:func:`Py_GetPythonHome`: get :c:member:`PyConfig.home` or the :envvar:" +":c:func:`Py_GetPythonHome`: Get :c:member:`PyConfig.home` or the :envvar:" "`PYTHONHOME` environment variable instead." msgstr "" ":c:func:`Py_GetPythonHome`:請改用 :c:member:`PyConfig.home` 或 :envvar:" @@ -1109,84 +1184,85 @@ msgid "" msgstr "下列 API 已被棄用並將會被移除,不過目前尚未訂定移除日期。" #: ../../deprecations/c-api-pending-removal-in-future.rst:7 -msgid ":c:macro:`Py_TPFLAGS_HAVE_FINALIZE`: unneeded since Python 3.8." +msgid ":c:macro:`Py_TPFLAGS_HAVE_FINALIZE`: Unneeded since Python 3.8." msgstr ":c:macro:`Py_TPFLAGS_HAVE_FINALIZE`:自 Python 3.8 起不再需要" -#: ../../deprecations/c-api-pending-removal-in-future.rst:8 -msgid ":c:func:`PyErr_Fetch`: use :c:func:`PyErr_GetRaisedException` instead." +#: ../../deprecations/c-api-pending-removal-in-future.rst:9 +msgid ":c:func:`PyErr_Fetch`: Use :c:func:`PyErr_GetRaisedException` instead." msgstr ":c:func:`PyErr_Fetch`:請改用 :c:func:`PyErr_GetRaisedException`。" -#: ../../deprecations/c-api-pending-removal-in-future.rst:9 +#: ../../deprecations/c-api-pending-removal-in-future.rst:11 msgid "" -":c:func:`PyErr_NormalizeException`: use :c:func:`PyErr_GetRaisedException` " +":c:func:`PyErr_NormalizeException`: Use :c:func:`PyErr_GetRaisedException` " "instead." msgstr "" ":c:func:`PyErr_NormalizeException`:請改用 :c:func:" "`PyErr_GetRaisedException`。" -#: ../../deprecations/c-api-pending-removal-in-future.rst:10 +#: ../../deprecations/c-api-pending-removal-in-future.rst:13 msgid "" -":c:func:`PyErr_Restore`: use :c:func:`PyErr_SetRaisedException` instead." +":c:func:`PyErr_Restore`: Use :c:func:`PyErr_SetRaisedException` instead." msgstr ":c:func:`PyErr_Restore`:請改用 :c:func:`PyErr_SetRaisedException`。" -#: ../../deprecations/c-api-pending-removal-in-future.rst:11 +#: ../../deprecations/c-api-pending-removal-in-future.rst:15 msgid "" -":c:func:`PyModule_GetFilename`: use :c:func:`PyModule_GetFilenameObject` " +":c:func:`PyModule_GetFilename`: Use :c:func:`PyModule_GetFilenameObject` " "instead." msgstr "" ":c:func:`PyModule_GetFilename`:請改用 :c:func:`PyModule_GetFilenameObject`。" -#: ../../deprecations/c-api-pending-removal-in-future.rst:12 -msgid ":c:func:`PyOS_AfterFork`: use :c:func:`PyOS_AfterFork_Child` instead." +#: ../../deprecations/c-api-pending-removal-in-future.rst:17 +msgid ":c:func:`PyOS_AfterFork`: Use :c:func:`PyOS_AfterFork_Child` instead." msgstr ":c:func:`PyOS_AfterFork`:請改用 :c:func:`PyOS_AfterFork_Child`。" -#: ../../deprecations/c-api-pending-removal-in-future.rst:13 +#: ../../deprecations/c-api-pending-removal-in-future.rst:19 msgid "" -":c:func:`PySlice_GetIndicesEx`: use :c:func:`PySlice_Unpack` and :c:func:" +":c:func:`PySlice_GetIndicesEx`: Use :c:func:`PySlice_Unpack` and :c:func:" "`PySlice_AdjustIndices` instead." msgstr "" ":c:func:`PySlice_GetIndicesEx`:請改用 :c:func:`PySlice_Unpack` 和 :c:func:" "`PySlice_AdjustIndices`。" -#: ../../deprecations/c-api-pending-removal-in-future.rst:14 +#: ../../deprecations/c-api-pending-removal-in-future.rst:21 msgid "" -":c:func:`!PyUnicode_AsDecodedObject`: use :c:func:`PyCodec_Decode` instead." +":c:func:`!PyUnicode_AsDecodedObject`: Use :c:func:`PyCodec_Decode` instead." msgstr "" ":c:func:`!PyUnicode_AsDecodedObject`:請改用 :c:func:`PyCodec_Decode`。" -#: ../../deprecations/c-api-pending-removal-in-future.rst:15 +#: ../../deprecations/c-api-pending-removal-in-future.rst:23 msgid "" -":c:func:`!PyUnicode_AsDecodedUnicode`: use :c:func:`PyCodec_Decode` instead." +":c:func:`!PyUnicode_AsDecodedUnicode`: Use :c:func:`PyCodec_Decode` instead." msgstr "" ":c:func:`!PyUnicode_AsDecodedUnicode`:請改用 :c:func:`PyCodec_Decode`。" -#: ../../deprecations/c-api-pending-removal-in-future.rst:16 +#: ../../deprecations/c-api-pending-removal-in-future.rst:25 msgid "" -":c:func:`!PyUnicode_AsEncodedObject`: use :c:func:`PyCodec_Encode` instead." +":c:func:`!PyUnicode_AsEncodedObject`: Use :c:func:`PyCodec_Encode` instead." msgstr "" ":c:func:`!PyUnicode_AsEncodedObject`:請改用 :c:func:`PyCodec_Encode`。" -#: ../../deprecations/c-api-pending-removal-in-future.rst:17 +#: ../../deprecations/c-api-pending-removal-in-future.rst:27 msgid "" -":c:func:`!PyUnicode_AsEncodedUnicode`: use :c:func:`PyCodec_Encode` instead." +":c:func:`!PyUnicode_AsEncodedUnicode`: Use :c:func:`PyCodec_Encode` instead." msgstr "" ":c:func:`!PyUnicode_AsEncodedUnicode`:請改用 :c:func:`PyCodec_Encode`。" -#: ../../deprecations/c-api-pending-removal-in-future.rst:18 -msgid ":c:func:`PyUnicode_READY`: unneeded since Python 3.12" +#: ../../deprecations/c-api-pending-removal-in-future.rst:29 +msgid ":c:func:`PyUnicode_READY`: Unneeded since Python 3.12" msgstr ":c:func:`PyUnicode_READY`:自 Python 3.12 起不再需要" -#: ../../deprecations/c-api-pending-removal-in-future.rst:19 -msgid ":c:func:`!PyErr_Display`: use :c:func:`PyErr_DisplayException` instead." +#: ../../deprecations/c-api-pending-removal-in-future.rst:31 +msgid ":c:func:`!PyErr_Display`: Use :c:func:`PyErr_DisplayException` instead." msgstr ":c:func:`!PyErr_Display`:請改用 :c:func:`PyErr_DisplayException`。" -#: ../../deprecations/c-api-pending-removal-in-future.rst:20 +#: ../../deprecations/c-api-pending-removal-in-future.rst:33 msgid "" -":c:func:`!_PyErr_ChainExceptions`: use ``_PyErr_ChainExceptions1`` instead." +":c:func:`!_PyErr_ChainExceptions`: Use :c:func:`!_PyErr_ChainExceptions1` " +"instead." msgstr "" ":c:func:`!_PyErr_ChainExceptions`:請改用 ``_PyErr_ChainExceptions1``。" -#: ../../deprecations/c-api-pending-removal-in-future.rst:21 +#: ../../deprecations/c-api-pending-removal-in-future.rst:35 msgid "" ":c:member:`!PyBytesObject.ob_shash` member: call :c:func:`PyObject_Hash` " "instead." @@ -1194,172 +1270,40 @@ msgstr "" ":c:member:`!PyBytesObject.ob_shash` 成員:請改為呼叫 :c:func:" "`PyObject_Hash`。" -#: ../../deprecations/c-api-pending-removal-in-future.rst:23 +#: ../../deprecations/c-api-pending-removal-in-future.rst:37 msgid ":c:member:`!PyDictObject.ma_version_tag` member." msgstr ":c:member:`!PyDictObject.ma_version_tag` 成員。" -#: ../../deprecations/c-api-pending-removal-in-future.rst:24 +#: ../../deprecations/c-api-pending-removal-in-future.rst:38 msgid "Thread Local Storage (TLS) API:" msgstr "執行緒局部儲存 (Thread Local Storage, TLS) API:" -#: ../../deprecations/c-api-pending-removal-in-future.rst:26 +#: ../../deprecations/c-api-pending-removal-in-future.rst:40 msgid "" -":c:func:`PyThread_create_key`: use :c:func:`PyThread_tss_alloc` instead." +":c:func:`PyThread_create_key`: Use :c:func:`PyThread_tss_alloc` instead." msgstr ":c:func:`PyThread_create_key`:請改用 :c:func:`PyThread_tss_alloc`。" -#: ../../deprecations/c-api-pending-removal-in-future.rst:27 -msgid ":c:func:`PyThread_delete_key`: use :c:func:`PyThread_tss_free` instead." +#: ../../deprecations/c-api-pending-removal-in-future.rst:42 +msgid ":c:func:`PyThread_delete_key`: Use :c:func:`PyThread_tss_free` instead." msgstr ":c:func:`PyThread_delete_key`:請改用 :c:func:`PyThread_tss_free`。" -#: ../../deprecations/c-api-pending-removal-in-future.rst:28 +#: ../../deprecations/c-api-pending-removal-in-future.rst:44 msgid "" -":c:func:`PyThread_set_key_value`: use :c:func:`PyThread_tss_set` instead." +":c:func:`PyThread_set_key_value`: Use :c:func:`PyThread_tss_set` instead." msgstr ":c:func:`PyThread_set_key_value`:請改用 :c:func:`PyThread_tss_set`。" -#: ../../deprecations/c-api-pending-removal-in-future.rst:29 +#: ../../deprecations/c-api-pending-removal-in-future.rst:46 msgid "" -":c:func:`PyThread_get_key_value`: use :c:func:`PyThread_tss_get` instead." +":c:func:`PyThread_get_key_value`: Use :c:func:`PyThread_tss_get` instead." msgstr ":c:func:`PyThread_get_key_value`:請改用 :c:func:`PyThread_tss_get`。" -#: ../../deprecations/c-api-pending-removal-in-future.rst:30 +#: ../../deprecations/c-api-pending-removal-in-future.rst:48 msgid "" -":c:func:`PyThread_delete_key_value`: use :c:func:`PyThread_tss_delete` " +":c:func:`PyThread_delete_key_value`: Use :c:func:`PyThread_tss_delete` " "instead." msgstr "" ":c:func:`PyThread_delete_key_value`:請改用 :c:func:`PyThread_tss_delete`。" -#: ../../deprecations/c-api-pending-removal-in-future.rst:31 -msgid ":c:func:`PyThread_ReInitTLS`: unneeded since Python 3.7." +#: ../../deprecations/c-api-pending-removal-in-future.rst:50 +msgid ":c:func:`PyThread_ReInitTLS`: Unneeded since Python 3.7." msgstr ":c:func:`PyThread_ReInitTLS`:自 Python 3.7 起不再需要。" - -#~ msgid "Pending Removal in Python 3.13" -#~ msgstr "Python 3.13 中待移除的項目" - -#~ msgid "Modules (see :pep:`594`):" -#~ msgstr "模組(請見 :pep:`594`):" - -#~ msgid ":mod:`aifc`" -#~ msgstr ":mod:`aifc`" - -#~ msgid ":mod:`audioop`" -#~ msgstr ":mod:`audioop`" - -#~ msgid ":mod:`cgi`" -#~ msgstr ":mod:`cgi`" - -#~ msgid ":mod:`cgitb`" -#~ msgstr ":mod:`cgitb`" - -#~ msgid ":mod:`chunk`" -#~ msgstr ":mod:`chunk`" - -#~ msgid ":mod:`crypt`" -#~ msgstr ":mod:`crypt`" - -#~ msgid ":mod:`imghdr`" -#~ msgstr ":mod:`imghdr`" - -#~ msgid ":mod:`mailcap`" -#~ msgstr ":mod:`mailcap`" - -#~ msgid ":mod:`msilib`" -#~ msgstr ":mod:`msilib`" - -#~ msgid ":mod:`nis`" -#~ msgstr ":mod:`nis`" - -#~ msgid ":mod:`nntplib`" -#~ msgstr ":mod:`nntplib`" - -#~ msgid ":mod:`ossaudiodev`" -#~ msgstr ":mod:`ossaudiodev`" - -#~ msgid ":mod:`pipes`" -#~ msgstr ":mod:`pipes`" - -#~ msgid ":mod:`sndhdr`" -#~ msgstr ":mod:`sndhdr`" - -#~ msgid ":mod:`spwd`" -#~ msgstr ":mod:`spwd`" - -#~ msgid ":mod:`sunau`" -#~ msgstr ":mod:`sunau`" - -#~ msgid ":mod:`telnetlib`" -#~ msgstr ":mod:`telnetlib`" - -#~ msgid ":mod:`uu`" -#~ msgstr ":mod:`uu`" - -#~ msgid ":mod:`xdrlib`" -#~ msgstr ":mod:`xdrlib`" - -#~ msgid "Other modules:" -#~ msgstr "其他模組:" - -#~ msgid ":mod:`!lib2to3`, and the :program:`2to3` program (:gh:`84540`)" -#~ msgstr ":mod:`!lib2to3` 和 :program:`2to3` 程式 (:gh:`84540`)" - -#~ msgid "APIs:" -#~ msgstr "API:" - -#~ msgid ":class:`!configparser.LegacyInterpolation` (:gh:`90765`)" -#~ msgstr ":class:`!configparser.LegacyInterpolation` (:gh:`90765`)" - -#~ msgid "``locale.resetlocale()`` (:gh:`90817`)" -#~ msgstr "``locale.resetlocale()`` (:gh:`90817`)" - -#~ msgid ":meth:`!turtle.RawTurtle.settiltangle` (:gh:`50096`)" -#~ msgstr ":meth:`!turtle.RawTurtle.settiltangle` (:gh:`50096`)" - -#~ msgid ":func:`!unittest.findTestCases` (:gh:`50096`)" -#~ msgstr ":func:`!unittest.findTestCases` (:gh:`50096`)" - -#~ msgid ":func:`!unittest.getTestCaseNames` (:gh:`50096`)" -#~ msgstr ":func:`!unittest.getTestCaseNames` (:gh:`50096`)" - -#~ msgid ":func:`!unittest.makeSuite` (:gh:`50096`)" -#~ msgstr ":func:`!unittest.makeSuite` (:gh:`50096`)" - -#~ msgid ":meth:`!unittest.TestProgram.usageExit` (:gh:`67048`)" -#~ msgstr ":meth:`!unittest.TestProgram.usageExit` (:gh:`67048`)" - -#~ msgid ":class:`!webbrowser.MacOSX` (:gh:`86421`)" -#~ msgstr ":class:`!webbrowser.MacOSX` (:gh:`86421`)" - -#~ msgid ":class:`classmethod` descriptor chaining (:gh:`89519`)" -#~ msgstr ":class:`classmethod` 描述器鏈接 (:gh:`89519`)" - -#~ msgid ":mod:`importlib.resources` deprecated methods:" -#~ msgstr ":mod:`importlib.resources` 的已棄用方法:" - -#~ msgid "``contents()``" -#~ msgstr "``contents()``" - -#~ msgid "``is_resource()``" -#~ msgstr "``is_resource()``" - -#~ msgid "``open_binary()``" -#~ msgstr "``open_binary()``" - -#~ msgid "``open_text()``" -#~ msgstr "``open_text()``" - -#~ msgid "``path()``" -#~ msgstr "``path()``" - -#~ msgid "``read_binary()``" -#~ msgstr "``read_binary()``" - -#~ msgid "``read_text()``" -#~ msgstr "``read_text()``" - -#~ msgid "" -#~ "Use :func:`importlib.resources.files` instead. Refer to `importlib-" -#~ "resources: Migrating from Legacy `_ (:gh:`106531`)" -#~ msgstr "" -#~ "請改用 :func:`importlib.resources.files`。請參閱 `importlib-resources: " -#~ "Migrating from Legacy `_ (:gh:`106531`)" diff --git a/deprecations/pending-removal-in-3.15.po b/deprecations/pending-removal-in-3.15.po index b2019d1972..b8663476ab 100644 --- a/deprecations/pending-removal-in-3.15.po +++ b/deprecations/pending-removal-in-3.15.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-23 07:52+0800\n" +"POT-Creation-Date: 2024-09-24 07:20+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -21,115 +21,130 @@ msgid "Pending Removal in Python 3.15" msgstr "Python 3.15 中待移除的項目" #: ../../deprecations/pending-removal-in-3.15.rst:4 +msgid ":mod:`ctypes`:" +msgstr ":mod:`ctypes`:" + +#: ../../deprecations/pending-removal-in-3.15.rst:6 msgid "" -":class:`http.server.CGIHTTPRequestHandler` will be removed along with its " -"related ``--cgi`` flag to ``python -m http.server``. It was obsolete and " -"rarely used. No direct replacement exists. *Anything* is better than CGI " -"to interface a web server with a request handler." +"The undocumented :func:`!ctypes.SetPointerType` function has been deprecated " +"since Python 3.13." msgstr "" -":class:`http.server.CGIHTTPRequestHandler` 將會被移除,連同其相關的 ``--" -"cgi`` 旗標到 ``python -m http.server``。它已經過時且很少被使用。沒有直接的替" -"代方案。*任何東西*\\ 都比 CGI 更好的來介接一個帶有請求處理器的網頁伺服器。" +"自 Python 3.13 起,未記錄的 :func:`!ctypes.SetPointerType` 函式已被棄用。" #: ../../deprecations/pending-removal-in-3.15.rst:9 +msgid ":mod:`http.server`:" +msgstr ":mod:`http.server`:" + +#: ../../deprecations/pending-removal-in-3.15.rst:11 msgid "" -":class:`locale`: :func:`locale.getdefaultlocale` was deprecated in Python " -"3.11 and originally planned for removal in Python 3.13 (:gh:`90817`), but " -"removal has been postponed to Python 3.15. Use :func:`locale.setlocale`, :" -"func:`locale.getencoding` and :func:`locale.getlocale` instead. (Contributed " -"by Hugo van Kemenade in :gh:`111187`.)" +"The obsolete and rarely used :class:`~http.server.CGIHTTPRequestHandler` has " +"been deprecated since Python 3.13. No direct replacement exists. *Anything* " +"is better than CGI to interface a web server with a request handler." msgstr "" -":class:`locale`::func:`locale.getdefaultlocale` 已在 Python 3.11 中被棄用," -"原本計劃在 Python 3.13 中移除 (:gh:`90817`),但被延後至 Python 3.15。請改用 :" -"func:`locale.setlocale`、:func:`locale.getencoding` 和 :func:`locale." -"getlocale`。 (由 Hugo van Kemenade 於 :gh:`111187` 貢獻。)" +"過時且很少使用的 :class:`~http.server.CGIHTTPRequestHandler` 自 Python 3.13 " +"起已被棄用。不存在直接的替代。*任何東西*\\ 都比 CGI 更好地將 Web 伺服器與請求" +"處理程序介接起來。" -#: ../../deprecations/pending-removal-in-3.15.rst:16 +#: ../../deprecations/pending-removal-in-3.15.rst:17 msgid "" -":mod:`pathlib`: :meth:`pathlib.PurePath.is_reserved` is deprecated and " -"scheduled for removal in Python 3.15. Use :func:`os.path.isreserved` to " -"detect reserved paths on Windows." +"The :option:`!--cgi` flag to the :program:`python -m http.server` command-" +"line interface has been deprecated since Python 3.13." msgstr "" -":mod:`pathlib`::meth:`pathlib.PurePath.is_reserved` 已被棄用並計劃在 Python " -"3.15 中移除。請用 :func:`os.path.isreserved` 來偵測 Windows 上的保留路徑。" +"自 Python 3.13 起,:program:`python -m http.server` 命令列介面的 :option:`!--" +"cgi` 旗標已被棄用。" -#: ../../deprecations/pending-removal-in-3.15.rst:21 +#: ../../deprecations/pending-removal-in-3.15.rst:20 +msgid ":class:`locale`:" +msgstr ":class:`locale`:" + +#: ../../deprecations/pending-removal-in-3.15.rst:22 msgid "" -":mod:`platform`: :func:`~platform.java_ver` is deprecated and will be " -"removed in 3.15. It was largely untested, had a confusing API, and was only " -"useful for Jython support. (Contributed by Nikita Sobolev in :gh:`116349`.)" +"The :func:`~locale.getdefaultlocale` function has been deprecated since " +"Python 3.11. Its removal was originally planned for Python 3.13 (:gh:" +"`90817`), but has been postponed to Python 3.15. Use :func:`~locale." +"getlocale`, :func:`~locale.setlocale`, and :func:`~locale.getencoding` " +"instead. (Contributed by Hugo van Kemenade in :gh:`111187`.)" msgstr "" -":mod:`platform`::func:`~platform.java_ver` 已被棄用並將在 3.15 中移除。它幾" -"乎沒有被測試過,API 令人困惑並且只對 Jython 支援有用。 (由 Nikita Sobolev " -"於 :gh:`116349` 貢獻。)" +":func:`~locale.getdefaultlocale` 已在 Python 3.11 中被棄用,原本計劃在 " +"Python 3.13 中移除 (:gh:`90817`),但被延後至 Python 3.15。請改用 :func:" +"`~locale.getlocale`、:func:`~locale.setlocale` 和 :func:`~locale." +"getencoding`。 (由 Hugo van Kemenade 於 :gh:`111187` 貢獻。)" + +#: ../../deprecations/pending-removal-in-3.15.rst:30 +msgid ":mod:`pathlib`:" +msgstr ":mod:`pathlib`:" -#: ../../deprecations/pending-removal-in-3.15.rst:27 +#: ../../deprecations/pending-removal-in-3.15.rst:32 msgid "" -":mod:`threading`: Passing any arguments to :func:`threading.RLock` is now " -"deprecated. C version allows any numbers of args and kwargs, but they are " -"just ignored. Python version does not allow any arguments. All arguments " -"will be removed from :func:`threading.RLock` in Python 3.15. (Contributed by " -"Nikita Sobolev in :gh:`102029`.)" +":meth:`.PurePath.is_reserved` has been deprecated since Python 3.13. Use :" +"func:`os.path.isreserved` to detect reserved paths on Windows." msgstr "" -":mod:`threading`:對 :func:`threading.RLock` 傳遞任何引數現在已被棄用。C 版本" -"允許任意數量的引數和關鍵字引數,但它們會被忽略。Python 版本不允許任何引數。所" -"有引數將在 Python 3.15 中從 :func:`threading.RLock` 中移除。 (由 Nikita " -"Sobolev 於 :gh:`102029` 貢獻。)" - -#: ../../deprecations/pending-removal-in-3.15.rst:34 -msgid ":class:`typing.NamedTuple`:" -msgstr ":class:`typing.NamedTuple`:" +":meth:`.PurePath.is_reserved` 已自 Python 3.13 被棄用。請用 :func:`os.path." +"isreserved` 來偵測 Windows 上的保留路徑。" #: ../../deprecations/pending-removal-in-3.15.rst:36 +msgid ":mod:`platform`:" +msgstr ":mod:`platform`:" + +#: ../../deprecations/pending-removal-in-3.15.rst:38 msgid "" -"The undocumented keyword argument syntax for creating :class:`!NamedTuple` " -"classes (``NT = NamedTuple(\"NT\", x=int)``) is deprecated, and will be " -"disallowed in 3.15. Use the class-based syntax or the functional syntax " -"instead." +":func:`~platform.java_ver` has been deprecated since Python 3.13. This " +"function is only useful for Jython support, has a confusing API, and is " +"largely untested." msgstr "" -"用於建立 :class:`!NamedTuple` 類別的未以文件記錄之關鍵字引數語法 (``NT = " -"NamedTuple(\"NT\", x=int)``) 已棄用,並將在 3.15 中被禁止。請改用基於類別的語" -"法或函式語法 (functional syntax)。" +"自 Python 3.13 起,:func:`~platform.java_ver` 已被棄用。此函式僅對 Jython 支" +"援有用,具有令人困惑的 API,基本上未經測試。" + +#: ../../deprecations/pending-removal-in-3.15.rst:42 +msgid ":mod:`threading`:" +msgstr ":mod:`threading`:" -#: ../../deprecations/pending-removal-in-3.15.rst:40 +#: ../../deprecations/pending-removal-in-3.15.rst:44 msgid "" -"When using the functional syntax to create a :class:`!NamedTuple` class, " -"failing to pass a value to the *fields* parameter (``NT = " -"NamedTuple(\"NT\")``) is deprecated. Passing ``None`` to the *fields* " -"parameter (``NT = NamedTuple(\"NT\", None)``) is also deprecated. Both will " -"be disallowed in Python 3.15. To create a :class:`!NamedTuple` class with 0 " -"fields, use ``class NT(NamedTuple): pass`` or ``NT = NamedTuple(\"NT\", " -"[])``." +":func:`~threading.RLock` will take no arguments in Python 3.15. Passing any " +"arguments has been deprecated since Python 3.14, as the Python version does " +"not permit any arguments, but the C version allows any number of positional " +"or keyword arguments, ignoring every argument." msgstr "" -"當使用函式語法來建立 :class:`!NamedTuple` 類別時,沒將值傳遞給 *fields* 參數" -"的方式 (``NT = NamedTuple(\"NT\")``) 已被棄用,將 ``None`` 傳遞給 *fields* 參" -"數(``NT = NamedTuple(\"NT\", None)``)也已被棄用。這兩者將在 Python 3.15 中" -"會被禁止。要建立一個沒有欄位的 :class:`!NamedTuple` 類別,請使用 ``class " -"NT(NamedTuple): pass`` 或 ``NT = NamedTuple(\"NT\", [])``。" +":func:`~threading.RLock` 在 Python 3.15 中將不接受任何引數。自 Python 3.14 " +"起,傳遞任何引數的用法已被棄用,因為 Python 版本不允許任何引數,但 C 版本允許" +"任意數量的位置或關鍵字引數,並忽略每個引數。" -#: ../../deprecations/pending-removal-in-3.15.rst:47 +#: ../../deprecations/pending-removal-in-3.15.rst:50 +msgid ":mod:`typing`:" +msgstr ":mod:`typing`:" + +#: ../../deprecations/pending-removal-in-3.15.rst:52 +msgid "" +"The undocumented keyword argument syntax for creating :class:`~typing." +"NamedTuple` classes (e.g. ``Point = NamedTuple(\"Point\", x=int, y=int)``) " +"has been deprecated since Python 3.13. Use the class-based syntax or the " +"functional syntax instead." +msgstr "" +"用於建立 :class:`~typing.NamedTuple` 類別的未以文件記錄之關鍵字引數語法 " +"(``Point = NamedTuple(\"Point\", x=int, y=int)``) 已自 Python 3.13 棄用。請改" +"用基於類別的語法或函式語法 (functional syntax)。" + +#: ../../deprecations/pending-removal-in-3.15.rst:58 msgid "" -":class:`typing.TypedDict`: When using the functional syntax to create a :" -"class:`!TypedDict` class, failing to pass a value to the *fields* parameter " -"(``TD = TypedDict(\"TD\")``) is deprecated. Passing ``None`` to the *fields* " -"parameter (``TD = TypedDict(\"TD\", None)``) is also deprecated. Both will " -"be disallowed in Python 3.15. To create a :class:`!TypedDict` class with 0 " -"fields, use ``class TD(TypedDict): pass`` or ``TD = TypedDict(\"TD\", {})``." +"The :func:`typing.no_type_check_decorator` decorator function has been " +"deprecated since Python 3.13. After eight years in the :mod:`typing` module, " +"it has yet to be supported by any major type checker." msgstr "" -":class:`typing.TypedDict`:當使用函式語法來建立 :class:`!TypedDict` 類別時," -"沒將值傳遞給 *fields* 參數的方式(``TD = TypedDict(\"TD\")``)已被棄用,將 " -"``None`` 傳遞給 *fields* 參數(``TD = TypedDict(\"TD\", None)``)也已被棄用。" -"這兩者將在 Python 3.15 中會被禁止。要建立一個沒有欄位的 :class:`!TypedDict` " -"類別,請使用 ``class TD(TypedDict): pass`` 或 ``TD = TypedDict(\"TD\", " -"{})``。" - -#: ../../deprecations/pending-removal-in-3.15.rst:54 +"自 Python 3.13 起,:func:`typing.no_type_check_decorator` 裝飾器函式已被棄" +"用。在 :mod:`typing` 模組中使用了八年之後,它尚未得到任何主要型別檢查器的支" +"援。" + +#: ../../deprecations/pending-removal-in-3.15.rst:63 +msgid ":mod:`wave`:" +msgstr ":mod:`wave`:" + +#: ../../deprecations/pending-removal-in-3.15.rst:65 msgid "" -":mod:`wave`: Deprecate the ``getmark()``, ``setmark()`` and ``getmarkers()`` " -"methods of the :class:`wave.Wave_read` and :class:`wave.Wave_write` classes. " -"They will be removed in Python 3.15. (Contributed by Victor Stinner in :gh:" -"`105096`.)" +"The :meth:`~wave.Wave_read.getmark`, :meth:`!setmark`, and :meth:`~wave." +"Wave_read.getmarkers` methods of the :class:`~wave.Wave_read` and :class:" +"`~wave.Wave_write` classes have been deprecated since Python 3.13." msgstr "" -":mod:`wave`:已棄用 :class:`wave.Wave_read` 和 :class:`wave.Wave_write` 類別" -"的 ``getmark()``、``setmark()`` 和 ``getmarkers()`` 方法。它們將在 Python " -"3.15 中被移除。 (由 Victor Stinner 於 :gh:`105096` 貢獻。)" +"已棄用 :class:`~wave.Wave_read` 和 :class:`~wave.Wave_write` 類別的 :meth:" +"`~wave.Wave_read.getmark`、:meth:`!setmark` 和 :meth:`~wave.Wave_read." +"getmarkers` 方法自 Python 3.13 被棄用。" diff --git a/deprecations/pending-removal-in-3.16.po b/deprecations/pending-removal-in-3.16.po index 184a9c07c8..80e023abb0 100644 --- a/deprecations/pending-removal-in-3.16.po +++ b/deprecations/pending-removal-in-3.16.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-08-26 00:03+0000\n" +"POT-Creation-Date: 2024-09-24 07:20+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -20,21 +20,82 @@ msgid "Pending Removal in Python 3.16" msgstr "Python 3.16 中待移除的項目" #: ../../deprecations/pending-removal-in-3.16.rst:4 +msgid ":mod:`builtins`:" +msgstr ":mod:`builtins`:" + +#: ../../deprecations/pending-removal-in-3.16.rst:6 +msgid "" +"Bitwise inversion on boolean types, ``~True`` or ``~False`` has been " +"deprecated since Python 3.12, as it produces surprising and unintuitive " +"results (``-2`` and ``-1``). Use ``not x`` instead for the logical negation " +"of a Boolean. In the rare case that you need the bitwise inversion of the " +"underlying integer, convert to ``int`` explicitly (``~int(x)``)." +msgstr "" +"自 Python 3.12 起,布林型別的位元反轉 ``~True`` 或 ``~False`` 已被棄用,因為" +"它會產生不預期且不直觀的結果(``-2`` 和 ``-1``)。使用 ``not x`` 代替布林值的" +"邏輯否定。在極少數情況下,你需要對底層的整數進行位元反轉,請明確轉換為 " +"``~int(x)`` (``~int(x)``)。" + +#: ../../deprecations/pending-removal-in-3.16.rst:13 +msgid ":mod:`array`:" +msgstr ":mod:`array`:" + +#: ../../deprecations/pending-removal-in-3.16.rst:15 +msgid "" +"The ``'u'`` format code (:c:type:`wchar_t`) has been deprecated in " +"documentation since Python 3.3 and at runtime since Python 3.13. Use the " +"``'w'`` format code (:c:type:`Py_UCS4`) for Unicode characters instead." +msgstr "" +"自 Python 3.3 起,``'u'`` 格式碼 (:c:type:`wchar_t`) 在文件中已被棄用,自 " +"Python 3.13 起在 runtime 已被棄用。請使用 ``'w'`` 格式碼 (:c:type:`Py_UCS4`) " +"來取代 Unicode 字元。" + +#: ../../deprecations/pending-removal-in-3.16.rst:21 +msgid ":mod:`shutil`:" +msgstr ":mod:`shutil`:" + +#: ../../deprecations/pending-removal-in-3.16.rst:23 +msgid "" +"The :class:`!ExecError` exception has been deprecated since Python 3.14. It " +"has not been used by any function in :mod:`!shutil` since Python 3.4, and is " +"now an alias of :exc:`RuntimeError`." +msgstr "" +"自 Python 3.14 起,:class:`!ExecError` 例外已被棄用。自 Python 3.4 以來,它尚" +"未被 :mod:`!shutil` 中的任何函式使用,現在是 :exc:`RuntimeError` 的別名。" + +#: ../../deprecations/pending-removal-in-3.16.rst:28 +msgid ":mod:`symtable`:" +msgstr ":mod:`symtable`:" + +#: ../../deprecations/pending-removal-in-3.16.rst:30 +msgid "" +"The :meth:`Class.get_methods ` method has been " +"deprecated since Python 3.14." +msgstr "" +"自 Python 3.14 起,:meth:`Class.get_methods ` 方" +"法已被棄用。" + +#: ../../deprecations/pending-removal-in-3.16.rst:33 +msgid ":mod:`sys`:" +msgstr ":mod:`sys`:" + +#: ../../deprecations/pending-removal-in-3.16.rst:35 msgid "" -":mod:`array`: :class:`array.array` ``'u'`` type (:c:type:`wchar_t`): use the " -"``'w'`` type instead (``Py_UCS4``)." +"The :func:`~sys._enablelegacywindowsfsencoding` function has been deprecated " +"since Python 3.13. Use the :envvar:`PYTHONLEGACYWINDOWSFSENCODING` " +"environment variable instead." msgstr "" -":mod:`array`::class:`array.array` ``'u'`` 型別 (:c:type:`wchar_t`):請改用 " -"``'w'`` 型別 (``Py_UCS4``)。" +"自 Python 3.13 起,:func:`~sys._enablelegacywindowsfsencoding` 函式已被棄用。" +"請改用 :envvar:`PYTHONLEGACYWINDOWSFSENCODING` 環境變數。" -#: ../../deprecations/pending-removal-in-3.16.rst:8 -msgid ":mod:`builtins`: ``~bool``, bitwise inversion on bool." -msgstr ":mod:`builtins`:``~bool``,對 bool 進行位元反轉。" +#: ../../deprecations/pending-removal-in-3.16.rst:39 +msgid ":mod:`tarfile`:" +msgstr ":mod:`tarfile`:" -#: ../../deprecations/pending-removal-in-3.16.rst:11 +#: ../../deprecations/pending-removal-in-3.16.rst:41 msgid "" -":mod:`symtable`: Deprecate :meth:`symtable.Class.get_methods` due to the " -"lack of interest. (Contributed by Bénédikt Tran in :gh:`119698`.)" +"The undocumented and unused :attr:`!TarFile.tarfile` attribute has been " +"deprecated since Python 3.13." msgstr "" -":mod:`symtable`:由於並沒有太多關注,已棄用 :meth:`symtable.Class." -"get_methods`。 (由 Bénédikt Tran 於 :gh:`119698` 貢獻。)" +"自 Python 3.13 起,未以文件記錄和未被使用的 :attr:`!TarFile.tarfile` 屬性已被" +"棄用。" diff --git a/faq/design.po b/faq/design.po index 0b92963fe7..543508819a 100644 --- a/faq/design.po +++ b/faq/design.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-23 07:52+0800\n" +"POT-Creation-Date: 2024-09-24 07:20+0000\n" "PO-Revision-Date: 2023-08-31 11:34+0800\n" "Last-Translator: Steven Hsu \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -647,11 +647,10 @@ msgid "Can Python be compiled to machine code, C or some other language?" msgstr "Python 可以被編譯成機器語言、C 語言或其他種語言嗎?" #: ../../faq/design.rst:330 -#, fuzzy msgid "" "`Cython `_ compiles a modified version of Python with " -"optional annotations into C extensions. `Nuitka `_ " -"is an up-and-coming compiler of Python into C++ code, aiming to support the " +"optional annotations into C extensions. `Nuitka `_ is " +"an up-and-coming compiler of Python into C++ code, aiming to support the " "full Python language." msgstr "" "`Cython `_ 可以編譯一個調整過有選擇性註解的 Python 版" @@ -679,13 +678,12 @@ msgstr "" "函式。" #: ../../faq/design.rst:347 -#, fuzzy msgid "" "Other implementations (such as `Jython `_ or `PyPy " -"`_), however, can rely on a different mechanism such " -"as a full-blown garbage collector. This difference can cause some subtle " -"porting problems if your Python code depends on the behavior of the " -"reference counting implementation." +"`_), however, can rely on a different mechanism such as a " +"full-blown garbage collector. This difference can cause some subtle porting " +"problems if your Python code depends on the behavior of the reference " +"counting implementation." msgstr "" "然而,在其他實作(像是 `Jython `_ 或 `PyPy `_)中,會使用像是成熟的垃圾收集器等不同機制。如果你的 Python 程式碼" diff --git a/faq/extending.po b/faq/extending.po index f55f34caaf..ab0b8990b6 100644 --- a/faq/extending.po +++ b/faq/extending.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-03 11:11+0800\n" +"POT-Creation-Date: 2024-09-24 07:20+0000\n" "PO-Revision-Date: 2023-02-18 13:08+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -467,26 +467,25 @@ msgstr "" #: ../../faq/extending.rst:249 #, fuzzy msgid "" -"Most packaged versions of Python don't include the :file:`/usr/lib/python2." -"{x}/config/` directory, which contains various files required for compiling " +"Most packaged versions of Python omit some files required for compiling " "Python extensions." msgstr "" "大多數打包版本的 Python 不包含 :file:`/usr/lib/python2.{x}/config/` 目錄,該" "目錄包含編譯 Python 擴充所需的各種檔案。" -#: ../../faq/extending.rst:253 -msgid "For Red Hat, install the python-devel RPM to get the necessary files." -msgstr "在 Red Hat 上,請安裝 python-devel RPM 來取得必要的檔案。" +#: ../../faq/extending.rst:252 +msgid "For Red Hat, install the python3-devel RPM to get the necessary files." +msgstr "在 Red Hat 上,請安裝 python3-devel RPM 來取得必要的檔案。" -#: ../../faq/extending.rst:255 -msgid "For Debian, run ``apt-get install python-dev``." -msgstr "對於 Debian,運行 ``apt-get install python-dev``。" +#: ../../faq/extending.rst:254 +msgid "For Debian, run ``apt-get install python3-dev``." +msgstr "對於 Debian,運行 ``apt-get install python3-dev``。" -#: ../../faq/extending.rst:258 +#: ../../faq/extending.rst:257 msgid "How do I tell \"incomplete input\" from \"invalid input\"?" msgstr "如何從「無效輸入」區分出「不完整輸入」?" -#: ../../faq/extending.rst:260 +#: ../../faq/extending.rst:259 #, fuzzy msgid "" "Sometimes you want to emulate the Python interactive interpreter's behavior, " @@ -499,7 +498,7 @@ msgstr "" "(例如,你鍵入了 \"if\" 陳述句的開頭或者你沒有關閉你的括號或三重字串引號)," "但是當輸入無效時,它會立即為你提供語法錯誤消息。" -#: ../../faq/extending.rst:266 +#: ../../faq/extending.rst:265 msgid "" "In Python you can use the :mod:`codeop` module, which approximates the " "parser's behavior sufficiently. IDLE uses this, for example." @@ -507,7 +506,7 @@ msgstr "" "在 Python 中,你可以使用 :mod:`codeop` 模組,它充分模擬了剖析器 (parser) 的行" "為。像是 IDLE 就有使用它。" -#: ../../faq/extending.rst:269 +#: ../../faq/extending.rst:268 #, fuzzy msgid "" "The easiest way to do it in C is to call :c:func:`PyRun_InteractiveLoop` " @@ -521,11 +520,11 @@ msgstr "" "`PyOS_ReadlineFunctionPointer` 設定為指向你的自定義輸入函式。有關更多提示,請" "參閱``Modules/readline.c`` 和``Parser/myreadline.c``。" -#: ../../faq/extending.rst:276 +#: ../../faq/extending.rst:275 msgid "How do I find undefined g++ symbols __builtin_new or __pure_virtual?" msgstr "如何找到未定義的 g++ 符號 __builtin_new 或 __pure_virtual?" -#: ../../faq/extending.rst:278 +#: ../../faq/extending.rst:277 #, fuzzy msgid "" "To dynamically load g++ extension modules, you must recompile Python, relink " @@ -536,7 +535,7 @@ msgstr "" "Python 模組 Makefile 中的 LINKCC),並使用 g++ 鏈接你的擴充模組(例如,``g++ " "-shared -o mymodule.so mymodule.o` `)。" -#: ../../faq/extending.rst:284 +#: ../../faq/extending.rst:283 #, fuzzy msgid "" "Can I create an object class with some methods implemented in C and others " @@ -545,7 +544,7 @@ msgstr "" "我可以用一些用 C 實作的方法和用 Python 實作的其他方法(例如通過繼承)建立一個" "物件類別嗎?" -#: ../../faq/extending.rst:286 +#: ../../faq/extending.rst:285 msgid "" "Yes, you can inherit from built-in classes such as :class:`int`, :class:" "`list`, :class:`dict`, etc." @@ -553,7 +552,7 @@ msgstr "" "是的,你可以繼承內建類別,例如 :class:`int`、:class:`list`、:class:`dict` " "等。" -#: ../../faq/extending.rst:289 +#: ../../faq/extending.rst:288 msgid "" "The Boost Python Library (BPL, https://www.boost.org/libs/python/doc/index." "html) provides a way of doing this from C++ (i.e. you can inherit from an " diff --git a/faq/general.po b/faq/general.po index 95f7688655..ac24b2276b 100644 --- a/faq/general.po +++ b/faq/general.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-23 07:52+0800\n" +"POT-Creation-Date: 2024-09-24 07:20+0000\n" "PO-Revision-Date: 2023-06-23 16:56+0800\n" "Last-Translator: Matt Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -614,10 +614,9 @@ msgstr "" #, fuzzy msgid "" "The latest stable releases can always be found on the `Python download page " -"`_. There are two production-ready " -"versions of Python: 2.x and 3.x. The recommended version is 3.x, which is " -"supported by most widely used libraries. Although 2.x is still widely used, " -"`it is not maintained anymore `_." +"`_. Python 3.x is the recommended version " +"and supported by most widely used libraries. Python 2.x :pep:`is not " +"maintained anymore <373>`." msgstr "" "最新的穩定發布版本隨時都可以在 `Python 下載頁面 `_\\ 上找到。Python 有兩個生產就緒 (production-ready) 的版本:2.x " diff --git a/faq/gui.po b/faq/gui.po index 784f3360fb..96851969b6 100644 --- a/faq/gui.po +++ b/faq/gui.po @@ -1,4 +1,3 @@ -# SOME DESCRIPTIVE TITLE. # Copyright (C) 2001-2022, Python Software Foundation # This file is distributed under the same license as the Python package. # @@ -139,22 +138,3 @@ msgstr "" "最常見的原因是,繫結到的小工具並沒有「鍵盤焦點 (keyboard focus)」。請查看 Tk " "說明文件中關於焦點命令的敘述。通常,點擊一個小工具,會讓它得到鍵盤焦點(但不" "適用於標籤;請參閱 takefocus 選項)。" - -#~ msgid "" -#~ "To get truly stand-alone applications, the Tcl scripts that form the " -#~ "library have to be integrated into the application as well. One tool " -#~ "supporting that is SAM (stand-alone modules), which is part of the Tix " -#~ "distribution (https://tix.sourceforge.net/)." -#~ msgstr "" -#~ "要得到真正獨立的應用程式,必須將構成函式庫的 Tcl 腳本也整合到應用程式中。" -#~ "一個可支援該方法的工具是 SAM(stand-alone modules,獨立模組),它是 Tix 發" -#~ "行版的一部分 (https://tix.sourceforge.net/)。" - -#~ msgid "" -#~ "Build Tix with SAM enabled, perform the appropriate call to :c:func:`!" -#~ "Tclsam_init`, etc. inside Python's :file:`Modules/tkappinit.c`, and link " -#~ "with libtclsam and libtksam (you might include the Tix libraries as well)." -#~ msgstr "" -#~ "請在 SAM 被啟用的情況下建置 Tix,對 Python 的 :file:`Modules/tkappinit.c` " -#~ "中的 :c:func:`!Tclsam_init` 等函式執行適當的呼叫,並與 libtclsam 和 " -#~ "libtksam 連結(你可能也會 include Tix 函式庫)。" diff --git a/glossary.po b/glossary.po index 076f333c7b..0f5ee13d86 100644 --- a/glossary.po +++ b/glossary.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-23 07:52+0800\n" +"POT-Creation-Date: 2024-09-24 07:20+0000\n" "PO-Revision-Date: 2023-07-02 22:47+0800\n" "Last-Translator: Matt Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -2540,16 +2540,16 @@ msgid "" "built-in sequence types are :class:`list`, :class:`str`, :class:`tuple`, " "and :class:`bytes`. Note that :class:`dict` also supports :meth:`~object." "__getitem__` and :meth:`!__len__`, but is considered a mapping rather than a " -"sequence because the lookups use arbitrary :term:`immutable` keys rather " -"than integers." +"sequence because the lookups use arbitrary :term:`hashable` keys rather than " +"integers." msgstr "" "一個 :term:`iterable`\\ (可疊代物件),它透過 :meth:`~object.__getitem__` " "special method(特殊方法),使用整數索引來支援高效率的元素存取,並定義了一" "個 :meth:`~object.__len__` method 來回傳該序列的長度。一些內建序列型別包括 :" "class:`list`、:class:`str`、:class:`tuple` 和 :class:`bytes`。請注意,雖然 :" "class:`dict` 也支援 :meth:`~object.__getitem__` 和 :meth:`!__len__`,但它被視" -"為對映 (mapping) 而不是序列,因為其查找方式是使用任意的 :term:`immutable` " -"鍵,而不是整數。" +"為對映 (mapping) 而不是序列,因為其查找方式是使用任意的 :term:`hashable` 鍵," +"而不是整數。" #: ../../glossary.rst:1126 msgid "" diff --git a/howto/argparse.po b/howto/argparse.po index c8731127a1..aeb863ddff 100644 --- a/howto/argparse.po +++ b/howto/argparse.po @@ -12,7 +12,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-03 11:11+0800\n" +"POT-Creation-Date: 2024-09-24 07:20+0000\n" "PO-Revision-Date: 2023-12-11 17:33+0800\n" "Last-Translator: Matt Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -871,7 +871,7 @@ msgid "" "\n" "options:\n" " -h, --help show this help message and exit\n" -" -v {0,1,2}, --verbosity {0,1,2}\n" +" -v, --verbosity {0,1,2}\n" " increase output verbosity" msgstr "" "$ python prog.py 4 -v 3\n" @@ -886,7 +886,7 @@ msgstr "" "\n" "options:\n" " -h, --help show this help message and exit\n" -" -v {0,1,2}, --verbosity {0,1,2}\n" +" -v, --verbosity {0,1,2}\n" " increase output verbosity" #: ../../howto/argparse.rst:450 diff --git a/howto/descriptor.po b/howto/descriptor.po index 6cc6a29c8f..80a905a7cd 100644 --- a/howto/descriptor.po +++ b/howto/descriptor.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-23 07:52+0800\n" +"POT-Creation-Date: 2024-09-24 07:20+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-" @@ -583,8 +583,9 @@ msgid "" "\n" " def validate(self, value):\n" " if value not in self.options:\n" -" raise ValueError(f'Expected {value!r} to be one of {self.options!" -"r}')\n" +" raise ValueError(\n" +" f'Expected {value!r} to be one of {self.options!r}'\n" +" )\n" "\n" "class Number(Validator):\n" "\n" @@ -629,15 +630,15 @@ msgid "" " )" msgstr "" -#: ../../howto/descriptor.rst:437 +#: ../../howto/descriptor.rst:439 msgid "Practical application" msgstr "" -#: ../../howto/descriptor.rst:439 +#: ../../howto/descriptor.rst:441 msgid "Here's how the data validators can be used in a real class:" msgstr "" -#: ../../howto/descriptor.rst:441 +#: ../../howto/descriptor.rst:443 msgid "" "class Component:\n" "\n" @@ -651,11 +652,11 @@ msgid "" " self.quantity = quantity" msgstr "" -#: ../../howto/descriptor.rst:454 +#: ../../howto/descriptor.rst:456 msgid "The descriptors prevent invalid instances from being created:" msgstr "" -#: ../../howto/descriptor.rst:456 +#: ../../howto/descriptor.rst:458 msgid "" ">>> Component('Widget', 'metal', 5) # Blocked: 'Widget' is not all " "uppercase\n" @@ -673,6 +674,7 @@ msgid "" "Traceback (most recent call last):\n" " ...\n" "ValueError: Expected -5 to be at least 0\n" +"\n" ">>> Component('WIDGET', 'metal', 'V') # Blocked: 'V' isn't a number\n" "Traceback (most recent call last):\n" " ...\n" @@ -681,37 +683,37 @@ msgid "" ">>> c = Component('WIDGET', 'metal', 5) # Allowed: The inputs are valid" msgstr "" -#: ../../howto/descriptor.rst:481 +#: ../../howto/descriptor.rst:484 msgid "Technical Tutorial" msgstr "" -#: ../../howto/descriptor.rst:483 +#: ../../howto/descriptor.rst:486 msgid "" "What follows is a more technical tutorial for the mechanics and details of " "how descriptors work." msgstr "" -#: ../../howto/descriptor.rst:488 +#: ../../howto/descriptor.rst:491 msgid "Abstract" msgstr "摘要" -#: ../../howto/descriptor.rst:490 +#: ../../howto/descriptor.rst:493 msgid "" "Defines descriptors, summarizes the protocol, and shows how descriptors are " "called. Provides an example showing how object relational mappings work." msgstr "" -#: ../../howto/descriptor.rst:493 +#: ../../howto/descriptor.rst:496 msgid "" "Learning about descriptors not only provides access to a larger toolset, it " "creates a deeper understanding of how Python works." msgstr "" -#: ../../howto/descriptor.rst:498 +#: ../../howto/descriptor.rst:501 msgid "Definition and introduction" msgstr "" -#: ../../howto/descriptor.rst:500 +#: ../../howto/descriptor.rst:503 msgid "" "In general, a descriptor is an attribute value that has one of the methods " "in the descriptor protocol. Those methods are :meth:`__get__`, :meth:" @@ -719,7 +721,7 @@ msgid "" "an attribute, it is said to be a :term:`descriptor`." msgstr "" -#: ../../howto/descriptor.rst:505 +#: ../../howto/descriptor.rst:508 msgid "" "The default behavior for attribute access is to get, set, or delete the " "attribute from an object's dictionary. For instance, ``a.x`` has a lookup " @@ -731,7 +733,7 @@ msgid "" "methods were defined." msgstr "" -#: ../../howto/descriptor.rst:514 +#: ../../howto/descriptor.rst:517 msgid "" "Descriptors are a powerful, general purpose protocol. They are the " "mechanism behind properties, methods, static methods, class methods, and :" @@ -740,30 +742,30 @@ msgid "" "Python programs." msgstr "" -#: ../../howto/descriptor.rst:522 +#: ../../howto/descriptor.rst:525 msgid "Descriptor protocol" msgstr "描述器協定" -#: ../../howto/descriptor.rst:524 +#: ../../howto/descriptor.rst:527 msgid "``descr.__get__(self, obj, type=None)``" msgstr "``descr.__get__(self, obj, type=None)``" -#: ../../howto/descriptor.rst:526 +#: ../../howto/descriptor.rst:529 msgid "``descr.__set__(self, obj, value)``" msgstr "``descr.__set__(self, obj, value)``" -#: ../../howto/descriptor.rst:528 +#: ../../howto/descriptor.rst:531 msgid "``descr.__delete__(self, obj)``" msgstr "``descr.__delete__(self, obj)``" -#: ../../howto/descriptor.rst:530 +#: ../../howto/descriptor.rst:533 msgid "" "That is all there is to it. Define any of these methods and an object is " "considered a descriptor and can override default behavior upon being looked " "up as an attribute." msgstr "" -#: ../../howto/descriptor.rst:534 +#: ../../howto/descriptor.rst:537 msgid "" "If an object defines :meth:`__set__` or :meth:`__delete__`, it is considered " "a data descriptor. Descriptors that only define :meth:`__get__` are called " @@ -771,7 +773,7 @@ msgid "" "possible)." msgstr "" -#: ../../howto/descriptor.rst:539 +#: ../../howto/descriptor.rst:542 msgid "" "Data and non-data descriptors differ in how overrides are calculated with " "respect to entries in an instance's dictionary. If an instance's dictionary " @@ -780,7 +782,7 @@ msgid "" "name as a non-data descriptor, the dictionary entry takes precedence." msgstr "" -#: ../../howto/descriptor.rst:545 +#: ../../howto/descriptor.rst:548 msgid "" "To make a read-only data descriptor, define both :meth:`__get__` and :meth:" "`__set__` with the :meth:`__set__` raising an :exc:`AttributeError` when " @@ -788,23 +790,23 @@ msgid "" "placeholder is enough to make it a data descriptor." msgstr "" -#: ../../howto/descriptor.rst:552 +#: ../../howto/descriptor.rst:555 msgid "Overview of descriptor invocation" msgstr "" -#: ../../howto/descriptor.rst:554 +#: ../../howto/descriptor.rst:557 msgid "" "A descriptor can be called directly with ``desc.__get__(obj)`` or ``desc." "__get__(None, cls)``." msgstr "" -#: ../../howto/descriptor.rst:557 +#: ../../howto/descriptor.rst:560 msgid "" "But it is more common for a descriptor to be invoked automatically from " "attribute access." msgstr "" -#: ../../howto/descriptor.rst:560 +#: ../../howto/descriptor.rst:563 msgid "" "The expression ``obj.x`` looks up the attribute ``x`` in the chain of " "namespaces for ``obj``. If the search finds a descriptor outside of the " @@ -812,17 +814,17 @@ msgid "" "the precedence rules listed below." msgstr "" -#: ../../howto/descriptor.rst:565 +#: ../../howto/descriptor.rst:568 msgid "" "The details of invocation depend on whether ``obj`` is an object, class, or " "instance of super." msgstr "" -#: ../../howto/descriptor.rst:570 +#: ../../howto/descriptor.rst:573 msgid "Invocation from an instance" msgstr "" -#: ../../howto/descriptor.rst:572 +#: ../../howto/descriptor.rst:575 msgid "" "Instance lookup scans through a chain of namespaces giving data descriptors " "the highest priority, followed by instance variables, then non-data " @@ -830,19 +832,19 @@ msgid "" "provided." msgstr "" -#: ../../howto/descriptor.rst:577 +#: ../../howto/descriptor.rst:580 msgid "" "If a descriptor is found for ``a.x``, then it is invoked with: ``desc." "__get__(a, type(a))``." msgstr "" -#: ../../howto/descriptor.rst:580 +#: ../../howto/descriptor.rst:583 msgid "" "The logic for a dotted lookup is in :meth:`object.__getattribute__`. Here " "is a pure Python equivalent:" msgstr "" -#: ../../howto/descriptor.rst:583 +#: ../../howto/descriptor.rst:586 msgid "" "def find_name_in_mro(cls, name, default):\n" " \"Emulate _PyType_Lookup() in Objects/typeobject.c\"\n" @@ -871,14 +873,14 @@ msgid "" " raise AttributeError(name)" msgstr "" -#: ../../howto/descriptor.rst:719 +#: ../../howto/descriptor.rst:722 msgid "" "Note, there is no :meth:`__getattr__` hook in the :meth:`__getattribute__` " "code. That is why calling :meth:`__getattribute__` directly or with " "``super().__getattribute__`` will bypass :meth:`__getattr__` entirely." msgstr "" -#: ../../howto/descriptor.rst:723 +#: ../../howto/descriptor.rst:726 msgid "" "Instead, it is the dot operator and the :func:`getattr` function that are " "responsible for invoking :meth:`__getattr__` whenever :meth:" @@ -886,7 +888,7 @@ msgid "" "encapsulated in a helper function:" msgstr "" -#: ../../howto/descriptor.rst:728 +#: ../../howto/descriptor.rst:731 msgid "" "def getattr_hook(obj, name):\n" " \"Emulate slot_tp_getattr_hook() in Objects/typeobject.c\"\n" @@ -906,11 +908,11 @@ msgstr "" " raise\n" " return type(obj).__getattr__(obj, name) # __getattr__" -#: ../../howto/descriptor.rst:773 +#: ../../howto/descriptor.rst:776 msgid "Invocation from a class" msgstr "" -#: ../../howto/descriptor.rst:775 +#: ../../howto/descriptor.rst:778 msgid "" "The logic for a dotted lookup such as ``A.x`` is in :meth:`type." "__getattribute__`. The steps are similar to those for :meth:`object." @@ -918,27 +920,27 @@ msgid "" "through the class's :term:`method resolution order`." msgstr "" -#: ../../howto/descriptor.rst:780 +#: ../../howto/descriptor.rst:783 msgid "If a descriptor is found, it is invoked with ``desc.__get__(None, A)``." msgstr "" -#: ../../howto/descriptor.rst:782 +#: ../../howto/descriptor.rst:785 msgid "" "The full C implementation can be found in :c:func:`!type_getattro` and :c:" "func:`!_PyType_Lookup` in :source:`Objects/typeobject.c`." msgstr "" -#: ../../howto/descriptor.rst:787 +#: ../../howto/descriptor.rst:790 msgid "Invocation from super" msgstr "" -#: ../../howto/descriptor.rst:789 +#: ../../howto/descriptor.rst:792 msgid "" "The logic for super's dotted lookup is in the :meth:`__getattribute__` " "method for object returned by :func:`super`." msgstr "" -#: ../../howto/descriptor.rst:792 +#: ../../howto/descriptor.rst:795 msgid "" "A dotted lookup such as ``super(A, obj).m`` searches ``obj.__class__." "__mro__`` for the base class ``B`` immediately following ``A`` and then " @@ -946,7 +948,7 @@ msgid "" "returned unchanged." msgstr "" -#: ../../howto/descriptor.rst:797 +#: ../../howto/descriptor.rst:800 msgid "" "The full C implementation can be found in :c:func:`!super_getattro` in :" "source:`Objects/typeobject.c`. A pure Python equivalent can be found in " @@ -954,37 +956,37 @@ msgid "" "#cooperation>`_." msgstr "" -#: ../../howto/descriptor.rst:804 +#: ../../howto/descriptor.rst:807 msgid "Summary of invocation logic" msgstr "" -#: ../../howto/descriptor.rst:806 +#: ../../howto/descriptor.rst:809 msgid "" "The mechanism for descriptors is embedded in the :meth:`__getattribute__` " "methods for :class:`object`, :class:`type`, and :func:`super`." msgstr "" -#: ../../howto/descriptor.rst:809 +#: ../../howto/descriptor.rst:812 msgid "The important points to remember are:" msgstr "要記住的重點是:" -#: ../../howto/descriptor.rst:811 +#: ../../howto/descriptor.rst:814 msgid "Descriptors are invoked by the :meth:`__getattribute__` method." msgstr "" -#: ../../howto/descriptor.rst:813 +#: ../../howto/descriptor.rst:816 msgid "" "Classes inherit this machinery from :class:`object`, :class:`type`, or :func:" "`super`." msgstr "" -#: ../../howto/descriptor.rst:816 +#: ../../howto/descriptor.rst:819 msgid "" "Overriding :meth:`__getattribute__` prevents automatic descriptor calls " "because all the descriptor logic is in that method." msgstr "" -#: ../../howto/descriptor.rst:819 +#: ../../howto/descriptor.rst:822 msgid "" ":meth:`object.__getattribute__` and :meth:`type.__getattribute__` make " "different calls to :meth:`__get__`. The first includes the instance and may " @@ -992,19 +994,19 @@ msgid "" "includes the class." msgstr "" -#: ../../howto/descriptor.rst:824 +#: ../../howto/descriptor.rst:827 msgid "Data descriptors always override instance dictionaries." msgstr "" -#: ../../howto/descriptor.rst:826 +#: ../../howto/descriptor.rst:829 msgid "Non-data descriptors may be overridden by instance dictionaries." msgstr "" -#: ../../howto/descriptor.rst:830 +#: ../../howto/descriptor.rst:833 msgid "Automatic name notification" msgstr "" -#: ../../howto/descriptor.rst:832 +#: ../../howto/descriptor.rst:835 msgid "" "Sometimes it is desirable for a descriptor to know what class variable name " "it was assigned to. When a new class is created, the :class:`type` " @@ -1014,38 +1016,38 @@ msgid "" "and the *name* is the class variable the descriptor was assigned to." msgstr "" -#: ../../howto/descriptor.rst:839 +#: ../../howto/descriptor.rst:842 msgid "" "The implementation details are in :c:func:`!type_new` and :c:func:`!" "set_names` in :source:`Objects/typeobject.c`." msgstr "" -#: ../../howto/descriptor.rst:842 +#: ../../howto/descriptor.rst:845 msgid "" "Since the update logic is in :meth:`type.__new__`, notifications only take " "place at the time of class creation. If descriptors are added to the class " "afterwards, :meth:`__set_name__` will need to be called manually." msgstr "" -#: ../../howto/descriptor.rst:848 +#: ../../howto/descriptor.rst:851 msgid "ORM example" msgstr "ORM 範例" -#: ../../howto/descriptor.rst:850 +#: ../../howto/descriptor.rst:853 msgid "" "The following code is a simplified skeleton showing how data descriptors " "could be used to implement an `object relational mapping `_." msgstr "" -#: ../../howto/descriptor.rst:854 +#: ../../howto/descriptor.rst:857 msgid "" "The essential idea is that the data is stored in an external database. The " "Python instances only hold keys to the database's tables. Descriptors take " "care of lookups or updates:" msgstr "" -#: ../../howto/descriptor.rst:858 +#: ../../howto/descriptor.rst:861 msgid "" "class Field:\n" "\n" @@ -1077,14 +1079,14 @@ msgstr "" " conn.execute(self.store, [value, obj.key])\n" " conn.commit()" -#: ../../howto/descriptor.rst:873 +#: ../../howto/descriptor.rst:876 msgid "" "We can use the :class:`Field` class to define `models `_ that describe the schema for each table in a " "database:" msgstr "" -#: ../../howto/descriptor.rst:877 +#: ../../howto/descriptor.rst:880 msgid "" "class Movie:\n" " table = 'Movies' # Table name\n" @@ -1106,11 +1108,11 @@ msgid "" " self.key = key" msgstr "" -#: ../../howto/descriptor.rst:898 +#: ../../howto/descriptor.rst:901 msgid "To use the models, first connect to the database::" msgstr "" -#: ../../howto/descriptor.rst:900 +#: ../../howto/descriptor.rst:903 msgid "" ">>> import sqlite3\n" ">>> conn = sqlite3.connect('entertainment.db')" @@ -1118,13 +1120,13 @@ msgstr "" ">>> import sqlite3\n" ">>> conn = sqlite3.connect('entertainment.db')" -#: ../../howto/descriptor.rst:903 +#: ../../howto/descriptor.rst:906 msgid "" "An interactive session shows how data is retrieved from the database and how " "it can be updated:" msgstr "" -#: ../../howto/descriptor.rst:931 +#: ../../howto/descriptor.rst:934 msgid "" ">>> Movie('Star Wars').director\n" "'George Lucas'\n" @@ -1152,11 +1154,11 @@ msgstr "" ">>> Movie('Star Wars').director\n" "'J.J. Abrams'" -#: ../../howto/descriptor.rst:952 +#: ../../howto/descriptor.rst:955 msgid "Pure Python Equivalents" msgstr "" -#: ../../howto/descriptor.rst:954 +#: ../../howto/descriptor.rst:957 msgid "" "The descriptor protocol is simple and offers exciting possibilities. " "Several use cases are so common that they have been prepackaged into built-" @@ -1164,27 +1166,27 @@ msgid "" "\\_\\_slots\\_\\_ are all based on the descriptor protocol." msgstr "" -#: ../../howto/descriptor.rst:961 +#: ../../howto/descriptor.rst:964 msgid "Properties" msgstr "" -#: ../../howto/descriptor.rst:963 +#: ../../howto/descriptor.rst:966 msgid "" "Calling :func:`property` is a succinct way of building a data descriptor " "that triggers a function call upon access to an attribute. Its signature " "is::" msgstr "" -#: ../../howto/descriptor.rst:966 +#: ../../howto/descriptor.rst:969 msgid "property(fget=None, fset=None, fdel=None, doc=None) -> property" msgstr "property(fget=None, fset=None, fdel=None, doc=None) -> property" -#: ../../howto/descriptor.rst:968 +#: ../../howto/descriptor.rst:971 msgid "" "The documentation shows a typical use to define a managed attribute ``x``:" msgstr "" -#: ../../howto/descriptor.rst:970 +#: ../../howto/descriptor.rst:973 msgid "" "class C:\n" " def getx(self): return self.__x\n" @@ -1198,14 +1200,14 @@ msgstr "" " def delx(self): del self.__x\n" " x = property(getx, setx, delx, \"I'm the 'x' property.\")" -#: ../../howto/descriptor.rst:992 +#: ../../howto/descriptor.rst:995 msgid "" "To see how :func:`property` is implemented in terms of the descriptor " "protocol, here is a pure Python equivalent that implements most of the core " "functionality:" msgstr "" -#: ../../howto/descriptor.rst:995 +#: ../../howto/descriptor.rst:998 msgid "" "class Property:\n" " \"Emulate PyProperty_Type() in Objects/descrobject.c\"\n" @@ -1217,7 +1219,6 @@ msgid "" " if doc is None and fget is not None:\n" " doc = fget.__doc__\n" " self.__doc__ = doc\n" -" self.__name__ = ''\n" "\n" " def __set_name__(self, owner, name):\n" " self.__name__ = name\n" @@ -1249,14 +1250,14 @@ msgid "" " return type(self)(self.fget, self.fset, fdel, self.__doc__)" msgstr "" -#: ../../howto/descriptor.rst:1120 +#: ../../howto/descriptor.rst:1122 msgid "" "The :func:`property` builtin helps whenever a user interface has granted " "attribute access and then subsequent changes require the intervention of a " "method." msgstr "" -#: ../../howto/descriptor.rst:1124 +#: ../../howto/descriptor.rst:1126 msgid "" "For instance, a spreadsheet class may grant access to a cell value through " "``Cell('b10').value``. Subsequent improvements to the program require the " @@ -1266,7 +1267,7 @@ msgid "" "descriptor:" msgstr "" -#: ../../howto/descriptor.rst:1130 +#: ../../howto/descriptor.rst:1132 msgid "" "class Cell:\n" " ...\n" @@ -1278,23 +1279,23 @@ msgid "" " return self._value" msgstr "" -#: ../../howto/descriptor.rst:1141 +#: ../../howto/descriptor.rst:1143 msgid "" "Either the built-in :func:`property` or our :func:`Property` equivalent " "would work in this example." msgstr "" -#: ../../howto/descriptor.rst:1146 +#: ../../howto/descriptor.rst:1148 msgid "Functions and methods" msgstr "" -#: ../../howto/descriptor.rst:1148 +#: ../../howto/descriptor.rst:1150 msgid "" "Python's object oriented features are built upon a function based " "environment. Using non-data descriptors, the two are merged seamlessly." msgstr "" -#: ../../howto/descriptor.rst:1151 +#: ../../howto/descriptor.rst:1153 msgid "" "Functions stored in class dictionaries get turned into methods when invoked. " "Methods only differ from regular functions in that the object instance is " @@ -1302,13 +1303,13 @@ msgid "" "*self* but could be called *this* or any other variable name." msgstr "" -#: ../../howto/descriptor.rst:1156 +#: ../../howto/descriptor.rst:1158 msgid "" "Methods can be created manually with :class:`types.MethodType` which is " "roughly equivalent to:" msgstr "" -#: ../../howto/descriptor.rst:1159 +#: ../../howto/descriptor.rst:1161 msgid "" "class MethodType:\n" " \"Emulate PyMethod_Type in Objects/classobject.c\"\n" @@ -1337,7 +1338,7 @@ msgid "" " return self" msgstr "" -#: ../../howto/descriptor.rst:1187 +#: ../../howto/descriptor.rst:1189 msgid "" "To support automatic creation of methods, functions include the :meth:" "`__get__` method for binding methods during attribute access. This means " @@ -1345,7 +1346,7 @@ msgid "" "dotted lookup from an instance. Here's how it works:" msgstr "" -#: ../../howto/descriptor.rst:1192 +#: ../../howto/descriptor.rst:1194 msgid "" "class Function:\n" " ...\n" @@ -1357,14 +1358,13 @@ msgid "" " return MethodType(self, obj)" msgstr "" -#: ../../howto/descriptor.rst:1203 +#: ../../howto/descriptor.rst:1205 msgid "" "Running the following class in the interpreter shows how the function " "descriptor works in practice:" msgstr "" -#: ../../howto/descriptor.rst:1206 -#, fuzzy +#: ../../howto/descriptor.rst:1208 msgid "" "class D:\n" " def f(self):\n" @@ -1374,15 +1374,18 @@ msgid "" " pass" msgstr "" "class D:\n" -" def f(self, x):\n" -" return x" +" def f(self):\n" +" return self\n" +"\n" +"class D2:\n" +" pass" -#: ../../howto/descriptor.rst:1224 +#: ../../howto/descriptor.rst:1226 msgid "" "The function has a :term:`qualified name` attribute to support introspection:" msgstr "" -#: ../../howto/descriptor.rst:1226 +#: ../../howto/descriptor.rst:1228 msgid "" ">>> D.f.__qualname__\n" "'D.f'" @@ -1390,13 +1393,13 @@ msgstr "" ">>> D.f.__qualname__\n" "'D.f'" -#: ../../howto/descriptor.rst:1231 +#: ../../howto/descriptor.rst:1233 msgid "" "Accessing the function through the class dictionary does not invoke :meth:" "`__get__`. Instead, it just returns the underlying function object::" msgstr "" -#: ../../howto/descriptor.rst:1234 +#: ../../howto/descriptor.rst:1236 msgid "" ">>> D.__dict__['f']\n" "" @@ -1404,13 +1407,13 @@ msgstr "" ">>> D.__dict__['f']\n" "" -#: ../../howto/descriptor.rst:1237 +#: ../../howto/descriptor.rst:1239 msgid "" "Dotted access from a class calls :meth:`__get__` which just returns the " "underlying function unchanged::" msgstr "" -#: ../../howto/descriptor.rst:1240 +#: ../../howto/descriptor.rst:1242 msgid "" ">>> D.f\n" "" @@ -1418,13 +1421,13 @@ msgstr "" ">>> D.f\n" "" -#: ../../howto/descriptor.rst:1243 +#: ../../howto/descriptor.rst:1245 msgid "" "The interesting behavior occurs during dotted access from an instance. The " "dotted lookup calls :meth:`__get__` which returns a bound method object::" msgstr "" -#: ../../howto/descriptor.rst:1246 +#: ../../howto/descriptor.rst:1248 msgid "" ">>> d = D()\n" ">>> d.f\n" @@ -1434,13 +1437,13 @@ msgstr "" ">>> d.f\n" ">" -#: ../../howto/descriptor.rst:1250 +#: ../../howto/descriptor.rst:1252 msgid "" "Internally, the bound method stores the underlying function and the bound " "instance::" msgstr "" -#: ../../howto/descriptor.rst:1253 +#: ../../howto/descriptor.rst:1255 msgid "" ">>> d.f.__func__\n" "\n" @@ -1454,23 +1457,23 @@ msgstr "" ">>> d.f.__self__\n" "<__main__.D object at 0x00B18C90>" -#: ../../howto/descriptor.rst:1259 +#: ../../howto/descriptor.rst:1261 msgid "" "If you have ever wondered where *self* comes from in regular methods or " "where *cls* comes from in class methods, this is it!" msgstr "" -#: ../../howto/descriptor.rst:1264 +#: ../../howto/descriptor.rst:1266 msgid "Kinds of methods" msgstr "" -#: ../../howto/descriptor.rst:1266 +#: ../../howto/descriptor.rst:1268 msgid "" "Non-data descriptors provide a simple mechanism for variations on the usual " "patterns of binding functions into methods." msgstr "" -#: ../../howto/descriptor.rst:1269 +#: ../../howto/descriptor.rst:1271 msgid "" "To recap, functions have a :meth:`__get__` method so that they can be " "converted to a method when accessed as attributes. The non-data descriptor " @@ -1478,55 +1481,55 @@ msgid "" "f(*args)`` becomes ``f(*args)``." msgstr "" -#: ../../howto/descriptor.rst:1274 +#: ../../howto/descriptor.rst:1276 msgid "This chart summarizes the binding and its two most useful variants:" msgstr "" -#: ../../howto/descriptor.rst:1277 +#: ../../howto/descriptor.rst:1279 msgid "Transformation" msgstr "" -#: ../../howto/descriptor.rst:1277 +#: ../../howto/descriptor.rst:1279 msgid "Called from an object" msgstr "" -#: ../../howto/descriptor.rst:1277 +#: ../../howto/descriptor.rst:1279 msgid "Called from a class" msgstr "" -#: ../../howto/descriptor.rst:1280 +#: ../../howto/descriptor.rst:1282 msgid "function" msgstr "函式" -#: ../../howto/descriptor.rst:1280 +#: ../../howto/descriptor.rst:1282 msgid "f(obj, \\*args)" msgstr "f(obj, \\*args)" -#: ../../howto/descriptor.rst:1280 ../../howto/descriptor.rst:1282 +#: ../../howto/descriptor.rst:1282 ../../howto/descriptor.rst:1284 msgid "f(\\*args)" msgstr "f(\\*args)" -#: ../../howto/descriptor.rst:1282 +#: ../../howto/descriptor.rst:1284 msgid "staticmethod" msgstr "staticmethod" -#: ../../howto/descriptor.rst:1284 +#: ../../howto/descriptor.rst:1286 msgid "classmethod" msgstr "classmethod" -#: ../../howto/descriptor.rst:1284 +#: ../../howto/descriptor.rst:1286 msgid "f(type(obj), \\*args)" msgstr "f(type(obj), \\*args)" -#: ../../howto/descriptor.rst:1284 +#: ../../howto/descriptor.rst:1286 msgid "f(cls, \\*args)" msgstr "f(cls, \\*args)" -#: ../../howto/descriptor.rst:1289 +#: ../../howto/descriptor.rst:1291 msgid "Static methods" msgstr "" -#: ../../howto/descriptor.rst:1291 +#: ../../howto/descriptor.rst:1293 msgid "" "Static methods return the underlying function without changes. Calling " "either ``c.f`` or ``C.f`` is the equivalent of a direct lookup into ``object." @@ -1535,13 +1538,13 @@ msgid "" "a class." msgstr "" -#: ../../howto/descriptor.rst:1297 +#: ../../howto/descriptor.rst:1299 msgid "" "Good candidates for static methods are methods that do not reference the " "``self`` variable." msgstr "" -#: ../../howto/descriptor.rst:1300 +#: ../../howto/descriptor.rst:1302 msgid "" "For instance, a statistics package may include a container class for " "experimental data. The class provides normal methods for computing the " @@ -1550,16 +1553,16 @@ msgid "" "but do not depend on the data. For instance, ``erf(x)`` is handy conversion " "routine that comes up in statistical work but does not directly depend on a " "particular dataset. It can be called either from an object or the class: " -"``s.erf(1.5) --> .9332`` or ``Sample.erf(1.5) --> .9332``." +"``s.erf(1.5) --> 0.9332`` or ``Sample.erf(1.5) --> 0.9332``." msgstr "" -#: ../../howto/descriptor.rst:1309 +#: ../../howto/descriptor.rst:1311 msgid "" "Since static methods return the underlying function with no changes, the " "example calls are unexciting:" msgstr "" -#: ../../howto/descriptor.rst:1312 +#: ../../howto/descriptor.rst:1314 msgid "" "class E:\n" " @staticmethod\n" @@ -1571,7 +1574,7 @@ msgstr "" " def f(x):\n" " return x * 10" -#: ../../howto/descriptor.rst:1319 +#: ../../howto/descriptor.rst:1321 msgid "" ">>> E.f(3)\n" "30\n" @@ -1583,13 +1586,13 @@ msgstr "" ">>> E().f(3)\n" "30" -#: ../../howto/descriptor.rst:1326 +#: ../../howto/descriptor.rst:1328 msgid "" "Using the non-data descriptor protocol, a pure Python version of :func:" "`staticmethod` would look like this:" msgstr "" -#: ../../howto/descriptor.rst:1329 +#: ../../howto/descriptor.rst:1331 msgid "" "import functools\n" "\n" @@ -1607,7 +1610,7 @@ msgid "" " return self.f(*args, **kwds)" msgstr "" -#: ../../howto/descriptor.rst:1346 +#: ../../howto/descriptor.rst:1348 msgid "" "The :func:`functools.update_wrapper` call adds a ``__wrapped__`` attribute " "that refers to the underlying function. Also it carries forward the " @@ -1616,18 +1619,18 @@ msgid "" "__doc__`, and :attr:`~function.__annotations__`." msgstr "" -#: ../../howto/descriptor.rst:1415 +#: ../../howto/descriptor.rst:1417 msgid "Class methods" msgstr "" -#: ../../howto/descriptor.rst:1417 +#: ../../howto/descriptor.rst:1419 msgid "" "Unlike static methods, class methods prepend the class reference to the " "argument list before calling the function. This format is the same for " "whether the caller is an object or a class:" msgstr "" -#: ../../howto/descriptor.rst:1421 +#: ../../howto/descriptor.rst:1423 msgid "" "class F:\n" " @classmethod\n" @@ -1639,7 +1642,7 @@ msgstr "" " def f(cls, x):\n" " return cls.__name__, x" -#: ../../howto/descriptor.rst:1428 +#: ../../howto/descriptor.rst:1430 msgid "" ">>> F.f(3)\n" "('F', 3)\n" @@ -1651,7 +1654,7 @@ msgstr "" ">>> F().f(3)\n" "('F', 3)" -#: ../../howto/descriptor.rst:1435 +#: ../../howto/descriptor.rst:1437 msgid "" "This behavior is useful whenever the method only needs to have a class " "reference and does not rely on data stored in a specific instance. One use " @@ -1660,7 +1663,7 @@ msgid "" "of keys. The pure Python equivalent is:" msgstr "" -#: ../../howto/descriptor.rst:1441 +#: ../../howto/descriptor.rst:1443 msgid "" "class Dict(dict):\n" " @classmethod\n" @@ -1672,11 +1675,11 @@ msgid "" " return d" msgstr "" -#: ../../howto/descriptor.rst:1452 +#: ../../howto/descriptor.rst:1454 msgid "Now a new dictionary of unique keys can be constructed like this:" msgstr "" -#: ../../howto/descriptor.rst:1454 +#: ../../howto/descriptor.rst:1456 msgid "" ">>> d = Dict.fromkeys('abracadabra')\n" ">>> type(d) is Dict\n" @@ -1690,13 +1693,13 @@ msgstr "" ">>> d\n" "{'a': None, 'b': None, 'r': None, 'c': None, 'd': None}" -#: ../../howto/descriptor.rst:1462 +#: ../../howto/descriptor.rst:1464 msgid "" "Using the non-data descriptor protocol, a pure Python version of :func:" "`classmethod` would look like this:" msgstr "" -#: ../../howto/descriptor.rst:1465 +#: ../../howto/descriptor.rst:1467 msgid "" "import functools\n" "\n" @@ -1713,7 +1716,7 @@ msgid "" " return MethodType(self.f, cls)" msgstr "" -#: ../../howto/descriptor.rst:1527 +#: ../../howto/descriptor.rst:1529 msgid "" "The :func:`functools.update_wrapper` call in ``ClassMethod`` adds a " "``__wrapped__`` attribute that refers to the underlying function. Also it " @@ -1723,24 +1726,24 @@ msgid "" "__annotations__`." msgstr "" -#: ../../howto/descriptor.rst:1536 +#: ../../howto/descriptor.rst:1538 msgid "Member objects and __slots__" msgstr "" -#: ../../howto/descriptor.rst:1538 +#: ../../howto/descriptor.rst:1540 msgid "" "When a class defines ``__slots__``, it replaces instance dictionaries with a " "fixed-length array of slot values. From a user point of view that has " "several effects:" msgstr "" -#: ../../howto/descriptor.rst:1542 +#: ../../howto/descriptor.rst:1544 msgid "" "1. Provides immediate detection of bugs due to misspelled attribute " "assignments. Only attribute names specified in ``__slots__`` are allowed:" msgstr "" -#: ../../howto/descriptor.rst:1545 +#: ../../howto/descriptor.rst:1547 msgid "" "class Vehicle:\n" " __slots__ = ('id_number', 'make', 'model')" @@ -1748,7 +1751,7 @@ msgstr "" "class Vehicle:\n" " __slots__ = ('id_number', 'make', 'model')" -#: ../../howto/descriptor.rst:1550 +#: ../../howto/descriptor.rst:1552 msgid "" ">>> auto = Vehicle()\n" ">>> auto.id_nubmer = 'VYE483814LQEX'\n" @@ -1762,13 +1765,13 @@ msgstr "" " ...\n" "AttributeError: 'Vehicle' object has no attribute 'id_nubmer'" -#: ../../howto/descriptor.rst:1558 +#: ../../howto/descriptor.rst:1560 msgid "" "2. Helps create immutable objects where descriptors manage access to private " "attributes stored in ``__slots__``:" msgstr "" -#: ../../howto/descriptor.rst:1561 +#: ../../howto/descriptor.rst:1563 msgid "" "class Immutable:\n" "\n" @@ -1788,7 +1791,7 @@ msgid "" " return self._name" msgstr "" -#: ../../howto/descriptor.rst:1579 +#: ../../howto/descriptor.rst:1581 msgid "" ">>> mark = Immutable('Botany', 'Mark Watney')\n" ">>> mark.dept\n" @@ -1814,7 +1817,7 @@ msgstr "" " ...\n" "AttributeError: 'Immutable' object has no attribute 'location'" -#: ../../howto/descriptor.rst:1593 +#: ../../howto/descriptor.rst:1595 msgid "" "3. Saves memory. On a 64-bit Linux build, an instance with two attributes " "takes 48 bytes with ``__slots__`` and 152 bytes without. This `flyweight " @@ -1822,19 +1825,19 @@ msgid "" "only matters when a large number of instances are going to be created." msgstr "" -#: ../../howto/descriptor.rst:1598 +#: ../../howto/descriptor.rst:1600 msgid "" "4. Improves speed. Reading instance variables is 35% faster with " "``__slots__`` (as measured with Python 3.10 on an Apple M1 processor)." msgstr "" -#: ../../howto/descriptor.rst:1601 +#: ../../howto/descriptor.rst:1603 msgid "" "5. Blocks tools like :func:`functools.cached_property` which require an " "instance dictionary to function correctly:" msgstr "" -#: ../../howto/descriptor.rst:1604 +#: ../../howto/descriptor.rst:1606 msgid "" "from functools import cached_property\n" "\n" @@ -1847,7 +1850,7 @@ msgid "" " for n in reversed(range(100_000)))" msgstr "" -#: ../../howto/descriptor.rst:1616 +#: ../../howto/descriptor.rst:1618 msgid "" ">>> CP().pi\n" "Traceback (most recent call last):\n" @@ -1859,7 +1862,7 @@ msgstr "" " ...\n" "TypeError: No '__dict__' attribute on 'CP' instance to cache 'pi' property." -#: ../../howto/descriptor.rst:1623 +#: ../../howto/descriptor.rst:1625 msgid "" "It is not possible to create an exact drop-in pure Python version of " "``__slots__`` because it requires direct access to C structures and control " @@ -1869,7 +1872,7 @@ msgid "" "managed by member descriptors:" msgstr "" -#: ../../howto/descriptor.rst:1630 +#: ../../howto/descriptor.rst:1632 msgid "" "null = object()\n" "\n" @@ -1908,13 +1911,13 @@ msgid "" " return f''" msgstr "" -#: ../../howto/descriptor.rst:1668 +#: ../../howto/descriptor.rst:1670 msgid "" "The :meth:`type.__new__` method takes care of adding member objects to class " "variables:" msgstr "" -#: ../../howto/descriptor.rst:1671 +#: ../../howto/descriptor.rst:1673 msgid "" "class Type(type):\n" " 'Simulate how the type metaclass adds member objects for slots'\n" @@ -1928,14 +1931,14 @@ msgid "" " return type.__new__(mcls, clsname, bases, mapping, **kwargs)" msgstr "" -#: ../../howto/descriptor.rst:1684 +#: ../../howto/descriptor.rst:1686 msgid "" "The :meth:`object.__new__` method takes care of creating instances that have " "slots instead of an instance dictionary. Here is a rough simulation in pure " "Python:" msgstr "" -#: ../../howto/descriptor.rst:1688 +#: ../../howto/descriptor.rst:1690 msgid "" "class Object:\n" " 'Simulate how object.__new__() allocates memory for __slots__'\n" @@ -1967,13 +1970,13 @@ msgid "" " super().__delattr__(name)" msgstr "" -#: ../../howto/descriptor.rst:1719 +#: ../../howto/descriptor.rst:1721 msgid "" "To use the simulation in a real class, just inherit from :class:`Object` and " "set the :term:`metaclass` to :class:`Type`:" msgstr "" -#: ../../howto/descriptor.rst:1722 +#: ../../howto/descriptor.rst:1724 msgid "" "class H(Object, metaclass=Type):\n" " 'Instance variables stored in slots'\n" @@ -1985,12 +1988,12 @@ msgid "" " self.y = y" msgstr "" -#: ../../howto/descriptor.rst:1733 +#: ../../howto/descriptor.rst:1735 msgid "" "At this point, the metaclass has loaded member objects for *x* and *y*::" msgstr "" -#: ../../howto/descriptor.rst:1735 +#: ../../howto/descriptor.rst:1737 msgid "" ">>> from pprint import pp\n" ">>> pp(dict(vars(H)))\n" @@ -2010,13 +2013,13 @@ msgstr "" " 'x': ,\n" " 'y': }" -#: ../../howto/descriptor.rst:1754 +#: ../../howto/descriptor.rst:1756 msgid "" "When instances are created, they have a ``slot_values`` list where the " "attributes are stored:" msgstr "" -#: ../../howto/descriptor.rst:1757 +#: ../../howto/descriptor.rst:1759 msgid "" ">>> h = H(10, 20)\n" ">>> vars(h)\n" @@ -2032,11 +2035,11 @@ msgstr "" ">>> vars(h)\n" "{'_slotvalues': [55, 20]}" -#: ../../howto/descriptor.rst:1766 +#: ../../howto/descriptor.rst:1768 msgid "Misspelled or unassigned attributes will raise an exception:" msgstr "" -#: ../../howto/descriptor.rst:1768 +#: ../../howto/descriptor.rst:1770 msgid "" ">>> h.xz\n" "Traceback (most recent call last):\n" diff --git a/howto/free-threading-extensions.po b/howto/free-threading-extensions.po index 08d6aaa97a..988740ef1d 100644 --- a/howto/free-threading-extensions.po +++ b/howto/free-threading-extensions.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-23 07:52+0800\n" +"POT-Creation-Date: 2024-09-24 07:20+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -128,6 +128,23 @@ msgid "" " return m;\n" "}" msgstr "" +"static struct PyModuleDef moduledef = {\n" +" PyModuleDef_HEAD_INIT,\n" +" ...\n" +"};\n" +"\n" +"PyMODINIT_FUNC\n" +"PyInit_mymodule(void)\n" +"{\n" +" PyObject *m = PyModule_Create(&moduledef);\n" +" if (m == NULL) {\n" +" return NULL;\n" +" }\n" +"#ifdef Py_GIL_DISABLED\n" +" PyUnstable_Module_SetGIL(m, Py_MOD_GIL_NOT_USED);\n" +"#endif\n" +" return m;\n" +"}" #: ../../howto/free-threading-extensions.rst:93 msgid "General API Guidelines" @@ -172,7 +189,7 @@ msgstr "" #: ../../howto/free-threading-extensions.rst:120 msgid "``PyDict_Next``" -msgstr "" +msgstr "``PyDict_Next``" #: ../../howto/free-threading-extensions.rst:122 msgid "" @@ -221,44 +238,44 @@ msgstr "" #: ../../howto/free-threading-extensions.rst:152 msgid ":c:func:`PyList_GetItem`" -msgstr "" +msgstr ":c:func:`PyList_GetItem`" #: ../../howto/free-threading-extensions.rst:152 msgid ":c:func:`PyList_GetItemRef`" -msgstr "" +msgstr ":c:func:`PyList_GetItemRef`" #: ../../howto/free-threading-extensions.rst:154 msgid ":c:func:`PyDict_GetItem`" -msgstr "" +msgstr ":c:func:`PyDict_GetItem`" #: ../../howto/free-threading-extensions.rst:154 #: ../../howto/free-threading-extensions.rst:156 msgid ":c:func:`PyDict_GetItemRef`" -msgstr "" +msgstr ":c:func:`PyDict_GetItemRef`" #: ../../howto/free-threading-extensions.rst:156 msgid ":c:func:`PyDict_GetItemWithError`" -msgstr "" +msgstr ":c:func:`PyDict_GetItemWithError`" #: ../../howto/free-threading-extensions.rst:158 msgid ":c:func:`PyDict_GetItemString`" -msgstr "" +msgstr ":c:func:`PyDict_GetItemString`" #: ../../howto/free-threading-extensions.rst:158 msgid ":c:func:`PyDict_GetItemStringRef`" -msgstr "" +msgstr ":c:func:`PyDict_GetItemStringRef`" #: ../../howto/free-threading-extensions.rst:160 msgid ":c:func:`PyDict_SetDefault`" -msgstr "" +msgstr ":c:func:`PyDict_SetDefault`" #: ../../howto/free-threading-extensions.rst:160 msgid ":c:func:`PyDict_SetDefaultRef`" -msgstr "" +msgstr ":c:func:`PyDict_SetDefaultRef`" #: ../../howto/free-threading-extensions.rst:162 msgid ":c:func:`PyDict_Next`" -msgstr "" +msgstr ":c:func:`PyDict_Next`" #: ../../howto/free-threading-extensions.rst:162 msgid "none (see :ref:`PyDict_Next`)" @@ -266,24 +283,24 @@ msgstr "" #: ../../howto/free-threading-extensions.rst:164 msgid ":c:func:`PyWeakref_GetObject`" -msgstr "" +msgstr ":c:func:`PyWeakref_GetObject`" #: ../../howto/free-threading-extensions.rst:164 #: ../../howto/free-threading-extensions.rst:166 msgid ":c:func:`PyWeakref_GetRef`" -msgstr "" +msgstr ":c:func:`PyWeakref_GetRef`" #: ../../howto/free-threading-extensions.rst:166 msgid ":c:func:`PyWeakref_GET_OBJECT`" -msgstr "" +msgstr ":c:func:`PyWeakref_GET_OBJECT`" #: ../../howto/free-threading-extensions.rst:168 msgid ":c:func:`PyImport_AddModule`" -msgstr "" +msgstr ":c:func:`PyImport_AddModule`" #: ../../howto/free-threading-extensions.rst:168 msgid ":c:func:`PyImport_AddModuleRef`" -msgstr "" +msgstr ":c:func:`PyImport_AddModuleRef`" #: ../../howto/free-threading-extensions.rst:171 msgid "" @@ -303,11 +320,11 @@ msgid "" "to provide implementations of these functions for older Python versions." msgstr "" -#: ../../howto/free-threading-extensions.rst:185 +#: ../../howto/free-threading-extensions.rst:187 msgid "Memory Allocation APIs" msgstr "" -#: ../../howto/free-threading-extensions.rst:187 +#: ../../howto/free-threading-extensions.rst:189 msgid "" "Python's memory management C API provides functions in three different :ref:" "`allocation domains `: \"raw\", \"mem\", and \"object\". " @@ -317,36 +334,36 @@ msgid "" "where this was only a best practice and not a hard requirement." msgstr "" -#: ../../howto/free-threading-extensions.rst:196 +#: ../../howto/free-threading-extensions.rst:198 msgid "" "Search for uses of :c:func:`PyObject_Malloc` in your extension and check " "that the allocated memory is used for Python objects. Use :c:func:" "`PyMem_Malloc` to allocate buffers instead of :c:func:`PyObject_Malloc`." msgstr "" -#: ../../howto/free-threading-extensions.rst:203 +#: ../../howto/free-threading-extensions.rst:205 msgid "Thread State and GIL APIs" msgstr "" -#: ../../howto/free-threading-extensions.rst:205 +#: ../../howto/free-threading-extensions.rst:207 msgid "" "Python provides a set of functions and macros to manage thread state and the " "GIL, such as:" msgstr "" -#: ../../howto/free-threading-extensions.rst:208 +#: ../../howto/free-threading-extensions.rst:210 msgid ":c:func:`PyGILState_Ensure` and :c:func:`PyGILState_Release`" -msgstr "" +msgstr ":c:func:`PyGILState_Ensure` 和 :c:func:`PyGILState_Release`" -#: ../../howto/free-threading-extensions.rst:209 +#: ../../howto/free-threading-extensions.rst:211 msgid ":c:func:`PyEval_SaveThread` and :c:func:`PyEval_RestoreThread`" -msgstr "" +msgstr ":c:func:`PyEval_SaveThread` 和 :c:func:`PyEval_RestoreThread`" -#: ../../howto/free-threading-extensions.rst:210 +#: ../../howto/free-threading-extensions.rst:212 msgid ":c:macro:`Py_BEGIN_ALLOW_THREADS` and :c:macro:`Py_END_ALLOW_THREADS`" -msgstr "" +msgstr ":c:macro:`Py_BEGIN_ALLOW_THREADS` 和 :c:macro:`Py_END_ALLOW_THREADS`" -#: ../../howto/free-threading-extensions.rst:212 +#: ../../howto/free-threading-extensions.rst:214 msgid "" "These functions should still be used in the free-threaded build to manage " "thread state even when the :term:`GIL` is disabled. For example, if you " @@ -355,7 +372,7 @@ msgid "" "Python thread state." msgstr "" -#: ../../howto/free-threading-extensions.rst:218 +#: ../../howto/free-threading-extensions.rst:220 msgid "" "You should continue to call :c:func:`PyEval_SaveThread` or :c:macro:" "`Py_BEGIN_ALLOW_THREADS` around blocking operations, such as I/O or lock " @@ -363,25 +380,25 @@ msgid "" "collector `." msgstr "" -#: ../../howto/free-threading-extensions.rst:225 +#: ../../howto/free-threading-extensions.rst:227 msgid "Protecting Internal Extension State" msgstr "" -#: ../../howto/free-threading-extensions.rst:227 +#: ../../howto/free-threading-extensions.rst:229 msgid "" "Your extension may have internal state that was previously protected by the " "GIL. You may need to add locking to protect this state. The approach will " "depend on your extension, but some common patterns include:" msgstr "" -#: ../../howto/free-threading-extensions.rst:231 +#: ../../howto/free-threading-extensions.rst:233 msgid "" "**Caches**: global caches are a common source of shared state. Consider " "using a lock to protect the cache or disabling it in the free-threaded build " "if the cache is not critical for performance." msgstr "" -#: ../../howto/free-threading-extensions.rst:234 +#: ../../howto/free-threading-extensions.rst:236 msgid "" "**Global State**: global state may need to be protected by a lock or moved " "to thread local storage. C11 and C++11 provide the ``thread_local`` or " @@ -389,34 +406,34 @@ msgid "" "language/storage_duration>`_." msgstr "" -#: ../../howto/free-threading-extensions.rst:241 +#: ../../howto/free-threading-extensions.rst:243 msgid "Building Extensions for the Free-Threaded Build" msgstr "" -#: ../../howto/free-threading-extensions.rst:243 +#: ../../howto/free-threading-extensions.rst:245 msgid "" "C API extensions need to be built specifically for the free-threaded build. " "The wheels, shared libraries, and binaries are indicated by a ``t`` suffix." msgstr "" -#: ../../howto/free-threading-extensions.rst:246 +#: ../../howto/free-threading-extensions.rst:248 msgid "" "`pypa/manylinux `_ supports the free-" "threaded build, with the ``t`` suffix, such as ``python3.13t``." msgstr "" -#: ../../howto/free-threading-extensions.rst:248 +#: ../../howto/free-threading-extensions.rst:250 msgid "" "`pypa/cibuildwheel `_ supports the " "free-threaded build if you set `CIBW_FREE_THREADED_SUPPORT `_." msgstr "" -#: ../../howto/free-threading-extensions.rst:253 +#: ../../howto/free-threading-extensions.rst:255 msgid "Limited C API and Stable ABI" msgstr "" -#: ../../howto/free-threading-extensions.rst:255 +#: ../../howto/free-threading-extensions.rst:257 msgid "" "The free-threaded build does not currently support the :ref:`Limited C API " "` or the stable ABI. If you use `setuptools `_: A community-maintained porting guide for " diff --git a/howto/index.po b/howto/index.po index d0d55f2163..da80089a8f 100644 --- a/howto/index.po +++ b/howto/index.po @@ -42,51 +42,51 @@ msgstr "" #: ../../howto/index.rst:39 msgid ":ref:`annotations-howto`" -msgstr "" +msgstr ":ref:`annotations-howto`" #: ../../howto/index.rst:40 msgid ":ref:`argparse-tutorial`" -msgstr "" +msgstr ":ref:`argparse-tutorial`" #: ../../howto/index.rst:41 msgid ":ref:`descriptorhowto`" -msgstr "" +msgstr ":ref:`descriptorhowto`" #: ../../howto/index.rst:42 msgid ":ref:`enum-howto`" -msgstr "" +msgstr ":ref:`enum-howto`" #: ../../howto/index.rst:43 msgid ":ref:`functional-howto`" -msgstr "" +msgstr ":ref:`functional-howto`" #: ../../howto/index.rst:44 msgid ":ref:`ipaddress-howto`" -msgstr "" +msgstr ":ref:`ipaddress-howto`" #: ../../howto/index.rst:45 msgid ":ref:`logging-howto`" -msgstr "" +msgstr ":ref:`logging-howto`" #: ../../howto/index.rst:46 msgid ":ref:`logging-cookbook`" -msgstr "" +msgstr ":ref:`logging-cookbook`" #: ../../howto/index.rst:47 msgid ":ref:`regex-howto`" -msgstr "" +msgstr ":ref:`regex-howto`" #: ../../howto/index.rst:48 msgid ":ref:`sortinghowto`" -msgstr "" +msgstr ":ref:`sortinghowto`" #: ../../howto/index.rst:49 msgid ":ref:`unicode-howto`" -msgstr "" +msgstr ":ref:`unicode-howto`" #: ../../howto/index.rst:50 msgid ":ref:`urllib-howto`" -msgstr "" +msgstr ":ref:`urllib-howto`" #: ../../howto/index.rst:52 msgid "Advanced development:" @@ -94,31 +94,31 @@ msgstr "" #: ../../howto/index.rst:54 msgid ":ref:`curses-howto`" -msgstr "" +msgstr ":ref:`curses-howto`" #: ../../howto/index.rst:55 msgid ":ref:`freethreading-extensions-howto`" -msgstr "" +msgstr ":ref:`freethreading-extensions-howto`" #: ../../howto/index.rst:56 msgid ":ref:`isolating-extensions-howto`" -msgstr "" +msgstr ":ref:`isolating-extensions-howto`" #: ../../howto/index.rst:57 msgid ":ref:`python_2.3_mro`" -msgstr "" +msgstr ":ref:`python_2.3_mro`" #: ../../howto/index.rst:58 msgid ":ref:`socket-howto`" -msgstr "" +msgstr ":ref:`socket-howto`" #: ../../howto/index.rst:59 msgid ":ref:`timerfd-howto`" -msgstr "" +msgstr ":ref:`timerfd-howto`" #: ../../howto/index.rst:60 msgid ":ref:`cporting-howto`" -msgstr "" +msgstr ":ref:`cporting-howto`" #: ../../howto/index.rst:62 msgid "Debugging and profiling:" @@ -126,15 +126,15 @@ msgstr "" #: ../../howto/index.rst:64 msgid ":ref:`gdb`" -msgstr "" +msgstr ":ref:`gdb`" #: ../../howto/index.rst:65 msgid ":ref:`instrumentation`" -msgstr "" +msgstr ":ref:`instrumentation`" #: ../../howto/index.rst:66 msgid ":ref:`perf_profiling`" -msgstr "" +msgstr ":ref:`perf_profiling`" #~ msgid "Currently, the HOWTOs are:" #~ msgstr "目前有以下這些任務指南:" diff --git a/library/2to3.po b/library/2to3.po deleted file mode 100644 index 1b1272de37..0000000000 --- a/library/2to3.po +++ /dev/null @@ -1,706 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) 2001-2022, Python Software Foundation -# This file is distributed under the same license as the Python package. -# -# Translators: -# jerrychen , 2016 -msgid "" -msgstr "" -"Project-Id-Version: Python 3.13\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-03 11:11+0800\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-" -"tw)\n" -"Language: zh_TW\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=1; plural=0;\n" - -#: ../../library/2to3.rst:4 -msgid "2to3 --- Automated Python 2 to 3 code translation" -msgstr "2to3 --- 自動將 Python 2的程式碼轉成 Python 3" - -#: ../../library/2to3.rst:8 -msgid "" -"2to3 is a Python program that reads Python 2.x source code and applies a " -"series of *fixers* to transform it into valid Python 3.x code. The standard " -"library contains a rich set of fixers that will handle almost all code. " -"2to3 supporting library :mod:`lib2to3` is, however, a flexible and generic " -"library, so it is possible to write your own fixers for 2to3." -msgstr "" - -#: ../../library/2to3.rst:14 -msgid "" -"The ``lib2to3`` module was marked pending for deprecation in Python 3.9 " -"(raising :exc:`PendingDeprecationWarning` on import) and fully deprecated in " -"Python 3.11 (raising :exc:`DeprecationWarning`). The ``2to3`` tool is part " -"of that. It will be removed in Python 3.13." -msgstr "" - -#: ../../library/2to3.rst:23 -msgid "Using 2to3" -msgstr "使用 2to3" - -#: ../../library/2to3.rst:25 -msgid "" -"2to3 will usually be installed with the Python interpreter as a script. It " -"is also located in the :file:`Tools/scripts` directory of the Python root." -msgstr "" - -#: ../../library/2to3.rst:28 -msgid "" -"2to3's basic arguments are a list of files or directories to transform. The " -"directories are recursively traversed for Python sources." -msgstr "" - -#: ../../library/2to3.rst:31 -msgid "Here is a sample Python 2.x source file, :file:`example.py`::" -msgstr "這邊有簡單的 Python 2的原始檔案 :file:`example.py`::" - -#: ../../library/2to3.rst:33 -msgid "" -"def greet(name):\n" -" print \"Hello, {0}!\".format(name)\n" -"print \"What's your name?\"\n" -"name = raw_input()\n" -"greet(name)" -msgstr "" - -#: ../../library/2to3.rst:39 -msgid "It can be converted to Python 3.x code via 2to3 on the command line:" -msgstr "" - -#: ../../library/2to3.rst:41 -msgid "$ 2to3 example.py" -msgstr "$ 2to3 example.py" - -#: ../../library/2to3.rst:45 -msgid "" -"A diff against the original source file is printed. 2to3 can also write the " -"needed modifications right back to the source file. (A backup of the " -"original file is made unless :option:`!-n` is also given.) Writing the " -"changes back is enabled with the :option:`!-w` flag:" -msgstr "" - -#: ../../library/2to3.rst:50 -msgid "$ 2to3 -w example.py" -msgstr "$ 2to3 -w example.py" - -#: ../../library/2to3.rst:54 -msgid "After transformation, :file:`example.py` looks like this::" -msgstr "" - -#: ../../library/2to3.rst:56 -msgid "" -"def greet(name):\n" -" print(\"Hello, {0}!\".format(name))\n" -"print(\"What's your name?\")\n" -"name = input()\n" -"greet(name)" -msgstr "" - -#: ../../library/2to3.rst:62 -msgid "" -"Comments and exact indentation are preserved throughout the translation " -"process." -msgstr "" - -#: ../../library/2to3.rst:64 -msgid "" -"By default, 2to3 runs a set of :ref:`predefined fixers <2to3-fixers>`. The :" -"option:`!-l` flag lists all available fixers. An explicit set of fixers to " -"run can be given with :option:`!-f`. Likewise the :option:`!-x` explicitly " -"disables a fixer. The following example runs only the ``imports`` and " -"``has_key`` fixers:" -msgstr "" - -#: ../../library/2to3.rst:69 -msgid "$ 2to3 -f imports -f has_key example.py" -msgstr "$ 2to3 -f imports -f has_key example.py" - -#: ../../library/2to3.rst:73 -msgid "This command runs every fixer except the ``apply`` fixer:" -msgstr "" - -#: ../../library/2to3.rst:75 -msgid "$ 2to3 -x apply example.py" -msgstr "$ 2to3 -x apply example.py" - -#: ../../library/2to3.rst:79 -msgid "" -"Some fixers are *explicit*, meaning they aren't run by default and must be " -"listed on the command line to be run. Here, in addition to the default " -"fixers, the ``idioms`` fixer is run:" -msgstr "" - -#: ../../library/2to3.rst:83 -msgid "$ 2to3 -f all -f idioms example.py" -msgstr "$ 2to3 -f all -f idioms example.py" - -#: ../../library/2to3.rst:87 -msgid "Notice how passing ``all`` enables all default fixers." -msgstr "" - -#: ../../library/2to3.rst:89 -msgid "" -"Sometimes 2to3 will find a place in your source code that needs to be " -"changed, but 2to3 cannot fix automatically. In this case, 2to3 will print a " -"warning beneath the diff for a file. You should address the warning in " -"order to have compliant 3.x code." -msgstr "" - -#: ../../library/2to3.rst:94 -msgid "" -"2to3 can also refactor doctests. To enable this mode, use the :option:`!-d` " -"flag. Note that *only* doctests will be refactored. This also doesn't " -"require the module to be valid Python. For example, doctest like examples " -"in a reST document could also be refactored with this option." -msgstr "" - -#: ../../library/2to3.rst:99 -msgid "" -"The :option:`!-v` option enables output of more information on the " -"translation process." -msgstr "" - -#: ../../library/2to3.rst:102 -msgid "" -"Since some print statements can be parsed as function calls or statements, " -"2to3 cannot always read files containing the print function. When 2to3 " -"detects the presence of the ``from __future__ import print_function`` " -"compiler directive, it modifies its internal grammar to interpret :func:" -"`print` as a function. This change can also be enabled manually with the :" -"option:`!-p` flag. Use :option:`!-p` to run fixers on code that already has " -"had its print statements converted. Also :option:`!-e` can be used to make :" -"func:`exec` a function." -msgstr "" - -#: ../../library/2to3.rst:110 -msgid "" -"The :option:`!-o` or :option:`!--output-dir` option allows specification of " -"an alternate directory for processed output files to be written to. The :" -"option:`!-n` flag is required when using this as backup files do not make " -"sense when not overwriting the input files." -msgstr "" - -#: ../../library/2to3.rst:115 -msgid "The :option:`!-o` option was added." -msgstr "新增 :option:`!-o` 選項。" - -#: ../../library/2to3.rst:118 -msgid "" -"The :option:`!-W` or :option:`!--write-unchanged-files` flag tells 2to3 to " -"always write output files even if no changes were required to the file. " -"This is most useful with :option:`!-o` so that an entire Python source tree " -"is copied with translation from one directory to another. This option " -"implies the :option:`!-w` flag as it would not make sense otherwise." -msgstr "" - -#: ../../library/2to3.rst:124 -msgid "The :option:`!-W` flag was added." -msgstr "" - -#: ../../library/2to3.rst:127 -msgid "" -"The :option:`!--add-suffix` option specifies a string to append to all " -"output filenames. The :option:`!-n` flag is required when specifying this " -"as backups are not necessary when writing to different filenames. Example:" -msgstr "" - -#: ../../library/2to3.rst:131 -msgid "$ 2to3 -n -W --add-suffix=3 example.py" -msgstr "$ 2to3 -n -W --add-suffix=3 example.py" - -#: ../../library/2to3.rst:135 -msgid "Will cause a converted file named ``example.py3`` to be written." -msgstr "" - -#: ../../library/2to3.rst:137 -msgid "The :option:`!--add-suffix` option was added." -msgstr "" - -#: ../../library/2to3.rst:140 -msgid "To translate an entire project from one directory tree to another use:" -msgstr "" - -#: ../../library/2to3.rst:142 -msgid "$ 2to3 --output-dir=python3-version/mycode -W -n python2-version/mycode" -msgstr "" -"$ 2to3 --output-dir=python3-version/mycode -W -n python2-version/mycode" - -#: ../../library/2to3.rst:150 -msgid "Fixers" -msgstr "" - -#: ../../library/2to3.rst:152 -msgid "" -"Each step of transforming code is encapsulated in a fixer. The command " -"``2to3 -l`` lists them. As :ref:`documented above <2to3-using>`, each can " -"be turned on and off individually. They are described here in more detail." -msgstr "" - -#: ../../library/2to3.rst:159 -msgid "" -"Removes usage of :func:`apply`. For example ``apply(function, *args, " -"**kwargs)`` is converted to ``function(*args, **kwargs)``." -msgstr "" - -#: ../../library/2to3.rst:164 -msgid "Replaces deprecated :mod:`unittest` method names with the correct ones." -msgstr "" - -#: ../../library/2to3.rst:167 ../../library/2to3.rst:356 -msgid "From" -msgstr "從" - -#: ../../library/2to3.rst:167 ../../library/2to3.rst:356 -msgid "To" -msgstr "到" - -#: ../../library/2to3.rst:169 -msgid "``failUnlessEqual(a, b)``" -msgstr "``failUnlessEqual(a, b)``" - -#: ../../library/2to3.rst:169 ../../library/2to3.rst:171 -msgid ":meth:`assertEqual(a, b) `" -msgstr ":meth:`assertEqual(a, b) `" - -#: ../../library/2to3.rst:171 -msgid "``assertEquals(a, b)``" -msgstr "``assertEquals(a, b)``" - -#: ../../library/2to3.rst:173 -msgid "``failIfEqual(a, b)``" -msgstr "``failIfEqual(a, b)``" - -#: ../../library/2to3.rst:173 ../../library/2to3.rst:175 -msgid ":meth:`assertNotEqual(a, b) `" -msgstr ":meth:`assertNotEqual(a, b) `" - -#: ../../library/2to3.rst:175 -msgid "``assertNotEquals(a, b)``" -msgstr "``assertNotEquals(a, b)``" - -#: ../../library/2to3.rst:177 -msgid "``failUnless(a)``" -msgstr "``failUnless(a)``" - -#: ../../library/2to3.rst:177 ../../library/2to3.rst:179 -msgid ":meth:`assertTrue(a) `" -msgstr ":meth:`assertTrue(a) `" - -#: ../../library/2to3.rst:179 -msgid "``assert_(a)``" -msgstr "``assert_(a)``" - -#: ../../library/2to3.rst:181 -msgid "``failIf(a)``" -msgstr "``failIf(a)``" - -#: ../../library/2to3.rst:181 -msgid ":meth:`assertFalse(a) `" -msgstr ":meth:`assertFalse(a) `" - -#: ../../library/2to3.rst:183 -msgid "``failUnlessRaises(exc, cal)``" -msgstr "``failUnlessRaises(exc, cal)``" - -#: ../../library/2to3.rst:183 -msgid ":meth:`assertRaises(exc, cal) `" -msgstr ":meth:`assertRaises(exc, cal) `" - -#: ../../library/2to3.rst:185 -msgid "``failUnlessAlmostEqual(a, b)``" -msgstr "``failUnlessAlmostEqual(a, b)``" - -#: ../../library/2to3.rst:185 ../../library/2to3.rst:187 -msgid ":meth:`assertAlmostEqual(a, b) `" -msgstr ":meth:`assertAlmostEqual(a, b) `" - -#: ../../library/2to3.rst:187 -msgid "``assertAlmostEquals(a, b)``" -msgstr "``assertAlmostEquals(a, b)``" - -#: ../../library/2to3.rst:189 -msgid "``failIfAlmostEqual(a, b)``" -msgstr "``failIfAlmostEqual(a, b)``" - -#: ../../library/2to3.rst:189 ../../library/2to3.rst:191 -msgid "" -":meth:`assertNotAlmostEqual(a, b) `" -msgstr "" - -#: ../../library/2to3.rst:191 -msgid "``assertNotAlmostEquals(a, b)``" -msgstr "``assertNotAlmostEquals(a, b)``" - -#: ../../library/2to3.rst:197 -msgid "Converts :class:`basestring` to :class:`str`." -msgstr "" - -#: ../../library/2to3.rst:201 -msgid "" -"Converts :class:`buffer` to :class:`memoryview`. This fixer is optional " -"because the :class:`memoryview` API is similar but not exactly the same as " -"that of :class:`buffer`." -msgstr "" - -#: ../../library/2to3.rst:207 -msgid "" -"Fixes dictionary iteration methods. :meth:`dict.iteritems` is converted to :" -"meth:`dict.items`, :meth:`dict.iterkeys` to :meth:`dict.keys`, and :meth:" -"`dict.itervalues` to :meth:`dict.values`. Similarly, :meth:`dict." -"viewitems`, :meth:`dict.viewkeys` and :meth:`dict.viewvalues` are converted " -"respectively to :meth:`dict.items`, :meth:`dict.keys` and :meth:`dict." -"values`. It also wraps existing usages of :meth:`dict.items`, :meth:`dict." -"keys`, and :meth:`dict.values` in a call to :class:`list`." -msgstr "" - -#: ../../library/2to3.rst:217 -msgid "Converts ``except X, T`` to ``except X as T``." -msgstr "" - -#: ../../library/2to3.rst:221 -msgid "Converts the ``exec`` statement to the :func:`exec` function." -msgstr "" - -#: ../../library/2to3.rst:225 -msgid "" -"Removes usage of :func:`execfile`. The argument to :func:`execfile` is " -"wrapped in calls to :func:`open`, :func:`compile`, and :func:`exec`." -msgstr "" - -#: ../../library/2to3.rst:230 -msgid "" -"Changes assignment of :attr:`sys.exitfunc` to use of the :mod:`atexit` " -"module." -msgstr "" - -#: ../../library/2to3.rst:235 -msgid "Wraps :func:`filter` usage in a :class:`list` call." -msgstr "" - -#: ../../library/2to3.rst:239 -msgid "" -"Fixes function attributes that have been renamed. For example, " -"``my_function.func_closure`` is converted to ``my_function.__closure__``." -msgstr "" - -#: ../../library/2to3.rst:244 -msgid "Removes ``from __future__ import new_feature`` statements." -msgstr "" - -#: ../../library/2to3.rst:248 -msgid "Renames :func:`os.getcwdu` to :func:`os.getcwd`." -msgstr "" - -#: ../../library/2to3.rst:252 -msgid "Changes ``dict.has_key(key)`` to ``key in dict``." -msgstr "" - -#: ../../library/2to3.rst:256 -msgid "" -"This optional fixer performs several transformations that make Python code " -"more idiomatic. Type comparisons like ``type(x) is SomeClass`` and " -"``type(x) == SomeClass`` are converted to ``isinstance(x, SomeClass)``. " -"``while 1`` becomes ``while True``. This fixer also tries to make use of :" -"func:`sorted` in appropriate places. For example, this block ::" -msgstr "" - -#: ../../library/2to3.rst:262 -msgid "" -"L = list(some_iterable)\n" -"L.sort()" -msgstr "" -"L = list(some_iterable)\n" -"L.sort()" - -#: ../../library/2to3.rst:265 -msgid "is changed to ::" -msgstr "" - -#: ../../library/2to3.rst:267 -msgid "L = sorted(some_iterable)" -msgstr "L = sorted(some_iterable)" - -#: ../../library/2to3.rst:271 -msgid "Detects sibling imports and converts them to relative imports." -msgstr "" - -#: ../../library/2to3.rst:275 -msgid "Handles module renames in the standard library." -msgstr "" - -#: ../../library/2to3.rst:279 -msgid "" -"Handles other modules renames in the standard library. It is separate from " -"the :2to3fixer:`imports` fixer only because of technical limitations." -msgstr "" - -#: ../../library/2to3.rst:284 -msgid "Converts ``input(prompt)`` to ``eval(input(prompt))``." -msgstr "" - -#: ../../library/2to3.rst:288 -msgid "Converts :func:`intern` to :func:`sys.intern`." -msgstr "" - -#: ../../library/2to3.rst:292 -msgid "" -"Fixes duplicate types in the second argument of :func:`isinstance`. For " -"example, ``isinstance(x, (int, int))`` is converted to ``isinstance(x, " -"int)`` and ``isinstance(x, (int, float, int))`` is converted to " -"``isinstance(x, (int, float))``." -msgstr "" - -#: ../../library/2to3.rst:299 -msgid "" -"Removes imports of :func:`itertools.ifilter`, :func:`itertools.izip`, and :" -"func:`itertools.imap`. Imports of :func:`itertools.ifilterfalse` are also " -"changed to :func:`itertools.filterfalse`." -msgstr "" - -#: ../../library/2to3.rst:305 -msgid "" -"Changes usage of :func:`itertools.ifilter`, :func:`itertools.izip`, and :" -"func:`itertools.imap` to their built-in equivalents. :func:`itertools." -"ifilterfalse` is changed to :func:`itertools.filterfalse`." -msgstr "" - -#: ../../library/2to3.rst:311 -msgid "Renames :class:`long` to :class:`int`." -msgstr "" - -#: ../../library/2to3.rst:315 -msgid "" -"Wraps :func:`map` in a :class:`list` call. It also changes ``map(None, x)`` " -"to ``list(x)``. Using ``from future_builtins import map`` disables this " -"fixer." -msgstr "" - -#: ../../library/2to3.rst:321 -msgid "" -"Converts the old metaclass syntax (``__metaclass__ = Meta`` in the class " -"body) to the new (``class X(metaclass=Meta)``)." -msgstr "" - -#: ../../library/2to3.rst:326 -msgid "" -"Fixes old method attribute names. For example, ``meth.im_func`` is " -"converted to ``meth.__func__``." -msgstr "" - -#: ../../library/2to3.rst:331 -msgid "Converts the old not-equal syntax, ``<>``, to ``!=``." -msgstr "" - -#: ../../library/2to3.rst:335 -msgid "" -"Converts the use of iterator's :meth:`~iterator.next` methods to the :func:" -"`next` function. It also renames :meth:`next` methods to :meth:`~iterator." -"__next__`." -msgstr "" - -#: ../../library/2to3.rst:341 -msgid "" -"Renames definitions of methods called :meth:`__nonzero__` to :meth:`~object." -"__bool__`." -msgstr "" - -#: ../../library/2to3.rst:346 -msgid "Converts octal literals into the new syntax." -msgstr "" - -#: ../../library/2to3.rst:350 -msgid "" -"Converts calls to various functions in the :mod:`operator` module to other, " -"but equivalent, function calls. When needed, the appropriate ``import`` " -"statements are added, e.g. ``import collections.abc``. The following " -"mapping are made:" -msgstr "" - -#: ../../library/2to3.rst:358 -msgid "``operator.isCallable(obj)``" -msgstr "``operator.isCallable(obj)``" - -#: ../../library/2to3.rst:358 -msgid "``callable(obj)``" -msgstr "``callable(obj)``" - -#: ../../library/2to3.rst:359 -msgid "``operator.sequenceIncludes(obj)``" -msgstr "``operator.sequenceIncludes(obj)``" - -#: ../../library/2to3.rst:359 -msgid "``operator.contains(obj)``" -msgstr "``operator.contains(obj)``" - -#: ../../library/2to3.rst:360 -msgid "``operator.isSequenceType(obj)``" -msgstr "``operator.isSequenceType(obj)``" - -#: ../../library/2to3.rst:360 -msgid "``isinstance(obj, collections.abc.Sequence)``" -msgstr "``isinstance(obj, collections.abc.Sequence)``" - -#: ../../library/2to3.rst:361 -msgid "``operator.isMappingType(obj)``" -msgstr "``operator.isMappingType(obj)``" - -#: ../../library/2to3.rst:361 -msgid "``isinstance(obj, collections.abc.Mapping)``" -msgstr "``isinstance(obj, collections.abc.Mapping)``" - -#: ../../library/2to3.rst:362 -msgid "``operator.isNumberType(obj)``" -msgstr "``operator.isNumberType(obj)``" - -#: ../../library/2to3.rst:362 -msgid "``isinstance(obj, numbers.Number)``" -msgstr "``isinstance(obj, numbers.Number)``" - -#: ../../library/2to3.rst:363 -msgid "``operator.repeat(obj, n)``" -msgstr "``operator.repeat(obj, n)``" - -#: ../../library/2to3.rst:363 -msgid "``operator.mul(obj, n)``" -msgstr "``operator.mul(obj, n)``" - -#: ../../library/2to3.rst:364 -msgid "``operator.irepeat(obj, n)``" -msgstr "``operator.irepeat(obj, n)``" - -#: ../../library/2to3.rst:364 -msgid "``operator.imul(obj, n)``" -msgstr "``operator.imul(obj, n)``" - -#: ../../library/2to3.rst:369 -msgid "" -"Add extra parenthesis where they are required in list comprehensions. For " -"example, ``[x for x in 1, 2]`` becomes ``[x for x in (1, 2)]``." -msgstr "" - -#: ../../library/2to3.rst:374 -msgid "Converts the ``print`` statement to the :func:`print` function." -msgstr "" - -#: ../../library/2to3.rst:378 -msgid "" -"Converts ``raise E, V`` to ``raise E(V)``, and ``raise E, V, T`` to ``raise " -"E(V).with_traceback(T)``. If ``E`` is a tuple, the translation will be " -"incorrect because substituting tuples for exceptions has been removed in 3.0." -msgstr "" - -#: ../../library/2to3.rst:384 -msgid "Converts :func:`raw_input` to :func:`input`." -msgstr "" - -#: ../../library/2to3.rst:388 -msgid "Handles the move of :func:`reduce` to :func:`functools.reduce`." -msgstr "" - -#: ../../library/2to3.rst:392 -msgid "Converts :func:`reload` to :func:`importlib.reload`." -msgstr "" - -#: ../../library/2to3.rst:396 -msgid "Changes :data:`sys.maxint` to :data:`sys.maxsize`." -msgstr "" - -#: ../../library/2to3.rst:400 -msgid "Replaces backtick repr with the :func:`repr` function." -msgstr "" - -#: ../../library/2to3.rst:404 -msgid "" -"Replaces use of the :class:`set` constructor with set literals. This fixer " -"is optional." -msgstr "" - -#: ../../library/2to3.rst:409 -msgid "Renames :exc:`StandardError` to :exc:`Exception`." -msgstr "" - -#: ../../library/2to3.rst:413 -msgid "" -"Changes the deprecated :data:`sys.exc_value`, :data:`sys.exc_type`, :data:" -"`sys.exc_traceback` to use :func:`sys.exc_info`." -msgstr "" - -#: ../../library/2to3.rst:418 -msgid "Fixes the API change in generator's :meth:`throw` method." -msgstr "" - -#: ../../library/2to3.rst:422 -msgid "" -"Removes implicit tuple parameter unpacking. This fixer inserts temporary " -"variables." -msgstr "" - -#: ../../library/2to3.rst:427 -msgid "" -"Fixes code broken from the removal of some members in the :mod:`types` " -"module." -msgstr "" - -#: ../../library/2to3.rst:432 -msgid "Renames :class:`unicode` to :class:`str`." -msgstr "" - -#: ../../library/2to3.rst:436 -msgid "" -"Handles the rename of :mod:`urllib` and :mod:`urllib2` to the :mod:`urllib` " -"package." -msgstr "" - -#: ../../library/2to3.rst:441 -msgid "" -"Removes excess whitespace from comma separated items. This fixer is " -"optional." -msgstr "" - -#: ../../library/2to3.rst:446 -msgid "" -"Renames :func:`xrange` to :func:`range` and wraps existing :func:`range` " -"calls with :class:`list`." -msgstr "" - -#: ../../library/2to3.rst:451 -msgid "Changes ``for x in file.xreadlines()`` to ``for x in file``." -msgstr "" - -#: ../../library/2to3.rst:455 -msgid "" -"Wraps :func:`zip` usage in a :class:`list` call. This is disabled when " -"``from future_builtins import zip`` appears." -msgstr "" - -#: ../../library/2to3.rst:460 -msgid ":mod:`lib2to3` --- 2to3's library" -msgstr "" - -#: ../../library/2to3.rst:469 -msgid "**Source code:** :source:`Lib/lib2to3/`" -msgstr "**原始碼:**\\ :source:`Lib/lib2to3/`" - -#: ../../library/2to3.rst:473 -msgid "" -"Python 3.9 switched to a PEG parser (see :pep:`617`) while lib2to3 is using " -"a less flexible LL(1) parser. Python 3.10 includes new language syntax that " -"is not parsable by lib2to3's LL(1) parser (see :pep:`634`). The ``lib2to3`` " -"module was marked pending for deprecation in Python 3.9 (raising :exc:" -"`PendingDeprecationWarning` on import) and fully deprecated in Python 3.11 " -"(raising :exc:`DeprecationWarning`). It will be removed from the standard " -"library in Python 3.13. Consider third-party alternatives such as `LibCST`_ " -"or `parso`_." -msgstr "" - -#: ../../library/2to3.rst:485 -msgid "" -"The :mod:`lib2to3` API should be considered unstable and may change " -"drastically in the future." -msgstr "" diff --git a/library/_thread.po b/library/_thread.po index 3fad9c4652..c36a47a237 100644 --- a/library/_thread.po +++ b/library/_thread.po @@ -215,7 +215,7 @@ msgstr "" #: ../../library/_thread.rst:148 msgid ":ref:`Availability `: Windows, pthreads." -msgstr ":ref:`適用 `:Windows, pthreads。" +msgstr ":ref:`適用 `:Windows、pthreads。" #: ../../library/_thread.rst:150 msgid "Unix platforms with POSIX threads support." diff --git a/library/aifc.po b/library/aifc.po deleted file mode 100644 index e5750661b5..0000000000 --- a/library/aifc.po +++ /dev/null @@ -1,286 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) 2001-2022, Python Software Foundation -# This file is distributed under the same license as the Python package. -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: Python 3.13\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-07-20 00:03+0000\n" -"PO-Revision-Date: 2022-05-22 01:57+0800\n" -"Last-Translator: Adrian Liaw \n" -"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" -"tw)\n" -"Language: zh_TW\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Poedit 3.0.1\n" - -#: ../../library/aifc.rst:2 -msgid ":mod:`aifc` --- Read and write AIFF and AIFC files" -msgstr ":mod:`aifc` --- 讀寫 AIFF 與 AIFC 檔案" - -#: ../../library/aifc.rst:8 -msgid "**Source code:** :source:`Lib/aifc.py`" -msgstr "**原始碼:**\\ :source:`Lib/aifc.py`" - -#: ../../library/aifc.rst:16 -msgid "" -"The :mod:`aifc` module is deprecated (see :pep:`PEP 594 <594#aifc>` for " -"details)." -msgstr "" -":mod:`aifc` 模組 (module) 即將被棄用(詳見 :pep:`PEP 594 <594#aifc>`\\ )。" - -#: ../../library/aifc.rst:22 -msgid "" -"This module provides support for reading and writing AIFF and AIFF-C files. " -"AIFF is Audio Interchange File Format, a format for storing digital audio " -"samples in a file. AIFF-C is a newer version of the format that includes " -"the ability to compress the audio data." -msgstr "" - -#: ../../library/aifc.rst:27 -msgid "" -"Audio files have a number of parameters that describe the audio data. The " -"sampling rate or frame rate is the number of times per second the sound is " -"sampled. The number of channels indicate if the audio is mono, stereo, or " -"quadro. Each frame consists of one sample per channel. The sample size is " -"the size in bytes of each sample. Thus a frame consists of ``nchannels * " -"samplesize`` bytes, and a second's worth of audio consists of ``nchannels * " -"samplesize * framerate`` bytes." -msgstr "" - -#: ../../library/aifc.rst:35 -msgid "" -"For example, CD quality audio has a sample size of two bytes (16 bits), uses " -"two channels (stereo) and has a frame rate of 44,100 frames/second. This " -"gives a frame size of 4 bytes (2\\*2), and a second's worth occupies " -"2\\*2\\*44100 bytes (176,400 bytes)." -msgstr "" - -#: ../../library/aifc.rst:40 -msgid "Module :mod:`aifc` defines the following function:" -msgstr ":mod:`aifc` 模組定義了以下函式:" - -#: ../../library/aifc.rst:45 -msgid "" -"Open an AIFF or AIFF-C file and return an object instance with methods that " -"are described below. The argument *file* is either a string naming a file " -"or a :term:`file object`. *mode* must be ``'r'`` or ``'rb'`` when the file " -"must be opened for reading, or ``'w'`` or ``'wb'`` when the file must be " -"opened for writing. If omitted, ``file.mode`` is used if it exists, " -"otherwise ``'rb'`` is used. When used for writing, the file object should " -"be seekable, unless you know ahead of time how many samples you are going to " -"write in total and use :meth:`writeframesraw` and :meth:`setnframes`. The :" -"func:`.open` function may be used in a :keyword:`with` statement. When the :" -"keyword:`!with` block completes, the :meth:`~aifc.close` method is called." -msgstr "" - -#: ../../library/aifc.rst:56 -msgid "Support for the :keyword:`with` statement was added." -msgstr "" - -#: ../../library/aifc.rst:59 -msgid "" -"Objects returned by :func:`.open` when a file is opened for reading have the " -"following methods:" -msgstr "" - -#: ../../library/aifc.rst:65 -msgid "Return the number of audio channels (1 for mono, 2 for stereo)." -msgstr "" - -#: ../../library/aifc.rst:70 -msgid "Return the size in bytes of individual samples." -msgstr "" - -#: ../../library/aifc.rst:75 -msgid "Return the sampling rate (number of audio frames per second)." -msgstr "" - -#: ../../library/aifc.rst:80 -msgid "Return the number of audio frames in the file." -msgstr "" - -#: ../../library/aifc.rst:85 -msgid "" -"Return a bytes array of length 4 describing the type of compression used in " -"the audio file. For AIFF files, the returned value is ``b'NONE'``." -msgstr "" - -#: ../../library/aifc.rst:92 -msgid "" -"Return a bytes array convertible to a human-readable description of the type " -"of compression used in the audio file. For AIFF files, the returned value " -"is ``b'not compressed'``." -msgstr "" - -#: ../../library/aifc.rst:99 -msgid "" -"Returns a :func:`~collections.namedtuple` ``(nchannels, sampwidth, " -"framerate, nframes, comptype, compname)``, equivalent to output of the :meth:" -"`get\\*` methods." -msgstr "" - -#: ../../library/aifc.rst:106 -msgid "" -"Return a list of markers in the audio file. A marker consists of a tuple of " -"three elements. The first is the mark ID (an integer), the second is the " -"mark position in frames from the beginning of the data (an integer), the " -"third is the name of the mark (a string)." -msgstr "" - -#: ../../library/aifc.rst:114 -msgid "" -"Return the tuple as described in :meth:`getmarkers` for the mark with the " -"given *id*." -msgstr "" - -#: ../../library/aifc.rst:120 -msgid "" -"Read and return the next *nframes* frames from the audio file. The returned " -"data is a string containing for each frame the uncompressed samples of all " -"channels." -msgstr "" - -#: ../../library/aifc.rst:127 -msgid "" -"Rewind the read pointer. The next :meth:`readframes` will start from the " -"beginning." -msgstr "" - -#: ../../library/aifc.rst:133 -msgid "Seek to the specified frame number." -msgstr "" - -#: ../../library/aifc.rst:138 -msgid "Return the current frame number." -msgstr "" - -#: ../../library/aifc.rst:143 -msgid "" -"Close the AIFF file. After calling this method, the object can no longer be " -"used." -msgstr "" - -#: ../../library/aifc.rst:146 -msgid "" -"Objects returned by :func:`.open` when a file is opened for writing have all " -"the above methods, except for :meth:`readframes` and :meth:`setpos`. In " -"addition the following methods exist. The :meth:`get\\*` methods can only " -"be called after the corresponding :meth:`set\\*` methods have been called. " -"Before the first :meth:`writeframes` or :meth:`writeframesraw`, all " -"parameters except for the number of frames must be filled in." -msgstr "" - -#: ../../library/aifc.rst:156 -msgid "" -"Create an AIFF file. The default is that an AIFF-C file is created, unless " -"the name of the file ends in ``'.aiff'`` in which case the default is an " -"AIFF file." -msgstr "" - -#: ../../library/aifc.rst:162 -msgid "" -"Create an AIFF-C file. The default is that an AIFF-C file is created, " -"unless the name of the file ends in ``'.aiff'`` in which case the default is " -"an AIFF file." -msgstr "" - -#: ../../library/aifc.rst:169 -msgid "Specify the number of channels in the audio file." -msgstr "" - -#: ../../library/aifc.rst:174 -msgid "Specify the size in bytes of audio samples." -msgstr "" - -#: ../../library/aifc.rst:179 -msgid "Specify the sampling frequency in frames per second." -msgstr "" - -#: ../../library/aifc.rst:184 -msgid "" -"Specify the number of frames that are to be written to the audio file. If " -"this parameter is not set, or not set correctly, the file needs to support " -"seeking." -msgstr "" - -#: ../../library/aifc.rst:195 -msgid "" -"Specify the compression type. If not specified, the audio data will not be " -"compressed. In AIFF files, compression is not possible. The name parameter " -"should be a human-readable description of the compression type as a bytes " -"array, the type parameter should be a bytes array of length 4. Currently " -"the following compression types are supported: ``b'NONE'``, ``b'ULAW'``, " -"``b'ALAW'``, ``b'G722'``." -msgstr "" - -#: ../../library/aifc.rst:205 -msgid "" -"Set all the above parameters at once. The argument is a tuple consisting of " -"the various parameters. This means that it is possible to use the result of " -"a :meth:`getparams` call as argument to :meth:`setparams`." -msgstr "" - -#: ../../library/aifc.rst:212 -msgid "" -"Add a mark with the given id (larger than 0), and the given name at the " -"given position. This method can be called at any time before :meth:`close`." -msgstr "" - -#: ../../library/aifc.rst:219 -msgid "" -"Return the current write position in the output file. Useful in combination " -"with :meth:`setmark`." -msgstr "" - -#: ../../library/aifc.rst:225 -msgid "" -"Write data to the output file. This method can only be called after the " -"audio file parameters have been set." -msgstr "" - -#: ../../library/aifc.rst:228 ../../library/aifc.rst:237 -msgid "Any :term:`bytes-like object` is now accepted." -msgstr "" - -#: ../../library/aifc.rst:234 -msgid "" -"Like :meth:`writeframes`, except that the header of the audio file is not " -"updated." -msgstr "" - -#: ../../library/aifc.rst:244 -msgid "" -"Close the AIFF file. The header of the file is updated to reflect the " -"actual size of the audio data. After calling this method, the object can no " -"longer be used." -msgstr "" - -#: ../../library/aifc.rst:10 -msgid "Audio Interchange File Format" -msgstr "Audio Interchange File Format(音訊交換檔案格式)" - -#: ../../library/aifc.rst:10 -msgid "AIFF" -msgstr "AIFF" - -#: ../../library/aifc.rst:10 -msgid "AIFF-C" -msgstr "AIFF-C" - -#: ../../library/aifc.rst:190 -msgid "u-LAW" -msgstr "u-LAW" - -#: ../../library/aifc.rst:190 -msgid "A-LAW" -msgstr "A-LAW" - -#: ../../library/aifc.rst:190 -msgid "G.722" -msgstr "G.722" diff --git a/library/argparse.po b/library/argparse.po index 726a5ed8f2..8c2959c432 100644 --- a/library/argparse.po +++ b/library/argparse.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-23 07:52+0800\n" +"POT-Creation-Date: 2024-09-24 07:20+0000\n" "PO-Revision-Date: 2018-05-23 14:38+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -2614,7 +2614,7 @@ msgid "" "argument of :meth:`~ArgumentParser.add_argument`, which defaults to " "``False``, specifies if the argument is deprecated and will be removed in " "the future. For arguments, if ``deprecated`` is ``True``, then a warning " -"will be printed to standard error when the argument is used::" +"will be printed to :data:`sys.stderr` when the argument is used::" msgstr "" #: ../../library/argparse.rst:1460 @@ -3858,8 +3858,8 @@ msgstr "" #: ../../library/argparse.rst:2237 msgid "" "This method terminates the program, exiting with the specified *status* and, " -"if given, it prints a *message* before that. The user can override this " -"method to handle these steps differently::" +"if given, it prints a *message* to :data:`sys.stderr` before that. The user " +"can override this method to handle these steps differently::" msgstr "" #: ../../library/argparse.rst:2241 @@ -3878,8 +3878,8 @@ msgstr "" #: ../../library/argparse.rst:2249 msgid "" -"This method prints a usage message including the *message* to the standard " -"error and terminates the program with a status code of 2." +"This method prints a usage message, including the *message*, to :data:`sys." +"stderr` and terminates the program with a status code of 2." msgstr "" #: ../../library/argparse.rst:2254 diff --git a/library/array.po b/library/array.po index 22011a7f92..8d66dac4e6 100644 --- a/library/array.po +++ b/library/array.po @@ -112,11 +112,11 @@ msgstr "\\(1)" #: ../../library/array.rst:27 msgid "``'w'``" -msgstr "" +msgstr "``'w'``" #: ../../library/array.rst:27 msgid "Py_UCS4" -msgstr "" +msgstr "Py_UCS4" #: ../../library/array.rst:27 ../../library/array.rst:37 #: ../../library/array.rst:39 ../../library/array.rst:45 @@ -536,13 +536,3 @@ msgstr "NumPy 套件定義了另一個陣列型別" #: ../../library/array.rst:7 msgid "arrays" msgstr "arrays(陣列)" - -#~ msgid "Module :mod:`xdrlib`" -#~ msgstr ":mod:`xdrlib` 模組" - -#~ msgid "" -#~ "Packing and unpacking of External Data Representation (XDR) data as used " -#~ "in some remote procedure call systems." -#~ msgstr "" -#~ "將 External Data Representation (XDR) 的資料包裝與解開包裝,這用在一些遠端" -#~ "操作的系統 (remote procedure call systems)。" diff --git a/library/ast.po b/library/ast.po index 4a81075034..a667e2bdc0 100644 --- a/library/ast.po +++ b/library/ast.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-23 07:52+0800\n" +"POT-Creation-Date: 2024-09-24 15:56+0800\n" "PO-Revision-Date: 2018-05-23 14:38+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -264,11 +264,10 @@ msgstr "" "有特定建構函式節點的實例會被建立。" #: ../../library/ast.rst:64 -#, fuzzy msgid "" "Each concrete class has an attribute :attr:`!_fields` which gives the names " "of all child nodes." -msgstr "每個具體類別都有一個屬性 :attr:`_fields`,它會給出所有子節點的名稱。" +msgstr "每個具體類別都有一個屬性 :attr:`!_fields`,它會給出所有子節點的名稱。" #: ../../library/ast.rst:67 msgid "" @@ -296,6 +295,8 @@ msgid "" "The :attr:`!_field_types` attribute on each concrete class is a dictionary " "mapping field names (as also listed in :attr:`_fields`) to their types." msgstr "" +"每個具體類別上的 :attr:`!_field_types` 屬性是將欄位名稱(也在 :attr:" +"`_fields` 中列出)對映到其型別的字典。" #: ../../library/ast.rst:82 msgid "" @@ -303,6 +304,9 @@ msgid "" "{'name': , 'bound': ast.expr | None, 'default_value': ast.expr " "| None}" msgstr "" +">>> ast.TypeVar._field_types\n" +"{'name': , 'bound': ast.expr | None, 'default_value': ast.expr " +"| None}" #: ../../library/ast.rst:94 msgid "" @@ -376,6 +380,11 @@ msgid "" "exc:`DeprecationWarning` is raised and the AST node will not have this " "field. In Python 3.15, this condition will raise an error." msgstr "" +"如果建構函式中省略了文法中可選的欄位,則它預設為 ``None``。如果省略串列欄位," +"則預設為空串列。如果省略 :class:`!ast.expr_context` 型別的欄位,則預設為 :" +"class:`Load() `。如果省略任何其他欄位,則會引發 :exc:" +"`DeprecationWarning`,且 AST 節點將沒有此欄位。在 Python 3.15 中,這種情況會" +"引發錯誤。" #: ../../library/ast.rst:130 msgid "Class :class:`ast.Constant` is now used for all constants." @@ -415,6 +424,9 @@ msgid "" "did not match any of the fields of the AST node. This behavior is deprecated " "and will be removed in Python 3.15." msgstr "" +"先前版本的 Python 允許建立缺少必填欄位的 AST 節點。同樣地,AST 節點建構函式允" +"許將任意關鍵字引數設為 AST 節點的屬性,即使它們與 AST 節點的任何欄位都不匹" +"配。此行為已被棄用,並將在 Python 3.15 中刪除。" #: ../../library/ast.rst:160 msgid "" @@ -451,7 +463,6 @@ msgstr "" "閱 :func:`ast.parse`。" #: ../../library/ast.rst:181 -#, fuzzy msgid "" ">>> print(ast.dump(ast.parse('x = 1'), indent=4))\n" "Module(\n" @@ -467,8 +478,7 @@ msgstr "" " Assign(\n" " targets=[\n" " Name(id='x', ctx=Store())],\n" -" value=Constant(value=1))],\n" -" type_ignores=[])" +" value=Constant(value=1))])" #: ../../library/ast.rst:194 msgid "" @@ -661,7 +671,6 @@ msgstr "" "一個 f 字串,包含一系列 :class:`FormattedValue` 和 :class:`Constant` 節點。" #: ../../library/ast.rst:302 -#, fuzzy msgid "" ">>> print(ast.dump(ast.parse('f\"sin({a}) is {sin(a):.3}\"', mode='eval'), " "indent=4))\n" @@ -697,8 +706,7 @@ msgstr "" " value=Call(\n" " func=Name(id='sin', ctx=Load()),\n" " args=[\n" -" Name(id='a', ctx=Load())],\n" -" keywords=[]),\n" +" Name(id='a', ctx=Load())]),\n" " conversion=-1,\n" " format_spec=JoinedStr(\n" " values=[\n" @@ -832,7 +840,6 @@ msgstr "" "(context) 來區分這些情況。" #: ../../library/ast.rst:406 -#, fuzzy msgid "" ">>> print(ast.dump(ast.parse('a'), indent=4))\n" "Module(\n" @@ -859,8 +866,7 @@ msgstr "" "Module(\n" " body=[\n" " Expr(\n" -" value=Name(id='a', ctx=Load()))],\n" -" type_ignores=[])\n" +" value=Name(id='a', ctx=Load()))])\n" "\n" ">>> print(ast.dump(ast.parse('a = 1'), indent=4))\n" "Module(\n" @@ -868,16 +874,14 @@ msgstr "" " Assign(\n" " targets=[\n" " Name(id='a', ctx=Store())],\n" -" value=Constant(value=1))],\n" -" type_ignores=[])\n" +" value=Constant(value=1))])\n" "\n" ">>> print(ast.dump(ast.parse('del a'), indent=4))\n" "Module(\n" " body=[\n" " Delete(\n" " targets=[\n" -" Name(id='a', ctx=Del())])],\n" -" type_ignores=[])" +" Name(id='a', ctx=Del())])])" #: ../../library/ast.rst:432 msgid "" @@ -889,7 +893,6 @@ msgstr "" "使用 ``*args`` 建置 :class:`Call` 節點時必須使用此型別。" #: ../../library/ast.rst:436 -#, fuzzy msgid "" ">>> print(ast.dump(ast.parse('a, *b = it'), indent=4))\n" "Module(\n" @@ -917,8 +920,7 @@ msgstr "" " value=Name(id='b', ctx=Store()),\n" " ctx=Store())],\n" " ctx=Store())],\n" -" value=Name(id='it', ctx=Load()))],\n" -" type_ignores=[])" +" value=Name(id='it', ctx=Load()))])" #: ../../library/ast.rst:456 msgid "Expressions" @@ -938,7 +940,6 @@ msgstr "" "`YieldFrom`" #: ../../library/ast.rst:465 -#, fuzzy msgid "" ">>> print(ast.dump(ast.parse('-a'), indent=4))\n" "Module(\n" @@ -954,8 +955,7 @@ msgstr "" " Expr(\n" " value=UnaryOp(\n" " op=USub(),\n" -" operand=Name(id='a', ctx=Load())))],\n" -" type_ignores=[])" +" operand=Name(id='a', ctx=Load())))])" #: ../../library/ast.rst:478 msgid "" @@ -1108,12 +1108,10 @@ msgstr "" "``keywords`` 保存一個 :class:`.keyword` 物件串列,表示透過關鍵字傳遞的引數。" #: ../../library/ast.rst:600 -#, fuzzy msgid "" "The ``args`` and ``keywords`` arguments are optional and default to empty " "lists." -msgstr "" -"建立 ``Call`` 節點時會需要 ``args`` 和 ``keywords``,但它們可以是空串列。" +msgstr "``args`` 和 ``keywords`` 引數是可選的,預設為空串列。" #: ../../library/ast.rst:602 msgid "" @@ -1326,7 +1324,6 @@ msgid "``generators`` is a list of :class:`comprehension` nodes." msgstr "``generators`` 是一個 :class:`comprehension` 節點的串列。" #: ../../library/ast.rst:735 -#, fuzzy msgid "" ">>> print(ast.dump(\n" "... ast.parse('[x for x in numbers]', mode='eval'),\n" @@ -1369,8 +1366,10 @@ msgid "" " iter=Name(id='numbers', ctx=Load()),\n" " is_async=0)]))" msgstr "" -">>> print(ast.dump(ast.parse('[x for x in numbers]', mode='eval'), " -"indent=4))\n" +">>> print(ast.dump(\n" +"... ast.parse('[x for x in numbers]', mode='eval'),\n" +"... indent=4,\n" +"... ))\n" "Expression(\n" " body=ListComp(\n" " elt=Name(id='x', ctx=Load()),\n" @@ -1378,10 +1377,11 @@ msgstr "" " comprehension(\n" " target=Name(id='x', ctx=Store()),\n" " iter=Name(id='numbers', ctx=Load()),\n" -" ifs=[],\n" " is_async=0)]))\n" -">>> print(ast.dump(ast.parse('{x: x**2 for x in numbers}', mode='eval'), " -"indent=4))\n" +">>> print(ast.dump(\n" +"... ast.parse('{x: x**2 for x in numbers}', mode='eval'),\n" +"... indent=4,\n" +"... ))\n" "Expression(\n" " body=DictComp(\n" " key=Name(id='x', ctx=Load()),\n" @@ -1393,10 +1393,11 @@ msgstr "" " comprehension(\n" " target=Name(id='x', ctx=Store()),\n" " iter=Name(id='numbers', ctx=Load()),\n" -" ifs=[],\n" " is_async=0)]))\n" -">>> print(ast.dump(ast.parse('{x for x in numbers}', mode='eval'), " -"indent=4))\n" +">>> print(ast.dump(\n" +"... ast.parse('{x for x in numbers}', mode='eval'),\n" +"... indent=4,\n" +"... ))\n" "Expression(\n" " body=SetComp(\n" " elt=Name(id='x', ctx=Load()),\n" @@ -1404,7 +1405,6 @@ msgstr "" " comprehension(\n" " target=Name(id='x', ctx=Store()),\n" " iter=Name(id='numbers', ctx=Load()),\n" -" ifs=[],\n" " is_async=0)]))" #: ../../library/ast.rst:781 @@ -1427,7 +1427,6 @@ msgstr "" "該值為整數(0 或 1)。" #: ../../library/ast.rst:789 -#, fuzzy msgid "" ">>> print(ast.dump(ast.parse('[ord(c) for line in file for c in line]', " "mode='eval'),\n" @@ -1487,43 +1486,63 @@ msgid "" " iter=Name(id='soc', ctx=Load()),\n" " is_async=1)]))" msgstr "" -">>> print(ast.dump(ast.parse('[x for x in numbers]', mode='eval'), " -"indent=4))\n" +">>> print(ast.dump(ast.parse('[ord(c) for line in file for c in line]', " +"mode='eval'),\n" +"... indent=4)) # Multiple comprehensions in one.\n" "Expression(\n" " body=ListComp(\n" -" elt=Name(id='x', ctx=Load()),\n" +" elt=Call(\n" +" func=Name(id='ord', ctx=Load()),\n" +" args=[\n" +" Name(id='c', ctx=Load())]),\n" " generators=[\n" " comprehension(\n" -" target=Name(id='x', ctx=Store()),\n" -" iter=Name(id='numbers', ctx=Load()),\n" -" ifs=[],\n" +" target=Name(id='line', ctx=Store()),\n" +" iter=Name(id='file', ctx=Load()),\n" +" is_async=0),\n" +" comprehension(\n" +" target=Name(id='c', ctx=Store()),\n" +" iter=Name(id='line', ctx=Load()),\n" " is_async=0)]))\n" -">>> print(ast.dump(ast.parse('{x: x**2 for x in numbers}', mode='eval'), " -"indent=4))\n" +"\n" +">>> print(ast.dump(ast.parse('(n**2 for n in it if n>5 if n<10)', " +"mode='eval'),\n" +"... indent=4)) # generator comprehension\n" "Expression(\n" -" body=DictComp(\n" -" key=Name(id='x', ctx=Load()),\n" -" value=BinOp(\n" -" left=Name(id='x', ctx=Load()),\n" +" body=GeneratorExp(\n" +" elt=BinOp(\n" +" left=Name(id='n', ctx=Load()),\n" " op=Pow(),\n" " right=Constant(value=2)),\n" " generators=[\n" " comprehension(\n" -" target=Name(id='x', ctx=Store()),\n" -" iter=Name(id='numbers', ctx=Load()),\n" -" ifs=[],\n" +" target=Name(id='n', ctx=Store()),\n" +" iter=Name(id='it', ctx=Load()),\n" +" ifs=[\n" +" Compare(\n" +" left=Name(id='n', ctx=Load()),\n" +" ops=[\n" +" Gt()],\n" +" comparators=[\n" +" Constant(value=5)]),\n" +" Compare(\n" +" left=Name(id='n', ctx=Load()),\n" +" ops=[\n" +" Lt()],\n" +" comparators=[\n" +" Constant(value=10)])],\n" " is_async=0)]))\n" -">>> print(ast.dump(ast.parse('{x for x in numbers}', mode='eval'), " -"indent=4))\n" +"\n" +">>> print(ast.dump(ast.parse('[i async for i in soc]', mode='eval'),\n" +"... indent=4)) # Async comprehension\n" "Expression(\n" -" body=SetComp(\n" -" elt=Name(id='x', ctx=Load()),\n" +" body=ListComp(\n" +" elt=Name(id='i', ctx=Load()),\n" " generators=[\n" " comprehension(\n" -" target=Name(id='x', ctx=Store()),\n" -" iter=Name(id='numbers', ctx=Load()),\n" -" ifs=[],\n" -" is_async=0)]))" +" target=Name(id='i', ctx=Store()),\n" +" iter=Name(id='soc', ctx=Load()),\n" +" is_async=1)]))" #: ../../library/ast.rst:851 msgid "Statements" @@ -1551,7 +1570,6 @@ msgid "" msgstr "``type_comment`` 是一個可選字串,其中的註解為型別註釋。" #: ../../library/ast.rst:865 -#, fuzzy msgid "" ">>> print(ast.dump(ast.parse('a = b = 1'), indent=4)) # Multiple assignment\n" "Module(\n" @@ -1574,7 +1592,16 @@ msgid "" " ctx=Store())],\n" " value=Name(id='c', ctx=Load()))])" msgstr "" -">>> print(ast.dump(ast.parse('a, *b = it'), indent=4))\n" +">>> print(ast.dump(ast.parse('a = b = 1'), indent=4)) # Multiple assignment\n" +"Module(\n" +" body=[\n" +" Assign(\n" +" targets=[\n" +" Name(id='a', ctx=Store()),\n" +" Name(id='b', ctx=Store())],\n" +" value=Constant(value=1))])\n" +"\n" +">>> print(ast.dump(ast.parse('a,b = c'), indent=4)) # Unpacking\n" "Module(\n" " body=[\n" " Assign(\n" @@ -1582,12 +1609,9 @@ msgstr "" " Tuple(\n" " elts=[\n" " Name(id='a', ctx=Store()),\n" -" Starred(\n" -" value=Name(id='b', ctx=Store()),\n" -" ctx=Store())],\n" +" Name(id='b', ctx=Store())],\n" " ctx=Store())],\n" -" value=Name(id='it', ctx=Load()))],\n" -" type_ignores=[])" +" value=Name(id='c', ctx=Load()))])" #: ../../library/ast.rst:891 msgid "" @@ -1614,7 +1638,6 @@ msgstr "" "中。" #: ../../library/ast.rst:902 -#, fuzzy msgid "" ">>> print(ast.dump(ast.parse('c: int'), indent=4))\n" "Module(\n" @@ -1657,43 +1680,46 @@ msgid "" " annotation=Name(id='int', ctx=Load()),\n" " simple=0)])" msgstr "" -">>> print(ast.dump(ast.parse('[x for x in numbers]', mode='eval'), " -"indent=4))\n" -"Expression(\n" -" body=ListComp(\n" -" elt=Name(id='x', ctx=Load()),\n" -" generators=[\n" -" comprehension(\n" -" target=Name(id='x', ctx=Store()),\n" -" iter=Name(id='numbers', ctx=Load()),\n" -" ifs=[],\n" -" is_async=0)]))\n" -">>> print(ast.dump(ast.parse('{x: x**2 for x in numbers}', mode='eval'), " -"indent=4))\n" -"Expression(\n" -" body=DictComp(\n" -" key=Name(id='x', ctx=Load()),\n" -" value=BinOp(\n" -" left=Name(id='x', ctx=Load()),\n" -" op=Pow(),\n" -" right=Constant(value=2)),\n" -" generators=[\n" -" comprehension(\n" -" target=Name(id='x', ctx=Store()),\n" -" iter=Name(id='numbers', ctx=Load()),\n" -" ifs=[],\n" -" is_async=0)]))\n" -">>> print(ast.dump(ast.parse('{x for x in numbers}', mode='eval'), " -"indent=4))\n" -"Expression(\n" -" body=SetComp(\n" -" elt=Name(id='x', ctx=Load()),\n" -" generators=[\n" -" comprehension(\n" -" target=Name(id='x', ctx=Store()),\n" -" iter=Name(id='numbers', ctx=Load()),\n" -" ifs=[],\n" -" is_async=0)]))" +">>> print(ast.dump(ast.parse('c: int'), indent=4))\n" +"Module(\n" +" body=[\n" +" AnnAssign(\n" +" target=Name(id='c', ctx=Store()),\n" +" annotation=Name(id='int', ctx=Load()),\n" +" simple=1)])\n" +"\n" +">>> print(ast.dump(ast.parse('(a): int = 1'), indent=4)) # Annotation with " +"parenthesis\n" +"Module(\n" +" body=[\n" +" AnnAssign(\n" +" target=Name(id='a', ctx=Store()),\n" +" annotation=Name(id='int', ctx=Load()),\n" +" value=Constant(value=1),\n" +" simple=0)])\n" +"\n" +">>> print(ast.dump(ast.parse('a.b: int'), indent=4)) # Attribute annotation\n" +"Module(\n" +" body=[\n" +" AnnAssign(\n" +" target=Attribute(\n" +" value=Name(id='a', ctx=Load()),\n" +" attr='b',\n" +" ctx=Store()),\n" +" annotation=Name(id='int', ctx=Load()),\n" +" simple=0)])\n" +"\n" +">>> print(ast.dump(ast.parse('a[1]: int'), indent=4)) # Subscript " +"annotation\n" +"Module(\n" +" body=[\n" +" AnnAssign(\n" +" target=Subscript(\n" +" value=Name(id='a', ctx=Load()),\n" +" slice=Constant(value=1),\n" +" ctx=Store()),\n" +" annotation=Name(id='int', ctx=Load()),\n" +" simple=0)])" #: ../../library/ast.rst:946 msgid "" @@ -1715,7 +1741,6 @@ msgstr "" "class:`List` 類別。" #: ../../library/ast.rst:954 -#, fuzzy msgid "" ">>> print(ast.dump(ast.parse('x += 2'), indent=4))\n" "Module(\n" @@ -1731,8 +1756,7 @@ msgstr "" " AugAssign(\n" " target=Name(id='x', ctx=Store()),\n" " op=Add(),\n" -" value=Constant(value=2))],\n" -" type_ignores=[])" +" value=Constant(value=2))])" #: ../../library/ast.rst:967 msgid "" @@ -1745,7 +1769,6 @@ msgstr "" "from y`` 中的可選部分 ``y``。" #: ../../library/ast.rst:971 -#, fuzzy msgid "" ">>> print(ast.dump(ast.parse('raise x from y'), indent=4))\n" "Module(\n" @@ -1759,8 +1782,7 @@ msgstr "" " body=[\n" " Raise(\n" " exc=Name(id='x', ctx=Load()),\n" -" cause=Name(id='y', ctx=Load()))],\n" -" type_ignores=[])" +" cause=Name(id='y', ctx=Load()))])" #: ../../library/ast.rst:983 msgid "" @@ -1771,7 +1793,6 @@ msgstr "" "保存失敗訊息。" #: ../../library/ast.rst:986 -#, fuzzy msgid "" ">>> print(ast.dump(ast.parse('assert x,y'), indent=4))\n" "Module(\n" @@ -1785,8 +1806,7 @@ msgstr "" " body=[\n" " Assert(\n" " test=Name(id='x', ctx=Load()),\n" -" msg=Name(id='y', ctx=Load()))],\n" -" type_ignores=[])" +" msg=Name(id='y', ctx=Load()))])" #: ../../library/ast.rst:998 msgid "" @@ -1797,7 +1817,6 @@ msgstr "" "`Attribute` 或 :class:`Subscript` 節點。" #: ../../library/ast.rst:1001 -#, fuzzy msgid "" ">>> print(ast.dump(ast.parse('del x,y,z'), indent=4))\n" "Module(\n" @@ -1815,15 +1834,13 @@ msgstr "" " targets=[\n" " Name(id='x', ctx=Del()),\n" " Name(id='y', ctx=Del()),\n" -" Name(id='z', ctx=Del())])],\n" -" type_ignores=[])" +" Name(id='z', ctx=Del())])])" #: ../../library/ast.rst:1015 msgid "A ``pass`` statement." msgstr "一個 ``pass`` 陳述式。" #: ../../library/ast.rst:1017 -#, fuzzy msgid "" ">>> print(ast.dump(ast.parse('pass'), indent=4))\n" "Module(\n" @@ -1833,8 +1850,7 @@ msgstr "" ">>> print(ast.dump(ast.parse('pass'), indent=4))\n" "Module(\n" " body=[\n" -" Pass()],\n" -" type_ignores=[])" +" Pass()])" #: ../../library/ast.rst:1027 msgid "" @@ -1848,7 +1864,6 @@ msgstr "" "parameter) ` 的串列、``value`` 是型別別名的值。" #: ../../library/ast.rst:1032 -#, fuzzy msgid "" ">>> print(ast.dump(ast.parse('type Alias = int'), indent=4))\n" "Module(\n" @@ -1862,9 +1877,7 @@ msgstr "" " body=[\n" " TypeAlias(\n" " name=Name(id='Alias', ctx=Store()),\n" -" type_params=[],\n" -" value=Name(id='int', ctx=Load()))],\n" -" type_ignores=[])" +" value=Name(id='int', ctx=Load()))])" #: ../../library/ast.rst:1043 msgid "" @@ -1881,7 +1894,6 @@ msgid "An import statement. ``names`` is a list of :class:`alias` nodes." msgstr "一個 import 陳述式。``names`` 是 :class:`alias` 節點的串列。" #: ../../library/ast.rst:1053 -#, fuzzy msgid "" ">>> print(ast.dump(ast.parse('import x,y,z'), indent=4))\n" "Module(\n" @@ -1899,8 +1911,7 @@ msgstr "" " names=[\n" " alias(name='x'),\n" " alias(name='y'),\n" -" alias(name='z')])],\n" -" type_ignores=[])" +" alias(name='z')])])" #: ../../library/ast.rst:1067 msgid "" @@ -1914,7 +1925,6 @@ msgstr "" "``level`` 是一個整數,保存相對引入的級別(0 表示絕對引入)。" #: ../../library/ast.rst:1072 -#, fuzzy msgid "" ">>> print(ast.dump(ast.parse('from y import x,y,z'), indent=4))\n" "Module(\n" @@ -1936,8 +1946,7 @@ msgstr "" " alias(name='x'),\n" " alias(name='y'),\n" " alias(name='z')],\n" -" level=0)],\n" -" type_ignores=[])" +" level=0)])" #: ../../library/ast.rst:1088 msgid "" @@ -1948,7 +1957,6 @@ msgstr "" "``None``。" #: ../../library/ast.rst:1091 -#, fuzzy msgid "" ">>> print(ast.dump(ast.parse('from ..foo.bar import a as b, c'), indent=4))\n" "Module(\n" @@ -1968,8 +1976,7 @@ msgstr "" " names=[\n" " alias(name='a', asname='b'),\n" " alias(name='c')],\n" -" level=2)],\n" -" type_ignores=[])" +" level=2)])" #: ../../library/ast.rst:1104 msgid "Control flow" @@ -1999,7 +2006,6 @@ msgstr "" "額外的 :class:`If` 節點出現。" #: ../../library/ast.rst:1119 -#, fuzzy msgid "" ">>> print(ast.dump(ast.parse(\"\"\"\n" "... if x:\n" @@ -2049,8 +2055,7 @@ msgstr "" " value=Constant(value=Ellipsis))],\n" " orelse=[\n" " Expr(\n" -" value=Constant(value=Ellipsis))])])],\n" -" type_ignores=[])" +" value=Constant(value=Ellipsis))])])])" #: ../../library/ast.rst:1149 msgid "" @@ -2068,7 +2073,6 @@ msgstr "" "``break`` 陳述式執行。" #: ../../library/ast.rst:1160 -#, fuzzy msgid "" ">>> print(ast.dump(ast.parse(\"\"\"\n" "... for x in y:\n" @@ -2104,8 +2108,7 @@ msgstr "" " value=Constant(value=Ellipsis))],\n" " orelse=[\n" " Expr(\n" -" value=Constant(value=Ellipsis))])],\n" -" type_ignores=[])" +" value=Constant(value=Ellipsis))])])" #: ../../library/ast.rst:1183 msgid "" @@ -2114,7 +2117,6 @@ msgid "" msgstr "一個 ``while`` 迴圈。``test`` 保存條件,例如 :class:`Compare` 節點。" #: ../../library/ast.rst:1186 -#, fuzzy msgid "" ">> print(ast.dump(ast.parse(\"\"\"\n" "... while x:\n" @@ -2148,15 +2150,13 @@ msgstr "" " value=Constant(value=Ellipsis))],\n" " orelse=[\n" " Expr(\n" -" value=Constant(value=Ellipsis))])],\n" -" type_ignores=[])" +" value=Constant(value=Ellipsis))])])" #: ../../library/ast.rst:1209 msgid "The ``break`` and ``continue`` statements." msgstr "``break`` 和 ``continue`` 陳述式。" #: ../../library/ast.rst:1211 -#, fuzzy msgid "" ">>> print(ast.dump(ast.parse(\"\"\"\\\n" "... for a in b:\n" @@ -2208,9 +2208,7 @@ msgstr "" " body=[\n" " Break()],\n" " orelse=[\n" -" Continue()])],\n" -" orelse=[])],\n" -" type_ignores=[])" +" Continue()])])])" #: ../../library/ast.rst:1242 msgid "" @@ -2221,7 +2219,6 @@ msgstr "" "有屬性都是要執行之節點的串列。" #: ../../library/ast.rst:1245 -#, fuzzy msgid "" ">>> print(ast.dump(ast.parse(\"\"\"\n" "... try:\n" @@ -2295,8 +2292,7 @@ msgstr "" " value=Constant(value=Ellipsis))],\n" " finalbody=[\n" " Expr(\n" -" value=Constant(value=Ellipsis))])],\n" -" type_ignores=[])" +" value=Constant(value=Ellipsis))])])" #: ../../library/ast.rst:1287 msgid "" @@ -2309,7 +2305,6 @@ msgstr "" "``except*`` 區塊而不是 ``except``。" #: ../../library/ast.rst:1291 -#, fuzzy msgid "" ">>> print(ast.dump(ast.parse(\"\"\"\n" "... try:\n" @@ -2347,10 +2342,7 @@ msgstr "" " type=Name(id='Exception', ctx=Load()),\n" " body=[\n" " Expr(\n" -" value=Constant(value=Ellipsis))])],\n" -" orelse=[],\n" -" finalbody=[])],\n" -" type_ignores=[])" +" value=Constant(value=Ellipsis))])])])" #: ../../library/ast.rst:1316 msgid "" @@ -2365,7 +2357,6 @@ msgstr "" "``None``。``body`` 是節點串列。" #: ../../library/ast.rst:1321 -#, fuzzy msgid "" ">>> print(ast.dump(ast.parse(\"\"\"\\\n" "... try:\n" @@ -2407,10 +2398,7 @@ msgstr "" " ExceptHandler(\n" " type=Name(id='TypeError', ctx=Load()),\n" " body=[\n" -" Pass()])],\n" -" orelse=[],\n" -" finalbody=[])],\n" -" type_ignores=[])" +" Pass()])])])" #: ../../library/ast.rst:1347 msgid "" @@ -2433,7 +2421,6 @@ msgstr "" "class:`Tuple` 或 :class:`List`,或者如果不使用則為 ``None`` 。" #: ../../library/ast.rst:1362 -#, fuzzy msgid "" ">>> print(ast.dump(ast.parse(\"\"\"\\\n" "... with a as b, c as d:\n" @@ -2477,9 +2464,7 @@ msgstr "" " func=Name(id='something', ctx=Load()),\n" " args=[\n" " Name(id='b', ctx=Load()),\n" -" Name(id='d', ctx=Load())],\n" -" keywords=[]))])],\n" -" type_ignores=[])" +" Name(id='d', ctx=Load())]))])])" #: ../../library/ast.rst:1388 msgid "Pattern matching" @@ -2520,7 +2505,6 @@ msgstr "" "求值 (evaluate) 結果為真,則會執行該節點串列。" #: ../../library/ast.rst:1412 -#, fuzzy msgid "" ">>> print(ast.dump(ast.parse(\"\"\"\n" "... match x:\n" @@ -2581,14 +2565,10 @@ msgstr "" " value=Constant(value=Ellipsis))]),\n" " match_case(\n" " pattern=MatchClass(\n" -" cls=Name(id='tuple', ctx=Load()),\n" -" patterns=[],\n" -" kwd_attrs=[],\n" -" kwd_patterns=[]),\n" +" cls=Name(id='tuple', ctx=Load())),\n" " body=[\n" " Expr(\n" -" value=Constant(value=Ellipsis))])])],\n" -" type_ignores=[])" +" value=Constant(value=Ellipsis))])])])" #: ../../library/ast.rst:1450 msgid "" @@ -2601,7 +2581,6 @@ msgstr "" "受到匹配陳述式文件中所述的限制。如果匹配主題等於求出值,則此模式成功。" #: ../../library/ast.rst:1455 -#, fuzzy msgid "" ">>> print(ast.dump(ast.parse(\"\"\"\n" "... match x:\n" @@ -2635,8 +2614,7 @@ msgstr "" " value=Constant(value='Relevant')),\n" " body=[\n" " Expr(\n" -" value=Constant(value=Ellipsis))])])],\n" -" type_ignores=[])" +" value=Constant(value=Ellipsis))])])])" #: ../../library/ast.rst:1478 msgid "" @@ -2649,7 +2627,6 @@ msgstr "" "則此模式成功。" #: ../../library/ast.rst:1482 -#, fuzzy msgid "" ">>> print(ast.dump(ast.parse(\"\"\"\n" "... match x:\n" @@ -2681,8 +2658,7 @@ msgstr "" " pattern=MatchSingleton(value=None),\n" " body=[\n" " Expr(\n" -" value=Constant(value=Ellipsis))])])],\n" -" type_ignores=[])" +" value=Constant(value=Ellipsis))])])])" #: ../../library/ast.rst:1504 msgid "" @@ -2695,7 +2671,6 @@ msgstr "" "子模式之一是 ``MatchStar`` 節點,則匹配可變長度序列,否則匹配固定長度序列。" #: ../../library/ast.rst:1509 -#, fuzzy msgid "" ">>> print(ast.dump(ast.parse(\"\"\"\n" "... match x:\n" @@ -2737,8 +2712,7 @@ msgstr "" " value=Constant(value=2))]),\n" " body=[\n" " Expr(\n" -" value=Constant(value=Ellipsis))])])],\n" -" type_ignores=[])" +" value=Constant(value=Ellipsis))])])])" #: ../../library/ast.rst:1536 msgid "" @@ -2751,7 +2725,6 @@ msgstr "" "整體序列模式成功,則包含其餘序列元素的串列將綁定到該名稱。" #: ../../library/ast.rst:1540 -#, fuzzy msgid "" ">>> print(ast.dump(ast.parse(\"\"\"\n" "... match x:\n" @@ -2813,8 +2786,7 @@ msgstr "" " MatchStar()]),\n" " body=[\n" " Expr(\n" -" value=Constant(value=Ellipsis))])])],\n" -" type_ignores=[])" +" value=Constant(value=Ellipsis))])])])" #: ../../library/ast.rst:1577 msgid "" @@ -2841,7 +2813,6 @@ msgstr "" "成功,則包含其餘對映元素的字典將綁定到該名稱。" #: ../../library/ast.rst:1589 -#, fuzzy msgid "" ">>> print(ast.dump(ast.parse(\"\"\"\n" "... match x:\n" @@ -2896,12 +2867,10 @@ msgstr "" " Expr(\n" " value=Constant(value=Ellipsis))]),\n" " match_case(\n" -" pattern=MatchMapping(keys=[], patterns=[], " -"rest='rest'),\n" +" pattern=MatchMapping(rest='rest'),\n" " body=[\n" " Expr(\n" -" value=Constant(value=Ellipsis))])])],\n" -" type_ignores=[])" +" value=Constant(value=Ellipsis))])])])" #: ../../library/ast.rst:1624 msgid "" @@ -2937,7 +2906,6 @@ msgstr "" "實例進行匹配。一些內建型別也以這種方式匹配,如同匹配陳述式文件中所述。" #: ../../library/ast.rst:1639 -#, fuzzy msgid "" ">>> print(ast.dump(ast.parse(\"\"\"\n" "... match x:\n" @@ -2999,16 +2967,13 @@ msgstr "" " MatchValue(\n" " value=Constant(value=0)),\n" " MatchValue(\n" -" value=Constant(value=0))],\n" -" kwd_attrs=[],\n" -" kwd_patterns=[]),\n" +" value=Constant(value=0))]),\n" " body=[\n" " Expr(\n" " value=Constant(value=Ellipsis))]),\n" " match_case(\n" " pattern=MatchClass(\n" " cls=Name(id='Point3D', ctx=Load()),\n" -" patterns=[],\n" " kwd_attrs=[\n" " 'x',\n" " 'y',\n" @@ -3022,8 +2987,7 @@ msgstr "" " value=Constant(value=0))]),\n" " body=[\n" " Expr(\n" -" value=Constant(value=Ellipsis))])])],\n" -" type_ignores=[])" +" value=Constant(value=Ellipsis))])])])" #: ../../library/ast.rst:1686 msgid "" @@ -3046,7 +3010,6 @@ msgstr "" "``pattern`` 也必須為 ``None``,並且節點代表通配模式。" #: ../../library/ast.rst:1695 -#, fuzzy msgid "" ">>> print(ast.dump(ast.parse(\"\"\"\n" "... match x:\n" @@ -3100,8 +3063,7 @@ msgstr "" " pattern=MatchAs(),\n" " body=[\n" " Expr(\n" -" value=Constant(value=Ellipsis))])])],\n" -" type_ignores=[])" +" value=Constant(value=Ellipsis))])])])" #: ../../library/ast.rst:1728 msgid "" @@ -3116,7 +3078,6 @@ msgstr "" "式將失敗。 ``patterns`` 屬性包含將與主題進行匹配的匹配模式節點串列。" #: ../../library/ast.rst:1734 -#, fuzzy msgid "" ">>> print(ast.dump(ast.parse(\"\"\"\n" "... match x:\n" @@ -3158,8 +3119,7 @@ msgstr "" " MatchAs(name='y')]),\n" " body=[\n" " Expr(\n" -" value=Constant(value=Ellipsis))])])],\n" -" type_ignores=[])" +" value=Constant(value=Ellipsis))])])])" #: ../../library/ast.rst:1762 msgid "Type parameters" @@ -3172,7 +3132,6 @@ msgid "" msgstr ":ref:`型別參數 `\\ 可以存在於類別、函式和型別別名上。" #: ../../library/ast.rst:1769 -#, fuzzy msgid "" "A :class:`typing.TypeVar`. *name* is the name of the type variable. *bound* " "is the bound or constraints, if any. If *bound* is a :class:`Tuple`, it " @@ -3180,12 +3139,12 @@ msgid "" "is the default value; if the :class:`!TypeVar` has no default, this " "attribute will be set to ``None``." msgstr "" -"一個 :class:`typing.TypeVar`。``name`` 是型別變數的名稱。``bound`` 是(如果有" -"存在的)界限 (bound) 或約束 (constraint)。如果 ``bound`` 是一個 :class:" -"`Tuple`,它代表約束;否則它代表界限。" +"一個 :class:`typing.TypeVar`。*name* 是型別變數的名稱。*bound* 是(如果有存在" +"的)界限 (bound) 或約束 (constraint)。如果 *bound* 是一個 :class:`Tuple`,它" +"代表約束;否則它代表界限。*default_value* 為預設值;如果 :class:`!TypeVar` 沒" +"有預設值,那此屬性會被設為 ``None``。" #: ../../library/ast.rst:1775 -#, fuzzy msgid "" ">>> print(ast.dump(ast.parse(\"type Alias[T: int = bool] = list[T]\"), " "indent=4))\n" @@ -3203,7 +3162,8 @@ msgid "" " slice=Name(id='T', ctx=Load()),\n" " ctx=Load()))])" msgstr "" -">>> print(ast.dump(ast.parse(\"type Alias[T: int] = list[T]\"), indent=4))\n" +">>> print(ast.dump(ast.parse(\"type Alias[T: int = bool] = list[T]\"), " +"indent=4))\n" "Module(\n" " body=[\n" " TypeAlias(\n" @@ -3211,18 +3171,17 @@ msgstr "" " type_params=[\n" " TypeVar(\n" " name='T',\n" -" bound=Name(id='int', ctx=Load()))],\n" +" bound=Name(id='int', ctx=Load()),\n" +" default_value=Name(id='bool', ctx=Load()))],\n" " value=Subscript(\n" " value=Name(id='list', ctx=Load()),\n" " slice=Name(id='T', ctx=Load()),\n" -" ctx=Load()))],\n" -" type_ignores=[])" +" ctx=Load()))])" #: ../../library/ast.rst:1794 ../../library/ast.rst:1829 #: ../../library/ast.rst:1861 -#, fuzzy msgid "Added the *default_value* parameter." -msgstr "新增 *indent* 選項。" +msgstr "新增 *default_value* 參數。" #: ../../library/ast.rst:1799 msgid "" @@ -3230,9 +3189,10 @@ msgid "" "specification. *default_value* is the default value; if the :class:`!" "ParamSpec` has no default, this attribute will be set to ``None``." msgstr "" +"一個 :class:`typing.ParamSpec`。*name* 是參數規範的名稱。*default_value* 是預" +"設值;如果 :class:`!ParamSpec` 沒有預設值,則該屬性將設定為 ``None``。" #: ../../library/ast.rst:1803 -#, fuzzy msgid "" ">>> print(ast.dump(ast.parse(\"type Alias[**P = (int, str)] = Callable[P, " "int]\"), indent=4))\n" @@ -3257,14 +3217,20 @@ msgid "" " ctx=Load()),\n" " ctx=Load()))])" msgstr "" -">>> print(ast.dump(ast.parse(\"type Alias[**P] = Callable[P, int]\"), " -"indent=4))\n" +">>> print(ast.dump(ast.parse(\"type Alias[**P = (int, str)] = Callable[P, " +"int]\"), indent=4))\n" "Module(\n" " body=[\n" " TypeAlias(\n" " name=Name(id='Alias', ctx=Store()),\n" " type_params=[\n" -" ParamSpec(name='P')],\n" +" ParamSpec(\n" +" name='P',\n" +" default_value=Tuple(\n" +" elts=[\n" +" Name(id='int', ctx=Load()),\n" +" Name(id='str', ctx=Load())],\n" +" ctx=Load()))],\n" " value=Subscript(\n" " value=Name(id='Callable', ctx=Load()),\n" " slice=Tuple(\n" @@ -3272,22 +3238,19 @@ msgstr "" " Name(id='P', ctx=Load()),\n" " Name(id='int', ctx=Load())],\n" " ctx=Load()),\n" -" ctx=Load()))],\n" -" type_ignores=[])" +" ctx=Load()))])" #: ../../library/ast.rst:1834 -#, fuzzy msgid "" "A :class:`typing.TypeVarTuple`. *name* is the name of the type variable " "tuple. *default_value* is the default value; if the :class:`!TypeVarTuple` " "has no default, this attribute will be set to ``None``." msgstr "" -"一個 :class:`typing.TypeVar`。``name`` 是型別變數的名稱。``bound`` 是(如果有" -"存在的)界限 (bound) 或約束 (constraint)。如果 ``bound`` 是一個 :class:" -"`Tuple`,它代表約束;否則它代表界限。" +"一個 :class:`typing.TypeVarTuple`。*name* 是型別變數元組的名稱。" +"*default_value* 為預設值;如果 :class:`!TypeVarTuple` 沒有預設值,那此屬性會" +"被設為 ``None``。" #: ../../library/ast.rst:1838 -#, fuzzy msgid "" ">>> print(ast.dump(ast.parse(\"type Alias[*Ts = ()] = tuple[*Ts]\"), " "indent=4))\n" @@ -3309,13 +3272,16 @@ msgid "" " ctx=Load()),\n" " ctx=Load()))])" msgstr "" -">>> print(ast.dump(ast.parse(\"type Alias[*Ts] = tuple[*Ts]\"), indent=4))\n" +">>> print(ast.dump(ast.parse(\"type Alias[*Ts = ()] = tuple[*Ts]\"), " +"indent=4))\n" "Module(\n" " body=[\n" " TypeAlias(\n" " name=Name(id='Alias', ctx=Store()),\n" " type_params=[\n" -" TypeVarTuple(name='Ts')],\n" +" TypeVarTuple(\n" +" name='Ts',\n" +" default_value=Tuple(ctx=Load()))],\n" " value=Subscript(\n" " value=Name(id='tuple', ctx=Load()),\n" " slice=Tuple(\n" @@ -3324,8 +3290,7 @@ msgstr "" " value=Name(id='Ts', ctx=Load()),\n" " ctx=Load())],\n" " ctx=Load()),\n" -" ctx=Load()))],\n" -" type_ignores=[])" +" ctx=Load()))])" #: ../../library/ast.rst:1865 msgid "Function and class definitions" @@ -3359,12 +3324,12 @@ msgstr "" msgid "``returns`` is the return annotation." msgstr "``returns`` 是回傳註釋。" -#: ../../library/ast.rst:1877 ../../library/ast.rst:2041 +#: ../../library/ast.rst:1877 ../../library/ast.rst:2040 msgid "``type_params`` is a list of :ref:`type parameters `." msgstr "``type_params`` 是\\ :ref:`型別參數 `\\ 的串列。" -#: ../../library/ast.rst:1883 ../../library/ast.rst:2068 -#: ../../library/ast.rst:2079 +#: ../../library/ast.rst:1883 ../../library/ast.rst:2067 +#: ../../library/ast.rst:2078 msgid "Added ``type_params``." msgstr "新增了 ``type_params``。" @@ -3377,7 +3342,6 @@ msgstr "" "``body`` 保存單個節點。" #: ../../library/ast.rst:1892 -#, fuzzy msgid "" ">>> print(ast.dump(ast.parse('lambda x,y: ...'), indent=4))\n" "Module(\n" @@ -3396,15 +3360,10 @@ msgstr "" " Expr(\n" " value=Lambda(\n" " args=arguments(\n" -" posonlyargs=[],\n" " args=[\n" " arg(arg='x'),\n" -" arg(arg='y')],\n" -" kwonlyargs=[],\n" -" kw_defaults=[],\n" -" defaults=[]),\n" -" body=Constant(value=Ellipsis)))],\n" -" type_ignores=[])" +" arg(arg='y')]),\n" +" body=Constant(value=Ellipsis)))])" #: ../../library/ast.rst:1908 msgid "The arguments for a function." @@ -3455,7 +3414,6 @@ msgid "" msgstr "``type_comment`` 是一個可選字串,其註解為型別註釋" #: ../../library/ast.rst:1929 -#, fuzzy msgid "" ">>> print(ast.dump(ast.parse(\"\"\"\\\n" "... @decorator1\n" @@ -3505,7 +3463,6 @@ msgstr "" " FunctionDef(\n" " name='f',\n" " args=arguments(\n" -" posonlyargs=[],\n" " args=[\n" " arg(\n" " arg='a',\n" @@ -3528,16 +3485,13 @@ msgstr "" " decorator_list=[\n" " Name(id='decorator1', ctx=Load()),\n" " Name(id='decorator2', ctx=Load())],\n" -" returns=Constant(value='return annotation'),\n" -" type_params=[])],\n" -" type_ignores=[])" +" returns=Constant(value='return annotation'))])" #: ../../library/ast.rst:1969 msgid "A ``return`` statement." msgstr "一個 ``return`` 陳述式。" #: ../../library/ast.rst:1971 -#, fuzzy msgid "" ">>> print(ast.dump(ast.parse('return 4'), indent=4))\n" "Module(\n" @@ -3549,8 +3503,7 @@ msgstr "" "Module(\n" " body=[\n" " Return(\n" -" value=Constant(value=4))],\n" -" type_ignores=[])" +" value=Constant(value=4))])" #: ../../library/ast.rst:1983 msgid "" @@ -3562,7 +3515,6 @@ msgstr "" "回來的值,則必須將它們包裝在 :class:`Expr` 節點中。" #: ../../library/ast.rst:1986 -#, fuzzy msgid "" ">>> print(ast.dump(ast.parse('yield x'), indent=4))\n" "Module(\n" @@ -3583,16 +3535,14 @@ msgstr "" " body=[\n" " Expr(\n" " value=Yield(\n" -" value=Name(id='x', ctx=Load())))],\n" -" type_ignores=[])\n" +" value=Name(id='x', ctx=Load())))])\n" "\n" ">>> print(ast.dump(ast.parse('yield from x'), indent=4))\n" "Module(\n" " body=[\n" " Expr(\n" " value=YieldFrom(\n" -" value=Name(id='x', ctx=Load())))],\n" -" type_ignores=[])" +" value=Name(id='x', ctx=Load())))])" #: ../../library/ast.rst:2006 msgid "" @@ -3600,7 +3550,6 @@ msgid "" msgstr "``global`` 和 ``nonlocal`` 陳述式。``names`` 是原始字串的串列。" #: ../../library/ast.rst:2008 -#, fuzzy msgid "" ">>> print(ast.dump(ast.parse('global x,y,z'), indent=4))\n" "Module(\n" @@ -3627,8 +3576,7 @@ msgstr "" " names=[\n" " 'x',\n" " 'y',\n" -" 'z'])],\n" -" type_ignores=[])\n" +" 'z'])])\n" "\n" ">>> print(ast.dump(ast.parse('nonlocal x,y,z'), indent=4))\n" "Module(\n" @@ -3637,8 +3585,7 @@ msgstr "" " names=[\n" " 'x',\n" " 'y',\n" -" 'z'])],\n" -" type_ignores=[])" +" 'z'])])" #: ../../library/ast.rst:2031 msgid "A class definition." @@ -3653,27 +3600,25 @@ msgid "``bases`` is a list of nodes for explicitly specified base classes." msgstr "``bases`` 是被顯式指定的基底類別節點串列。" #: ../../library/ast.rst:2035 -#, fuzzy msgid "" "``keywords`` is a list of :class:`.keyword` nodes, principally for " -"'metaclass'. Other keywords will be passed to the metaclass, as per " -"`PEP-3115 `_." +"'metaclass'. Other keywords will be passed to the metaclass, as per :pep:" +"`3115`." msgstr "" "``keywords`` 是一個 :class:`.keyword` 節點的串列,主要用於 'metaclass'(元類" "別)。如 :pep:`3115` 所述,其他關鍵字將被傳遞到 metaclass。" -#: ../../library/ast.rst:2038 +#: ../../library/ast.rst:2037 msgid "" "``body`` is a list of nodes representing the code within the class " "definition." msgstr "``body`` 是表示類別定義中程式碼的節點串列。" -#: ../../library/ast.rst:2040 +#: ../../library/ast.rst:2039 msgid "``decorator_list`` is a list of nodes, as in :class:`FunctionDef`." msgstr "``decorator_list`` 是一個節點串列,如 :class:`FunctionDef` 中所示。" -#: ../../library/ast.rst:2043 -#, fuzzy +#: ../../library/ast.rst:2042 msgid "" ">>> print(ast.dump(ast.parse(\"\"\"\\\n" "... @decorator1\n" @@ -3719,21 +3664,19 @@ msgstr "" " Pass()],\n" " decorator_list=[\n" " Name(id='decorator1', ctx=Load()),\n" -" Name(id='decorator2', ctx=Load())],\n" -" type_params=[])],\n" -" type_ignores=[])" +" Name(id='decorator2', ctx=Load())])])" -#: ../../library/ast.rst:2072 +#: ../../library/ast.rst:2071 msgid "Async and await" msgstr "async 和 await" -#: ../../library/ast.rst:2076 +#: ../../library/ast.rst:2075 msgid "" "An ``async def`` function definition. Has the same fields as :class:" "`FunctionDef`." msgstr "一個 ``async def`` 函式定義。與 :class:`FunctionDef` 具有相同的欄位。" -#: ../../library/ast.rst:2085 +#: ../../library/ast.rst:2084 msgid "" "An ``await`` expression. ``value`` is what it waits for. Only valid in the " "body of an :class:`AsyncFunctionDef`." @@ -3741,8 +3684,7 @@ msgstr "" "一個 ``await`` 運算式。``value`` 是它等待的東西。僅在 :class:" "`AsyncFunctionDef` 主體 (body) 中有效。" -#: ../../library/ast.rst:2088 -#, fuzzy +#: ../../library/ast.rst:2087 msgid "" ">>> print(ast.dump(ast.parse(\"\"\"\\\n" "... async def f():\n" @@ -3767,24 +3709,14 @@ msgstr "" " body=[\n" " AsyncFunctionDef(\n" " name='f',\n" -" args=arguments(\n" -" posonlyargs=[],\n" -" args=[],\n" -" kwonlyargs=[],\n" -" kw_defaults=[],\n" -" defaults=[]),\n" +" args=arguments(),\n" " body=[\n" " Expr(\n" " value=Await(\n" " value=Call(\n" -" func=Name(id='other_func', ctx=Load()),\n" -" args=[],\n" -" keywords=[])))],\n" -" decorator_list=[],\n" -" type_params=[])],\n" -" type_ignores=[])" +" func=Name(id='other_func', ctx=Load()))))])])" -#: ../../library/ast.rst:2109 +#: ../../library/ast.rst:2108 msgid "" "``async for`` loops and ``async with`` context managers. They have the same " "fields as :class:`For` and :class:`With`, respectively. Only valid in the " @@ -3793,7 +3725,7 @@ msgstr "" "``async for`` 迴圈和 ``async with`` 情境管理器。它們分別具有與 :class:`For` " "和 :class:`With` 相同的欄位。僅在 :class:`AsyncFunctionDef` 主體中有效。" -#: ../../library/ast.rst:2114 +#: ../../library/ast.rst:2113 msgid "" "When a string is parsed by :func:`ast.parse`, operator nodes (subclasses of :" "class:`ast.operator`, :class:`ast.unaryop`, :class:`ast.cmpop`, :class:`ast." @@ -3806,11 +3738,11 @@ msgstr "" "boolop` 和 :class:`ast.expr_context`\\ )將是單例。對其中之一的更改將反映在所" "有其他出現的相同值中(例如 :class:`ast.Add`\\ )。" -#: ../../library/ast.rst:2122 +#: ../../library/ast.rst:2121 msgid ":mod:`ast` Helpers" msgstr ":mod:`ast` 輔助程式" -#: ../../library/ast.rst:2124 +#: ../../library/ast.rst:2123 msgid "" "Apart from the node classes, the :mod:`ast` module defines these utility " "functions and classes for traversing abstract syntax trees:" @@ -3818,18 +3750,18 @@ msgstr "" "除了節點類別之外,:mod:`ast` 模組還定義了這些用於遍歷 (traverse) 抽象語法樹的" "實用函式和類別:" -#: ../../library/ast.rst:2129 -#, fuzzy +#: ../../library/ast.rst:2128 msgid "" "Parse the source into an AST node. Equivalent to ``compile(source, " "filename, mode, flags=FLAGS_VALUE, optimize=optimize)``, where " "``FLAGS_VALUE`` is ``ast.PyCF_ONLY_AST`` if ``optimize <= 0`` and ``ast." "PyCF_OPTIMIZED_AST`` otherwise." msgstr "" -"將原始碼剖析為 AST 節點。相當於 ``compile(source, filename, mode, ast." -"PyCF_ONLY_AST)``。" +"將原始碼剖析為 AST 節點,相當於 ``compile(source, filename, mode, " +"flags=FLAGS_VALUE, optimize=optimize)``,其中 ``FLAGS_VALUE`` 在 ``optimize " +"<= 0`` 時為 ``ast.PyCF_ONLY_AST``,否則為 ``ast.PyCF_OPTIMIZED_AST``。" -#: ../../library/ast.rst:2134 +#: ../../library/ast.rst:2133 msgid "" "If ``type_comments=True`` is given, the parser is modified to check and " "return type comments as specified by :pep:`484` and :pep:`526`. This is " @@ -3848,7 +3780,7 @@ msgstr "" "``None``。此外,``# type: ignore`` 註釋的位置將作為 :class:`Module` 的 " "``type_ignores`` 屬性回傳(否則它始終是一個空串列)。" -#: ../../library/ast.rst:2144 +#: ../../library/ast.rst:2143 msgid "" "In addition, if ``mode`` is ``'func_type'``, the input syntax is modified to " "correspond to :pep:`484` \"signature type comments\", e.g. ``(str, int) -> " @@ -3858,8 +3790,7 @@ msgstr "" "名型別註解 (signature type comments)」而被修改,例如 ``(str, int) -> " "List[str]``。" -#: ../../library/ast.rst:2148 -#, fuzzy +#: ../../library/ast.rst:2147 msgid "" "Setting ``feature_version`` to a tuple ``(major, minor)`` will result in a " "\"best-effort\" attempt to parse using that Python version's grammar. For " @@ -3873,18 +3804,18 @@ msgid "" msgstr "" "將 ``feature_version`` 設定為元組 ``(major, minor)`` 將「盡可能」嘗試使用該 " "Python 版本的文法進行剖析。當前 ``major`` 必須等於 ``3``。例如,設定 " -"``feature_version=(3, 4)`` 將嘗試禁止剖析 :keyword:`match` 陳述式。目前 " -"``major`` 必須為 ``3``、支援的最低版本為 ``(3, 4)``\\ (這在未來的 Python 版" +"``feature_version=(3, 9)`` 將嘗試禁止剖析 :keyword:`match` 陳述式。目前 " +"``major`` 必須為 ``3``、支援的最低版本為 ``(3, 7)``\\ (這在未來的 Python 版" "本中可能會增加);最高的是 ``sys.version_info[0:2]``。「盡可能」嘗試意味著不" "能保證剖析(或剖析的成功)與在與 ``feature_version`` 對應的 Python 版本上運行" "時相同。" -#: ../../library/ast.rst:2158 +#: ../../library/ast.rst:2157 msgid "" "If source contains a null character (``\\0``), :exc:`ValueError` is raised." msgstr "如果來源包含 null 字元 (``\\0``),則會引發 :exc:`ValueError`。" -#: ../../library/ast.rst:2161 +#: ../../library/ast.rst:2160 msgid "" "Note that successfully parsing source code into an AST object doesn't " "guarantee that the source code provided is valid Python code that can be " @@ -3898,14 +3829,14 @@ msgstr "" "原始的 ``return 42`` 為 return 陳述式生成一個有效的 AST 節點,但它不能單獨編" "譯(它需要位於函式節點內)。" -#: ../../library/ast.rst:2168 +#: ../../library/ast.rst:2167 msgid "" "In particular, :func:`ast.parse` won't do any scoping checks, which the " "compilation step does." msgstr "" "特別是 :func:`ast.parse` 不會執行任何範圍檢查,而編譯步驟才會執行此操作。" -#: ../../library/ast.rst:2172 +#: ../../library/ast.rst:2171 msgid "" "It is possible to crash the Python interpreter with a sufficiently large/" "complex string due to stack depth limitations in Python's AST compiler." @@ -3913,17 +3844,19 @@ msgstr "" "由於 Python AST 編譯器中的堆疊 (stack) 深度限制,太大或太複雜的字串可能會導" "致 Python 直譯器崩潰。" -#: ../../library/ast.rst:2176 +#: ../../library/ast.rst:2175 msgid "Added ``type_comments``, ``mode='func_type'`` and ``feature_version``." msgstr "新增 ``type_comments``、``mode='func_type'`` 與 ``feature_version``。" -#: ../../library/ast.rst:2179 +#: ../../library/ast.rst:2178 msgid "" "The minimum supported version for ``feature_version`` is now ``(3, 7)``. The " "``optimize`` argument was added." msgstr "" +"``feature_version`` 的最低支援版本現在是 ``(3, 7)``。新增了 ``optimize`` 引" +"數。" -#: ../../library/ast.rst:2186 +#: ../../library/ast.rst:2185 msgid "" "Unparse an :class:`ast.AST` object and generate a string with code that " "would produce an equivalent :class:`ast.AST` object if parsed back with :" @@ -3932,7 +3865,7 @@ msgstr "" "反剖析 :class:`ast.AST` 物件並生成一個帶有程式碼的字串,如果使用 :func:`ast." "parse` 剖析回來,該程式碼將生成等效的 :class:`ast.AST` 物件。" -#: ../../library/ast.rst:2191 +#: ../../library/ast.rst:2190 msgid "" "The produced code string will not necessarily be equal to the original code " "that generated the :class:`ast.AST` object (without any compiler " @@ -3941,13 +3874,13 @@ msgstr "" "生成的程式碼字串不一定等於生成 :class:`ast.AST` 物件的原始程式碼(沒有任何編" "譯器最佳化,例如常數元組/凍結集合)。" -#: ../../library/ast.rst:2196 +#: ../../library/ast.rst:2195 msgid "" "Trying to unparse a highly complex expression would result with :exc:" "`RecursionError`." msgstr "嘗試剖析高度複雜的運算式會導致 :exc:`RecursionError`。" -#: ../../library/ast.rst:2204 +#: ../../library/ast.rst:2203 msgid "" "Evaluate an expression node or a string containing only a Python literal or " "container display. The string or node provided may only consist of the " @@ -3958,7 +3891,7 @@ msgstr "" "能包含以下 Python 文本結構:字串、位元組、數字、元組、串列、字典、集合、布林" "值、``None`` 和 ``Ellipsis``。" -#: ../../library/ast.rst:2209 +#: ../../library/ast.rst:2208 msgid "" "This can be used for evaluating strings containing Python values without the " "need to parse the values oneself. It is not capable of evaluating " @@ -3967,7 +3900,7 @@ msgstr "" "這可用於為包含 Python 值的字串求值,而無需自己剖析這些值。它無法計算任意複雜" "的運算式,例如涉及運算子或索引。" -#: ../../library/ast.rst:2214 +#: ../../library/ast.rst:2213 msgid "" "This function had been documented as \"safe\" in the past without defining " "what that meant. That was misleading. This is specifically designed not to " @@ -3984,13 +3917,13 @@ msgstr "" "盡或 C 堆疊耗盡,從而導致行程崩潰。某些輸入也可能會出現 CPU 消耗過多而導致拒" "絕服務的情況。因此不建議在不受信任的資料上呼叫它。" -#: ../../library/ast.rst:2224 +#: ../../library/ast.rst:2223 msgid "" "It is possible to crash the Python interpreter due to stack depth " "limitations in Python's AST compiler." msgstr "由於 Python AST 編譯器的堆疊深度限制,Python 直譯器可能會崩潰。" -#: ../../library/ast.rst:2227 +#: ../../library/ast.rst:2226 msgid "" "It can raise :exc:`ValueError`, :exc:`TypeError`, :exc:`SyntaxError`, :exc:" "`MemoryError` and :exc:`RecursionError` depending on the malformed input." @@ -3998,19 +3931,19 @@ msgstr "" "它可能會引發 :exc:`ValueError`、:exc:`TypeError`、:exc:`SyntaxError`、:exc:" "`MemoryError` 和 :exc:`RecursionError`,具體取決於格式錯誤的輸入。" -#: ../../library/ast.rst:2231 +#: ../../library/ast.rst:2230 msgid "Now allows bytes and set literals." msgstr "現在允許位元組和集合文本 (set literal)。" -#: ../../library/ast.rst:2234 +#: ../../library/ast.rst:2233 msgid "Now supports creating empty sets with ``'set()'``." msgstr "現在支援使用 ``'set()'`` 建立空集合。" -#: ../../library/ast.rst:2237 +#: ../../library/ast.rst:2236 msgid "For string inputs, leading spaces and tabs are now stripped." msgstr "對於字串輸入,前導空格和定位字元 (tab) 現在已被去除。" -#: ../../library/ast.rst:2243 +#: ../../library/ast.rst:2242 msgid "" "Return the docstring of the given *node* (which must be a :class:" "`FunctionDef`, :class:`AsyncFunctionDef`, :class:`ClassDef`, or :class:" @@ -4022,11 +3955,11 @@ msgstr "" "件字串則為 ``None``。如果 *clean* 為 true,則使用 :func:`inspect.cleandoc` 清" "理文件字串的縮排。" -#: ../../library/ast.rst:2249 +#: ../../library/ast.rst:2248 msgid ":class:`AsyncFunctionDef` is now supported." msgstr "目前已支援 :class:`AsyncFunctionDef`。" -#: ../../library/ast.rst:2255 +#: ../../library/ast.rst:2254 msgid "" "Get source code segment of the *source* that generated *node*. If some " "location information (:attr:`~ast.AST.lineno`, :attr:`~ast.AST.end_lineno`, :" @@ -4037,7 +3970,7 @@ msgstr "" "lineno`、:attr:`~ast.AST.end_lineno`、:attr:`~ast.AST.col_offset` 或 :attr:" "`~ast.AST.end_col_offset`\\ )遺漏,則回傳 ``None``。" -#: ../../library/ast.rst:2259 +#: ../../library/ast.rst:2258 msgid "" "If *padded* is ``True``, the first line of a multi-line statement will be " "padded with spaces to match its original position." @@ -4045,7 +3978,7 @@ msgstr "" "如果 *padded* 為 ``True``,則多列陳述式的第一列將用空格填充 (padded) 以匹配其" "原始位置。" -#: ../../library/ast.rst:2267 +#: ../../library/ast.rst:2266 msgid "" "When you compile a node tree with :func:`compile`, the compiler expects :" "attr:`~ast.AST.lineno` and :attr:`~ast.AST.col_offset` attributes for every " @@ -4059,7 +3992,7 @@ msgstr "" "要存在。填入生成的節點相當繁瑣,因此該輔助工具透過將這些屬性設定為父節點的" "值,在尚未設定的地方遞迴地新增這些屬性。它從 *node* 開始遞迴地作用。" -#: ../../library/ast.rst:2276 +#: ../../library/ast.rst:2275 msgid "" "Increment the line number and end line number of each node in the tree " "starting at *node* by *n*. This is useful to \"move code\" to a different " @@ -4068,7 +4001,7 @@ msgstr "" "將樹中從 *node* 開始的每個節點的列號和結束列號增加 *n*。這對於「移動程式碼」" "到檔案中的不同位置很有用。" -#: ../../library/ast.rst:2283 +#: ../../library/ast.rst:2282 msgid "" "Copy source location (:attr:`~ast.AST.lineno`, :attr:`~ast.AST.col_offset`, :" "attr:`~ast.AST.end_lineno`, and :attr:`~ast.AST.end_col_offset`) from " @@ -4078,7 +4011,7 @@ msgstr "" "attr:`~ast.AST.end_lineno` 和 :attr:`~ast.AST.end_col_offset` )從 " "*old_node* 複製到 *new_node*,並回傳 *new_node* 。" -#: ../../library/ast.rst:2290 +#: ../../library/ast.rst:2289 msgid "" "Yield a tuple of ``(fieldname, value)`` for each field in ``node._fields`` " "that is present on *node*." @@ -4086,7 +4019,7 @@ msgstr "" "為 *node* 上存在的 ``node._fields`` 中的每個欄位生成一個 ``(fieldname, " "value)`` 元組。" -#: ../../library/ast.rst:2296 +#: ../../library/ast.rst:2295 msgid "" "Yield all direct child nodes of *node*, that is, all fields that are nodes " "and all items of fields that are lists of nodes." @@ -4094,7 +4027,7 @@ msgstr "" "生成 *node* 的所有直接子節點,即作為節點的所有欄位以及作為節點串列欄位的所有" "項目。" -#: ../../library/ast.rst:2302 +#: ../../library/ast.rst:2301 msgid "" "Recursively yield all descendant nodes in the tree starting at *node* " "(including *node* itself), in no specified order. This is useful if you " @@ -4103,7 +4036,7 @@ msgstr "" "遞迴地生成樹中從 *node* 開始的所有後代節點(包括 *node* 本身),不按指定順" "序。如果你只想就地修改節點而不關心情境,這非常有用。" -#: ../../library/ast.rst:2309 +#: ../../library/ast.rst:2308 msgid "" "A node visitor base class that walks the abstract syntax tree and calls a " "visitor function for every node found. This function may return a value " @@ -4112,13 +4045,13 @@ msgstr "" "節點訪問者基底類別,它遍歷抽象語法樹並為找到的每個節點呼叫訪問者函式。該函式" "可能會回傳一個由 :meth:`visit` 方法轉發的值。" -#: ../../library/ast.rst:2313 +#: ../../library/ast.rst:2312 msgid "" "This class is meant to be subclassed, with the subclass adding visitor " "methods." msgstr "這個類別應該被子類別化,子類別新增訪問者方法。" -#: ../../library/ast.rst:2318 +#: ../../library/ast.rst:2317 msgid "" "Visit a node. The default implementation calls the method called :samp:" "`self.visit_{classname}` where *classname* is the name of the node class, " @@ -4128,11 +4061,11 @@ msgstr "" "*classname* 是節點類別的名稱,或者在該方法不存在時呼叫 :meth:" "`generic_visit`。" -#: ../../library/ast.rst:2324 +#: ../../library/ast.rst:2323 msgid "This visitor calls :meth:`visit` on all children of the node." msgstr "該訪問者對該節點的所有子節點呼叫 :meth:`visit`。" -#: ../../library/ast.rst:2326 +#: ../../library/ast.rst:2325 msgid "" "Note that child nodes of nodes that have a custom visitor method won't be " "visited unless the visitor calls :meth:`generic_visit` or visits them itself." @@ -4140,11 +4073,11 @@ msgstr "" "請注意,除非訪問者呼叫 :meth:`generic_visit` 或訪問它們本身,否則不會訪問具有" "自定義訪問者方法的節點之子節點。" -#: ../../library/ast.rst:2332 +#: ../../library/ast.rst:2331 msgid "Handles all constant nodes." msgstr "處理所有常數節點。" -#: ../../library/ast.rst:2334 +#: ../../library/ast.rst:2333 msgid "" "Don't use the :class:`NodeVisitor` if you want to apply changes to nodes " "during traversal. For this a special visitor exists (:class:" @@ -4154,7 +4087,7 @@ msgstr "" "`NodeVisitor`。為此,有個允許修改的特殊遍歷訪問者工具 :class:" "`NodeTransformer`。" -#: ../../library/ast.rst:2340 +#: ../../library/ast.rst:2339 msgid "" "Methods :meth:`!visit_Num`, :meth:`!visit_Str`, :meth:`!visit_Bytes`, :meth:" "`!visit_NameConstant` and :meth:`!visit_Ellipsis` are deprecated now and " @@ -4165,13 +4098,13 @@ msgstr "" "visit_NameConstant` 和 :meth:`!visit_Ellipsis` 方法現已棄用,並且不會在未來的" "Python 版本中被呼叫。新增 :meth:`visit_Constant` 方法來處理所有常數節點。" -#: ../../library/ast.rst:2348 +#: ../../library/ast.rst:2347 msgid "" "A :class:`NodeVisitor` subclass that walks the abstract syntax tree and " "allows modification of nodes." msgstr "一個 :class:`NodeVisitor` 子類別,它會遍歷抽象語法樹並允許修改節點。" -#: ../../library/ast.rst:2351 +#: ../../library/ast.rst:2350 msgid "" "The :class:`NodeTransformer` will walk the AST and use the return value of " "the visitor methods to replace or remove the old node. If the return value " @@ -4183,7 +4116,7 @@ msgstr "" "點。如果訪問者方法的回傳值為 ``None``,則該節點將從其位置中刪除,否則將被替換" "為回傳值。回傳值可能是原始節點,在這種情況下不會發生替換。" -#: ../../library/ast.rst:2357 +#: ../../library/ast.rst:2356 msgid "" "Here is an example transformer that rewrites all occurrences of name lookups " "(``foo``) to ``data['foo']``::" @@ -4191,7 +4124,7 @@ msgstr "" "下面是一個示範用的 transformer,它將查找所有出現名稱 (``foo``) 並改寫為 " "``data['foo']``: ::" -#: ../../library/ast.rst:2360 +#: ../../library/ast.rst:2359 msgid "" "class RewriteName(NodeTransformer):\n" "\n" @@ -4211,7 +4144,7 @@ msgstr "" " ctx=node.ctx\n" " )" -#: ../../library/ast.rst:2369 +#: ../../library/ast.rst:2368 msgid "" "Keep in mind that if the node you're operating on has child nodes you must " "either transform the child nodes yourself or call the :meth:`~ast." @@ -4220,7 +4153,7 @@ msgstr "" "請記住,如果你正在操作的節點有子節點,你必須自己轉換子節點或先呼叫該節點的 :" "meth:`~ast.NodeVisitor.generic_visit` 方法。" -#: ../../library/ast.rst:2373 +#: ../../library/ast.rst:2372 msgid "" "For nodes that were part of a collection of statements (that applies to all " "statement nodes), the visitor may also return a list of nodes rather than " @@ -4229,7 +4162,7 @@ msgstr "" "對於屬於陳述式總集 (collection) 一部分的節點(適用於所有陳述式節點),訪問者" "還可以回傳節點串列,而不僅僅是單個節點。" -#: ../../library/ast.rst:2377 +#: ../../library/ast.rst:2376 msgid "" "If :class:`NodeTransformer` introduces new nodes (that weren't part of " "original tree) without giving them location information (such as :attr:`~ast." @@ -4240,7 +4173,7 @@ msgstr "" "它們提供位置資訊(例如 :attr:`~ast.AST.lineno`\\ ),則應使用新的子樹呼叫 :" "func:`fix_missing_locations` 以重新計算位置資訊: ::" -#: ../../library/ast.rst:2382 +#: ../../library/ast.rst:2381 msgid "" "tree = ast.parse('foo', mode='eval')\n" "new_tree = fix_missing_locations(RewriteName().visit(tree))" @@ -4248,15 +4181,15 @@ msgstr "" "tree = ast.parse('foo', mode='eval')\n" "new_tree = fix_missing_locations(RewriteName().visit(tree))" -#: ../../library/ast.rst:2385 +#: ../../library/ast.rst:2384 msgid "Usually you use the transformer like this::" msgstr "你通常會像這樣使用 transformer: ::" -#: ../../library/ast.rst:2387 +#: ../../library/ast.rst:2386 msgid "node = YourTransformer().visit(node)" msgstr "node = YourTransformer().visit(node)" -#: ../../library/ast.rst:2392 +#: ../../library/ast.rst:2391 msgid "" "Return a formatted dump of the tree in *node*. This is mainly useful for " "debugging purposes. If *annotate_fields* is true (by default), the returned " @@ -4272,7 +4205,7 @@ msgstr "" "潔。預設情況下,不會傾印列號和行偏移量等屬性。如果需要,可以設定 " "*include_attributes* 為 true。" -#: ../../library/ast.rst:2400 +#: ../../library/ast.rst:2399 msgid "" "If *indent* is a non-negative integer or string, then the tree will be " "pretty-printed with that indent level. An indent level of 0, negative, or " @@ -4286,23 +4219,23 @@ msgstr "" "(預設值)代表選擇單列表示。使用正整數縮排可以在每個級別縮排相同數量的空格。" "如果 *indent* 是一個字串(例如 ``\"\\t\"``\\ ),則該字串用於縮排每個級別。" -#: ../../library/ast.rst:2407 +#: ../../library/ast.rst:2406 msgid "" "If *show_empty* is ``False`` (the default), empty lists and fields that are " "``None`` will be omitted from the output." msgstr "" +"如果 *show_empty* 為 ``False`` (預設值),則輸出中將省略 ``False`` 的空串列" +"和欄位。" -#: ../../library/ast.rst:2410 +#: ../../library/ast.rst:2409 msgid "Added the *indent* option." msgstr "新增 *indent* 選項。" -#: ../../library/ast.rst:2413 -#, fuzzy +#: ../../library/ast.rst:2412 msgid "Added the *show_empty* option." -msgstr "新增 *indent* 選項。" +msgstr "新增 *show_empty* 選項。" -#: ../../library/ast.rst:2416 -#, fuzzy +#: ../../library/ast.rst:2415 msgid "" ">>> print(ast.dump(ast.parse(\"\"\"\\\n" "... async def f():\n" @@ -4332,7 +4265,7 @@ msgstr "" ">>> print(ast.dump(ast.parse(\"\"\"\\\n" "... async def f():\n" "... await other_func()\n" -"... \"\"\"), indent=4))\n" +"... \"\"\"), indent=4, show_empty=True))\n" "Module(\n" " body=[\n" " AsyncFunctionDef(\n" @@ -4354,17 +4287,17 @@ msgstr "" " type_params=[])],\n" " type_ignores=[])" -#: ../../library/ast.rst:2447 +#: ../../library/ast.rst:2446 msgid "Compiler Flags" msgstr "編譯器旗標" -#: ../../library/ast.rst:2449 +#: ../../library/ast.rst:2448 msgid "" "The following flags may be passed to :func:`compile` in order to change " "effects on the compilation of a program:" msgstr "可以將以下旗標傳遞給 :func:`compile` 以變更對程式的編譯效果:" -#: ../../library/ast.rst:2454 +#: ../../library/ast.rst:2453 msgid "" "Enables support for top-level ``await``, ``async for``, ``async with`` and " "async comprehensions." @@ -4372,19 +4305,21 @@ msgstr "" "啟用對最高階 ``await``、``async for``、``async with`` 和非同步綜合運算的支" "援。" -#: ../../library/ast.rst:2461 +#: ../../library/ast.rst:2460 msgid "" "Generates and returns an abstract syntax tree instead of returning a " "compiled code object." msgstr "生成並回傳抽象語法樹,而不是回傳已編譯的程式碼物件。" -#: ../../library/ast.rst:2466 +#: ../../library/ast.rst:2465 msgid "" "The returned AST is optimized according to the *optimize* argument in :func:" "`compile` or :func:`ast.parse`." msgstr "" +"回傳的 AST 會根據 :func:`compile` 或 :func:`ast.parse` 中的 *optimize* 引數進" +"行最佳化。" -#: ../../library/ast.rst:2473 +#: ../../library/ast.rst:2472 msgid "" "Enables support for :pep:`484` and :pep:`526` style type comments (``# type: " "``, ``# type: ignore ``)." @@ -4392,47 +4327,47 @@ msgstr "" "啟用對 :pep:`484` 和 :pep:`526` 樣式型別註釋的支援 (``# type: ``, ``# " "type: ignore ``)。" -#: ../../library/ast.rst:2482 +#: ../../library/ast.rst:2481 msgid "Command-Line Usage" msgstr "命令列用法" -#: ../../library/ast.rst:2486 +#: ../../library/ast.rst:2485 msgid "" "The :mod:`ast` module can be executed as a script from the command line. It " "is as simple as:" msgstr ":mod:`ast` 模組可以作為腳本從命令列執行,可以像這樣簡單地做到:" -#: ../../library/ast.rst:2489 +#: ../../library/ast.rst:2488 msgid "python -m ast [-m ] [-a] [infile]" msgstr "python -m ast [-m ] [-a] [infile]" -#: ../../library/ast.rst:2493 +#: ../../library/ast.rst:2492 msgid "The following options are accepted:" msgstr "以下選項可被接受:" -#: ../../library/ast.rst:2499 +#: ../../library/ast.rst:2498 msgid "Show the help message and exit." msgstr "顯示幫助訊息並退出。" -#: ../../library/ast.rst:2504 +#: ../../library/ast.rst:2503 msgid "" "Specify what kind of code must be compiled, like the *mode* argument in :" "func:`parse`." msgstr "指定必須編譯哪種類型的程式碼,像是 :func:`parse` 中的 *mode* 引數。" -#: ../../library/ast.rst:2509 +#: ../../library/ast.rst:2508 msgid "Don't parse type comments." msgstr "不要剖析型別註解。" -#: ../../library/ast.rst:2513 +#: ../../library/ast.rst:2512 msgid "Include attributes such as line numbers and column offsets." msgstr "包括列號和行偏移量等屬性。" -#: ../../library/ast.rst:2518 +#: ../../library/ast.rst:2517 msgid "Indentation of nodes in AST (number of spaces)." msgstr "AST 中節點的縮進(空格數)。" -#: ../../library/ast.rst:2520 +#: ../../library/ast.rst:2519 msgid "" "If :file:`infile` is specified its contents are parsed to AST and dumped to " "stdout. Otherwise, the content is read from stdin." @@ -4440,7 +4375,7 @@ msgstr "" "如果指定了 :file:`infile`,則其內容將被剖析為 AST 並傾印 (dump) 到 stdout。否" "則會從 stdin 讀取內容。" -#: ../../library/ast.rst:2526 +#: ../../library/ast.rst:2525 msgid "" "`Green Tree Snakes `_, an external " "documentation resource, has good details on working with Python ASTs." @@ -4448,7 +4383,7 @@ msgstr "" "`Green Tree Snakes `_ 是一個外部文件" "資源,提供了有關使用 Python AST 的詳細資訊。" -#: ../../library/ast.rst:2529 +#: ../../library/ast.rst:2528 msgid "" "`ASTTokens `_ " "annotates Python ASTs with the positions of tokens and text in the source " @@ -4459,7 +4394,7 @@ msgstr "" "用生成它們的原始碼中的標記和文本的位置來註釋 Python AST。這對於進行原始碼轉換" "的工具很有幫助。" -#: ../../library/ast.rst:2534 +#: ../../library/ast.rst:2533 msgid "" "`leoAst.py `_ unifies the token-based and parse-tree-based views of python programs " @@ -4469,7 +4404,7 @@ msgstr "" "py>`_ 透過在 token 和 ast 節點之間插入雙向鏈結,統一了 python 程式的基於 " "token 和基於剖析樹的視圖。" -#: ../../library/ast.rst:2539 +#: ../../library/ast.rst:2538 msgid "" "`LibCST `_ parses code as a Concrete Syntax " "Tree that looks like an ast tree and keeps all formatting details. It's " @@ -4479,7 +4414,7 @@ msgstr "" "(Concrete Syntax Tree),看起來像 ast 樹並保留所有格式詳細資訊。它對於建置自動" "重構 (codemod) 應用程式和 linter 非常有用。" -#: ../../library/ast.rst:2544 +#: ../../library/ast.rst:2543 msgid "" "`Parso `_ is a Python parser that supports " "error recovery and round-trip parsing for different Python versions (in " @@ -4501,35 +4436,3 @@ msgstr "於 AST 文法中" #: ../../library/ast.rst:60 msgid "* (asterisk)" msgstr "* (星號)" - -#~ msgid "" -#~ "node = ast.UnaryOp()\n" -#~ "node.op = ast.USub()\n" -#~ "node.operand = ast.Constant()\n" -#~ "node.operand.value = 5\n" -#~ "node.operand.lineno = 0\n" -#~ "node.operand.col_offset = 0\n" -#~ "node.lineno = 0\n" -#~ "node.col_offset = 0" -#~ msgstr "" -#~ "node = ast.UnaryOp()\n" -#~ "node.op = ast.USub()\n" -#~ "node.operand = ast.Constant()\n" -#~ "node.operand.value = 5\n" -#~ "node.operand.lineno = 0\n" -#~ "node.operand.col_offset = 0\n" -#~ "node.lineno = 0\n" -#~ "node.col_offset = 0" - -#~ msgid "or the more compact ::" -#~ msgstr "或更簡潔的: ::" - -#~ msgid "" -#~ "A :class:`typing.ParamSpec`. ``name`` is the name of the parameter " -#~ "specification." -#~ msgstr "A :class:`typing.ParamSpec`。``name`` 是參數規範的名稱。" - -#~ msgid "" -#~ "A :class:`typing.TypeVarTuple`. ``name`` is the name of the type variable " -#~ "tuple." -#~ msgstr "一個 :class:`typing.TypeVarTuple`。``name`` 是型別變數元組的名稱。" diff --git a/library/asyncio-task.po b/library/asyncio-task.po index 6e293fd3d1..ab4532b2ef 100644 --- a/library/asyncio-task.po +++ b/library/asyncio-task.po @@ -226,7 +226,7 @@ msgstr "" #: ../../library/asyncio-task.rst:130 msgid ":class:`asyncio.TaskGroup`." -msgstr "" +msgstr ":class:`asyncio.TaskGroup`。" #: ../../library/asyncio-task.rst:137 msgid "Awaitables" diff --git a/library/asyncio.po b/library/asyncio.po index f6ca78be42..56727e33e5 100644 --- a/library/asyncio.po +++ b/library/asyncio.po @@ -148,18 +148,16 @@ msgstr "" "based) 的函式庫與程式碼。" #: ../../includes/wasm-notavail.rst:3 -#, fuzzy msgid ":ref:`Availability `: not WASI." -msgstr ":ref:`適用 `:非 Emscripten、非 WASI。" +msgstr ":ref:`適用 `:非 WASI。" #: ../../includes/wasm-notavail.rst:5 -#, fuzzy msgid "" "This module does not work or is not available on WebAssembly. See :ref:`wasm-" "availability` for more information." msgstr "" -"此模組在 WebAssembly 平台 ``wasm32-emscripten`` 和 ``wasm32-wasi`` 上不起作用" -"或無法使用。有關更多資訊,請參閱 :ref:`wasm-availability`。" +"此模組在 WebAssembly 平台上不起作用或無法使用。更多資訊請參閱 :ref:`wasm-" +"availability`。" #: ../../library/asyncio.rst:64 msgid "asyncio REPL" diff --git a/library/audioop.po b/library/audioop.po deleted file mode 100644 index 4de310eb6f..0000000000 --- a/library/audioop.po +++ /dev/null @@ -1,367 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) 2001-2022, Python Software Foundation -# This file is distributed under the same license as the Python package. -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: Python 3.13\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-03 11:11+0800\n" -"PO-Revision-Date: 2022-05-22 02:00+0800\n" -"Last-Translator: Liang-Bo Wang \n" -"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" -"tw)\n" -"Language: zh_TW\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Poedit 3.0.1\n" - -#: ../../library/audioop.rst:2 -msgid ":mod:`audioop` --- Manipulate raw audio data" -msgstr ":mod:`audioop` --- 操作原始聲音檔案" - -#: ../../library/audioop.rst:8 -msgid "" -"The :mod:`audioop` module is deprecated (see :pep:`PEP 594 <594#audioop>` " -"for details)." -msgstr "" -":mod:`audioop` 模組 (module) 即將被棄用(詳見 :pep:`PEP 594 " -"<594#audioop>`\\ )。" - -#: ../../library/audioop.rst:14 -msgid "" -"The :mod:`audioop` module contains some useful operations on sound " -"fragments. It operates on sound fragments consisting of signed integer " -"samples 8, 16, 24 or 32 bits wide, stored in :term:`bytes-like objects " -"`. All scalar items are integers, unless specified " -"otherwise." -msgstr "" - -#: ../../library/audioop.rst:19 -msgid "" -"Support for 24-bit samples was added. All functions now accept any :term:" -"`bytes-like object`. String input now results in an immediate error." -msgstr "" - -#: ../../library/audioop.rst:30 -msgid "" -"This module provides support for a-LAW, u-LAW and Intel/DVI ADPCM encodings." -msgstr "" - -#: ../../library/audioop.rst:34 -msgid "" -"A few of the more complicated operations only take 16-bit samples, otherwise " -"the sample size (in bytes) is always a parameter of the operation." -msgstr "" - -#: ../../library/audioop.rst:37 -msgid "The module defines the following variables and functions:" -msgstr "" - -#: ../../library/audioop.rst:42 -msgid "" -"This exception is raised on all errors, such as unknown number of bytes per " -"sample, etc." -msgstr "" - -#: ../../library/audioop.rst:48 -msgid "" -"Return a fragment which is the addition of the two samples passed as " -"parameters. *width* is the sample width in bytes, either ``1``, ``2``, ``3`` " -"or ``4``. Both fragments should have the same length. Samples are " -"truncated in case of overflow." -msgstr "" - -#: ../../library/audioop.rst:55 -msgid "" -"Decode an Intel/DVI ADPCM coded fragment to a linear fragment. See the " -"description of :func:`lin2adpcm` for details on ADPCM coding. Return a tuple " -"``(sample, newstate)`` where the sample has the width specified in *width*." -msgstr "" - -#: ../../library/audioop.rst:62 -msgid "" -"Convert sound fragments in a-LAW encoding to linearly encoded sound " -"fragments. a-LAW encoding always uses 8 bits samples, so *width* refers only " -"to the sample width of the output fragment here." -msgstr "" - -#: ../../library/audioop.rst:69 -msgid "Return the average over all samples in the fragment." -msgstr "" - -#: ../../library/audioop.rst:74 -msgid "" -"Return the average peak-peak value over all samples in the fragment. No " -"filtering is done, so the usefulness of this routine is questionable." -msgstr "" - -#: ../../library/audioop.rst:80 -msgid "" -"Return a fragment that is the original fragment with a bias added to each " -"sample. Samples wrap around in case of overflow." -msgstr "" - -#: ../../library/audioop.rst:86 -msgid "" -"\"Byteswap\" all samples in a fragment and returns the modified fragment. " -"Converts big-endian samples to little-endian and vice versa." -msgstr "" - -#: ../../library/audioop.rst:94 -msgid "" -"Return the number of zero crossings in the fragment passed as an argument." -msgstr "" - -#: ../../library/audioop.rst:99 -msgid "" -"Return a factor *F* such that ``rms(add(fragment, mul(reference, -F)))`` is " -"minimal, i.e., return the factor with which you should multiply *reference* " -"to make it match as well as possible to *fragment*. The fragments should " -"both contain 2-byte samples." -msgstr "" - -#: ../../library/audioop.rst:104 -msgid "The time taken by this routine is proportional to ``len(fragment)``." -msgstr "" - -#: ../../library/audioop.rst:109 -msgid "" -"Try to match *reference* as well as possible to a portion of *fragment* " -"(which should be the longer fragment). This is (conceptually) done by " -"taking slices out of *fragment*, using :func:`findfactor` to compute the " -"best match, and minimizing the result. The fragments should both contain 2-" -"byte samples. Return a tuple ``(offset, factor)`` where *offset* is the " -"(integer) offset into *fragment* where the optimal match started and " -"*factor* is the (floating-point) factor as per :func:`findfactor`." -msgstr "" - -#: ../../library/audioop.rst:120 -msgid "" -"Search *fragment* for a slice of length *length* samples (not bytes!) with " -"maximum energy, i.e., return *i* for which ``rms(fragment[i*2:" -"(i+length)*2])`` is maximal. The fragments should both contain 2-byte " -"samples." -msgstr "" - -#: ../../library/audioop.rst:124 -msgid "The routine takes time proportional to ``len(fragment)``." -msgstr "" - -#: ../../library/audioop.rst:129 -msgid "Return the value of sample *index* from the fragment." -msgstr "" - -#: ../../library/audioop.rst:134 -msgid "" -"Convert samples to 4 bit Intel/DVI ADPCM encoding. ADPCM coding is an " -"adaptive coding scheme, whereby each 4 bit number is the difference between " -"one sample and the next, divided by a (varying) step. The Intel/DVI ADPCM " -"algorithm has been selected for use by the IMA, so it may well become a " -"standard." -msgstr "" - -#: ../../library/audioop.rst:139 -msgid "" -"*state* is a tuple containing the state of the coder. The coder returns a " -"tuple ``(adpcmfrag, newstate)``, and the *newstate* should be passed to the " -"next call of :func:`lin2adpcm`. In the initial call, ``None`` can be passed " -"as the state. *adpcmfrag* is the ADPCM coded fragment packed 2 4-bit values " -"per byte." -msgstr "" - -#: ../../library/audioop.rst:147 -msgid "" -"Convert samples in the audio fragment to a-LAW encoding and return this as a " -"bytes object. a-LAW is an audio encoding format whereby you get a dynamic " -"range of about 13 bits using only 8 bit samples. It is used by the Sun " -"audio hardware, among others." -msgstr "" - -#: ../../library/audioop.rst:155 -msgid "Convert samples between 1-, 2-, 3- and 4-byte formats." -msgstr "" - -#: ../../library/audioop.rst:159 -msgid "" -"In some audio formats, such as .WAV files, 16, 24 and 32 bit samples are " -"signed, but 8 bit samples are unsigned. So when converting to 8 bit wide " -"samples for these formats, you need to also add 128 to the result::" -msgstr "" - -#: ../../library/audioop.rst:163 -msgid "" -"new_frames = audioop.lin2lin(frames, old_width, 1)\n" -"new_frames = audioop.bias(new_frames, 1, 128)" -msgstr "" - -#: ../../library/audioop.rst:166 -msgid "" -"The same, in reverse, has to be applied when converting from 8 to 16, 24 or " -"32 bit width samples." -msgstr "" - -#: ../../library/audioop.rst:172 -msgid "" -"Convert samples in the audio fragment to u-LAW encoding and return this as a " -"bytes object. u-LAW is an audio encoding format whereby you get a dynamic " -"range of about 14 bits using only 8 bit samples. It is used by the Sun " -"audio hardware, among others." -msgstr "" - -#: ../../library/audioop.rst:180 -msgid "" -"Return the maximum of the *absolute value* of all samples in a fragment." -msgstr "" - -#: ../../library/audioop.rst:185 -msgid "Return the maximum peak-peak value in the sound fragment." -msgstr "" - -#: ../../library/audioop.rst:190 -msgid "" -"Return a tuple consisting of the minimum and maximum values of all samples " -"in the sound fragment." -msgstr "" - -#: ../../library/audioop.rst:196 -msgid "" -"Return a fragment that has all samples in the original fragment multiplied " -"by the floating-point value *factor*. Samples are truncated in case of " -"overflow." -msgstr "" - -#: ../../library/audioop.rst:202 -msgid "Convert the frame rate of the input fragment." -msgstr "" - -#: ../../library/audioop.rst:204 -msgid "" -"*state* is a tuple containing the state of the converter. The converter " -"returns a tuple ``(newfragment, newstate)``, and *newstate* should be passed " -"to the next call of :func:`ratecv`. The initial call should pass ``None`` " -"as the state." -msgstr "" - -#: ../../library/audioop.rst:208 -msgid "" -"The *weightA* and *weightB* arguments are parameters for a simple digital " -"filter and default to ``1`` and ``0`` respectively." -msgstr "" - -#: ../../library/audioop.rst:214 -msgid "Reverse the samples in a fragment and returns the modified fragment." -msgstr "" - -#: ../../library/audioop.rst:219 -msgid "" -"Return the root-mean-square of the fragment, i.e. ``sqrt(sum(S_i^2)/n)``." -msgstr "" - -#: ../../library/audioop.rst:221 -msgid "This is a measure of the power in an audio signal." -msgstr "" - -#: ../../library/audioop.rst:226 -msgid "" -"Convert a stereo fragment to a mono fragment. The left channel is " -"multiplied by *lfactor* and the right channel by *rfactor* before adding the " -"two channels to give a mono signal." -msgstr "" - -#: ../../library/audioop.rst:233 -msgid "" -"Generate a stereo fragment from a mono fragment. Each pair of samples in " -"the stereo fragment are computed from the mono sample, whereby left channel " -"samples are multiplied by *lfactor* and right channel samples by *rfactor*." -msgstr "" - -#: ../../library/audioop.rst:240 -msgid "" -"Convert sound fragments in u-LAW encoding to linearly encoded sound " -"fragments. u-LAW encoding always uses 8 bits samples, so *width* refers only " -"to the sample width of the output fragment here." -msgstr "" - -#: ../../library/audioop.rst:244 -msgid "" -"Note that operations such as :func:`.mul` or :func:`.max` make no " -"distinction between mono and stereo fragments, i.e. all samples are treated " -"equal. If this is a problem the stereo fragment should be split into two " -"mono fragments first and recombined later. Here is an example of how to do " -"that::" -msgstr "" - -#: ../../library/audioop.rst:249 -msgid "" -"def mul_stereo(sample, width, lfactor, rfactor):\n" -" lsample = audioop.tomono(sample, width, 1, 0)\n" -" rsample = audioop.tomono(sample, width, 0, 1)\n" -" lsample = audioop.mul(lsample, width, lfactor)\n" -" rsample = audioop.mul(rsample, width, rfactor)\n" -" lsample = audioop.tostereo(lsample, width, 1, 0)\n" -" rsample = audioop.tostereo(rsample, width, 0, 1)\n" -" return audioop.add(lsample, rsample, width)" -msgstr "" - -#: ../../library/audioop.rst:258 -msgid "" -"If you use the ADPCM coder to build network packets and you want your " -"protocol to be stateless (i.e. to be able to tolerate packet loss) you " -"should not only transmit the data but also the state. Note that you should " -"send the *initial* state (the one you passed to :func:`lin2adpcm`) along to " -"the decoder, not the final state (as returned by the coder). If you want to " -"use :class:`struct.Struct` to store the state in binary you can code the " -"first element (the predicted value) in 16 bits and the second (the delta " -"index) in 8." -msgstr "" - -#: ../../library/audioop.rst:266 -msgid "" -"The ADPCM coders have never been tried against other ADPCM coders, only " -"against themselves. It could well be that I misinterpreted the standards in " -"which case they will not be interoperable with the respective standards." -msgstr "" - -#: ../../library/audioop.rst:270 -msgid "" -"The :func:`find\\*` routines might look a bit funny at first sight. They are " -"primarily meant to do echo cancellation. A reasonably fast way to do this " -"is to pick the most energetic piece of the output sample, locate that in the " -"input sample and subtract the whole output sample from the input sample::" -msgstr "" - -#: ../../library/audioop.rst:275 -msgid "" -"def echocancel(outputdata, inputdata):\n" -" pos = audioop.findmax(outputdata, 800) # one tenth second\n" -" out_test = outputdata[pos*2:]\n" -" in_test = inputdata[pos*2:]\n" -" ipos, factor = audioop.findfit(in_test, out_test)\n" -" # Optional (for better cancellation):\n" -" # factor = audioop.findfactor(in_test[ipos*2:ipos*2+len(out_test)],\n" -" # out_test)\n" -" prefill = '\\0'*(pos+ipos)*2\n" -" postfill = '\\0'*(len(inputdata)-len(prefill)-len(outputdata))\n" -" outputdata = prefill + audioop.mul(outputdata, 2, -factor) + postfill\n" -" return audioop.add(inputdata, outputdata, 2)" -msgstr "" - -#: ../../library/audioop.rst:24 -msgid "Intel/DVI ADPCM" -msgstr "Intel/DVI ADPCM" - -#: ../../library/audioop.rst:24 -msgid "ADPCM, Intel/DVI" -msgstr "ADPCM, Intel/DVI" - -#: ../../library/audioop.rst:24 -msgid "a-LAW" -msgstr "a-LAW" - -#: ../../library/audioop.rst:24 -msgid "u-LAW" -msgstr "u-LAW" diff --git a/library/cgi.po b/library/cgi.po deleted file mode 100644 index 8f7890bfa5..0000000000 --- a/library/cgi.po +++ /dev/null @@ -1,889 +0,0 @@ -# Copyright (C) 2001-2024, Python Software Foundation -# This file is distributed under the same license as the Python package. -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: Python 3.13\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-03 11:11+0800\n" -"PO-Revision-Date: 2022-05-22 02:01+0800\n" -"Last-Translator: Adrian Liaw \n" -"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" -"tw)\n" -"Language: zh_TW\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Poedit 3.0.1\n" - -#: ../../library/cgi.rst:2 -msgid ":mod:`cgi` --- Common Gateway Interface support" -msgstr ":mod:`cgi` --- 通用閘道器介面支援" - -#: ../../library/cgi.rst:8 -msgid "**Source code:** :source:`Lib/cgi.py`" -msgstr "**原始碼:**\\ :source:`Lib/cgi.py`" - -#: ../../library/cgi.rst:18 -msgid "" -"The :mod:`cgi` module is deprecated (see :pep:`PEP 594 <594#cgi>` for " -"details and alternatives)." -msgstr "" -":mod:`cgi` 模組 (module) 即將被棄用(詳情與替代方案請見 :pep:`PEP 594 " -"<594#cgi>`\\ )。" - -#: ../../library/cgi.rst:22 -msgid "" -"The :class:`FieldStorage` class can typically be replaced with :func:`urllib." -"parse.parse_qsl` for ``GET`` and ``HEAD`` requests, and the :mod:`email." -"message` module or :pypi:`multipart` for ``POST`` and ``PUT``. Most :ref:" -"`utility functions ` have replacements." -msgstr "" - -#: ../../library/cgi.rst:30 -msgid "Support module for Common Gateway Interface (CGI) scripts." -msgstr "" - -#: ../../library/cgi.rst:32 -msgid "" -"This module defines a number of utilities for use by CGI scripts written in " -"Python." -msgstr "" - -#: ../../library/cgi.rst:35 -msgid "" -"The global variable ``maxlen`` can be set to an integer indicating the " -"maximum size of a POST request. POST requests larger than this size will " -"result in a :exc:`ValueError` being raised during parsing. The default value " -"of this variable is ``0``, meaning the request size is unlimited." -msgstr "" - -#: ../../includes/wasm-notavail.rst:3 -msgid ":ref:`Availability `: not Emscripten, not WASI." -msgstr "" - -#: ../../includes/wasm-notavail.rst:5 -msgid "" -"This module does not work or is not available on WebAssembly platforms " -"``wasm32-emscripten`` and ``wasm32-wasi``. See :ref:`wasm-availability` for " -"more information." -msgstr "" -"此模組在 WebAssembly 平台 ``wasm32-emscripten`` 和 ``wasm32-wasi`` 上無法作用" -"或無法使用。有關更多資訊,請參閱 :ref:`wasm-availability`。" - -#: ../../library/cgi.rst:43 -msgid "Introduction" -msgstr "簡介" - -#: ../../library/cgi.rst:47 -msgid "" -"A CGI script is invoked by an HTTP server, usually to process user input " -"submitted through an HTML ``
`` or ```` element." -msgstr "" - -#: ../../library/cgi.rst:50 -msgid "" -"Most often, CGI scripts live in the server's special :file:`cgi-bin` " -"directory. The HTTP server places all sorts of information about the request " -"(such as the client's hostname, the requested URL, the query string, and " -"lots of other goodies) in the script's shell environment, executes the " -"script, and sends the script's output back to the client." -msgstr "" - -#: ../../library/cgi.rst:56 -msgid "" -"The script's input is connected to the client too, and sometimes the form " -"data is read this way; at other times the form data is passed via the " -"\"query string\" part of the URL. This module is intended to take care of " -"the different cases and provide a simpler interface to the Python script. " -"It also provides a number of utilities that help in debugging scripts, and " -"the latest addition is support for file uploads from a form (if your browser " -"supports it)." -msgstr "" - -#: ../../library/cgi.rst:63 -msgid "" -"The output of a CGI script should consist of two sections, separated by a " -"blank line. The first section contains a number of headers, telling the " -"client what kind of data is following. Python code to generate a minimal " -"header section looks like this::" -msgstr "" - -#: ../../library/cgi.rst:68 -msgid "" -"print(\"Content-Type: text/html\") # HTML is following\n" -"print() # blank line, end of headers" -msgstr "" - -#: ../../library/cgi.rst:71 -msgid "" -"The second section is usually HTML, which allows the client software to " -"display nicely formatted text with header, in-line images, etc. Here's " -"Python code that prints a simple piece of HTML::" -msgstr "" - -#: ../../library/cgi.rst:75 -msgid "" -"print(\"CGI script output\")\n" -"print(\"

This is my first CGI script

\")\n" -"print(\"Hello, world!\")" -msgstr "" -"print(\"CGI script output\")\n" -"print(\"

This is my first CGI script

\")\n" -"print(\"Hello, world!\")" - -#: ../../library/cgi.rst:83 -msgid "Using the cgi module" -msgstr "使用 cgi 模組" - -#: ../../library/cgi.rst:85 -msgid "Begin by writing ``import cgi``." -msgstr "" - -#: ../../library/cgi.rst:87 -msgid "When you write a new script, consider adding these lines::" -msgstr "" - -#: ../../library/cgi.rst:89 ../../library/cgi.rst:505 -msgid "" -"import cgitb\n" -"cgitb.enable()" -msgstr "" -"import cgitb\n" -"cgitb.enable()" - -#: ../../library/cgi.rst:92 -msgid "" -"This activates a special exception handler that will display detailed " -"reports in the web browser if any errors occur. If you'd rather not show " -"the guts of your program to users of your script, you can have the reports " -"saved to files instead, with code like this::" -msgstr "" - -#: ../../library/cgi.rst:97 -msgid "" -"import cgitb\n" -"cgitb.enable(display=0, logdir=\"/path/to/logdir\")" -msgstr "" -"import cgitb\n" -"cgitb.enable(display=0, logdir=\"/path/to/logdir\")" - -#: ../../library/cgi.rst:100 -msgid "" -"It's very helpful to use this feature during script development. The reports " -"produced by :mod:`cgitb` provide information that can save you a lot of time " -"in tracking down bugs. You can always remove the ``cgitb`` line later when " -"you have tested your script and are confident that it works correctly." -msgstr "" - -#: ../../library/cgi.rst:105 -msgid "" -"To get at submitted form data, use the :class:`FieldStorage` class. If the " -"form contains non-ASCII characters, use the *encoding* keyword parameter set " -"to the value of the encoding defined for the document. It is usually " -"contained in the META tag in the HEAD section of the HTML document or by " -"the :mailheader:`Content-Type` header. This reads the form contents from " -"the standard input or the environment (depending on the value of various " -"environment variables set according to the CGI standard). Since it may " -"consume standard input, it should be instantiated only once." -msgstr "" - -#: ../../library/cgi.rst:114 -msgid "" -"The :class:`FieldStorage` instance can be indexed like a Python dictionary. " -"It allows membership testing with the :keyword:`in` operator, and also " -"supports the standard dictionary method :meth:`~dict.keys` and the built-in " -"function :func:`len`. Form fields containing empty strings are ignored and " -"do not appear in the dictionary; to keep such values, provide a true value " -"for the optional *keep_blank_values* keyword parameter when creating the :" -"class:`FieldStorage` instance." -msgstr "" - -#: ../../library/cgi.rst:122 -msgid "" -"For instance, the following code (which assumes that the :mailheader:" -"`Content-Type` header and blank line have already been printed) checks that " -"the fields ``name`` and ``addr`` are both set to a non-empty string::" -msgstr "" - -#: ../../library/cgi.rst:127 -msgid "" -"form = cgi.FieldStorage()\n" -"if \"name\" not in form or \"addr\" not in form:\n" -" print(\"

Error

\")\n" -" print(\"Please fill in the name and addr fields.\")\n" -" return\n" -"print(\"

name:\", form[\"name\"].value)\n" -"print(\"

addr:\", form[\"addr\"].value)\n" -"...further form processing here..." -msgstr "" - -#: ../../library/cgi.rst:136 -msgid "" -"Here the fields, accessed through ``form[key]``, are themselves instances " -"of :class:`FieldStorage` (or :class:`MiniFieldStorage`, depending on the " -"form encoding). The :attr:`~FieldStorage.value` attribute of the instance " -"yields the string value of the field. The :meth:`~FieldStorage.getvalue` " -"method returns this string value directly; it also accepts an optional " -"second argument as a default to return if the requested key is not present." -msgstr "" - -#: ../../library/cgi.rst:143 -msgid "" -"If the submitted form data contains more than one field with the same name, " -"the object retrieved by ``form[key]`` is not a :class:`FieldStorage` or :" -"class:`MiniFieldStorage` instance but a list of such instances. Similarly, " -"in this situation, ``form.getvalue(key)`` would return a list of strings. If " -"you expect this possibility (when your HTML form contains multiple fields " -"with the same name), use the :meth:`~FieldStorage.getlist` method, which " -"always returns a list of values (so that you do not need to special-case the " -"single item case). For example, this code concatenates any number of " -"username fields, separated by commas::" -msgstr "" - -#: ../../library/cgi.rst:153 -msgid "" -"value = form.getlist(\"username\")\n" -"usernames = \",\".join(value)" -msgstr "" -"value = form.getlist(\"username\")\n" -"usernames = \",\".join(value)" - -#: ../../library/cgi.rst:156 -msgid "" -"If a field represents an uploaded file, accessing the value via the :attr:" -"`~FieldStorage.value` attribute or the :meth:`~FieldStorage.getvalue` method " -"reads the entire file in memory as bytes. This may not be what you want. " -"You can test for an uploaded file by testing either the :attr:`~FieldStorage." -"filename` attribute or the :attr:`~FieldStorage.file` attribute. You can " -"then read the data from the :attr:`!file` attribute before it is " -"automatically closed as part of the garbage collection of the :class:" -"`FieldStorage` instance (the :func:`~io.RawIOBase.read` and :func:`~io." -"IOBase.readline` methods will return bytes)::" -msgstr "" - -#: ../../library/cgi.rst:167 -msgid "" -"fileitem = form[\"userfile\"]\n" -"if fileitem.file:\n" -" # It's an uploaded file; count lines\n" -" linecount = 0\n" -" while True:\n" -" line = fileitem.file.readline()\n" -" if not line: break\n" -" linecount = linecount + 1" -msgstr "" - -#: ../../library/cgi.rst:176 -msgid "" -":class:`FieldStorage` objects also support being used in a :keyword:`with` " -"statement, which will automatically close them when done." -msgstr "" - -#: ../../library/cgi.rst:179 -msgid "" -"If an error is encountered when obtaining the contents of an uploaded file " -"(for example, when the user interrupts the form submission by clicking on a " -"Back or Cancel button) the :attr:`~FieldStorage.done` attribute of the " -"object for the field will be set to the value -1." -msgstr "" - -#: ../../library/cgi.rst:184 -msgid "" -"The file upload draft standard entertains the possibility of uploading " -"multiple files from one field (using a recursive :mimetype:`multipart/\\*` " -"encoding). When this occurs, the item will be a dictionary-like :class:" -"`FieldStorage` item. This can be determined by testing its :attr:`!type` " -"attribute, which should be :mimetype:`multipart/form-data` (or perhaps " -"another MIME type matching :mimetype:`multipart/\\*`). In this case, it can " -"be iterated over recursively just like the top-level form object." -msgstr "" - -#: ../../library/cgi.rst:192 -msgid "" -"When a form is submitted in the \"old\" format (as the query string or as a " -"single data part of type :mimetype:`application/x-www-form-urlencoded`), the " -"items will actually be instances of the class :class:`MiniFieldStorage`. In " -"this case, the :attr:`!list`, :attr:`!file`, and :attr:`filename` attributes " -"are always ``None``." -msgstr "" - -#: ../../library/cgi.rst:197 -msgid "" -"A form submitted via POST that also has a query string will contain both :" -"class:`FieldStorage` and :class:`MiniFieldStorage` items." -msgstr "" - -#: ../../library/cgi.rst:200 -msgid "" -"The :attr:`~FieldStorage.file` attribute is automatically closed upon the " -"garbage collection of the creating :class:`FieldStorage` instance." -msgstr "" - -#: ../../library/cgi.rst:204 -msgid "" -"Added support for the context management protocol to the :class:" -"`FieldStorage` class." -msgstr "" - -#: ../../library/cgi.rst:210 -msgid "Higher Level Interface" -msgstr "" - -#: ../../library/cgi.rst:212 -msgid "" -"The previous section explains how to read CGI form data using the :class:" -"`FieldStorage` class. This section describes a higher level interface which " -"was added to this class to allow one to do it in a more readable and " -"intuitive way. The interface doesn't make the techniques described in " -"previous sections obsolete --- they are still useful to process file uploads " -"efficiently, for example." -msgstr "" - -#: ../../library/cgi.rst:221 -msgid "" -"The interface consists of two simple methods. Using the methods you can " -"process form data in a generic way, without the need to worry whether only " -"one or more values were posted under one name." -msgstr "" - -#: ../../library/cgi.rst:225 -msgid "" -"In the previous section, you learned to write following code anytime you " -"expected a user to post more than one value under one name::" -msgstr "" - -#: ../../library/cgi.rst:228 -msgid "" -"item = form.getvalue(\"item\")\n" -"if isinstance(item, list):\n" -" # The user is requesting more than one item.\n" -"else:\n" -" # The user is requesting only one item." -msgstr "" - -#: ../../library/cgi.rst:234 -msgid "" -"This situation is common for example when a form contains a group of " -"multiple checkboxes with the same name::" -msgstr "" - -#: ../../library/cgi.rst:237 -msgid "" -"\n" -"" -msgstr "" -"\n" -"" - -#: ../../library/cgi.rst:240 -msgid "" -"In most situations, however, there's only one form control with a particular " -"name in a form and then you expect and need only one value associated with " -"this name. So you write a script containing for example this code::" -msgstr "" - -#: ../../library/cgi.rst:244 -msgid "user = form.getvalue(\"user\").upper()" -msgstr "user = form.getvalue(\"user\").upper()" - -#: ../../library/cgi.rst:246 -msgid "" -"The problem with the code is that you should never expect that a client will " -"provide valid input to your scripts. For example, if a curious user appends " -"another ``user=foo`` pair to the query string, then the script would crash, " -"because in this situation the ``getvalue(\"user\")`` method call returns a " -"list instead of a string. Calling the :meth:`~str.upper` method on a list " -"is not valid (since lists do not have a method of this name) and results in " -"an :exc:`AttributeError` exception." -msgstr "" - -#: ../../library/cgi.rst:254 -msgid "" -"Therefore, the appropriate way to read form data values was to always use " -"the code which checks whether the obtained value is a single value or a list " -"of values. That's annoying and leads to less readable scripts." -msgstr "" - -#: ../../library/cgi.rst:258 -msgid "" -"A more convenient approach is to use the methods :meth:`~FieldStorage." -"getfirst` and :meth:`~FieldStorage.getlist` provided by this higher level " -"interface." -msgstr "" - -#: ../../library/cgi.rst:264 -msgid "" -"This method always returns only one value associated with form field *name*. " -"The method returns only the first value in case that more values were posted " -"under such name. Please note that the order in which the values are " -"received may vary from browser to browser and should not be counted on. " -"[#]_ If no such form field or value exists then the method returns the " -"value specified by the optional parameter *default*. This parameter " -"defaults to ``None`` if not specified." -msgstr "" - -#: ../../library/cgi.rst:275 -msgid "" -"This method always returns a list of values associated with form field " -"*name*. The method returns an empty list if no such form field or value " -"exists for *name*. It returns a list consisting of one item if only one " -"such value exists." -msgstr "" - -#: ../../library/cgi.rst:279 -msgid "Using these methods you can write nice compact code::" -msgstr "" - -#: ../../library/cgi.rst:281 -msgid "" -"import cgi\n" -"form = cgi.FieldStorage()\n" -"user = form.getfirst(\"user\", \"\").upper() # This way it's safe.\n" -"for item in form.getlist(\"item\"):\n" -" do_something(item)" -msgstr "" -"import cgi\n" -"form = cgi.FieldStorage()\n" -"user = form.getfirst(\"user\", \"\").upper() # 這是安全的方式。\n" -"for item in form.getlist(\"item\"):\n" -" do_something(item)" - -#: ../../library/cgi.rst:291 -msgid "Functions" -msgstr "函式" - -#: ../../library/cgi.rst:293 -msgid "" -"These are useful if you want more control, or if you want to employ some of " -"the algorithms implemented in this module in other circumstances." -msgstr "" - -#: ../../library/cgi.rst:299 -msgid "" -"Parse a query in the environment or from a file (the file defaults to ``sys." -"stdin``). The *keep_blank_values*, *strict_parsing* and *separator* " -"parameters are passed to :func:`urllib.parse.parse_qs` unchanged." -msgstr "" - -#: ../../library/cgi.rst:303 -msgid "" -"This function, like the rest of the :mod:`cgi` module, is deprecated. It can " -"be replaced by calling :func:`urllib.parse.parse_qs` directly on the desired " -"query string (except for ``multipart/form-data`` input, which can be handled " -"as described for :func:`parse_multipart`)." -msgstr "" - -#: ../../library/cgi.rst:312 -msgid "" -"Parse input of type :mimetype:`multipart/form-data` (for file uploads). " -"Arguments are *fp* for the input file, *pdict* for a dictionary containing " -"other parameters in the :mailheader:`Content-Type` header, and *encoding*, " -"the request encoding." -msgstr "" - -#: ../../library/cgi.rst:317 -msgid "" -"Returns a dictionary just like :func:`urllib.parse.parse_qs`: keys are the " -"field names, each value is a list of values for that field. For non-file " -"fields, the value is a list of strings." -msgstr "" - -#: ../../library/cgi.rst:321 -msgid "" -"This is easy to use but not much good if you are expecting megabytes to be " -"uploaded --- in that case, use the :class:`FieldStorage` class instead which " -"is much more flexible." -msgstr "" - -#: ../../library/cgi.rst:325 -msgid "" -"Added the *encoding* and *errors* parameters. For non-file fields, the " -"value is now a list of strings, not bytes." -msgstr "" - -#: ../../library/cgi.rst:329 -msgid "Added the *separator* parameter." -msgstr "新增 *separator* 參數。" - -#: ../../library/cgi.rst:332 -msgid "" -"This function, like the rest of the :mod:`cgi` module, is deprecated. It can " -"be replaced with the functionality in the :mod:`email` package (e.g. :class:" -"`email.message.EmailMessage`/:class:`email.message.Message`) which " -"implements the same MIME RFCs, or with the :pypi:`multipart` PyPI project." -msgstr "" - -#: ../../library/cgi.rst:342 -msgid "" -"Parse a MIME header (such as :mailheader:`Content-Type`) into a main value " -"and a dictionary of parameters." -msgstr "" - -#: ../../library/cgi.rst:345 -msgid "" -"This function, like the rest of the :mod:`cgi` module, is deprecated. It can " -"be replaced with the functionality in the :mod:`email` package, which " -"implements the same MIME RFCs." -msgstr "" - -#: ../../library/cgi.rst:350 -msgid "For example, with :class:`email.message.EmailMessage`::" -msgstr "" - -#: ../../library/cgi.rst:352 -msgid "" -"from email.message import EmailMessage\n" -"msg = EmailMessage()\n" -"msg['content-type'] = 'application/json; charset=\"utf8\"'\n" -"main, params = msg.get_content_type(), msg['content-type'].params" -msgstr "" -"from email.message import EmailMessage\n" -"msg = EmailMessage()\n" -"msg['content-type'] = 'application/json; charset=\"utf8\"'\n" -"main, params = msg.get_content_type(), msg['content-type'].params" - -#: ../../library/cgi.rst:360 -msgid "" -"Robust test CGI script, usable as main program. Writes minimal HTTP headers " -"and formats all information provided to the script in HTML format." -msgstr "" - -#: ../../library/cgi.rst:366 -msgid "Format the shell environment in HTML." -msgstr "" - -#: ../../library/cgi.rst:371 -msgid "Format a form in HTML." -msgstr "" - -#: ../../library/cgi.rst:376 -msgid "Format the current directory in HTML." -msgstr "" - -#: ../../library/cgi.rst:381 -msgid "Print a list of useful (used by CGI) environment variables in HTML." -msgstr "" - -#: ../../library/cgi.rst:387 -msgid "Caring about security" -msgstr "" - -#: ../../library/cgi.rst:391 -msgid "" -"There's one important rule: if you invoke an external program (via :func:`os." -"system`, :func:`os.popen` or other functions with similar functionality), " -"make very sure you don't pass arbitrary strings received from the client to " -"the shell. This is a well-known security hole whereby clever hackers " -"anywhere on the web can exploit a gullible CGI script to invoke arbitrary " -"shell commands. Even parts of the URL or field names cannot be trusted, " -"since the request doesn't have to come from your form!" -msgstr "" - -#: ../../library/cgi.rst:399 -msgid "" -"To be on the safe side, if you must pass a string gotten from a form to a " -"shell command, you should make sure the string contains only alphanumeric " -"characters, dashes, underscores, and periods." -msgstr "" - -#: ../../library/cgi.rst:405 -msgid "Installing your CGI script on a Unix system" -msgstr "" - -#: ../../library/cgi.rst:407 -msgid "" -"Read the documentation for your HTTP server and check with your local system " -"administrator to find the directory where CGI scripts should be installed; " -"usually this is in a directory :file:`cgi-bin` in the server tree." -msgstr "" - -#: ../../library/cgi.rst:411 -msgid "" -"Make sure that your script is readable and executable by \"others\"; the " -"Unix file mode should be ``0o755`` octal (use ``chmod 0755 filename``). " -"Make sure that the first line of the script contains ``#!`` starting in " -"column 1 followed by the pathname of the Python interpreter, for instance::" -msgstr "" - -#: ../../library/cgi.rst:416 -msgid "#!/usr/local/bin/python" -msgstr "#!/usr/local/bin/python" - -#: ../../library/cgi.rst:418 -msgid "" -"Make sure the Python interpreter exists and is executable by \"others\"." -msgstr "" - -#: ../../library/cgi.rst:420 -msgid "" -"Make sure that any files your script needs to read or write are readable or " -"writable, respectively, by \"others\" --- their mode should be ``0o644`` for " -"readable and ``0o666`` for writable. This is because, for security reasons, " -"the HTTP server executes your script as user \"nobody\", without any special " -"privileges. It can only read (write, execute) files that everybody can read " -"(write, execute). The current directory at execution time is also different " -"(it is usually the server's cgi-bin directory) and the set of environment " -"variables is also different from what you get when you log in. In " -"particular, don't count on the shell's search path for executables (:envvar:" -"`PATH`) or the Python module search path (:envvar:`PYTHONPATH`) to be set to " -"anything interesting." -msgstr "" - -#: ../../library/cgi.rst:431 -msgid "" -"If you need to load modules from a directory which is not on Python's " -"default module search path, you can change the path in your script, before " -"importing other modules. For example::" -msgstr "" - -#: ../../library/cgi.rst:435 -msgid "" -"import sys\n" -"sys.path.insert(0, \"/usr/home/joe/lib/python\")\n" -"sys.path.insert(0, \"/usr/local/lib/python\")" -msgstr "" -"import sys\n" -"sys.path.insert(0, \"/usr/home/joe/lib/python\")\n" -"sys.path.insert(0, \"/usr/local/lib/python\")" - -#: ../../library/cgi.rst:439 -msgid "(This way, the directory inserted last will be searched first!)" -msgstr "" - -#: ../../library/cgi.rst:441 -msgid "" -"Instructions for non-Unix systems will vary; check your HTTP server's " -"documentation (it will usually have a section on CGI scripts)." -msgstr "" - -#: ../../library/cgi.rst:446 -msgid "Testing your CGI script" -msgstr "" - -#: ../../library/cgi.rst:448 -msgid "" -"Unfortunately, a CGI script will generally not run when you try it from the " -"command line, and a script that works perfectly from the command line may " -"fail mysteriously when run from the server. There's one reason why you " -"should still test your script from the command line: if it contains a syntax " -"error, the Python interpreter won't execute it at all, and the HTTP server " -"will most likely send a cryptic error to the client." -msgstr "" - -#: ../../library/cgi.rst:455 -msgid "" -"Assuming your script has no syntax errors, yet it does not work, you have no " -"choice but to read the next section." -msgstr "" - -#: ../../library/cgi.rst:460 -msgid "Debugging CGI scripts" -msgstr "" - -#: ../../library/cgi.rst:464 -msgid "" -"First of all, check for trivial installation errors --- reading the section " -"above on installing your CGI script carefully can save you a lot of time. " -"If you wonder whether you have understood the installation procedure " -"correctly, try installing a copy of this module file (:file:`cgi.py`) as a " -"CGI script. When invoked as a script, the file will dump its environment " -"and the contents of the form in HTML format. Give it the right mode etc., " -"and send it a request. If it's installed in the standard :file:`cgi-bin` " -"directory, it should be possible to send it a request by entering a URL into " -"your browser of the form:" -msgstr "" - -#: ../../library/cgi.rst:473 -msgid "http://yourhostname/cgi-bin/cgi.py?name=Joe+Blow&addr=At+Home" -msgstr "http://yourhostname/cgi-bin/cgi.py?name=Joe+Blow&addr=At+Home" - -#: ../../library/cgi.rst:477 -msgid "" -"If this gives an error of type 404, the server cannot find the script -- " -"perhaps you need to install it in a different directory. If it gives " -"another error, there's an installation problem that you should fix before " -"trying to go any further. If you get a nicely formatted listing of the " -"environment and form content (in this example, the fields should be listed " -"as \"addr\" with value \"At Home\" and \"name\" with value \"Joe Blow\"), " -"the :file:`cgi.py` script has been installed correctly. If you follow the " -"same procedure for your own script, you should now be able to debug it." -msgstr "" - -#: ../../library/cgi.rst:486 -msgid "" -"The next step could be to call the :mod:`cgi` module's :func:`test` function " -"from your script: replace its main code with the single statement ::" -msgstr "" - -#: ../../library/cgi.rst:489 -msgid "cgi.test()" -msgstr "cgi.test()" - -#: ../../library/cgi.rst:491 -msgid "" -"This should produce the same results as those gotten from installing the :" -"file:`cgi.py` file itself." -msgstr "" - -#: ../../library/cgi.rst:494 -msgid "" -"When an ordinary Python script raises an unhandled exception (for whatever " -"reason: of a typo in a module name, a file that can't be opened, etc.), the " -"Python interpreter prints a nice traceback and exits. While the Python " -"interpreter will still do this when your CGI script raises an exception, " -"most likely the traceback will end up in one of the HTTP server's log files, " -"or be discarded altogether." -msgstr "" - -#: ../../library/cgi.rst:501 -msgid "" -"Fortunately, once you have managed to get your script to execute *some* " -"code, you can easily send tracebacks to the web browser using the :mod:" -"`cgitb` module. If you haven't done so already, just add the lines::" -msgstr "" - -#: ../../library/cgi.rst:508 -msgid "" -"to the top of your script. Then try running it again; when a problem " -"occurs, you should see a detailed report that will likely make apparent the " -"cause of the crash." -msgstr "" - -#: ../../library/cgi.rst:512 -msgid "" -"If you suspect that there may be a problem in importing the :mod:`cgitb` " -"module, you can use an even more robust approach (which only uses built-in " -"modules)::" -msgstr "" - -#: ../../library/cgi.rst:515 -msgid "" -"import sys\n" -"sys.stderr = sys.stdout\n" -"print(\"Content-Type: text/plain\")\n" -"print()\n" -"...your code here..." -msgstr "" - -#: ../../library/cgi.rst:521 -msgid "" -"This relies on the Python interpreter to print the traceback. The content " -"type of the output is set to plain text, which disables all HTML " -"processing. If your script works, the raw HTML will be displayed by your " -"client. If it raises an exception, most likely after the first two lines " -"have been printed, a traceback will be displayed. Because no HTML " -"interpretation is going on, the traceback will be readable." -msgstr "" - -#: ../../library/cgi.rst:530 -msgid "Common problems and solutions" -msgstr "" - -#: ../../library/cgi.rst:532 -msgid "" -"Most HTTP servers buffer the output from CGI scripts until the script is " -"completed. This means that it is not possible to display a progress report " -"on the client's display while the script is running." -msgstr "" - -#: ../../library/cgi.rst:536 -msgid "Check the installation instructions above." -msgstr "" - -#: ../../library/cgi.rst:538 -msgid "" -"Check the HTTP server's log files. (``tail -f logfile`` in a separate " -"window may be useful!)" -msgstr "" - -#: ../../library/cgi.rst:541 -msgid "" -"Always check a script for syntax errors first, by doing something like " -"``python script.py``." -msgstr "" - -#: ../../library/cgi.rst:544 -msgid "" -"If your script does not have any syntax errors, try adding ``import cgitb; " -"cgitb.enable()`` to the top of the script." -msgstr "" - -#: ../../library/cgi.rst:547 -msgid "" -"When invoking external programs, make sure they can be found. Usually, this " -"means using absolute path names --- :envvar:`PATH` is usually not set to a " -"very useful value in a CGI script." -msgstr "" - -#: ../../library/cgi.rst:551 -msgid "" -"When reading or writing external files, make sure they can be read or " -"written by the userid under which your CGI script will be running: this is " -"typically the userid under which the web server is running, or some " -"explicitly specified userid for a web server's ``suexec`` feature." -msgstr "" - -#: ../../library/cgi.rst:556 -msgid "" -"Don't try to give a CGI script a set-uid mode. This doesn't work on most " -"systems, and is a security liability as well." -msgstr "" - -#: ../../library/cgi.rst:560 -msgid "Footnotes" -msgstr "註解" - -#: ../../library/cgi.rst:561 -msgid "" -"Note that some recent versions of the HTML specification do state what order " -"the field values should be supplied in, but knowing whether a request was " -"received from a conforming browser, or even from a browser at all, is " -"tedious and error-prone." -msgstr "" - -#: ../../library/cgi.rst:10 -msgid "WWW" -msgstr "WWW" - -#: ../../library/cgi.rst:10 -msgid "server" -msgstr "server(伺服器)" - -#: ../../library/cgi.rst:10 ../../library/cgi.rst:389 ../../library/cgi.rst:462 -msgid "CGI" -msgstr "CGI" - -#: ../../library/cgi.rst:10 -msgid "protocol" -msgstr "protocol(協定)" - -#: ../../library/cgi.rst:10 -msgid "HTTP" -msgstr "HTTP" - -#: ../../library/cgi.rst:10 -msgid "MIME" -msgstr "MIME" - -#: ../../library/cgi.rst:10 -msgid "headers" -msgstr "headers(標頭)" - -#: ../../library/cgi.rst:10 -msgid "URL" -msgstr "URL(統一資源定位器)" - -#: ../../library/cgi.rst:10 -msgid "Common Gateway Interface" -msgstr "Common Gateway Interface(通用閘道器介面)" - -#: ../../library/cgi.rst:389 -msgid "security" -msgstr "security(安全)" - -#: ../../library/cgi.rst:462 -msgid "debugging" -msgstr "debugging(除錯)" diff --git a/library/cgitb.po b/library/cgitb.po deleted file mode 100644 index e608145917..0000000000 --- a/library/cgitb.po +++ /dev/null @@ -1,137 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) 2001-2022, Python Software Foundation -# This file is distributed under the same license as the Python package. -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: Python 3.13\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-03 11:11+0800\n" -"PO-Revision-Date: 2022-05-22 02:02+0800\n" -"Last-Translator: Liang-Bo Wang \n" -"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" -"tw)\n" -"Language: zh_TW\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Poedit 3.0.1\n" - -#: ../../library/cgitb.rst:2 -msgid ":mod:`cgitb` --- Traceback manager for CGI scripts" -msgstr ":mod:`cgitb` --- CGI 腳本的回溯 (traceback) 管理程式" - -#: ../../library/cgitb.rst:11 -msgid "**Source code:** :source:`Lib/cgitb.py`" -msgstr "**原始碼:**\\ :source:`Lib/cgitb.py`" - -#: ../../library/cgitb.rst:19 -msgid "" -"The :mod:`cgitb` module is deprecated (see :pep:`PEP 594 <594#cgitb>` for " -"details)." -msgstr "" -":mod:`cgitb` 模組 (module) 即將被棄用(詳見 :pep:`PEP 594 <594#cgitb>`\\ )。" - -#: ../../library/cgitb.rst:25 -msgid "" -"The :mod:`cgitb` module provides a special exception handler for Python " -"scripts. (Its name is a bit misleading. It was originally designed to " -"display extensive traceback information in HTML for CGI scripts. It was " -"later generalized to also display this information in plain text.) After " -"this module is activated, if an uncaught exception occurs, a detailed, " -"formatted report will be displayed. The report includes a traceback showing " -"excerpts of the source code for each level, as well as the values of the " -"arguments and local variables to currently running functions, to help you " -"debug the problem. Optionally, you can save this information to a file " -"instead of sending it to the browser." -msgstr "" - -#: ../../library/cgitb.rst:35 -msgid "To enable this feature, simply add this to the top of your CGI script::" -msgstr "" - -#: ../../library/cgitb.rst:37 -msgid "" -"import cgitb\n" -"cgitb.enable()" -msgstr "" -"import cgitb\n" -"cgitb.enable()" - -#: ../../library/cgitb.rst:40 -msgid "" -"The options to the :func:`enable` function control whether the report is " -"displayed in the browser and whether the report is logged to a file for " -"later analysis." -msgstr "" - -#: ../../library/cgitb.rst:49 -msgid "" -"This function causes the :mod:`cgitb` module to take over the interpreter's " -"default handling for exceptions by setting the value of :attr:`sys." -"excepthook`." -msgstr "" - -#: ../../library/cgitb.rst:52 -msgid "" -"The optional argument *display* defaults to ``1`` and can be set to ``0`` to " -"suppress sending the traceback to the browser. If the argument *logdir* is " -"present, the traceback reports are written to files. The value of *logdir* " -"should be a directory where these files will be placed. The optional " -"argument *context* is the number of lines of context to display around the " -"current line of source code in the traceback; this defaults to ``5``. If the " -"optional argument *format* is ``\"html\"``, the output is formatted as " -"HTML. Any other value forces plain text output. The default value is " -"``\"html\"``." -msgstr "" - -#: ../../library/cgitb.rst:64 -msgid "" -"This function handles the exception described by *info* (a 3-tuple " -"containing the result of :func:`sys.exc_info`), formatting its traceback as " -"text and returning the result as a string. The optional argument *context* " -"is the number of lines of context to display around the current line of " -"source code in the traceback; this defaults to ``5``." -msgstr "" - -#: ../../library/cgitb.rst:73 -msgid "" -"This function handles the exception described by *info* (a 3-tuple " -"containing the result of :func:`sys.exc_info`), formatting its traceback as " -"HTML and returning the result as a string. The optional argument *context* " -"is the number of lines of context to display around the current line of " -"source code in the traceback; this defaults to ``5``." -msgstr "" - -#: ../../library/cgitb.rst:82 -msgid "" -"This function handles an exception using the default settings (that is, show " -"a report in the browser, but don't log to a file). This can be used when " -"you've caught an exception and want to report it using :mod:`cgitb`. The " -"optional *info* argument should be a 3-tuple containing an exception type, " -"exception value, and traceback object, exactly like the tuple returned by :" -"func:`sys.exc_info`. If the *info* argument is not supplied, the current " -"exception is obtained from :func:`sys.exc_info`." -msgstr "" - -#: ../../library/cgitb.rst:13 -msgid "CGI" -msgstr "CGI" - -#: ../../library/cgitb.rst:13 -msgid "exceptions" -msgstr "exceptions(例外)" - -#: ../../library/cgitb.rst:13 -msgid "tracebacks" -msgstr "tracebacks(回溯)" - -#: ../../library/cgitb.rst:13 -msgid "in CGI scripts" -msgstr "於 CGI 腳本中" - -#: ../../library/cgitb.rst:47 -msgid "excepthook() (in module sys)" -msgstr "excepthook() (sys 模組中)" diff --git a/library/chunk.po b/library/chunk.po deleted file mode 100644 index 96bf1cfea3..0000000000 --- a/library/chunk.po +++ /dev/null @@ -1,225 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) 2001-2022, Python Software Foundation -# This file is distributed under the same license as the Python package. -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: Python 3.13\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-07-20 00:03+0000\n" -"PO-Revision-Date: 2022-05-22 02:03+0800\n" -"Last-Translator: Liang-Bo Wang \n" -"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" -"tw)\n" -"Language: zh_TW\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Poedit 3.0.1\n" - -#: ../../library/chunk.rst:2 -msgid ":mod:`chunk` --- Read IFF chunked data" -msgstr ":mod:`chunk` --- 讀取 IFF 分塊資料" - -#: ../../library/chunk.rst:11 -msgid "**Source code:** :source:`Lib/chunk.py`" -msgstr "**原始碼:**\\ :source:`Lib/chunk.py`" - -#: ../../library/chunk.rst:20 -msgid "" -"The :mod:`chunk` module is deprecated (see :pep:`PEP 594 <594#chunk>` for " -"details)." -msgstr "" -":mod:`chunk` 模組 (module) 即將被棄用(詳見 :pep:`PEP 594 <594#chunk>`\\ )。" - -#: ../../library/chunk.rst:26 -msgid "" -"This module provides an interface for reading files that use EA IFF 85 " -"chunks. [#]_ This format is used in at least the Audio Interchange File " -"Format (AIFF/AIFF-C) and the Real Media File Format (RMFF). The WAVE audio " -"file format is closely related and can also be read using this module." -msgstr "" - -#: ../../library/chunk.rst:31 -msgid "A chunk has the following structure:" -msgstr "" - -#: ../../library/chunk.rst:34 -msgid "Offset" -msgstr "" - -#: ../../library/chunk.rst:34 -msgid "Length" -msgstr "長度" - -#: ../../library/chunk.rst:34 -msgid "Contents" -msgstr "內容" - -#: ../../library/chunk.rst:36 -msgid "0" -msgstr "0" - -#: ../../library/chunk.rst:36 ../../library/chunk.rst:38 -msgid "4" -msgstr "4" - -#: ../../library/chunk.rst:36 -msgid "Chunk ID" -msgstr "" - -#: ../../library/chunk.rst:38 -msgid "Size of chunk in big-endian byte order, not including the header" -msgstr "" - -#: ../../library/chunk.rst:42 -msgid "8" -msgstr "8" - -#: ../../library/chunk.rst:42 -msgid "*n*" -msgstr "*n*" - -#: ../../library/chunk.rst:42 -msgid "Data bytes, where *n* is the size given in the preceding field" -msgstr "" - -#: ../../library/chunk.rst:46 -msgid "8 + *n*" -msgstr "8 + *n*" - -#: ../../library/chunk.rst:46 -msgid "0 or 1" -msgstr "0 或 1" - -#: ../../library/chunk.rst:46 -msgid "Pad byte needed if *n* is odd and chunk alignment is used" -msgstr "" - -#: ../../library/chunk.rst:50 -msgid "The ID is a 4-byte string which identifies the type of chunk." -msgstr "" - -#: ../../library/chunk.rst:52 -msgid "" -"The size field (a 32-bit value, encoded using big-endian byte order) gives " -"the size of the chunk data, not including the 8-byte header." -msgstr "" - -#: ../../library/chunk.rst:55 -msgid "" -"Usually an IFF-type file consists of one or more chunks. The proposed usage " -"of the :class:`Chunk` class defined here is to instantiate an instance at " -"the start of each chunk and read from the instance until it reaches the end, " -"after which a new instance can be instantiated. At the end of the file, " -"creating a new instance will fail with an :exc:`EOFError` exception." -msgstr "" - -#: ../../library/chunk.rst:64 -msgid "" -"Class which represents a chunk. The *file* argument is expected to be a " -"file-like object. An instance of this class is specifically allowed. The " -"only method that is needed is :meth:`~io.IOBase.read`. If the methods :meth:" -"`~io.IOBase.seek` and :meth:`~io.IOBase.tell` are present and don't raise an " -"exception, they are also used. If these methods are present and raise an " -"exception, they are expected to not have altered the object. If the " -"optional argument *align* is true, chunks are assumed to be aligned on 2-" -"byte boundaries. If *align* is false, no alignment is assumed. The default " -"value is true. If the optional argument *bigendian* is false, the chunk " -"size is assumed to be in little-endian order. This is needed for WAVE audio " -"files. The default value is true. If the optional argument *inclheader* is " -"true, the size given in the chunk header includes the size of the header. " -"The default value is false." -msgstr "" - -#: ../../library/chunk.rst:78 -msgid "A :class:`Chunk` object supports the following methods:" -msgstr "" - -#: ../../library/chunk.rst:83 -msgid "" -"Returns the name (ID) of the chunk. This is the first 4 bytes of the chunk." -msgstr "" - -#: ../../library/chunk.rst:89 -msgid "Returns the size of the chunk." -msgstr "" - -#: ../../library/chunk.rst:94 -msgid "" -"Close and skip to the end of the chunk. This does not close the underlying " -"file." -msgstr "" - -#: ../../library/chunk.rst:97 -msgid "" -"The remaining methods will raise :exc:`OSError` if called after the :meth:" -"`close` method has been called. Before Python 3.3, they used to raise :exc:" -"`IOError`, now an alias of :exc:`OSError`." -msgstr "" - -#: ../../library/chunk.rst:104 -msgid "Returns ``False``." -msgstr "" - -#: ../../library/chunk.rst:109 -msgid "" -"Set the chunk's current position. The *whence* argument is optional and " -"defaults to ``0`` (absolute file positioning); other values are ``1`` (seek " -"relative to the current position) and ``2`` (seek relative to the file's " -"end). There is no return value. If the underlying file does not allow seek, " -"only forward seeks are allowed." -msgstr "" - -#: ../../library/chunk.rst:118 -msgid "Return the current position into the chunk." -msgstr "" - -#: ../../library/chunk.rst:123 -msgid "" -"Read at most *size* bytes from the chunk (less if the read hits the end of " -"the chunk before obtaining *size* bytes). If the *size* argument is " -"negative or omitted, read all data until the end of the chunk. An empty " -"bytes object is returned when the end of the chunk is encountered " -"immediately." -msgstr "" - -#: ../../library/chunk.rst:132 -msgid "" -"Skip to the end of the chunk. All further calls to :meth:`read` for the " -"chunk will return ``b''``. If you are not interested in the contents of the " -"chunk, this method should be called so that the file points to the start of " -"the next chunk." -msgstr "" - -#: ../../library/chunk.rst:139 -msgid "Footnotes" -msgstr "註解" - -#: ../../library/chunk.rst:140 -msgid "" -"\"EA IFF 85\" Standard for Interchange Format Files, Jerry Morrison, " -"Electronic Arts, January 1985." -msgstr "" - -#: ../../library/chunk.rst:13 -msgid "Audio Interchange File Format" -msgstr "Audio Interchange File Format(音訊交換檔案格式)" - -#: ../../library/chunk.rst:13 -msgid "AIFF" -msgstr "AIFF" - -#: ../../library/chunk.rst:13 -msgid "AIFF-C" -msgstr "AIFF-C" - -#: ../../library/chunk.rst:13 -msgid "Real Media File Format" -msgstr "Real Media File Format(Real Media 檔案格式)" - -#: ../../library/chunk.rst:13 -msgid "RMFF" -msgstr "RMFF" diff --git a/library/cmdline.po b/library/cmdline.po index ed2fd4286f..4f84c320d2 100644 --- a/library/cmdline.po +++ b/library/cmdline.po @@ -154,9 +154,8 @@ msgid ":mod:`quopri`" msgstr ":mod:`quopri`" #: ../../library/cmdline.rst:39 -#, fuzzy msgid ":ref:`random `" -msgstr ":ref:`asyncio `" +msgstr ":ref:`random `" #: ../../library/cmdline.rst:40 msgid ":mod:`runpy`" diff --git a/library/compileall.po b/library/compileall.po index 2f8e76a53f..78cbc5fb98 100644 --- a/library/compileall.po +++ b/library/compileall.po @@ -37,16 +37,15 @@ msgstr "" #: ../../includes/wasm-notavail.rst:3 msgid ":ref:`Availability `: not WASI." -msgstr "" +msgstr ":ref:`適用 `:非 WASI。" #: ../../includes/wasm-notavail.rst:5 -#, fuzzy msgid "" "This module does not work or is not available on WebAssembly. See :ref:`wasm-" "availability` for more information." msgstr "" -"此模組在 WebAssembly 平台 ``wasm32-emscripten`` 和 ``wasm32-wasi`` 上無法作用" -"或無法使用。有關更多資訊,請參閱 :ref:`wasm-availability`。" +"此模組在 WebAssembly 平台上不起作用或無法使用。更多資訊請參閱 :ref:`wasm-" +"availability`。" #: ../../library/compileall.rst:22 msgid "Command-line use" diff --git a/library/concurrent.futures.po b/library/concurrent.futures.po index 061f4dc950..1a8ea4d243 100644 --- a/library/concurrent.futures.po +++ b/library/concurrent.futures.po @@ -51,18 +51,16 @@ msgstr "" "相同的介面,該介面由抽象的 :class:`Executor` 類別定義。" #: ../../includes/wasm-notavail.rst:3 -#, fuzzy msgid ":ref:`Availability `: not WASI." -msgstr ":ref:`適用 `:非 Emscripten、非 WASI。" +msgstr ":ref:`適用 `:非 WASI。" #: ../../includes/wasm-notavail.rst:5 -#, fuzzy msgid "" "This module does not work or is not available on WebAssembly. See :ref:`wasm-" "availability` for more information." msgstr "" -"此模組在 WebAssembly 平台 ``wasm32-emscripten`` 和 ``wasm32-wasi`` 上沒有作用" -"或不可使用。更多資訊,請參閱 :ref:`wasm-availability`。" +"此模組在 WebAssembly 平台上不起作用或無法使用。更多資訊請參閱 :ref:`wasm-" +"availability`。" #: ../../library/concurrent.futures.rst:25 msgid "Executor Objects" diff --git a/library/crypt.po b/library/crypt.po deleted file mode 100644 index 4f37bcb814..0000000000 --- a/library/crypt.po +++ /dev/null @@ -1,277 +0,0 @@ -# Copyright (C) 2001-2024, Python Software Foundation -# This file is distributed under the same license as the Python package. -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: Python 3.13\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-03 11:11+0800\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-" -"tw)\n" -"Language: zh_TW\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=1; plural=0;\n" - -#: ../../library/crypt.rst:2 -msgid ":mod:`crypt` --- Function to check Unix passwords" -msgstr ":mod:`crypt` --- 用於檢查 Unix 密碼的函式" - -#: ../../library/crypt.rst:13 -msgid "**Source code:** :source:`Lib/crypt.py`" -msgstr "**原始碼:**\\ :source:`Lib/crypt.py`" - -#: ../../library/crypt.rst:19 -msgid "" -"The :mod:`crypt` module is deprecated (see :pep:`PEP 594 <594#crypt>` for " -"details and alternatives). The :mod:`hashlib` module is a potential " -"replacement for certain use cases. The :pypi:`passlib` package can replace " -"all use cases of this module." -msgstr "" - -#: ../../library/crypt.rst:27 -msgid "" -"This module implements an interface to the :manpage:`crypt(3)` routine, " -"which is a one-way hash function based upon a modified DES algorithm; see " -"the Unix man page for further details. Possible uses include storing hashed " -"passwords so you can check passwords without storing the actual password, or " -"attempting to crack Unix passwords with a dictionary." -msgstr "" - -#: ../../library/crypt.rst:35 -msgid "" -"Notice that the behavior of this module depends on the actual " -"implementation of the :manpage:`crypt(3)` routine in the running system. " -"Therefore, any extensions available on the current implementation will also " -"be available on this module." -msgstr "" - -#: ../../library/crypt.rst:40 -msgid ":ref:`Availability `: Unix, not VxWorks." -msgstr ":ref:`適用 `:Unix,非 VxWorks。" - -#: ../../includes/wasm-notavail.rst:3 -msgid ":ref:`Availability `: not Emscripten, not WASI." -msgstr "" - -#: ../../includes/wasm-notavail.rst:5 -msgid "" -"This module does not work or is not available on WebAssembly platforms " -"``wasm32-emscripten`` and ``wasm32-wasi``. See :ref:`wasm-availability` for " -"more information." -msgstr "" -"此模組在 WebAssembly 平台 ``wasm32-emscripten`` 和 ``wasm32-wasi`` 上無法作用" -"或無法使用。有關更多資訊,請參閱 :ref:`wasm-availability`。" - -#: ../../library/crypt.rst:45 -msgid "Hashing Methods" -msgstr "雜湊方法" - -#: ../../library/crypt.rst:49 -msgid "" -"The :mod:`crypt` module defines the list of hashing methods (not all methods " -"are available on all platforms):" -msgstr "" - -#: ../../library/crypt.rst:54 -msgid "" -"A Modular Crypt Format method with 16 character salt and 86 character hash " -"based on the SHA-512 hash function. This is the strongest method." -msgstr "" - -#: ../../library/crypt.rst:59 -msgid "" -"Another Modular Crypt Format method with 16 character salt and 43 character " -"hash based on the SHA-256 hash function." -msgstr "" - -#: ../../library/crypt.rst:64 -msgid "" -"Another Modular Crypt Format method with 22 character salt and 31 character " -"hash based on the Blowfish cipher." -msgstr "" - -#: ../../library/crypt.rst:71 -msgid "" -"Another Modular Crypt Format method with 8 character salt and 22 character " -"hash based on the MD5 hash function." -msgstr "" - -#: ../../library/crypt.rst:76 -msgid "" -"The traditional method with a 2 character salt and 13 characters of hash. " -"This is the weakest method." -msgstr "" - -#: ../../library/crypt.rst:81 -msgid "Module Attributes" -msgstr "模組屬性" - -#: ../../library/crypt.rst:87 -msgid "" -"A list of available password hashing algorithms, as ``crypt.METHOD_*`` " -"objects. This list is sorted from strongest to weakest." -msgstr "" - -#: ../../library/crypt.rst:93 -msgid "Module Functions" -msgstr "模組函式" - -#: ../../library/crypt.rst:95 -msgid "The :mod:`crypt` module defines the following functions:" -msgstr ":mod:`crypt` 模組定義了以下函式:" - -#: ../../library/crypt.rst:99 -msgid "" -"*word* will usually be a user's password as typed at a prompt or in a " -"graphical interface. The optional *salt* is either a string as returned " -"from :func:`mksalt`, one of the ``crypt.METHOD_*`` values (though not all " -"may be available on all platforms), or a full encrypted password including " -"salt, as returned by this function. If *salt* is not provided, the " -"strongest method available in :attr:`methods` will be used." -msgstr "" - -#: ../../library/crypt.rst:106 -msgid "" -"Checking a password is usually done by passing the plain-text password as " -"*word* and the full results of a previous :func:`crypt` call, which should " -"be the same as the results of this call." -msgstr "" - -#: ../../library/crypt.rst:110 -msgid "" -"*salt* (either a random 2 or 16 character string, possibly prefixed with " -"``$digit$`` to indicate the method) which will be used to perturb the " -"encryption algorithm. The characters in *salt* must be in the set ``[./a-zA-" -"Z0-9]``, with the exception of Modular Crypt Format which prefixes a " -"``$digit$``." -msgstr "" - -#: ../../library/crypt.rst:116 -msgid "" -"Returns the hashed password as a string, which will be composed of " -"characters from the same alphabet as the salt." -msgstr "" - -#: ../../library/crypt.rst:121 -msgid "" -"Since a few :manpage:`crypt(3)` extensions allow different values, with " -"different sizes in the *salt*, it is recommended to use the full crypted " -"password as salt when checking for a password." -msgstr "" - -#: ../../library/crypt.rst:125 -msgid "Accept ``crypt.METHOD_*`` values in addition to strings for *salt*." -msgstr "" - -#: ../../library/crypt.rst:131 -msgid "" -"Return a randomly generated salt of the specified method. If no *method* is " -"given, the strongest method available in :attr:`methods` is used." -msgstr "" - -#: ../../library/crypt.rst:135 -msgid "" -"The return value is a string suitable for passing as the *salt* argument to :" -"func:`crypt`." -msgstr "" - -#: ../../library/crypt.rst:138 -msgid "" -"*rounds* specifies the number of rounds for ``METHOD_SHA256``, " -"``METHOD_SHA512`` and ``METHOD_BLOWFISH``. For ``METHOD_SHA256`` and " -"``METHOD_SHA512`` it must be an integer between ``1000`` and " -"``999_999_999``, the default is ``5000``. For ``METHOD_BLOWFISH`` it must " -"be a power of two between ``16`` (2\\ :sup:`4`) and ``2_147_483_648`` (2\\ :" -"sup:`31`), the default is ``4096`` (2\\ :sup:`12`)." -msgstr "" - -#: ../../library/crypt.rst:148 -msgid "Added the *rounds* parameter." -msgstr "新增 *rounds* 參數。" - -#: ../../library/crypt.rst:153 -msgid "Examples" -msgstr "範例" - -#: ../../library/crypt.rst:155 -msgid "" -"A simple example illustrating typical use (a constant-time comparison " -"operation is needed to limit exposure to timing attacks. :func:`hmac." -"compare_digest` is suitable for this purpose)::" -msgstr "" - -#: ../../library/crypt.rst:159 -msgid "" -"import pwd\n" -"import crypt\n" -"import getpass\n" -"from hmac import compare_digest as compare_hash\n" -"\n" -"def login():\n" -" username = input('Python login: ')\n" -" cryptedpasswd = pwd.getpwnam(username)[1]\n" -" if cryptedpasswd:\n" -" if cryptedpasswd == 'x' or cryptedpasswd == '*':\n" -" raise ValueError('no support for shadow passwords')\n" -" cleartext = getpass.getpass()\n" -" return compare_hash(crypt.crypt(cleartext, cryptedpasswd), " -"cryptedpasswd)\n" -" else:\n" -" return True" -msgstr "" -"import pwd\n" -"import crypt\n" -"import getpass\n" -"from hmac import compare_digest as compare_hash\n" -"\n" -"def login():\n" -" username = input('Python login: ')\n" -" cryptedpasswd = pwd.getpwnam(username)[1]\n" -" if cryptedpasswd:\n" -" if cryptedpasswd == 'x' or cryptedpasswd == '*':\n" -" raise ValueError('no support for shadow passwords')\n" -" cleartext = getpass.getpass()\n" -" return compare_hash(crypt.crypt(cleartext, cryptedpasswd), " -"cryptedpasswd)\n" -" else:\n" -" return True" - -#: ../../library/crypt.rst:175 -msgid "" -"To generate a hash of a password using the strongest available method and " -"check it against the original::" -msgstr "" - -#: ../../library/crypt.rst:178 -msgid "" -"import crypt\n" -"from hmac import compare_digest as compare_hash\n" -"\n" -"hashed = crypt.crypt(plaintext)\n" -"if not compare_hash(hashed, crypt.crypt(plaintext, hashed)):\n" -" raise ValueError(\"hashed version doesn't validate against original\")" -msgstr "" -"import crypt\n" -"from hmac import compare_digest as compare_hash\n" -"\n" -"hashed = crypt.crypt(plaintext)\n" -"if not compare_hash(hashed, crypt.crypt(plaintext, hashed)):\n" -" raise ValueError(\"hashed version doesn't validate against original\")" - -#: ../../library/crypt.rst:15 ../../library/crypt.rst:33 -#: ../../library/crypt.rst:119 -msgid "crypt(3)" -msgstr "crypt(3)" - -#: ../../library/crypt.rst:15 -msgid "cipher" -msgstr "cipher" - -#: ../../library/crypt.rst:15 -msgid "DES" -msgstr "DES" diff --git a/library/ctypes.po b/library/ctypes.po index 048c245976..4d41b963bb 100644 --- a/library/ctypes.po +++ b/library/ctypes.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-23 07:52+0800\n" +"POT-Creation-Date: 2024-09-24 07:20+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-" @@ -83,8 +83,8 @@ msgstr "" #: ../../library/ctypes.rst:53 msgid "" "Here are some examples for Windows. Note that ``msvcrt`` is the MS standard " -"C library containing most standard C functions, and uses the cdecl calling " -"convention::" +"C library containing most standard C functions, and uses the ``cdecl`` " +"calling convention::" msgstr "" #: ../../library/ctypes.rst:57 diff --git a/library/curses.po b/library/curses.po index e2707a4f1a..0640ee51c5 100644 --- a/library/curses.po +++ b/library/curses.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-23 07:52+0800\n" +"POT-Creation-Date: 2024-09-24 07:20+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-" @@ -40,17 +40,17 @@ msgid "" "curses library hosted on Linux and the BSD variants of Unix." msgstr "" -#: ../../includes/wasm-ios-notavail.rst:3 -msgid ":ref:`Availability `: not WASI, not iOS." -msgstr "" +#: ../../includes/wasm-mobile-notavail.rst:3 +msgid ":ref:`Availability `: not Android, not iOS, not WASI." +msgstr ":ref:`適用 `:非 Android、非 iOS、非 WASI。" -#: ../../includes/wasm-ios-notavail.rst:5 +#: ../../includes/wasm-mobile-notavail.rst:5 msgid "" -"This module does not work or is not available on WebAssembly platforms, or " -"on iOS. See :ref:`wasm-availability` for more information on WASM " -"availability; see :ref:`iOS-availability` for more information on iOS " -"availability." +"This module is not supported on :ref:`mobile platforms ` or :ref:`WebAssembly platforms `." msgstr "" +"此模組在\\ :ref:`行動平台 `\\ 或\\ :ref:`WebAssembly 平" +"台 `\\ 上不支援。" #: ../../library/curses.rst:28 msgid "" diff --git a/library/dbm.po b/library/dbm.po index c93cd0d4b0..d8cdda7b2e 100644 --- a/library/dbm.po +++ b/library/dbm.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-23 07:52+0800\n" +"POT-Creation-Date: 2024-09-24 07:20+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-" @@ -27,21 +27,20 @@ msgid "**Source code:** :source:`Lib/dbm/__init__.py`" msgstr "**原始碼:**\\ :source:`Lib/dbm/__init__.py`" #: ../../library/dbm.rst:11 -#, fuzzy msgid ":mod:`dbm` is a generic interface to variants of the DBM database:" -msgstr ":mod:`!dbm` --- Unix \"databases\" 的介面" +msgstr "" #: ../../library/dbm.rst:13 msgid ":mod:`dbm.sqlite3`" -msgstr "" +msgstr ":mod:`dbm.sqlite3`" #: ../../library/dbm.rst:14 msgid ":mod:`dbm.gnu`" -msgstr "" +msgstr ":mod:`dbm.gnu`" #: ../../library/dbm.rst:15 msgid ":mod:`dbm.ndbm`" -msgstr "" +msgstr ":mod:`dbm.ndbm`" #: ../../library/dbm.rst:17 msgid "" @@ -50,56 +49,44 @@ msgid "" "`_ to the Oracle Berkeley DB." msgstr "" -#: ../../includes/wasm-ios-notavail.rst:3 -msgid ":ref:`Availability `: not WASI, not iOS." -msgstr "" - -#: ../../includes/wasm-ios-notavail.rst:5 -msgid "" -"This module does not work or is not available on WebAssembly platforms, or " -"on iOS. See :ref:`wasm-availability` for more information on WASM " -"availability; see :ref:`iOS-availability` for more information on iOS " -"availability." -msgstr "" - -#: ../../library/dbm.rst:26 +#: ../../library/dbm.rst:24 msgid "" "A tuple containing the exceptions that can be raised by each of the " "supported modules, with a unique exception also named :exc:`dbm.error` as " "the first item --- the latter is used when :exc:`dbm.error` is raised." msgstr "" -#: ../../library/dbm.rst:33 +#: ../../library/dbm.rst:31 msgid "" "This function attempts to guess which of the several simple database modules " "available --- :mod:`dbm.sqlite3`, :mod:`dbm.gnu`, :mod:`dbm.ndbm`, or :mod:" "`dbm.dumb` --- should be used to open a given file." msgstr "" -#: ../../library/dbm.rst:37 +#: ../../library/dbm.rst:35 msgid "Return one of the following values:" msgstr "回傳以下其中一個值:" -#: ../../library/dbm.rst:39 +#: ../../library/dbm.rst:37 msgid "" "``None`` if the file can't be opened because it's unreadable or doesn't exist" msgstr "" -#: ../../library/dbm.rst:40 +#: ../../library/dbm.rst:38 msgid "the empty string (``''``) if the file's format can't be guessed" msgstr "" -#: ../../library/dbm.rst:41 +#: ../../library/dbm.rst:39 msgid "" "a string containing the required module name, such as ``'dbm.ndbm'`` or " "``'dbm.gnu'``" msgstr "" -#: ../../library/dbm.rst:43 ../../library/dbm.rst:248 ../../library/dbm.rst:444 +#: ../../library/dbm.rst:41 ../../library/dbm.rst:250 ../../library/dbm.rst:448 msgid "*filename* accepts a :term:`path-like object`." msgstr "" -#: ../../library/dbm.rst:67 +#: ../../library/dbm.rst:65 msgid "Open a database and return the corresponding database object." msgstr "" @@ -107,7 +94,7 @@ msgstr "" msgid "Parameters" msgstr "參數" -#: ../../library/dbm.rst:69 +#: ../../library/dbm.rst:67 msgid "" "The database file to open. If the database file already exists, the :func:" "`whichdb` function is used to determine its type and the appropriate module " @@ -115,18 +102,18 @@ msgid "" "imported is used." msgstr "" -#: ../../library/dbm.rst:70 ../../library/dbm.rst:220 +#: ../../library/dbm.rst:68 ../../library/dbm.rst:222 msgid "The database file to open." msgstr "要打開的資料庫檔案" -#: ../../library/dbm.rst:72 +#: ../../library/dbm.rst:70 msgid "" "If the database file already exists, the :func:`whichdb` function is used to " "determine its type and the appropriate module is used; if it does not exist, " "the first submodule listed above that can be imported is used." msgstr "" -#: ../../library/dbm.rst:77 ../../library/dbm.rst:178 ../../library/dbm.rst:349 +#: ../../library/dbm.rst:75 ../../library/dbm.rst:178 ../../library/dbm.rst:353 msgid "" "* ``'r'`` (default): |flag_r| * ``'w'``: |flag_w| * ``'c'``: |flag_c| * " "``'n'``: |flag_n|" @@ -134,36 +121,36 @@ msgstr "" "* ``'r'`` (default): |flag_r| * ``'w'``: |flag_w| * ``'c'``: |flag_c| * " "``'n'``: |flag_n|" -#: ../../library/dbm.rst:78 ../../library/dbm.rst:180 ../../library/dbm.rst:225 -#: ../../library/dbm.rst:350 +#: ../../library/dbm.rst:76 ../../library/dbm.rst:180 ../../library/dbm.rst:227 +#: ../../library/dbm.rst:354 msgid "``'r'`` (default): |flag_r|" msgstr "``'r'`` (default): |flag_r|" -#: ../../library/dbm.rst:79 ../../library/dbm.rst:181 ../../library/dbm.rst:226 -#: ../../library/dbm.rst:351 ../../library/dbm.rst:425 +#: ../../library/dbm.rst:77 ../../library/dbm.rst:181 ../../library/dbm.rst:228 +#: ../../library/dbm.rst:355 ../../library/dbm.rst:429 msgid "``'w'``: |flag_w|" msgstr "``'w'``: |flag_w|" -#: ../../library/dbm.rst:80 ../../library/dbm.rst:182 ../../library/dbm.rst:227 -#: ../../library/dbm.rst:352 +#: ../../library/dbm.rst:78 ../../library/dbm.rst:182 ../../library/dbm.rst:229 +#: ../../library/dbm.rst:356 msgid "``'c'``: |flag_c|" msgstr "``'c'``: |flag_c|" -#: ../../library/dbm.rst:81 ../../library/dbm.rst:183 ../../library/dbm.rst:228 -#: ../../library/dbm.rst:353 ../../library/dbm.rst:427 +#: ../../library/dbm.rst:79 ../../library/dbm.rst:183 ../../library/dbm.rst:230 +#: ../../library/dbm.rst:357 ../../library/dbm.rst:431 msgid "``'n'``: |flag_n|" msgstr "``'n'``: |flag_n|" -#: ../../library/dbm.rst:83 ../../library/dbm.rst:242 ../../library/dbm.rst:355 -#: ../../library/dbm.rst:429 +#: ../../library/dbm.rst:81 ../../library/dbm.rst:244 ../../library/dbm.rst:359 +#: ../../library/dbm.rst:433 msgid "|mode_param_doc|" msgstr "|mode_param_doc|" -#: ../../library/dbm.rst:86 +#: ../../library/dbm.rst:84 msgid "*file* accepts a :term:`path-like object`." msgstr "*file* 接受一個\\ :term:`類路徑物件 `。" -#: ../../library/dbm.rst:89 +#: ../../library/dbm.rst:87 msgid "" "The object returned by :func:`~dbm.open` supports the same basic " "functionality as a :class:`dict`; keys and their corresponding values can be " @@ -172,44 +159,44 @@ msgid "" "setdefault` methods." msgstr "" -#: ../../library/dbm.rst:94 +#: ../../library/dbm.rst:92 msgid "" "Key and values are always stored as :class:`bytes`. This means that when " "strings are used they are implicitly converted to the default encoding " "before being stored." msgstr "" -#: ../../library/dbm.rst:98 +#: ../../library/dbm.rst:96 msgid "" "These objects also support being used in a :keyword:`with` statement, which " "will automatically close them when done." msgstr "" -#: ../../library/dbm.rst:101 +#: ../../library/dbm.rst:99 msgid "" ":meth:`!get` and :meth:`!setdefault` methods are now available for all :mod:" "`dbm` backends." msgstr "" -#: ../../library/dbm.rst:105 +#: ../../library/dbm.rst:103 msgid "" "Added native support for the context management protocol to the objects " "returned by :func:`~dbm.open`." msgstr "" -#: ../../library/dbm.rst:109 +#: ../../library/dbm.rst:107 msgid "" "Deleting a key from a read-only database raises a database module specific " "exception instead of :exc:`KeyError`." msgstr "" -#: ../../library/dbm.rst:113 +#: ../../library/dbm.rst:111 msgid "" "The following example records some hostnames and a corresponding title, and " "then prints out the contents of the database::" msgstr "" -#: ../../library/dbm.rst:116 +#: ../../library/dbm.rst:114 msgid "" "import dbm\n" "\n" @@ -236,28 +223,27 @@ msgid "" "# db is automatically closed when leaving the with statement." msgstr "" -#: ../../library/dbm.rst:143 +#: ../../library/dbm.rst:141 msgid "Module :mod:`shelve`" msgstr ":mod:`shelve` 模組" -#: ../../library/dbm.rst:144 +#: ../../library/dbm.rst:142 msgid "Persistence module which stores non-string data." msgstr "" -#: ../../library/dbm.rst:147 +#: ../../library/dbm.rst:145 msgid "The individual submodules are described in the following sections." msgstr "" -#: ../../library/dbm.rst:150 +#: ../../library/dbm.rst:148 msgid ":mod:`dbm.sqlite3` --- SQLite backend for dbm" msgstr "" -#: ../../library/dbm.rst:158 -#, fuzzy +#: ../../library/dbm.rst:156 msgid "**Source code:** :source:`Lib/dbm/sqlite3.py`" -msgstr "**原始碼:**\\ :source:`Lib/dbm/gnu.py`" +msgstr "**原始碼:**\\ :source:`Lib/dbm/sqlite3.py`" -#: ../../library/dbm.rst:162 +#: ../../library/dbm.rst:160 msgid "" "This module uses the standard library :mod:`sqlite3` module to provide an " "SQLite backend for the :mod:`dbm` module. The files created by :mod:`dbm." @@ -265,6 +251,18 @@ msgid "" "including the SQLite CLI." msgstr "" +#: ../../includes/wasm-notavail.rst:3 +msgid ":ref:`Availability `: not WASI." +msgstr ":ref:`適用 `:非 WASI。" + +#: ../../includes/wasm-notavail.rst:5 +msgid "" +"This module does not work or is not available on WebAssembly. See :ref:`wasm-" +"availability` for more information." +msgstr "" +"此模組在 WebAssembly 平台上不起作用或無法使用。更多資訊請參閱 :ref:`wasm-" +"availability`。" + #: ../../library/dbm.rst:169 msgid "" "Open an SQLite database. The returned object behaves like a :term:`mapping`, " @@ -273,9 +271,8 @@ msgid "" msgstr "" #: ../../library/dbm.rst:174 -#, fuzzy msgid "The path to the database to be opened." -msgstr "要打開的資料庫檔案" +msgstr "要打開的資料庫路徑" #: ../../library/dbm.rst:185 msgid "" @@ -298,24 +295,36 @@ msgid "" "functionality like crash tolerance." msgstr "" -#: ../../library/dbm.rst:207 ../../library/dbm.rst:319 +#: ../../library/dbm.rst:207 ../../library/dbm.rst:321 msgid "" "The file formats created by :mod:`dbm.gnu` and :mod:`dbm.ndbm` are " "incompatible and can not be used interchangeably." msgstr "" -#: ../../library/dbm.rst:212 +#: ../../includes/wasm-mobile-notavail.rst:3 +msgid ":ref:`Availability `: not Android, not iOS, not WASI." +msgstr ":ref:`適用 `:非 Android、非 iOS、非 WASI。" + +#: ../../includes/wasm-mobile-notavail.rst:5 +msgid "" +"This module is not supported on :ref:`mobile platforms ` or :ref:`WebAssembly platforms `." +msgstr "" +"此模組在\\ :ref:`行動平台 `\\ 或\\ :ref:`WebAssembly 平" +"台 `\\ 上不支援。" + +#: ../../library/dbm.rst:214 msgid "" "Raised on :mod:`dbm.gnu`-specific errors, such as I/O errors. :exc:" "`KeyError` is raised for general mapping errors like specifying an incorrect " "key." msgstr "" -#: ../../library/dbm.rst:218 +#: ../../library/dbm.rst:220 msgid "Open a GDBM database and return a :class:`!gdbm` object." msgstr "" -#: ../../library/dbm.rst:224 +#: ../../library/dbm.rst:226 msgid "" "* ``'r'`` (default): |flag_r| * ``'w'``: |flag_w| * ``'c'``: |flag_c| * " "``'n'``: |flag_n| The following additional characters may be appended to " @@ -327,29 +336,29 @@ msgid "" "flag characters." msgstr "" -#: ../../library/dbm.rst:230 +#: ../../library/dbm.rst:232 msgid "" "The following additional characters may be appended to control how the " "database is opened:" msgstr "" -#: ../../library/dbm.rst:233 +#: ../../library/dbm.rst:235 msgid "" "``'f'``: Open the database in fast mode. Writes to the database will not be " "synchronized." msgstr "" -#: ../../library/dbm.rst:235 +#: ../../library/dbm.rst:237 msgid "" "``'s'``: Synchronized mode. Changes to the database will be written " "immediately to the file." msgstr "" -#: ../../library/dbm.rst:237 +#: ../../library/dbm.rst:239 msgid "``'u'``: Do not lock database." msgstr "``'u'``: 不要鎖住資料庫。" -#: ../../library/dbm.rst:239 +#: ../../library/dbm.rst:241 msgid "" "Not all flags are valid for all versions of GDBM. See the :data:`open_flags` " "member for a list of supported flag characters." @@ -359,24 +368,24 @@ msgstr "" msgid "Raises" msgstr "引發" -#: ../../library/dbm.rst:245 +#: ../../library/dbm.rst:247 msgid "If an invalid *flag* argument is passed." msgstr "如果一個無效的 *flag* 引數被傳入。" -#: ../../library/dbm.rst:253 +#: ../../library/dbm.rst:255 msgid "" "A string of characters the *flag* parameter of :meth:`~dbm.gnu.open` " "supports." msgstr "" -#: ../../library/dbm.rst:255 +#: ../../library/dbm.rst:257 msgid "" ":class:`!gdbm` objects behave similar to :term:`mappings `, but :" "meth:`!items` and :meth:`!values` methods are not supported. The following " "methods are also provided:" msgstr "" -#: ../../library/dbm.rst:261 +#: ../../library/dbm.rst:263 msgid "" "It's possible to loop over every key in the database using this method and " "the :meth:`nextkey` method. The traversal is ordered by GDBM's internal " @@ -384,14 +393,14 @@ msgid "" "starting key." msgstr "" -#: ../../library/dbm.rst:268 +#: ../../library/dbm.rst:270 msgid "" "Returns the key that follows *key* in the traversal. The following code " "prints every key in the database ``db``, without having to create a list in " "memory that contains them all::" msgstr "" -#: ../../library/dbm.rst:272 +#: ../../library/dbm.rst:274 msgid "" "k = db.firstkey()\n" "while k is not None:\n" @@ -403,7 +412,7 @@ msgstr "" " print(k)\n" " k = db.nextkey(k)" -#: ../../library/dbm.rst:279 +#: ../../library/dbm.rst:281 msgid "" "If you have carried out a lot of deletions and would like to shrink the " "space used by the GDBM file, this routine will reorganize the database. :" @@ -412,37 +421,36 @@ msgid "" "reused as new (key, value) pairs are added." msgstr "" -#: ../../library/dbm.rst:287 +#: ../../library/dbm.rst:289 msgid "" "When the database has been opened in fast mode, this method forces any " "unwritten data to be written to the disk." msgstr "" -#: ../../library/dbm.rst:292 +#: ../../library/dbm.rst:294 msgid "Close the GDBM database." msgstr "關閉 GDBM 資料庫。" -#: ../../library/dbm.rst:296 -#, fuzzy +#: ../../library/dbm.rst:298 msgid "Remove all items from the GDBM database." -msgstr "關閉 GDBM 資料庫。" +msgstr "移除 GDBM 資料庫中所有項目。" -#: ../../library/dbm.rst:302 +#: ../../library/dbm.rst:304 msgid ":mod:`dbm.ndbm` --- New Database Manager" msgstr ":mod:`dbm.ndbm` --- 新資料庫管理器" -#: ../../library/dbm.rst:308 +#: ../../library/dbm.rst:310 msgid "**Source code:** :source:`Lib/dbm/ndbm.py`" msgstr "**原始碼:**\\ :source:`Lib/dbm/ndbm.py`" -#: ../../library/dbm.rst:312 +#: ../../library/dbm.rst:314 msgid "" "The :mod:`dbm.ndbm` module provides an interface to the :abbr:`NDBM (New " "Database Manager)` library. This module can be used with the \"classic\" " "NDBM interface or the :abbr:`GDBM (GNU dbm)` compatibility interface." msgstr "" -#: ../../library/dbm.rst:324 +#: ../../library/dbm.rst:326 msgid "" "The NDBM library shipped as part of macOS has an undocumented limitation on " "the size of values, which can result in corrupted database files when " @@ -450,56 +458,55 @@ msgid "" "result in a hard crash (segmentation fault)." msgstr "" -#: ../../library/dbm.rst:331 +#: ../../library/dbm.rst:335 msgid "" "Raised on :mod:`dbm.ndbm`-specific errors, such as I/O errors. :exc:" "`KeyError` is raised for general mapping errors like specifying an incorrect " "key." msgstr "" -#: ../../library/dbm.rst:337 +#: ../../library/dbm.rst:341 msgid "Name of the NDBM implementation library used." msgstr "" -#: ../../library/dbm.rst:342 +#: ../../library/dbm.rst:346 msgid "Open an NDBM database and return an :class:`!ndbm` object." msgstr "" -#: ../../library/dbm.rst:344 +#: ../../library/dbm.rst:348 msgid "" "The basename of the database file (without the :file:`.dir` or :file:`.pag` " "extensions)." msgstr "" -#: ../../library/dbm.rst:358 +#: ../../library/dbm.rst:362 msgid "" ":class:`!ndbm` objects behave similar to :term:`mappings `, but :" "meth:`!items` and :meth:`!values` methods are not supported. The following " "methods are also provided:" msgstr "" -#: ../../library/dbm.rst:362 +#: ../../library/dbm.rst:366 msgid "Accepts :term:`path-like object` for filename." msgstr "" -#: ../../library/dbm.rst:367 +#: ../../library/dbm.rst:371 msgid "Close the NDBM database." msgstr "關閉 NDBM 資料庫。" -#: ../../library/dbm.rst:371 -#, fuzzy +#: ../../library/dbm.rst:375 msgid "Remove all items from the NDBM database." -msgstr "關閉 NDBM 資料庫。" +msgstr "移除 NDBM 資料庫中所有項目。" -#: ../../library/dbm.rst:377 +#: ../../library/dbm.rst:381 msgid ":mod:`dbm.dumb` --- Portable DBM implementation" msgstr ":mod:`dbm.dumb` --- 可攜式 DBM 實作" -#: ../../library/dbm.rst:382 +#: ../../library/dbm.rst:386 msgid "**Source code:** :source:`Lib/dbm/dumb.py`" msgstr "**原始碼:**\\ :source:`Lib/dbm/dumb.py`" -#: ../../library/dbm.rst:388 +#: ../../library/dbm.rst:392 msgid "" "The :mod:`dbm.dumb` module is intended as a last resort fallback for the :" "mod:`dbm` module when a more robust module is not available. The :mod:`dbm." @@ -507,53 +514,53 @@ msgid "" "the other database modules." msgstr "" -#: ../../library/dbm.rst:395 +#: ../../library/dbm.rst:399 msgid "" "The :mod:`dbm.dumb` module provides a persistent :class:`dict`-like " "interface which is written entirely in Python. Unlike other :mod:`dbm` " "backends, such as :mod:`dbm.gnu`, no external library is required." msgstr "" -#: ../../library/dbm.rst:400 +#: ../../library/dbm.rst:404 msgid "The :mod:`!dbm.dumb` module defines the following:" msgstr ":mod:`!dbm.dumb` 模組定義了以下項目:" -#: ../../library/dbm.rst:404 +#: ../../library/dbm.rst:408 msgid "" "Raised on :mod:`dbm.dumb`-specific errors, such as I/O errors. :exc:" "`KeyError` is raised for general mapping errors like specifying an incorrect " "key." msgstr "" -#: ../../library/dbm.rst:410 +#: ../../library/dbm.rst:414 msgid "" "Open a :mod:`!dbm.dumb` database. The returned database object behaves " "similar to a :term:`mapping`, in addition to providing :meth:`~dumbdbm.sync` " "and :meth:`~dumbdbm.close` methods." msgstr "" -#: ../../library/dbm.rst:415 +#: ../../library/dbm.rst:419 msgid "" "The basename of the database file (without extensions). A new database " "creates the following files: - :file:`{filename}.dat` - :file:`{filename}." "dir`" msgstr "" -#: ../../library/dbm.rst:416 +#: ../../library/dbm.rst:420 msgid "" "The basename of the database file (without extensions). A new database " "creates the following files:" msgstr "" -#: ../../library/dbm.rst:419 +#: ../../library/dbm.rst:423 msgid ":file:`{filename}.dat`" msgstr ":file:`{filename}.dat`" -#: ../../library/dbm.rst:420 +#: ../../library/dbm.rst:424 msgid ":file:`{filename}.dir`" msgstr ":file:`{filename}.dir`" -#: ../../library/dbm.rst:423 +#: ../../library/dbm.rst:427 msgid "" "* ``'r'``: |flag_r| * ``'w'``: |flag_w| * ``'c'`` (default): |flag_c| * " "``'n'``: |flag_n|" @@ -561,49 +568,49 @@ msgstr "" "* ``'r'``: |flag_r| * ``'w'``: |flag_w| * ``'c'`` (default): |flag_c| * " "``'n'``: |flag_n|" -#: ../../library/dbm.rst:424 +#: ../../library/dbm.rst:428 msgid "``'r'``: |flag_r|" msgstr "``'r'``: |flag_r|" -#: ../../library/dbm.rst:426 +#: ../../library/dbm.rst:430 msgid "``'c'`` (default): |flag_c|" msgstr "``'c'`` (default): |flag_c|" -#: ../../library/dbm.rst:433 +#: ../../library/dbm.rst:437 msgid "" "It is possible to crash the Python interpreter when loading a database with " "a sufficiently large/complex entry due to stack depth limitations in " "Python's AST compiler." msgstr "" -#: ../../library/dbm.rst:437 +#: ../../library/dbm.rst:441 msgid "" ":func:`~dbm.dumb.open` always creates a new database when *flag* is ``'n'``." msgstr "" -#: ../../library/dbm.rst:440 +#: ../../library/dbm.rst:444 msgid "" "A database opened read-only if *flag* is ``'r'``. A database is not created " "if it does not exist if *flag* is ``'r'`` or ``'w'``." msgstr "" -#: ../../library/dbm.rst:447 +#: ../../library/dbm.rst:451 msgid "" "In addition to the methods provided by the :class:`collections.abc." "MutableMapping` class, the following methods are provided:" msgstr "" -#: ../../library/dbm.rst:453 +#: ../../library/dbm.rst:457 msgid "" "Synchronize the on-disk directory and data files. This method is called by " "the :meth:`Shelve.sync` method." msgstr "" -#: ../../library/dbm.rst:458 +#: ../../library/dbm.rst:462 msgid "Close the database." msgstr "關閉資料庫。" -#: ../../library/dbm.rst:384 +#: ../../library/dbm.rst:388 msgid "databases" msgstr "databases(資料庫)" diff --git a/library/ensurepip.po b/library/ensurepip.po index 8b2bc4d453..0c3867c9a3 100644 --- a/library/ensurepip.po +++ b/library/ensurepip.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-23 07:52+0800\n" +"POT-Creation-Date: 2024-09-24 07:20+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-" @@ -75,20 +75,17 @@ msgstr ":pep:`453`: 在 Python 安裝中的 pip 明確初始建置" msgid "The original rationale and specification for this module." msgstr "此模組的最初設計理念與規範。" -#: ../../includes/wasm-ios-notavail.rst:3 -msgid ":ref:`Availability `: not WASI, not iOS." -msgstr "" +#: ../../includes/wasm-mobile-notavail.rst:3 +msgid ":ref:`Availability `: not Android, not iOS, not WASI." +msgstr ":ref:`適用 `:非 Android、非 iOS、非 WASI。" -#: ../../includes/wasm-ios-notavail.rst:5 -#, fuzzy +#: ../../includes/wasm-mobile-notavail.rst:5 msgid "" -"This module does not work or is not available on WebAssembly platforms, or " -"on iOS. See :ref:`wasm-availability` for more information on WASM " -"availability; see :ref:`iOS-availability` for more information on iOS " -"availability." +"This module is not supported on :ref:`mobile platforms ` or :ref:`WebAssembly platforms `." msgstr "" -"此模組在 WebAssembly 平台 ``wasm32-emscripten`` 和 ``wasm32-wasi`` 上無法作用" -"或無法使用。有關更多資訊,請參閱 :ref:`wasm-availability`。" +"此模組在\\ :ref:`行動平台 `\\ 或\\ :ref:`WebAssembly 平" +"台 `\\ 上不支援。" #: ../../library/ensurepip.rst:44 msgid "Command line interface" @@ -273,3 +270,13 @@ msgstr "" "初始建置的過程也許會安裝 ``pip`` 所需要的額外的模組,但其他軟體不應該假設這些" "相依 (dependency) 總是預設存在(因為這些相依很可能會在未來版本的 ``pip`` 中被" "移除)。" + +#, fuzzy +#~ msgid "" +#~ "This module does not work or is not available on WebAssembly platforms, " +#~ "or on iOS. See :ref:`wasm-availability` for more information on WASM " +#~ "availability; see :ref:`iOS-availability` for more information on iOS " +#~ "availability." +#~ msgstr "" +#~ "此模組在 WebAssembly 平台 ``wasm32-emscripten`` 和 ``wasm32-wasi`` 上無法" +#~ "作用或無法使用。有關更多資訊,請參閱 :ref:`wasm-availability`。" diff --git a/library/exceptions.po b/library/exceptions.po index 836c4bee5c..eb2e321fa6 100644 --- a/library/exceptions.po +++ b/library/exceptions.po @@ -645,7 +645,7 @@ msgstr "" #: ../../library/exceptions.rst:429 msgid ":func:`os.fork`." -msgstr "" +msgstr ":func:`os.fork`。" #: ../../library/exceptions.rst:431 msgid "See also the :func:`sys.is_finalizing` function." diff --git a/library/ftplib.po b/library/ftplib.po index b0dac40c3a..5f1ac72eb1 100644 --- a/library/ftplib.po +++ b/library/ftplib.po @@ -50,13 +50,12 @@ msgid ":ref:`Availability `: not WASI." msgstr ":ref:`Availability `:非 WASI。" #: ../../includes/wasm-notavail.rst:5 -#, fuzzy msgid "" "This module does not work or is not available on WebAssembly. See :ref:`wasm-" "availability` for more information." msgstr "" -"此模組在 WebAssembly 平台 ``wasm32-emscripten`` 和 ``wasm32-wasi`` 上不起作用" -"或無法使用。有關更多資訊,請參閱 :ref:`wasm-availability`。" +"此模組在 WebAssembly 平台上不起作用或無法使用。更多資訊請參閱 :ref:`wasm-" +"availability`。" #: ../../library/ftplib.rst:26 msgid "Here's a sample session using the :mod:`ftplib` module::" diff --git a/library/functools.po b/library/functools.po index 280a86fb33..cc8ce0e7f8 100644 --- a/library/functools.po +++ b/library/functools.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-23 07:52+0800\n" +"POT-Creation-Date: 2024-09-24 07:20+0000\n" "PO-Revision-Date: 2024-05-11 16:02+0800\n" "Last-Translator: Matt Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -394,10 +394,9 @@ msgstr "" "cache-method-calls`" #: ../../library/functools.rst:220 -#, fuzzy msgid "" "An `LRU (least recently used) cache `_ works best when the " +"Cache_replacement_policies#Least_Recently_Used_(LRU)>`_ works best when the " "most recent calls are the best predictors of upcoming calls (for example, " "the most popular articles on a news server tend to change each day). The " "cache's size limit assures that the cache does not grow without bound on " diff --git a/library/getpass.po b/library/getpass.po index 19177262cd..c1301e9377 100644 --- a/library/getpass.po +++ b/library/getpass.po @@ -29,16 +29,15 @@ msgstr "**原始碼:**\\ :source:`Lib/getpass.py`" #: ../../includes/wasm-notavail.rst:3 msgid ":ref:`Availability `: not WASI." -msgstr "" +msgstr ":ref:`Availability `:非 WASI。" #: ../../includes/wasm-notavail.rst:5 -#, fuzzy msgid "" "This module does not work or is not available on WebAssembly. See :ref:`wasm-" "availability` for more information." msgstr "" -"此模組在 WebAssembly 平台 ``wasm32-emscripten`` 和 ``wasm32-wasi`` 上無法作用" -"或無法使用。有關更多資訊,請參閱 :ref:`wasm-availability`。" +"此模組在 WebAssembly 平台上不起作用或無法使用。更多資訊請參閱 :ref:`wasm-" +"availability`。" #: ../../library/getpass.rst:17 msgid "The :mod:`getpass` module provides two functions:" diff --git a/library/grp.po b/library/grp.po index 00ca37fb41..15b9d95405 100644 --- a/library/grp.po +++ b/library/grp.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-23 07:52+0800\n" +"POT-Creation-Date: 2024-09-24 07:20+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-" @@ -29,9 +29,9 @@ msgid "" msgstr "" #: ../../library/grp.rst:13 -#, fuzzy -msgid ":ref:`Availability `: Unix, not WASI, not iOS." -msgstr ":ref:`適用 `:Unix、非 Emscripten、非 WASI。" +msgid "" +":ref:`Availability `: Unix, not WASI, not Android, not iOS." +msgstr ":ref:`適用 `:Unix、非 WASI、非 Android、非 iOS。" #: ../../library/grp.rst:15 msgid "" diff --git a/library/hashlib.po b/library/hashlib.po index c3eba1ece2..e7b2a5de94 100644 --- a/library/hashlib.po +++ b/library/hashlib.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-23 07:52+0800\n" +"POT-Creation-Date: 2024-09-24 07:20+0000\n" "PO-Revision-Date: 2024-05-11 16:03+0800\n" "Last-Translator: Matt Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -976,10 +976,9 @@ msgstr "" "性。" #: ../../library/hashlib.rst:657 -#, fuzzy msgid "" "(`NIST SP-800-106 \"Randomized Hashing for Digital Signatures\" `_)" +"csrc.nist.gov/pubs/sp/800/106/final>`_)" msgstr "" "(`NIST SP-800-106 「數位簽章的隨機雜湊 (Randomized Hashing for Digital " "Signatures)」 `_)" @@ -1251,8 +1250,7 @@ msgid "The FIPS 180-4 publication on Secure Hash Algorithms." msgstr "有關安全雜湊演算法的 FIPS 180-4 出版物。" #: ../../library/hashlib.rst:830 -#, fuzzy -msgid "https://csrc.nist.gov/publications/detail/fips/202/final" +msgid "https://csrc.nist.gov/pubs/fips/202/final" msgstr "https://csrc.nist.gov/pubs/fips/202/final" #: ../../library/hashlib.rst:831 diff --git a/library/http.client.po b/library/http.client.po index a3bb30106b..e9a367037e 100644 --- a/library/http.client.po +++ b/library/http.client.po @@ -46,16 +46,15 @@ msgstr "" #: ../../includes/wasm-notavail.rst:3 msgid ":ref:`Availability `: not WASI." -msgstr "" +msgstr ":ref:`Availability `:非 WASI。" #: ../../includes/wasm-notavail.rst:5 -#, fuzzy msgid "" "This module does not work or is not available on WebAssembly. See :ref:`wasm-" "availability` for more information." msgstr "" -"此模組在 WebAssembly 平台 ``wasm32-emscripten`` 和 ``wasm32-wasi`` 上無法作用" -"或無法使用。有關更多資訊,請參閱 :ref:`wasm-availability`。" +"此模組在 WebAssembly 平台上不起作用或無法使用。更多資訊請參閱 :ref:`wasm-" +"availability`。" #: ../../library/http.client.rst:33 msgid "The module provides the following classes:" diff --git a/library/http.cookiejar.po b/library/http.cookiejar.po index ea30115b2d..6184715dab 100644 --- a/library/http.cookiejar.po +++ b/library/http.cookiejar.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-23 07:52+0800\n" +"POT-Creation-Date: 2024-09-24 07:20+0000\n" "PO-Revision-Date: 2016-11-19 00:31+0000\n" "Last-Translator: Liang-Bo Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -200,8 +200,7 @@ msgid "" msgstr "" #: ../../library/http.cookiejar.rst:140 -#, fuzzy -msgid "http://kristol.org/cookie/errata.html" +msgid "https://kristol.org/cookie/errata.html" msgstr "https://kristol.org/cookie/errata.html" #: ../../library/http.cookiejar.rst:141 @@ -224,7 +223,7 @@ msgstr "" #: ../../library/http.cookiejar.rst:153 msgid ":class:`CookieJar` has the following methods:" -msgstr "" +msgstr ":class:`CookieJar` 擁有以下方法:" #: ../../library/http.cookiejar.rst:158 msgid "Add correct :mailheader:`Cookie` header to *request*." diff --git a/library/http.server.po b/library/http.server.po index 5a706bd1c1..16bc06d5f9 100644 --- a/library/http.server.po +++ b/library/http.server.po @@ -37,16 +37,15 @@ msgstr "" #: ../../includes/wasm-notavail.rst:3 msgid ":ref:`Availability `: not WASI." -msgstr "" +msgstr ":ref:`適用 `:非 WASI。" #: ../../includes/wasm-notavail.rst:5 -#, fuzzy msgid "" "This module does not work or is not available on WebAssembly. See :ref:`wasm-" "availability` for more information." msgstr "" -"此模組在 WebAssembly 平台 ``wasm32-emscripten`` 和 ``wasm32-wasi`` 上無法作用" -"或無法使用。有關更多資訊,請參閱 :ref:`wasm-availability`。" +"此模組在 WebAssembly 平台上不起作用或無法使用。更多資訊請參閱 :ref:`wasm-" +"availability`。" #: ../../library/http.server.rst:27 msgid "" diff --git a/library/imaplib.po b/library/imaplib.po index ecc2eaa302..e78b7739b0 100644 --- a/library/imaplib.po +++ b/library/imaplib.po @@ -36,16 +36,15 @@ msgstr "" #: ../../includes/wasm-notavail.rst:3 msgid ":ref:`Availability `: not WASI." -msgstr "" +msgstr ":ref:`適用 `:非 WASI。" #: ../../includes/wasm-notavail.rst:5 -#, fuzzy msgid "" "This module does not work or is not available on WebAssembly. See :ref:`wasm-" "availability` for more information." msgstr "" -"此模組在 WebAssembly 平台 ``wasm32-emscripten`` 和 ``wasm32-wasi`` 上無法作用" -"或無法使用。有關更多資訊,請參閱 :ref:`wasm-availability`。" +"此模組在 WebAssembly 平台上不起作用或無法使用。更多資訊請參閱 :ref:`wasm-" +"availability`。" #: ../../library/imaplib.rst:31 msgid "" diff --git a/library/imghdr.po b/library/imghdr.po deleted file mode 100644 index f190c8b9c3..0000000000 --- a/library/imghdr.po +++ /dev/null @@ -1,209 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) 2001-2022, Python Software Foundation -# This file is distributed under the same license as the Python package. -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: Python 3.13\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-03 11:11+0800\n" -"PO-Revision-Date: 2022-05-22 02:06+0800\n" -"Last-Translator: Adrian Liaw \n" -"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" -"tw)\n" -"Language: zh_TW\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Poedit 3.0.1\n" - -#: ../../library/imghdr.rst:2 -msgid ":mod:`imghdr` --- Determine the type of an image" -msgstr ":mod:`imghdr` --- 推測圖片種類" - -#: ../../library/imghdr.rst:8 -msgid "**Source code:** :source:`Lib/imghdr.py`" -msgstr "**原始碼:**\\ :source:`Lib/imghdr.py`" - -#: ../../library/imghdr.rst:10 -msgid "" -"The :mod:`imghdr` module is deprecated (see :pep:`PEP 594 <594#imghdr>` for " -"details and alternatives)." -msgstr "" -":mod:`imghdr` 模組 (module) 即將被棄用(詳情與替代方案見 :pep:`PEP 594 " -"<594#imghdr>`\\ )。" - -#: ../../library/imghdr.rst:16 -msgid "" -"The :mod:`imghdr` module determines the type of image contained in a file or " -"byte stream." -msgstr "" - -#: ../../library/imghdr.rst:19 -msgid "The :mod:`imghdr` module defines the following function:" -msgstr "" - -#: ../../library/imghdr.rst:24 -msgid "" -"Test the image data contained in the file named *file* and return a string " -"describing the image type. If *h* is provided, the *file* argument is " -"ignored and *h* is assumed to contain the byte stream to test." -msgstr "" - -#: ../../library/imghdr.rst:28 -msgid "Accepts a :term:`path-like object`." -msgstr "" - -#: ../../library/imghdr.rst:31 -msgid "" -"The following image types are recognized, as listed below with the return " -"value from :func:`what`:" -msgstr "" - -#: ../../library/imghdr.rst:35 -msgid "Value" -msgstr "" - -#: ../../library/imghdr.rst:35 -msgid "Image format" -msgstr "" - -#: ../../library/imghdr.rst:37 -msgid "``'rgb'``" -msgstr "``'rgb'``" - -#: ../../library/imghdr.rst:37 -msgid "SGI ImgLib Files" -msgstr "" - -#: ../../library/imghdr.rst:39 -msgid "``'gif'``" -msgstr "``'gif'``" - -#: ../../library/imghdr.rst:39 -msgid "GIF 87a and 89a Files" -msgstr "" - -#: ../../library/imghdr.rst:41 -msgid "``'pbm'``" -msgstr "``'pbm'``" - -#: ../../library/imghdr.rst:41 -msgid "Portable Bitmap Files" -msgstr "" - -#: ../../library/imghdr.rst:43 -msgid "``'pgm'``" -msgstr "``'pgm'``" - -#: ../../library/imghdr.rst:43 -msgid "Portable Graymap Files" -msgstr "" - -#: ../../library/imghdr.rst:45 -msgid "``'ppm'``" -msgstr "``'ppm'``" - -#: ../../library/imghdr.rst:45 -msgid "Portable Pixmap Files" -msgstr "" - -#: ../../library/imghdr.rst:47 -msgid "``'tiff'``" -msgstr "``'tiff'``" - -#: ../../library/imghdr.rst:47 -msgid "TIFF Files" -msgstr "TIFF 檔案" - -#: ../../library/imghdr.rst:49 -msgid "``'rast'``" -msgstr "``'rast'``" - -#: ../../library/imghdr.rst:49 -msgid "Sun Raster Files" -msgstr "" - -#: ../../library/imghdr.rst:51 -msgid "``'xbm'``" -msgstr "``'xbm'``" - -#: ../../library/imghdr.rst:51 -msgid "X Bitmap Files" -msgstr "" - -#: ../../library/imghdr.rst:53 -msgid "``'jpeg'``" -msgstr "``'jpeg'``" - -#: ../../library/imghdr.rst:53 -msgid "JPEG data in JFIF or Exif formats" -msgstr "" - -#: ../../library/imghdr.rst:55 -msgid "``'bmp'``" -msgstr "``'bmp'``" - -#: ../../library/imghdr.rst:55 -msgid "BMP files" -msgstr "BMP 檔案" - -#: ../../library/imghdr.rst:57 -msgid "``'png'``" -msgstr "``'png'``" - -#: ../../library/imghdr.rst:57 -msgid "Portable Network Graphics" -msgstr "" - -#: ../../library/imghdr.rst:59 -msgid "``'webp'``" -msgstr "``'webp'``" - -#: ../../library/imghdr.rst:59 -msgid "WebP files" -msgstr "WebP 檔案" - -#: ../../library/imghdr.rst:61 -msgid "``'exr'``" -msgstr "``'exr'``" - -#: ../../library/imghdr.rst:61 -msgid "OpenEXR Files" -msgstr "OpenEXR 檔案" - -#: ../../library/imghdr.rst:64 -msgid "The *exr* and *webp* formats were added." -msgstr "新增 *exr* 與 *webp* 格式。" - -#: ../../library/imghdr.rst:68 -msgid "" -"You can extend the list of file types :mod:`imghdr` can recognize by " -"appending to this variable:" -msgstr "" - -#: ../../library/imghdr.rst:74 -msgid "" -"A list of functions performing the individual tests. Each function takes " -"two arguments: the byte-stream and an open file-like object. When :func:" -"`what` is called with a byte-stream, the file-like object will be ``None``." -msgstr "" - -#: ../../library/imghdr.rst:78 -msgid "" -"The test function should return a string describing the image type if the " -"test succeeded, or ``None`` if it failed." -msgstr "" - -#: ../../library/imghdr.rst:81 -msgid "Example::" -msgstr "範例: ::" - -#: ../../library/imghdr.rst:83 -msgid "" -">>> import imghdr\n" -">>> imghdr.what('bass.gif')\n" -"'gif'" -msgstr "" diff --git a/library/importlib.po b/library/importlib.po index 4ce7485363..77865d2b32 100644 --- a/library/importlib.po +++ b/library/importlib.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-23 07:52+0800\n" +"POT-Creation-Date: 2024-09-24 07:20+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-" @@ -1919,34 +1919,53 @@ msgid "Importing a source file directly" msgstr "" #: ../../library/importlib.rst:1587 -msgid "To import a Python source file directly, use the following recipe::" +msgid "" +"This recipe should be used with caution: it is an approximation of an import " +"statement where the file path is specified directly, rather than :data:`sys." +"path` being searched. Alternatives should first be considered first, such as " +"modifying :data:`sys.path` when a proper module is required, or using :func:" +"`runpy.run_path` when the global namespace resulting from running a Python " +"file is appropriate." +msgstr "" + +#: ../../library/importlib.rst:1594 +msgid "" +"To import a Python source file directly from a path, use the following " +"recipe::" msgstr "" -#: ../../library/importlib.rst:1589 +#: ../../library/importlib.rst:1596 msgid "" "import importlib.util\n" "import sys\n" "\n" -"# For illustrative purposes.\n" -"import tokenize\n" -"file_path = tokenize.__file__\n" -"module_name = tokenize.__name__\n" "\n" -"spec = importlib.util.spec_from_file_location(module_name, file_path)\n" -"module = importlib.util.module_from_spec(spec)\n" -"sys.modules[module_name] = module\n" -"spec.loader.exec_module(module)" +"def import_from_path(module_name, file_path):\n" +" spec = importlib.util.spec_from_file_location(module_name, file_path)\n" +" module = importlib.util.module_from_spec(spec)\n" +" sys.modules[module_name] = module\n" +" spec.loader.exec_module(module)\n" +" return module\n" +"\n" +"\n" +"# For illustrative purposes only (use of `json` is arbitrary).\n" +"import json\n" +"file_path = json.__file__\n" +"module_name = json.__name__\n" +"\n" +"# Similar outcome as `import json`.\n" +"json = import_from_path(module_name, file_path)" msgstr "" -#: ../../library/importlib.rst:1604 +#: ../../library/importlib.rst:1618 msgid "Implementing lazy imports" msgstr "" -#: ../../library/importlib.rst:1606 +#: ../../library/importlib.rst:1620 msgid "The example below shows how to implement lazy imports::" msgstr "" -#: ../../library/importlib.rst:1608 +#: ../../library/importlib.rst:1622 msgid "" ">>> import importlib.util\n" ">>> import sys\n" @@ -1966,11 +1985,11 @@ msgid "" "False" msgstr "" -#: ../../library/importlib.rst:1628 +#: ../../library/importlib.rst:1641 msgid "Setting up an importer" msgstr "" -#: ../../library/importlib.rst:1630 +#: ../../library/importlib.rst:1643 msgid "" "For deep customizations of import, you typically want to implement an :term:" "`importer`. This means managing both the :term:`finder` and :term:`loader` " @@ -1984,7 +2003,7 @@ msgid "" "for the appropriate classes defined within this package)::" msgstr "" -#: ../../library/importlib.rst:1641 +#: ../../library/importlib.rst:1654 msgid "" "import importlib.machinery\n" "import sys\n" @@ -2008,11 +2027,11 @@ msgid "" "sys.path_hooks.append(SpamPathEntryFinder.path_hook(loader_details))" msgstr "" -#: ../../library/importlib.rst:1662 +#: ../../library/importlib.rst:1675 msgid "Approximating :func:`importlib.import_module`" msgstr "" -#: ../../library/importlib.rst:1664 +#: ../../library/importlib.rst:1677 msgid "" "Import itself is implemented in Python code, making it possible to expose " "most of the import machinery through importlib. The following helps " @@ -2020,7 +2039,7 @@ msgid "" "approximate implementation of :func:`importlib.import_module`::" msgstr "" -#: ../../library/importlib.rst:1670 +#: ../../library/importlib.rst:1683 msgid "" "import importlib.util\n" "import sys\n" diff --git a/library/inspect.po b/library/inspect.po index 75c786af83..d8ce3640b7 100644 --- a/library/inspect.po +++ b/library/inspect.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-23 07:52+0800\n" +"POT-Creation-Date: 2024-09-24 07:20+0000\n" "PO-Revision-Date: 2022-10-16 06:59+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -667,11 +667,10 @@ msgid "" msgstr "" #: ../../library/inspect.rst:366 -#, fuzzy msgid "" "Functions wrapped in :func:`functools.partialmethod` now return ``True`` if " "the wrapped function is a Python generator function." -msgstr "如果物件是 Python 產生器函式,則回傳 ``True``。" +msgstr "" #: ../../library/inspect.rst:372 msgid "Return ``True`` if the object is a generator." @@ -1131,7 +1130,7 @@ msgid "" "including keyword-only parameters." msgstr "" -#: ../../library/inspect.rst:770 ../../library/inspect.rst:1124 +#: ../../library/inspect.rst:770 ../../library/inspect.rst:1125 msgid "" "Python only explicitly guaranteed that it preserved the declaration order of " "keyword-only parameters as of version 3.7, although in practice this order " @@ -1487,28 +1486,29 @@ msgstr "" #: ../../library/inspect.rst:1020 msgid "" "A dict of keyword arguments values. Dynamically computed from the :attr:" -"`arguments` attribute." +"`arguments` attribute. Arguments that can be passed positionally are " +"included in :attr:`args` instead." msgstr "" -#: ../../library/inspect.rst:1025 +#: ../../library/inspect.rst:1026 msgid "A reference to the parent :class:`Signature` object." msgstr "" -#: ../../library/inspect.rst:1029 +#: ../../library/inspect.rst:1030 msgid "Set default values for missing arguments." msgstr "為遺漏的引數設定預設值。" -#: ../../library/inspect.rst:1031 +#: ../../library/inspect.rst:1032 msgid "" "For variable-positional arguments (``*args``) the default is an empty tuple." msgstr "" -#: ../../library/inspect.rst:1034 +#: ../../library/inspect.rst:1035 msgid "" "For variable-keyword arguments (``**kwargs``) the default is an empty dict." msgstr "" -#: ../../library/inspect.rst:1037 +#: ../../library/inspect.rst:1038 msgid "" ">>> def foo(a, b='ham', *args): pass\n" ">>> ba = inspect.signature(foo).bind('spam')\n" @@ -1522,13 +1522,13 @@ msgstr "" ">>> ba.arguments\n" "{'a': 'spam', 'b': 'ham', 'args': ()}" -#: ../../library/inspect.rst:1047 +#: ../../library/inspect.rst:1048 msgid "" "The :attr:`args` and :attr:`kwargs` properties can be used to invoke " "functions:" msgstr "" -#: ../../library/inspect.rst:1050 +#: ../../library/inspect.rst:1051 msgid "" "def test(a, *, b):\n" " ...\n" @@ -1544,19 +1544,19 @@ msgstr "" "ba = sig.bind(10, b=20)\n" "test(*ba.args, **ba.kwargs)" -#: ../../library/inspect.rst:1062 +#: ../../library/inspect.rst:1063 msgid ":pep:`362` - Function Signature Object." msgstr "" -#: ../../library/inspect.rst:1063 +#: ../../library/inspect.rst:1064 msgid "The detailed specification, implementation details and examples." msgstr "" -#: ../../library/inspect.rst:1069 +#: ../../library/inspect.rst:1070 msgid "Classes and functions" msgstr "類別與函式" -#: ../../library/inspect.rst:1073 +#: ../../library/inspect.rst:1074 msgid "" "Arrange the given list of classes into a hierarchy of nested lists. Where a " "nested list appears, it contains classes derived from the class whose entry " @@ -1567,19 +1567,19 @@ msgid "" "will appear multiple times." msgstr "" -#: ../../library/inspect.rst:1084 +#: ../../library/inspect.rst:1085 msgid "" "Get the names and default values of a Python function's parameters. A :term:" "`named tuple` is returned:" msgstr "" -#: ../../library/inspect.rst:1087 +#: ../../library/inspect.rst:1088 msgid "" "``FullArgSpec(args, varargs, varkw, defaults, kwonlyargs, kwonlydefaults, " "annotations)``" msgstr "" -#: ../../library/inspect.rst:1090 +#: ../../library/inspect.rst:1091 msgid "" "*args* is a list of the positional parameter names. *varargs* is the name of " "the ``*`` parameter or ``None`` if arbitrary positional arguments are not " @@ -1594,7 +1594,7 @@ msgid "" "report the function return value annotation (if any)." msgstr "" -#: ../../library/inspect.rst:1105 +#: ../../library/inspect.rst:1106 msgid "" "Note that :func:`signature` and :ref:`Signature Object ` provide the recommended API for callable introspection, and support " @@ -1604,14 +1604,14 @@ msgid "" "``inspect`` module API." msgstr "" -#: ../../library/inspect.rst:1112 +#: ../../library/inspect.rst:1113 msgid "" "This function is now based on :func:`signature`, but still ignores " "``__wrapped__`` attributes and includes the already bound first parameter in " "the signature output for bound methods." msgstr "" -#: ../../library/inspect.rst:1117 +#: ../../library/inspect.rst:1118 msgid "" "This method was previously documented as deprecated in favour of :func:" "`signature` in Python 3.5, but that decision has been reversed in order to " @@ -1619,7 +1619,7 @@ msgid "" "code migrating away from the legacy :func:`getargspec` API." msgstr "" -#: ../../library/inspect.rst:1132 +#: ../../library/inspect.rst:1133 msgid "" "Get information about arguments passed into a particular frame. A :term:" "`named tuple` ``ArgInfo(args, varargs, keywords, locals)`` is returned. " @@ -1628,18 +1628,18 @@ msgid "" "dictionary of the given frame." msgstr "" -#: ../../library/inspect.rst:1139 ../../library/inspect.rst:1149 +#: ../../library/inspect.rst:1140 ../../library/inspect.rst:1150 msgid "This function was inadvertently marked as deprecated in Python 3.5." msgstr "" -#: ../../library/inspect.rst:1144 +#: ../../library/inspect.rst:1145 msgid "" "Format a pretty argument spec from the four values returned by :func:" "`getargvalues`. The format\\* arguments are the corresponding optional " "formatting functions that are called to turn names and values into strings." msgstr "" -#: ../../library/inspect.rst:1154 +#: ../../library/inspect.rst:1155 msgid "" "Return a tuple of class cls's base classes, including cls, in method " "resolution order. No class appears more than once in this tuple. Note that " @@ -1647,7 +1647,7 @@ msgid "" "user-defined metatype is in use, cls will be the first element of the tuple." msgstr "" -#: ../../library/inspect.rst:1162 +#: ../../library/inspect.rst:1163 msgid "" "Bind the *args* and *kwds* to the argument names of the Python function or " "method *func*, as if it was called with them. For bound methods, bind also " @@ -1660,7 +1660,7 @@ msgid "" "example:" msgstr "" -#: ../../library/inspect.rst:1171 +#: ../../library/inspect.rst:1172 msgid "" ">>> from inspect import getcallargs\n" ">>> def f(a, b=1, *pos, **named):\n" @@ -1690,11 +1690,11 @@ msgstr "" "...\n" "TypeError: f() missing 1 required positional argument: 'a'" -#: ../../library/inspect.rst:1188 +#: ../../library/inspect.rst:1189 msgid "Use :meth:`Signature.bind` and :meth:`Signature.bind_partial` instead." msgstr "請改用 :meth:`Signature.bind` 與 :meth:`Signature.bind_partial`。" -#: ../../library/inspect.rst:1194 +#: ../../library/inspect.rst:1195 msgid "" "Get the mapping of external name references in a Python function or method " "*func* to their current values. A :term:`named tuple` " @@ -1706,18 +1706,18 @@ msgid "" "builtins." msgstr "" -#: ../../library/inspect.rst:1203 +#: ../../library/inspect.rst:1204 msgid "" ":exc:`TypeError` is raised if *func* is not a Python function or method." msgstr "如果 *func* 不是 Python 函式或方法,則引發 :exc:`TypeError`。" -#: ../../library/inspect.rst:1210 +#: ../../library/inspect.rst:1211 msgid "" "Get the object wrapped by *func*. It follows the chain of :attr:" "`__wrapped__` attributes returning the last object in the chain." msgstr "" -#: ../../library/inspect.rst:1213 +#: ../../library/inspect.rst:1214 msgid "" "*stop* is an optional callback accepting an object in the wrapper chain as " "its sole argument that allows the unwrapping to be terminated early if the " @@ -1727,80 +1727,80 @@ msgid "" "``__signature__`` attribute defined." msgstr "" -#: ../../library/inspect.rst:1220 +#: ../../library/inspect.rst:1221 msgid ":exc:`ValueError` is raised if a cycle is encountered." msgstr "如果遇到循環,則引發 :exc:`ValueError`。" -#: ../../library/inspect.rst:1227 +#: ../../library/inspect.rst:1228 msgid "Compute the annotations dict for an object." msgstr "" -#: ../../library/inspect.rst:1229 +#: ../../library/inspect.rst:1230 msgid "" "``obj`` may be a callable, class, or module. Passing in an object of any " "other type raises :exc:`TypeError`." msgstr "" -#: ../../library/inspect.rst:1232 +#: ../../library/inspect.rst:1233 msgid "" "Returns a dict. ``get_annotations()`` returns a new dict every time it's " "called; calling it twice on the same object will return two different but " "equivalent dicts." msgstr "" -#: ../../library/inspect.rst:1236 +#: ../../library/inspect.rst:1237 msgid "This function handles several details for you:" msgstr "" -#: ../../library/inspect.rst:1238 +#: ../../library/inspect.rst:1239 msgid "" "If ``eval_str`` is true, values of type ``str`` will be un-stringized using :" "func:`eval`. This is intended for use with stringized annotations (``from " "__future__ import annotations``)." msgstr "" -#: ../../library/inspect.rst:1242 +#: ../../library/inspect.rst:1243 msgid "" "If ``obj`` doesn't have an annotations dict, returns an empty dict. " "(Functions and methods always have an annotations dict; classes, modules, " "and other types of callables may not.)" msgstr "" -#: ../../library/inspect.rst:1246 +#: ../../library/inspect.rst:1247 msgid "" "Ignores inherited annotations on classes. If a class doesn't have its own " "annotations dict, returns an empty dict." msgstr "" -#: ../../library/inspect.rst:1248 +#: ../../library/inspect.rst:1249 msgid "" "All accesses to object members and dict values are done using ``getattr()`` " "and ``dict.get()`` for safety." msgstr "" -#: ../../library/inspect.rst:1250 +#: ../../library/inspect.rst:1251 msgid "Always, always, always returns a freshly created dict." msgstr "" -#: ../../library/inspect.rst:1252 +#: ../../library/inspect.rst:1253 msgid "" "``eval_str`` controls whether or not values of type ``str`` are replaced " "with the result of calling :func:`eval` on those values:" msgstr "" -#: ../../library/inspect.rst:1255 +#: ../../library/inspect.rst:1256 msgid "" "If eval_str is true, :func:`eval` is called on values of type ``str``. (Note " "that ``get_annotations`` doesn't catch exceptions; if :func:`eval` raises an " "exception, it will unwind the stack past the ``get_annotations`` call.)" msgstr "" -#: ../../library/inspect.rst:1259 +#: ../../library/inspect.rst:1260 msgid "" "If eval_str is false (the default), values of type ``str`` are unchanged." msgstr "" -#: ../../library/inspect.rst:1261 +#: ../../library/inspect.rst:1262 msgid "" "``globals`` and ``locals`` are passed in to :func:`eval`; see the " "documentation for :func:`eval` for more information. If ``globals`` or " @@ -1808,35 +1808,35 @@ msgid "" "specific default, contingent on ``type(obj)``:" msgstr "" -#: ../../library/inspect.rst:1266 +#: ../../library/inspect.rst:1267 msgid "If ``obj`` is a module, ``globals`` defaults to ``obj.__dict__``." msgstr "" -#: ../../library/inspect.rst:1267 +#: ../../library/inspect.rst:1268 msgid "" "If ``obj`` is a class, ``globals`` defaults to ``sys.modules[obj.__module__]." "__dict__`` and ``locals`` defaults to the ``obj`` class namespace." msgstr "" -#: ../../library/inspect.rst:1270 +#: ../../library/inspect.rst:1271 msgid "" "If ``obj`` is a callable, ``globals`` defaults to :attr:`obj.__globals__ " "`, although if ``obj`` is a wrapped function (using :" "func:`functools.update_wrapper`) it is first unwrapped." msgstr "" -#: ../../library/inspect.rst:1275 +#: ../../library/inspect.rst:1276 msgid "" "Calling ``get_annotations`` is best practice for accessing the annotations " "dict of any object. See :ref:`annotations-howto` for more information on " "annotations best practices." msgstr "" -#: ../../library/inspect.rst:1285 +#: ../../library/inspect.rst:1286 msgid "The interpreter stack" msgstr "直譯器堆疊" -#: ../../library/inspect.rst:1287 +#: ../../library/inspect.rst:1288 msgid "" "Some of the following functions return :class:`FrameInfo` objects. For " "backwards compatibility these objects allow tuple-like operations on all " @@ -1844,95 +1844,95 @@ msgid "" "may be removed in the future." msgstr "" -#: ../../library/inspect.rst:1296 +#: ../../library/inspect.rst:1297 msgid "The :ref:`frame object ` that the record corresponds to." msgstr "" -#: ../../library/inspect.rst:1300 +#: ../../library/inspect.rst:1301 msgid "" "The file name associated with the code being executed by the frame this " "record corresponds to." msgstr "" -#: ../../library/inspect.rst:1305 +#: ../../library/inspect.rst:1306 msgid "" "The line number of the current line associated with the code being executed " "by the frame this record corresponds to." msgstr "" -#: ../../library/inspect.rst:1310 +#: ../../library/inspect.rst:1311 msgid "" "The function name that is being executed by the frame this record " "corresponds to." msgstr "" -#: ../../library/inspect.rst:1314 +#: ../../library/inspect.rst:1315 msgid "" "A list of lines of context from the source code that's being executed by the " "frame this record corresponds to." msgstr "" -#: ../../library/inspect.rst:1319 ../../library/inspect.rst:1358 +#: ../../library/inspect.rst:1320 ../../library/inspect.rst:1359 msgid "" "The index of the current line being executed in the :attr:`code_context` " "list." msgstr "" -#: ../../library/inspect.rst:1323 +#: ../../library/inspect.rst:1324 msgid "" "A :class:`dis.Positions` object containing the start line number, end line " "number, start column offset, and end column offset associated with the " "instruction being executed by the frame this record corresponds to." msgstr "" -#: ../../library/inspect.rst:1327 +#: ../../library/inspect.rst:1328 msgid "Return a :term:`named tuple` instead of a :class:`tuple`." msgstr "" -#: ../../library/inspect.rst:1330 +#: ../../library/inspect.rst:1331 msgid "" ":class:`!FrameInfo` is now a class instance (that is backwards compatible " "with the previous :term:`named tuple`)." msgstr "" -#: ../../library/inspect.rst:1339 +#: ../../library/inspect.rst:1340 msgid "" "The file name associated with the code being executed by the frame this " "traceback corresponds to." msgstr "" -#: ../../library/inspect.rst:1344 +#: ../../library/inspect.rst:1345 msgid "" "The line number of the current line associated with the code being executed " "by the frame this traceback corresponds to." msgstr "" -#: ../../library/inspect.rst:1349 +#: ../../library/inspect.rst:1350 msgid "" "The function name that is being executed by the frame this traceback " "corresponds to." msgstr "" -#: ../../library/inspect.rst:1353 +#: ../../library/inspect.rst:1354 msgid "" "A list of lines of context from the source code that's being executed by the " "frame this traceback corresponds to." msgstr "" -#: ../../library/inspect.rst:1362 +#: ../../library/inspect.rst:1363 msgid "" "A :class:`dis.Positions` object containing the start line number, end line " "number, start column offset, and end column offset associated with the " "instruction being executed by the frame this traceback corresponds to." msgstr "" -#: ../../library/inspect.rst:1367 +#: ../../library/inspect.rst:1368 msgid "" ":class:`!Traceback` is now a class instance (that is backwards compatible " "with the previous :term:`named tuple`)." msgstr "" -#: ../../library/inspect.rst:1374 +#: ../../library/inspect.rst:1375 msgid "" "Keeping references to frame objects, as found in the first element of the " "frame records these functions return, can cause your program to create " @@ -1944,7 +1944,7 @@ msgid "" "consumption which occurs." msgstr "" -#: ../../library/inspect.rst:1382 +#: ../../library/inspect.rst:1383 msgid "" "Though the cycle detector will catch these, destruction of the frames (and " "local variables) can be made deterministic by removing the cycle in a :" @@ -1952,7 +1952,7 @@ msgid "" "disabled when Python was compiled or using :func:`gc.disable`. For example::" msgstr "" -#: ../../library/inspect.rst:1387 +#: ../../library/inspect.rst:1388 msgid "" "def handle_stackframe_without_leak():\n" " frame = inspect.currentframe()\n" @@ -1962,31 +1962,31 @@ msgid "" " del frame" msgstr "" -#: ../../library/inspect.rst:1394 +#: ../../library/inspect.rst:1395 msgid "" "If you want to keep the frame around (for example to print a traceback " "later), you can also break reference cycles by using the :meth:`frame.clear` " "method." msgstr "" -#: ../../library/inspect.rst:1398 +#: ../../library/inspect.rst:1399 msgid "" "The optional *context* argument supported by most of these functions " "specifies the number of lines of context to return, which are centered " "around the current line." msgstr "" -#: ../../library/inspect.rst:1405 +#: ../../library/inspect.rst:1406 msgid "" "Get information about a frame or traceback object. A :class:`Traceback` " "object is returned." msgstr "" -#: ../../library/inspect.rst:1408 +#: ../../library/inspect.rst:1409 msgid "A :class:`Traceback` object is returned instead of a named tuple." msgstr "" -#: ../../library/inspect.rst:1413 +#: ../../library/inspect.rst:1414 msgid "" "Get a list of :class:`FrameInfo` objects for a frame and all outer frames. " "These frames represent the calls that lead to the creation of *frame*. The " @@ -1994,19 +1994,19 @@ msgid "" "represents the outermost call on *frame*'s stack." msgstr "" -#: ../../library/inspect.rst:1418 ../../library/inspect.rst:1433 -#: ../../library/inspect.rst:1459 ../../library/inspect.rst:1474 +#: ../../library/inspect.rst:1419 ../../library/inspect.rst:1434 +#: ../../library/inspect.rst:1460 ../../library/inspect.rst:1475 msgid "" "A list of :term:`named tuples ` ``FrameInfo(frame, filename, " "lineno, function, code_context, index)`` is returned." msgstr "" -#: ../../library/inspect.rst:1423 ../../library/inspect.rst:1438 -#: ../../library/inspect.rst:1464 ../../library/inspect.rst:1479 +#: ../../library/inspect.rst:1424 ../../library/inspect.rst:1439 +#: ../../library/inspect.rst:1465 ../../library/inspect.rst:1480 msgid "A list of :class:`FrameInfo` objects is returned." msgstr "回傳一個 :class:`FrameInfo` 物件串列。" -#: ../../library/inspect.rst:1428 +#: ../../library/inspect.rst:1429 msgid "" "Get a list of :class:`FrameInfo` objects for a traceback's frame and all " "inner frames. These frames represent calls made as a consequence of " @@ -2014,11 +2014,11 @@ msgid "" "represents where the exception was raised." msgstr "" -#: ../../library/inspect.rst:1443 +#: ../../library/inspect.rst:1444 msgid "Return the frame object for the caller's stack frame." msgstr "" -#: ../../library/inspect.rst:1447 +#: ../../library/inspect.rst:1448 msgid "" "This function relies on Python stack frame support in the interpreter, which " "isn't guaranteed to exist in all implementations of Python. If running in " @@ -2026,14 +2026,14 @@ msgid "" "``None``." msgstr "" -#: ../../library/inspect.rst:1455 +#: ../../library/inspect.rst:1456 msgid "" "Return a list of :class:`FrameInfo` objects for the caller's stack. The " "first entry in the returned list represents the caller; the last entry " "represents the outermost call on the stack." msgstr "" -#: ../../library/inspect.rst:1469 +#: ../../library/inspect.rst:1470 msgid "" "Return a list of :class:`FrameInfo` objects for the stack between the " "current frame and the frame in which an exception currently being handled " @@ -2041,11 +2041,11 @@ msgid "" "entry represents where the exception was raised." msgstr "" -#: ../../library/inspect.rst:1483 +#: ../../library/inspect.rst:1484 msgid "Fetching attributes statically" msgstr "" -#: ../../library/inspect.rst:1485 +#: ../../library/inspect.rst:1486 msgid "" "Both :func:`getattr` and :func:`hasattr` can trigger code execution when " "fetching or checking for the existence of attributes. Descriptors, like " @@ -2053,20 +2053,20 @@ msgid "" "`~object.__getattribute__` may be called." msgstr "" -#: ../../library/inspect.rst:1491 +#: ../../library/inspect.rst:1492 msgid "" "For cases where you want passive introspection, like documentation tools, " "this can be inconvenient. :func:`getattr_static` has the same signature as :" "func:`getattr` but avoids executing code when it fetches attributes." msgstr "" -#: ../../library/inspect.rst:1497 +#: ../../library/inspect.rst:1498 msgid "" "Retrieve attributes without triggering dynamic lookup via the descriptor " "protocol, :meth:`~object.__getattr__` or :meth:`~object.__getattribute__`." msgstr "" -#: ../../library/inspect.rst:1501 +#: ../../library/inspect.rst:1502 msgid "" "Note: this function may not be able to retrieve all attributes that getattr " "can fetch (like dynamically created attributes) and may find attributes that " @@ -2074,27 +2074,27 @@ msgid "" "return descriptors objects instead of instance members." msgstr "" -#: ../../library/inspect.rst:1507 +#: ../../library/inspect.rst:1508 msgid "" "If the instance :attr:`~object.__dict__` is shadowed by another member (for " "example a property) then this function will be unable to find instance " "members." msgstr "" -#: ../../library/inspect.rst:1513 +#: ../../library/inspect.rst:1514 msgid "" ":func:`getattr_static` does not resolve descriptors, for example slot " "descriptors or getset descriptors on objects implemented in C. The " "descriptor object is returned instead of the underlying attribute." msgstr "" -#: ../../library/inspect.rst:1517 +#: ../../library/inspect.rst:1518 msgid "" "You can handle these with code like the following. Note that for arbitrary " "getset descriptors invoking these may trigger code execution::" msgstr "" -#: ../../library/inspect.rst:1521 +#: ../../library/inspect.rst:1522 msgid "" "# example code for resolving the builtin descriptor types\n" "class _foo:\n" @@ -2117,11 +2117,11 @@ msgid "" " pass" msgstr "" -#: ../../library/inspect.rst:1543 +#: ../../library/inspect.rst:1544 msgid "Current State of Generators, Coroutines, and Asynchronous Generators" msgstr "" -#: ../../library/inspect.rst:1545 +#: ../../library/inspect.rst:1546 msgid "" "When implementing coroutine schedulers and for other advanced uses of " "generators, it is useful to determine whether a generator is currently " @@ -2130,32 +2130,32 @@ msgid "" "generator to be determined easily." msgstr "" -#: ../../library/inspect.rst:1553 +#: ../../library/inspect.rst:1554 msgid "Get current state of a generator-iterator." msgstr "" -#: ../../library/inspect.rst:1555 ../../library/inspect.rst:1571 -#: ../../library/inspect.rst:1588 +#: ../../library/inspect.rst:1556 ../../library/inspect.rst:1572 +#: ../../library/inspect.rst:1589 msgid "Possible states are:" msgstr "" -#: ../../library/inspect.rst:1557 +#: ../../library/inspect.rst:1558 msgid "GEN_CREATED: Waiting to start execution." msgstr "" -#: ../../library/inspect.rst:1558 +#: ../../library/inspect.rst:1559 msgid "GEN_RUNNING: Currently being executed by the interpreter." msgstr "" -#: ../../library/inspect.rst:1559 +#: ../../library/inspect.rst:1560 msgid "GEN_SUSPENDED: Currently suspended at a yield expression." msgstr "" -#: ../../library/inspect.rst:1560 +#: ../../library/inspect.rst:1561 msgid "GEN_CLOSED: Execution has completed." msgstr "" -#: ../../library/inspect.rst:1566 +#: ../../library/inspect.rst:1567 msgid "" "Get current state of a coroutine object. The function is intended to be " "used with coroutine objects created by :keyword:`async def` functions, but " @@ -2163,23 +2163,23 @@ msgid "" "``cr_frame`` attributes." msgstr "" -#: ../../library/inspect.rst:1573 +#: ../../library/inspect.rst:1574 msgid "CORO_CREATED: Waiting to start execution." msgstr "" -#: ../../library/inspect.rst:1574 +#: ../../library/inspect.rst:1575 msgid "CORO_RUNNING: Currently being executed by the interpreter." msgstr "" -#: ../../library/inspect.rst:1575 +#: ../../library/inspect.rst:1576 msgid "CORO_SUSPENDED: Currently suspended at an await expression." msgstr "" -#: ../../library/inspect.rst:1576 +#: ../../library/inspect.rst:1577 msgid "CORO_CLOSED: Execution has completed." msgstr "" -#: ../../library/inspect.rst:1582 +#: ../../library/inspect.rst:1583 msgid "" "Get current state of an asynchronous generator object. The function is " "intended to be used with asynchronous iterator objects created by :keyword:" @@ -2188,30 +2188,30 @@ msgid "" "``ag_frame`` attributes." msgstr "" -#: ../../library/inspect.rst:1590 +#: ../../library/inspect.rst:1591 msgid "AGEN_CREATED: Waiting to start execution." msgstr "AGEN_CREATED: 等待開始執行。" -#: ../../library/inspect.rst:1591 +#: ../../library/inspect.rst:1592 msgid "AGEN_RUNNING: Currently being executed by the interpreter." msgstr "AGEN_RUNNING: 目前正在被直譯器執行。" -#: ../../library/inspect.rst:1592 +#: ../../library/inspect.rst:1593 msgid "AGEN_SUSPENDED: Currently suspended at a yield expression." msgstr "AGEN_SUSPENDED: 目前於 yield 運算式暫停。" -#: ../../library/inspect.rst:1593 +#: ../../library/inspect.rst:1594 msgid "AGEN_CLOSED: Execution has completed." msgstr "AGEN_CLOSED: 執行已完成。" -#: ../../library/inspect.rst:1597 +#: ../../library/inspect.rst:1598 msgid "" "The current internal state of the generator can also be queried. This is " "mostly useful for testing purposes, to ensure that internal state is being " "updated as expected:" msgstr "" -#: ../../library/inspect.rst:1603 +#: ../../library/inspect.rst:1604 msgid "" "Get the mapping of live local variables in *generator* to their current " "values. A dictionary is returned that maps from variable names to values. " @@ -2219,14 +2219,14 @@ msgid "" "generator, and all the same caveats apply." msgstr "" -#: ../../library/inspect.rst:1608 +#: ../../library/inspect.rst:1609 msgid "" "If *generator* is a :term:`generator` with no currently associated frame, " "then an empty dictionary is returned. :exc:`TypeError` is raised if " "*generator* is not a Python generator object." msgstr "" -#: ../../library/inspect.rst:1614 +#: ../../library/inspect.rst:1615 msgid "" "This function relies on the generator exposing a Python stack frame for " "introspection, which isn't guaranteed to be the case in all implementations " @@ -2234,79 +2234,79 @@ msgid "" "dictionary." msgstr "" -#: ../../library/inspect.rst:1623 +#: ../../library/inspect.rst:1624 msgid "" "This function is analogous to :func:`~inspect.getgeneratorlocals`, but works " "for coroutine objects created by :keyword:`async def` functions." msgstr "" -#: ../../library/inspect.rst:1630 +#: ../../library/inspect.rst:1631 msgid "" "This function is analogous to :func:`~inspect.getgeneratorlocals`, but works " "for asynchronous generator objects created by :keyword:`async def` functions " "which use the :keyword:`yield` statement." msgstr "" -#: ../../library/inspect.rst:1640 +#: ../../library/inspect.rst:1641 msgid "Code Objects Bit Flags" msgstr "" -#: ../../library/inspect.rst:1642 +#: ../../library/inspect.rst:1643 msgid "" "Python code objects have a :attr:`~codeobject.co_flags` attribute, which is " "a bitmap of the following flags:" msgstr "" -#: ../../library/inspect.rst:1647 +#: ../../library/inspect.rst:1648 msgid "The code object is optimized, using fast locals." msgstr "" -#: ../../library/inspect.rst:1651 +#: ../../library/inspect.rst:1652 msgid "" "If set, a new dict will be created for the frame's :attr:`~frame.f_locals` " "when the code object is executed." msgstr "" -#: ../../library/inspect.rst:1656 +#: ../../library/inspect.rst:1657 msgid "The code object has a variable positional parameter (``*args``-like)." msgstr "" -#: ../../library/inspect.rst:1660 +#: ../../library/inspect.rst:1661 msgid "The code object has a variable keyword parameter (``**kwargs``-like)." msgstr "" -#: ../../library/inspect.rst:1664 +#: ../../library/inspect.rst:1665 msgid "The flag is set when the code object is a nested function." msgstr "" -#: ../../library/inspect.rst:1668 +#: ../../library/inspect.rst:1669 msgid "" "The flag is set when the code object is a generator function, i.e. a " "generator object is returned when the code object is executed." msgstr "" -#: ../../library/inspect.rst:1673 +#: ../../library/inspect.rst:1674 msgid "" "The flag is set when the code object is a coroutine function. When the code " "object is executed it returns a coroutine object. See :pep:`492` for more " "details." msgstr "" -#: ../../library/inspect.rst:1681 +#: ../../library/inspect.rst:1682 msgid "" "The flag is used to transform generators into generator-based coroutines. " "Generator objects with this flag can be used in ``await`` expression, and " "can ``yield from`` coroutine objects. See :pep:`492` for more details." msgstr "" -#: ../../library/inspect.rst:1690 +#: ../../library/inspect.rst:1691 msgid "" "The flag is set when the code object is an asynchronous generator function. " "When the code object is executed it returns an asynchronous generator " "object. See :pep:`525` for more details." msgstr "" -#: ../../library/inspect.rst:1697 +#: ../../library/inspect.rst:1698 msgid "" "The flags are specific to CPython, and may not be defined in other Python " "implementations. Furthermore, the flags are an implementation detail, and " @@ -2314,39 +2314,39 @@ msgid "" "use public APIs from the :mod:`inspect` module for any introspection needs." msgstr "" -#: ../../library/inspect.rst:1705 +#: ../../library/inspect.rst:1706 msgid "Buffer flags" msgstr "" -#: ../../library/inspect.rst:1709 +#: ../../library/inspect.rst:1710 msgid "" "This is an :class:`enum.IntFlag` that represents the flags that can be " "passed to the :meth:`~object.__buffer__` method of objects implementing the :" "ref:`buffer protocol `." msgstr "" -#: ../../library/inspect.rst:1713 +#: ../../library/inspect.rst:1714 msgid "The meaning of the flags is explained at :ref:`buffer-request-types`." msgstr "" -#: ../../library/inspect.rst:1740 +#: ../../library/inspect.rst:1741 msgid "Command Line Interface" msgstr "命令列介面" -#: ../../library/inspect.rst:1742 +#: ../../library/inspect.rst:1743 msgid "" "The :mod:`inspect` module also provides a basic introspection capability " "from the command line." msgstr "" -#: ../../library/inspect.rst:1747 +#: ../../library/inspect.rst:1748 msgid "" "By default, accepts the name of a module and prints the source of that " "module. A class or function within the module can be printed instead by " "appended a colon and the qualified name of the target object." msgstr "" -#: ../../library/inspect.rst:1753 +#: ../../library/inspect.rst:1754 msgid "" "Print information about the specified object rather than the source code" msgstr "" diff --git a/library/intro.po b/library/intro.po index 599f406f42..b620131be3 100644 --- a/library/intro.po +++ b/library/intro.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-23 07:52+0800\n" +"POT-Creation-Date: 2024-09-24 07:20+0000\n" "PO-Revision-Date: 2021-10-26 17:01+0800\n" "Last-Translator: Matt Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -117,7 +117,7 @@ msgstr "讓我們開始吧!" #: ../../library/intro.rst:54 msgid "Notes on availability" -msgstr "可用性之註釋" +msgstr "可用性之標註" #: ../../library/intro.rst:56 msgid "" @@ -125,17 +125,16 @@ msgid "" "Unix systems. It does not make any claims about its existence on a specific " "operating system." msgstr "" -"如果出現「適用:Unix」註釋,則代表該函式普遍存在於 Unix 系統中,但這並不保證" +"如果出現「適用:Unix」標註,則代表該函式普遍存在於 Unix 系統中,但這並不保證" "其存在於某特定作業系統。" #: ../../library/intro.rst:60 -#, fuzzy msgid "" "If not separately noted, all functions that claim \"Availability: Unix\" are " -"supported on macOS and iOS, both of which build on a Unix core." +"supported on macOS, iOS and Android, all of which build on a Unix core." msgstr "" -"如果沒有分別註釋的話,有標明「適用:Unix」註釋的所有函式也都於 macOS 上支援," -"因其建於 Unix 核心之上。" +"如果沒有分別標註的話,有標明「適用:Unix」標註的所有函式也都於 macOS、iOS 和 " +"Android 上支援,因其建於 Unix 核心之上。" #: ../../library/intro.rst:63 msgid "" @@ -213,64 +212,86 @@ msgid "" "not permit symlinks with absolute file names." msgstr "" -#: ../../library/intro.rst:126 -msgid "iOS" -msgstr "" +#: ../../library/intro.rst:127 +msgid "Mobile platforms" +msgstr "行動平台" -#: ../../library/intro.rst:128 +#: ../../library/intro.rst:129 msgid "" -"iOS is, in most respects, a POSIX operating system. File I/O, socket " -"handling, and threading all behave as they would on any POSIX operating " -"system. However, there are several major differences between iOS and other " -"POSIX systems." +"Android and iOS are, in most respects, POSIX operating systems. File I/O, " +"socket handling, and threading all behave as they would on any POSIX " +"operating system. However, there are several major differences:" msgstr "" -#: ../../library/intro.rst:132 +#: ../../library/intro.rst:133 msgid "" -"iOS can only use Python in \"embedded\" mode. There is no Python REPL, and " -"no ability to execute binaries that are part of the normal Python developer " -"experience, such as :program:`pip`. To add Python code to your iOS app, you " -"must use the :ref:`Python embedding API ` to add a Python " -"interpreter to an iOS app created with Xcode. See the :ref:`iOS usage guide " -"` for more details." +"Mobile platforms can only use Python in \"embedded\" mode. There is no " +"Python REPL, and no ability to use separate executables such as :program:" +"`python` or :program:`pip`. To add Python code to your mobile app, you must " +"use the :ref:`Python embedding API `. For more details, see :ref:" +"`using-android` and :ref:`using-ios`." msgstr "" #: ../../library/intro.rst:139 +msgid "Subprocesses:" +msgstr "" + +#: ../../library/intro.rst:141 msgid "" -"An iOS app cannot use any form of subprocessing, background processing, or " -"inter-process communication. If an iOS app attempts to create a subprocess, " -"the process creating the subprocess will either lock up, or crash. An iOS " -"app has no visibility of other applications that are running, nor any " -"ability to communicate with other running applications, outside of the iOS-" -"specific APIs that exist for this purpose." +"On Android, creating subprocesses is possible but `officially unsupported " +"`__. In " +"particular, Android does not support any part of the System V IPC API, so :" +"mod:`multiprocessing` is not available." msgstr "" #: ../../library/intro.rst:146 msgid "" -"iOS apps have limited access to modify system resources (such as the system " -"clock). These resources will often be *readable*, but attempts to modify " -"those resources will usually fail." +"An iOS app cannot use any form of subprocessing, multiprocessing, or inter-" +"process communication. If an iOS app attempts to create a subprocess, the " +"process creating the subprocess will either lock up, or crash. An iOS app " +"has no visibility of other applications that are running, nor any ability to " +"communicate with other running applications, outside of the iOS-specific " +"APIs that exist for this purpose." msgstr "" -#: ../../library/intro.rst:150 +#: ../../library/intro.rst:153 msgid "" -"iOS apps have a limited concept of console input and output. ``stdout`` and " -"``stderr`` *exist*, and content written to ``stdout`` and ``stderr`` will be " -"visible in logs when running in Xcode, but this content *won't* be recorded " -"in the system log. If a user who has installed your app provides their app " -"logs as a diagnostic aid, they will not include any detail written to " -"``stdout`` or ``stderr``." +"Mobile apps have limited access to modify system resources (such as the " +"system clock). These resources will often be *readable*, but attempts to " +"modify those resources will usually fail." msgstr "" #: ../../library/intro.rst:157 +msgid "Console input and output:" +msgstr "" + +#: ../../library/intro.rst:159 +msgid "" +"On Android, the native ``stdout`` and ``stderr`` are not connected to " +"anything, so Python installs its own streams which redirect messages to the " +"system log. These can be seen under the tags ``python.stdout`` and ``python." +"stderr`` respectively." +msgstr "" + +#: ../../library/intro.rst:164 +msgid "" +"iOS apps have a limited concept of console output. ``stdout`` and ``stderr`` " +"*exist*, and content written to ``stdout`` and ``stderr`` will be visible in " +"logs when running in Xcode, but this content *won't* be recorded in the " +"system log. If a user who has installed your app provides their app logs as " +"a diagnostic aid, they will not include any detail written to ``stdout`` or " +"``stderr``." +msgstr "" + +#: ../../library/intro.rst:171 msgid "" -"iOS apps have no concept of ``stdin`` at all. While iOS apps can have a " -"keyboard, this is a software feature, not something that is attached to " -"``stdin``." +"Mobile apps have no usable ``stdin`` at all. While apps can display an on-" +"screen keyboard, this is a software feature, not something that is attached " +"to ``stdin``." msgstr "" -#: ../../library/intro.rst:161 +#: ../../library/intro.rst:175 msgid "" -"As a result, Python library that involve console manipulation (such as :mod:" -"`curses` and :mod:`readline`) are not available on iOS." +"As a result, Python modules that involve console manipulation (such as :mod:" +"`curses` and :mod:`readline`) are not available on mobile platforms." msgstr "" diff --git a/library/json.po b/library/json.po index 8d22f578e3..a910b316ff 100644 --- a/library/json.po +++ b/library/json.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-23 07:52+0800\n" +"POT-Creation-Date: 2024-09-24 07:20+0000\n" "PO-Revision-Date: 2023-08-05 15:25+0800\n" "Last-Translator: Matt Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -29,10 +29,9 @@ msgid "**Source code:** :source:`Lib/json/__init__.py`" msgstr "**原始碼:**\\ :source:`Lib/json/__init__.py`" #: ../../library/json.rst:14 -#, fuzzy msgid "" "`JSON (JavaScript Object Notation) `_, specified by :rfc:" -"`7159` (which obsoletes :rfc:`4627`) and by `ECMA-404 `_, is a " "lightweight data interchange format inspired by `JavaScript `_ object literal syntax (although it is not a " @@ -118,7 +117,6 @@ msgid "Pretty printing::" msgstr "美化輸出: ::" #: ../../library/json.rst:56 -#, fuzzy msgid "" ">>> import json\n" ">>> print(json.dumps({'6': 7, '4': 5}, sort_keys=True, indent=4))\n" @@ -128,16 +126,15 @@ msgid "" "}" msgstr "" ">>> import json\n" -">>> print(json.dumps({'4': 5, '6': 7}, sort_keys=True, indent=4))\n" +">>> print(json.dumps({'6': 7, '4': 5}, sort_keys=True, indent=4))\n" "{\n" " \"4\": 5,\n" " \"6\": 7\n" "}" #: ../../library/json.rst:63 -#, fuzzy msgid "Specializing JSON object encoding::" -msgstr "自訂特殊的 JSON 解碼方式: ::" +msgstr "特殊化 JSON 物件解碼方式: ::" #: ../../library/json.rst:65 msgid "" @@ -912,11 +909,10 @@ msgid "Standard Compliance and Interoperability" msgstr "合規性與互通性(Interoperability)" #: ../../library/json.rst:559 -#, fuzzy msgid "" -"The JSON format is specified by :rfc:`7159` and by `ECMA-404 `_. " -"This section details this module's level of compliance with the RFC. For " +"The JSON format is specified by :rfc:`7159` and by `ECMA-404 `_. This " +"section details this module's level of compliance with the RFC. For " "simplicity, :class:`JSONEncoder` and :class:`JSONDecoder` subclasses, and " "parameters other than those explicitly mentioned, are not considered." msgstr "" diff --git a/library/mailcap.po b/library/mailcap.po deleted file mode 100644 index 6b778d0178..0000000000 --- a/library/mailcap.po +++ /dev/null @@ -1,148 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) 2001-2022, Python Software Foundation -# This file is distributed under the same license as the Python package. -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: Python 3.13\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-03 11:11+0800\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-" -"tw)\n" -"Language: zh_TW\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=1; plural=0;\n" - -#: ../../library/mailcap.rst:2 -msgid ":mod:`mailcap` --- Mailcap file handling" -msgstr ":mod:`mailcap` --- Mailcap 檔案處理" - -#: ../../library/mailcap.rst:8 -msgid "**Source code:** :source:`Lib/mailcap.py`" -msgstr "**原始碼:**\\ :source:`Lib/mailcap.py`" - -#: ../../library/mailcap.rst:10 -msgid "" -"The :mod:`mailcap` module is deprecated (see :pep:`PEP 594 <594#mailcap>` " -"for details). The :mod:`mimetypes` module provides an alternative." -msgstr "" - -#: ../../library/mailcap.rst:17 -msgid "" -"Mailcap files are used to configure how MIME-aware applications such as mail " -"readers and web browsers react to files with different MIME types. (The name " -"\"mailcap\" is derived from the phrase \"mail capability\".) For example, a " -"mailcap file might contain a line like ``video/mpeg; xmpeg %s``. Then, if " -"the user encounters an email message or web document with the MIME type :" -"mimetype:`video/mpeg`, ``%s`` will be replaced by a filename (usually one " -"belonging to a temporary file) and the :program:`xmpeg` program can be " -"automatically started to view the file." -msgstr "" - -#: ../../library/mailcap.rst:26 -msgid "" -"The mailcap format is documented in :rfc:`1524`, \"A User Agent " -"Configuration Mechanism For Multimedia Mail Format Information\", but is not " -"an internet standard. However, mailcap files are supported on most Unix " -"systems." -msgstr "" - -#: ../../library/mailcap.rst:33 -msgid "" -"Return a 2-tuple; the first element is a string containing the command line " -"to be executed (which can be passed to :func:`os.system`), and the second " -"element is the mailcap entry for a given MIME type. If no matching MIME " -"type can be found, ``(None, None)`` is returned." -msgstr "" - -#: ../../library/mailcap.rst:38 -msgid "" -"*key* is the name of the field desired, which represents the type of " -"activity to be performed; the default value is 'view', since in the most " -"common case you simply want to view the body of the MIME-typed data. Other " -"possible values might be 'compose' and 'edit', if you wanted to create a new " -"body of the given MIME type or alter the existing body data. See :rfc:" -"`1524` for a complete list of these fields." -msgstr "" - -#: ../../library/mailcap.rst:45 -msgid "" -"*filename* is the filename to be substituted for ``%s`` in the command line; " -"the default value is ``'/dev/null'`` which is almost certainly not what you " -"want, so usually you'll override it by specifying a filename." -msgstr "" - -#: ../../library/mailcap.rst:49 -msgid "" -"*plist* can be a list containing named parameters; the default value is " -"simply an empty list. Each entry in the list must be a string containing " -"the parameter name, an equals sign (``'='``), and the parameter's value. " -"Mailcap entries can contain named parameters like ``%{foo}``, which will be " -"replaced by the value of the parameter named 'foo'. For example, if the " -"command line ``showpartial %{id} %{number} %{total}`` was in a mailcap file, " -"and *plist* was set to ``['id=1', 'number=2', 'total=3']``, the resulting " -"command line would be ``'showpartial 1 2 3'``." -msgstr "" - -#: ../../library/mailcap.rst:58 -msgid "" -"In a mailcap file, the \"test\" field can optionally be specified to test " -"some external condition (such as the machine architecture, or the window " -"system in use) to determine whether or not the mailcap line applies. :func:" -"`findmatch` will automatically check such conditions and skip the entry if " -"the check fails." -msgstr "" - -#: ../../library/mailcap.rst:65 -msgid "" -"To prevent security issues with shell metacharacters (symbols that have " -"special effects in a shell command line), ``findmatch`` will refuse to " -"inject ASCII characters other than alphanumerics and ``@+=:,./-_`` into the " -"returned command line." -msgstr "" - -#: ../../library/mailcap.rst:70 -msgid "" -"If a disallowed character appears in *filename*, ``findmatch`` will always " -"return ``(None, None)`` as if no entry was found. If such a character " -"appears elsewhere (a value in *plist* or in *MIMEtype*), ``findmatch`` will " -"ignore all mailcap entries which use that value. A :mod:`warning ` " -"will be raised in either case." -msgstr "" - -#: ../../library/mailcap.rst:78 -msgid "" -"Returns a dictionary mapping MIME types to a list of mailcap file entries. " -"This dictionary must be passed to the :func:`findmatch` function. An entry " -"is stored as a list of dictionaries, but it shouldn't be necessary to know " -"the details of this representation." -msgstr "" - -#: ../../library/mailcap.rst:83 -msgid "" -"The information is derived from all of the mailcap files found on the " -"system. Settings in the user's mailcap file :file:`$HOME/.mailcap` will " -"override settings in the system mailcap files :file:`/etc/mailcap`, :file:`/" -"usr/etc/mailcap`, and :file:`/usr/local/etc/mailcap`." -msgstr "" - -#: ../../library/mailcap.rst:88 -msgid "An example usage::" -msgstr "" - -#: ../../library/mailcap.rst:90 -msgid "" -">>> import mailcap\n" -">>> d = mailcap.getcaps()\n" -">>> mailcap.findmatch(d, 'video/mpeg', filename='tmp1223')\n" -"('xmpeg tmp1223', {'view': 'xmpeg %s'})" -msgstr "" -">>> import mailcap\n" -">>> d = mailcap.getcaps()\n" -">>> mailcap.findmatch(d, 'video/mpeg', filename='tmp1223')\n" -"('xmpeg tmp1223', {'view': 'xmpeg %s'})" diff --git a/library/mmap.po b/library/mmap.po index b9e77a07cc..753e0bb140 100644 --- a/library/mmap.po +++ b/library/mmap.po @@ -23,16 +23,15 @@ msgstr ":mod:`!mmap` --- 記憶體映射檔案的支援" #: ../../includes/wasm-notavail.rst:3 msgid ":ref:`Availability `: not WASI." -msgstr "" +msgstr ":ref:`適用 `:非 WASI。" #: ../../includes/wasm-notavail.rst:5 -#, fuzzy msgid "" "This module does not work or is not available on WebAssembly. See :ref:`wasm-" "availability` for more information." msgstr "" -"此模組在 WebAssembly 平台 ``wasm32-emscripten`` 和 ``wasm32-wasi`` 上無法作用" -"或無法使用。有關更多資訊,請參閱 :ref:`wasm-availability`。" +"此模組在 WebAssembly 平台上不起作用或無法使用。更多資訊請參閱 :ref:`wasm-" +"availability`。" #: ../../library/mmap.rst:11 msgid "" diff --git a/library/msilib.po b/library/msilib.po deleted file mode 100644 index f7d0ed3c2a..0000000000 --- a/library/msilib.po +++ /dev/null @@ -1,623 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) 2001-2022, Python Software Foundation -# This file is distributed under the same license as the Python package. -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: Python 3.13\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-07-20 00:03+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-" -"tw)\n" -"Language: zh_TW\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=1; plural=0;\n" - -#: ../../library/msilib.rst:2 -msgid ":mod:`msilib` --- Read and write Microsoft Installer files" -msgstr ":mod:`msilib` --- 讀寫 Microsoft Installer 檔案" - -#: ../../library/msilib.rst:12 -msgid "**Source code:** :source:`Lib/msilib/__init__.py`" -msgstr "**原始碼:**\\ :source:`Lib/msilib/__init__.py`" - -#: ../../library/msilib.rst:16 -msgid "" -"The :mod:`msilib` module is deprecated (see :pep:`PEP 594 <594#msilib>` for " -"details)." -msgstr "" -":mod:`msilib` 模組 (module) 即將被棄用(詳見 :pep:`PEP 594 " -"<594#msilib>`\\ )。" - -#: ../../library/msilib.rst:22 -msgid "" -"The :mod:`msilib` supports the creation of Microsoft Installer (``.msi``) " -"files. Because these files often contain an embedded \"cabinet\" file (``." -"cab``), it also exposes an API to create CAB files. Support for reading ``." -"cab`` files is currently not implemented; read support for the ``.msi`` " -"database is possible." -msgstr "" - -#: ../../library/msilib.rst:27 -msgid "" -"This package aims to provide complete access to all tables in an ``.msi`` " -"file, therefore, it is a fairly low-level API. One primary application of " -"this package is the creation of Python installer package itself (although " -"that currently uses a different version of ``msilib``)." -msgstr "" - -#: ../../library/msilib.rst:32 -msgid "" -"The package contents can be roughly split into four parts: low-level CAB " -"routines, low-level MSI routines, higher-level MSI routines, and standard " -"table structures." -msgstr "" - -#: ../../library/msilib.rst:39 -msgid "" -"Create a new CAB file named *cabname*. *files* must be a list of tuples, " -"each containing the name of the file on disk, and the name of the file " -"inside the CAB file." -msgstr "" - -#: ../../library/msilib.rst:43 -msgid "" -"The files are added to the CAB file in the order they appear in the list. " -"All files are added into a single CAB file, using the MSZIP compression " -"algorithm." -msgstr "" - -#: ../../library/msilib.rst:46 -msgid "" -"Callbacks to Python for the various steps of MSI creation are currently not " -"exposed." -msgstr "" - -#: ../../library/msilib.rst:52 -msgid "" -"Return the string representation of a new unique identifier. This wraps the " -"Windows API functions :c:func:`UuidCreate` and :c:func:`UuidToString`." -msgstr "" - -#: ../../library/msilib.rst:58 -msgid "" -"Return a new database object by calling MsiOpenDatabase. *path* is the " -"file name of the MSI file; *persist* can be one of the constants " -"``MSIDBOPEN_CREATEDIRECT``, ``MSIDBOPEN_CREATE``, ``MSIDBOPEN_DIRECT``, " -"``MSIDBOPEN_READONLY``, or ``MSIDBOPEN_TRANSACT``, and may include the flag " -"``MSIDBOPEN_PATCHFILE``. See the Microsoft documentation for the meaning of " -"these flags; depending on the flags, an existing database is opened, or a " -"new one created." -msgstr "" - -#: ../../library/msilib.rst:69 -msgid "" -"Return a new record object by calling :c:func:`MSICreateRecord`. *count* is " -"the number of fields of the record." -msgstr "" - -#: ../../library/msilib.rst:75 -msgid "" -"Create and return a new database *name*, initialize it with *schema*, and " -"set the properties *ProductName*, *ProductCode*, *ProductVersion*, and " -"*Manufacturer*." -msgstr "" - -#: ../../library/msilib.rst:79 -msgid "" -"*schema* must be a module object containing ``tables`` and " -"``_Validation_records`` attributes; typically, :mod:`msilib.schema` should " -"be used." -msgstr "" - -#: ../../library/msilib.rst:83 -msgid "" -"The database will contain just the schema and the validation records when " -"this function returns." -msgstr "" - -#: ../../library/msilib.rst:89 -msgid "Add all *records* to the table named *table* in *database*." -msgstr "" - -#: ../../library/msilib.rst:91 -msgid "" -"The *table* argument must be one of the predefined tables in the MSI schema, " -"e.g. ``'Feature'``, ``'File'``, ``'Component'``, ``'Dialog'``, " -"``'Control'``, etc." -msgstr "" - -#: ../../library/msilib.rst:95 -msgid "" -"*records* should be a list of tuples, each one containing all fields of a " -"record according to the schema of the table. For optional fields, ``None`` " -"can be passed." -msgstr "" - -#: ../../library/msilib.rst:99 -msgid "Field values can be ints, strings, or instances of the Binary class." -msgstr "" - -#: ../../library/msilib.rst:104 -msgid "" -"Represents entries in the Binary table; inserting such an object using :func:" -"`add_data` reads the file named *filename* into the table." -msgstr "" - -#: ../../library/msilib.rst:110 -msgid "" -"Add all table content from *module* to *database*. *module* must contain an " -"attribute *tables* listing all tables for which content should be added, and " -"one attribute per table that has the actual content." -msgstr "" - -#: ../../library/msilib.rst:114 -msgid "This is typically used to install the sequence tables." -msgstr "" - -#: ../../library/msilib.rst:119 -msgid "" -"Add the file *path* into the ``_Stream`` table of *database*, with the " -"stream name *name*." -msgstr "" - -#: ../../library/msilib.rst:125 -msgid "" -"Return a new UUID, in the format that MSI typically requires (i.e. in curly " -"braces, and with all hexdigits in uppercase)." -msgstr "" - -#: ../../library/msilib.rst:131 -msgid "" -"`FCICreate `_ " -"`UuidCreate `_ `UuidToString `_" -msgstr "" - -#: ../../library/msilib.rst:138 -msgid "Database Objects" -msgstr "" - -#: ../../library/msilib.rst:143 -msgid "" -"Return a view object, by calling :c:func:`MSIDatabaseOpenView`. *sql* is the " -"SQL statement to execute." -msgstr "" - -#: ../../library/msilib.rst:149 -msgid "" -"Commit the changes pending in the current transaction, by calling :c:func:" -"`MSIDatabaseCommit`." -msgstr "" - -#: ../../library/msilib.rst:155 -msgid "" -"Return a new summary information object, by calling :c:func:" -"`MsiGetSummaryInformation`. *count* is the maximum number of updated values." -msgstr "" - -#: ../../library/msilib.rst:161 -msgid "Close the database object, through :c:func:`MsiCloseHandle`." -msgstr "" - -#: ../../library/msilib.rst:167 -msgid "" -"`MSIDatabaseOpenView `_ `MSIDatabaseCommit `_ `MSIGetSummaryInformation " -"`_ " -"`MsiCloseHandle `_" -msgstr "" - -#: ../../library/msilib.rst:175 -msgid "View Objects" -msgstr "" - -#: ../../library/msilib.rst:180 -msgid "" -"Execute the SQL query of the view, through :c:func:`MSIViewExecute`. If " -"*params* is not ``None``, it is a record describing actual values of the " -"parameter tokens in the query." -msgstr "" - -#: ../../library/msilib.rst:187 -msgid "" -"Return a record describing the columns of the view, through calling :c:func:" -"`MsiViewGetColumnInfo`. *kind* can be either ``MSICOLINFO_NAMES`` or " -"``MSICOLINFO_TYPES``." -msgstr "" - -#: ../../library/msilib.rst:194 -msgid "" -"Return a result record of the query, through calling :c:func:`MsiViewFetch`." -msgstr "" - -#: ../../library/msilib.rst:199 -msgid "" -"Modify the view, by calling :c:func:`MsiViewModify`. *kind* can be one of " -"``MSIMODIFY_SEEK``, ``MSIMODIFY_REFRESH``, ``MSIMODIFY_INSERT``, " -"``MSIMODIFY_UPDATE``, ``MSIMODIFY_ASSIGN``, ``MSIMODIFY_REPLACE``, " -"``MSIMODIFY_MERGE``, ``MSIMODIFY_DELETE``, ``MSIMODIFY_INSERT_TEMPORARY``, " -"``MSIMODIFY_VALIDATE``, ``MSIMODIFY_VALIDATE_NEW``, " -"``MSIMODIFY_VALIDATE_FIELD``, or ``MSIMODIFY_VALIDATE_DELETE``." -msgstr "" - -#: ../../library/msilib.rst:206 -msgid "*data* must be a record describing the new data." -msgstr "" - -#: ../../library/msilib.rst:211 -msgid "Close the view, through :c:func:`MsiViewClose`." -msgstr "" - -#: ../../library/msilib.rst:216 -msgid "" -"`MsiViewExecute `_ `MSIViewGetColumnInfo `_ `MsiViewFetch `_ `MsiViewModify " -"`_ " -"`MsiViewClose `_" -msgstr "" - -#: ../../library/msilib.rst:225 -msgid "Summary Information Objects" -msgstr "" - -#: ../../library/msilib.rst:230 -msgid "" -"Return a property of the summary, through :c:func:" -"`MsiSummaryInfoGetProperty`. *field* is the name of the property, and can be " -"one of the constants ``PID_CODEPAGE``, ``PID_TITLE``, ``PID_SUBJECT``, " -"``PID_AUTHOR``, ``PID_KEYWORDS``, ``PID_COMMENTS``, ``PID_TEMPLATE``, " -"``PID_LASTAUTHOR``, ``PID_REVNUMBER``, ``PID_LASTPRINTED``, " -"``PID_CREATE_DTM``, ``PID_LASTSAVE_DTM``, ``PID_PAGECOUNT``, " -"``PID_WORDCOUNT``, ``PID_CHARCOUNT``, ``PID_APPNAME``, or ``PID_SECURITY``." -msgstr "" - -#: ../../library/msilib.rst:241 -msgid "" -"Return the number of summary properties, through :c:func:" -"`MsiSummaryInfoGetPropertyCount`." -msgstr "" - -#: ../../library/msilib.rst:247 -msgid "" -"Set a property through :c:func:`MsiSummaryInfoSetProperty`. *field* can have " -"the same values as in :meth:`GetProperty`, *value* is the new value of the " -"property. Possible value types are integer and string." -msgstr "" - -#: ../../library/msilib.rst:254 -msgid "" -"Write the modified properties to the summary information stream, using :c:" -"func:`MsiSummaryInfoPersist`." -msgstr "" - -#: ../../library/msilib.rst:260 -msgid "" -"`MsiSummaryInfoGetProperty `_ `MsiSummaryInfoGetPropertyCount `_ " -"`MsiSummaryInfoSetProperty `_ `MsiSummaryInfoPersist `_" -msgstr "" - -#: ../../library/msilib.rst:268 -msgid "Record Objects" -msgstr "" - -#: ../../library/msilib.rst:273 -msgid "" -"Return the number of fields of the record, through :c:func:" -"`MsiRecordGetFieldCount`." -msgstr "" - -#: ../../library/msilib.rst:279 -msgid "" -"Return the value of *field* as an integer where possible. *field* must be " -"an integer." -msgstr "" - -#: ../../library/msilib.rst:285 -msgid "" -"Return the value of *field* as a string where possible. *field* must be an " -"integer." -msgstr "" - -#: ../../library/msilib.rst:291 -msgid "" -"Set *field* to *value* through :c:func:`MsiRecordSetString`. *field* must be " -"an integer; *value* a string." -msgstr "" - -#: ../../library/msilib.rst:297 -msgid "" -"Set *field* to the contents of the file named *value*, through :c:func:" -"`MsiRecordSetStream`. *field* must be an integer; *value* a string." -msgstr "" - -#: ../../library/msilib.rst:303 -msgid "" -"Set *field* to *value* through :c:func:`MsiRecordSetInteger`. Both *field* " -"and *value* must be an integer." -msgstr "" - -#: ../../library/msilib.rst:309 -msgid "" -"Set all fields of the record to 0, through :c:func:`MsiRecordClearData`." -msgstr "" - -#: ../../library/msilib.rst:314 -msgid "" -"`MsiRecordGetFieldCount `_ `MsiRecordSetString `_ `MsiRecordSetStream `_ " -"`MsiRecordSetInteger `_ `MsiRecordClearData `_" -msgstr "" - -#: ../../library/msilib.rst:323 -msgid "Errors" -msgstr "" - -#: ../../library/msilib.rst:325 -msgid "" -"All wrappers around MSI functions raise :exc:`MSIError`; the string inside " -"the exception will contain more detail." -msgstr "" - -#: ../../library/msilib.rst:332 -msgid "CAB Objects" -msgstr "CAB 物件" - -#: ../../library/msilib.rst:337 -msgid "" -"The class :class:`CAB` represents a CAB file. During MSI construction, files " -"will be added simultaneously to the ``Files`` table, and to a CAB file. " -"Then, when all files have been added, the CAB file can be written, then " -"added to the MSI file." -msgstr "" - -#: ../../library/msilib.rst:342 -msgid "*name* is the name of the CAB file in the MSI file." -msgstr "" - -#: ../../library/msilib.rst:347 -msgid "" -"Add the file with the pathname *full* to the CAB file, under the name " -"*logical*. If there is already a file named *logical*, a new file name is " -"created." -msgstr "" - -#: ../../library/msilib.rst:351 -msgid "" -"Return the index of the file in the CAB file, and the new name of the file " -"inside the CAB file." -msgstr "" - -#: ../../library/msilib.rst:357 -msgid "" -"Generate a CAB file, add it as a stream to the MSI file, put it into the " -"``Media`` table, and remove the generated file from the disk." -msgstr "" - -#: ../../library/msilib.rst:364 -msgid "Directory Objects" -msgstr "" - -#: ../../library/msilib.rst:369 -msgid "" -"Create a new directory in the Directory table. There is a current component " -"at each point in time for the directory, which is either explicitly created " -"through :meth:`start_component`, or implicitly when files are added for the " -"first time. Files are added into the current component, and into the cab " -"file. To create a directory, a base directory object needs to be specified " -"(can be ``None``), the path to the physical directory, and a logical " -"directory name. *default* specifies the DefaultDir slot in the directory " -"table. *componentflags* specifies the default flags that new components get." -msgstr "" - -#: ../../library/msilib.rst:381 -msgid "" -"Add an entry to the Component table, and make this component the current " -"component for this directory. If no component name is given, the directory " -"name is used. If no *feature* is given, the current feature is used. If no " -"*flags* are given, the directory's default flags are used. If no *keyfile* " -"is given, the KeyPath is left null in the Component table." -msgstr "" - -#: ../../library/msilib.rst:390 -msgid "" -"Add a file to the current component of the directory, starting a new one if " -"there is no current component. By default, the file name in the source and " -"the file table will be identical. If the *src* file is specified, it is " -"interpreted relative to the current directory. Optionally, a *version* and a " -"*language* can be specified for the entry in the File table." -msgstr "" - -#: ../../library/msilib.rst:399 -msgid "" -"Add a list of files to the current component as specified in the glob " -"pattern. Individual files can be excluded in the *exclude* list." -msgstr "" - -#: ../../library/msilib.rst:405 -msgid "Remove ``.pyc`` files on uninstall." -msgstr "" - -#: ../../library/msilib.rst:410 -msgid "" -"`Directory Table `_ `File Table `_ `Component Table `_ `FeatureComponents Table " -"`_" -msgstr "" - -#: ../../library/msilib.rst:418 -msgid "Features" -msgstr "" - -#: ../../library/msilib.rst:423 -msgid "" -"Add a new record to the ``Feature`` table, using the values *id*, *parent." -"id*, *title*, *desc*, *display*, *level*, *directory*, and *attributes*. The " -"resulting feature object can be passed to the :meth:`start_component` method " -"of :class:`Directory`." -msgstr "" - -#: ../../library/msilib.rst:431 -msgid "" -"Make this feature the current feature of :mod:`msilib`. New components are " -"automatically added to the default feature, unless a feature is explicitly " -"specified." -msgstr "" - -#: ../../library/msilib.rst:438 -msgid "" -"`Feature Table `_" -msgstr "" - -#: ../../library/msilib.rst:443 -msgid "GUI classes" -msgstr "" - -#: ../../library/msilib.rst:445 -msgid "" -":mod:`msilib` provides several classes that wrap the GUI tables in an MSI " -"database. However, no standard user interface is provided." -msgstr "" - -#: ../../library/msilib.rst:451 -msgid "" -"Base class of the dialog controls. *dlg* is the dialog object the control " -"belongs to, and *name* is the control's name." -msgstr "" - -#: ../../library/msilib.rst:457 -msgid "Make an entry into the ``ControlEvent`` table for this control." -msgstr "" - -#: ../../library/msilib.rst:462 -msgid "Make an entry into the ``EventMapping`` table for this control." -msgstr "" - -#: ../../library/msilib.rst:467 -msgid "Make an entry into the ``ControlCondition`` table for this control." -msgstr "" - -#: ../../library/msilib.rst:472 -msgid "" -"Create a radio button control named *name*. *property* is the installer " -"property that gets set when a radio button is selected." -msgstr "" - -#: ../../library/msilib.rst:478 -msgid "" -"Add a radio button named *name* to the group, at the coordinates *x*, *y*, " -"*width*, *height*, and with the label *text*. If *value* is ``None``, it " -"defaults to *name*." -msgstr "" - -#: ../../library/msilib.rst:485 -msgid "" -"Return a new :class:`Dialog` object. An entry in the ``Dialog`` table is " -"made, with the specified coordinates, dialog attributes, title, name of the " -"first, default, and cancel controls." -msgstr "" - -#: ../../library/msilib.rst:492 -msgid "" -"Return a new :class:`Control` object. An entry in the ``Control`` table is " -"made with the specified parameters." -msgstr "" - -#: ../../library/msilib.rst:495 -msgid "" -"This is a generic method; for specific types, specialized methods are " -"provided." -msgstr "" - -#: ../../library/msilib.rst:501 -msgid "Add and return a ``Text`` control." -msgstr "" - -#: ../../library/msilib.rst:506 -msgid "Add and return a ``Bitmap`` control." -msgstr "" - -#: ../../library/msilib.rst:511 -msgid "Add and return a ``Line`` control." -msgstr "" - -#: ../../library/msilib.rst:516 -msgid "Add and return a ``PushButton`` control." -msgstr "" - -#: ../../library/msilib.rst:521 -msgid "Add and return a ``RadioButtonGroup`` control." -msgstr "" - -#: ../../library/msilib.rst:526 -msgid "Add and return a ``CheckBox`` control." -msgstr "" - -#: ../../library/msilib.rst:531 -msgid "" -"`Dialog Table `_ `Control Table `_ `Control Types `_ `ControlCondition Table " -"`_ " -"`ControlEvent Table `_ `EventMapping Table `_ `RadioButton Table `_" -msgstr "" - -#: ../../library/msilib.rst:542 -msgid "Precomputed tables" -msgstr "" - -#: ../../library/msilib.rst:544 -msgid "" -":mod:`msilib` provides a few subpackages that contain only schema and table " -"definitions. Currently, these definitions are based on MSI version 2.0." -msgstr "" - -#: ../../library/msilib.rst:550 -msgid "" -"This is the standard MSI schema for MSI 2.0, with the *tables* variable " -"providing a list of table definitions, and *_Validation_records* providing " -"the data for MSI validation." -msgstr "" - -#: ../../library/msilib.rst:557 -msgid "" -"This module contains table contents for the standard sequence tables: " -"*AdminExecuteSequence*, *AdminUISequence*, *AdvtExecuteSequence*, " -"*InstallExecuteSequence*, and *InstallUISequence*." -msgstr "" - -#: ../../library/msilib.rst:564 -msgid "" -"This module contains definitions for the UIText and ActionText tables, for " -"the standard installer actions." -msgstr "" - -#: ../../library/msilib.rst:14 -msgid "msi" -msgstr "msi" diff --git a/library/multiprocessing.po b/library/multiprocessing.po index 6bbd946213..c428df62b4 100644 --- a/library/multiprocessing.po +++ b/library/multiprocessing.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-23 07:52+0800\n" +"POT-Creation-Date: 2024-09-24 07:20+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-" @@ -25,20 +25,17 @@ msgstr ":mod:`!multiprocessing` --- 以行程為基礎的平行性" msgid "**Source code:** :source:`Lib/multiprocessing/`" msgstr "**原始碼:**\\ :source:`Lib/multiprocessing/`" -#: ../../includes/wasm-ios-notavail.rst:3 -msgid ":ref:`Availability `: not WASI, not iOS." -msgstr "" +#: ../../includes/wasm-mobile-notavail.rst:3 +msgid ":ref:`Availability `: not Android, not iOS, not WASI." +msgstr ":ref:`適用 `:非 Android、非 iOS、非 WASI。" -#: ../../includes/wasm-ios-notavail.rst:5 -#, fuzzy +#: ../../includes/wasm-mobile-notavail.rst:5 msgid "" -"This module does not work or is not available on WebAssembly platforms, or " -"on iOS. See :ref:`wasm-availability` for more information on WASM " -"availability; see :ref:`iOS-availability` for more information on iOS " -"availability." +"This module is not supported on :ref:`mobile platforms ` or :ref:`WebAssembly platforms `." msgstr "" -"此模組在 WebAssembly 平台 ``wasm32-emscripten`` 和 ``wasm32-wasi`` 上無法作用" -"或無法使用。有關更多資訊,請參閱 :ref:`wasm-availability`。" +"此模組在\\ :ref:`行動平台 `\\ 或\\ :ref:`WebAssembly 平" +"台 `\\ 上不支援。" #: ../../library/multiprocessing.rst:14 msgid "Introduction" @@ -4883,5 +4880,15 @@ msgid "" " test()\n" msgstr "" +#, fuzzy +#~ msgid "" +#~ "This module does not work or is not available on WebAssembly platforms, " +#~ "or on iOS. See :ref:`wasm-availability` for more information on WASM " +#~ "availability; see :ref:`iOS-availability` for more information on iOS " +#~ "availability." +#~ msgstr "" +#~ "此模組在 WebAssembly 平台 ``wasm32-emscripten`` 和 ``wasm32-wasi`` 上無法" +#~ "作用或無法使用。有關更多資訊,請參閱 :ref:`wasm-availability`。" + #~ msgid ":func:`os.cpu_count`" #~ msgstr ":func:`os.cpu_count`" diff --git a/library/nis.po b/library/nis.po deleted file mode 100644 index 4f16e11b08..0000000000 --- a/library/nis.po +++ /dev/null @@ -1,100 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) 2001-2022, Python Software Foundation -# This file is distributed under the same license as the Python package. -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: Python 3.13\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-07-20 00:03+0000\n" -"PO-Revision-Date: 2016-11-19 00:32+0000\n" -"Last-Translator: Liang-Bo Wang \n" -"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" -"tw)\n" -"Language: zh_TW\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=1; plural=0;\n" - -#: ../../library/nis.rst:3 -msgid ":mod:`nis` --- Interface to Sun's NIS (Yellow Pages)" -msgstr ":mod:`nis` --- Sun NIS (Yellow Pages) 介面" - -#: ../../library/nis.rst:13 -msgid "" -"The :mod:`nis` module is deprecated (see :pep:`PEP 594 <594#nis>` for " -"details)." -msgstr "" -":mod:`nis` 模組 (module) 即將被棄用(詳見 :pep:`PEP 594 <594#nis>`\\ )。" - -#: ../../library/nis.rst:19 -msgid "" -"The :mod:`nis` module gives a thin wrapper around the NIS library, useful " -"for central administration of several hosts." -msgstr "" - -#: ../../library/nis.rst:22 -msgid "" -"Because NIS exists only on Unix systems, this module is only available for " -"Unix." -msgstr "" - -#: ../../includes/wasm-notavail.rst:3 -msgid ":ref:`Availability `: not Emscripten, not WASI." -msgstr "" - -#: ../../includes/wasm-notavail.rst:5 -msgid "" -"This module does not work or is not available on WebAssembly platforms " -"``wasm32-emscripten`` and ``wasm32-wasi``. See :ref:`wasm-availability` for " -"more information." -msgstr "" -"此模組在 WebAssembly 平台 ``wasm32-emscripten`` 和 ``wasm32-wasi`` 上無法作用" -"或無法使用。有關更多資訊,請參閱 :ref:`wasm-availability`。" - -#: ../../library/nis.rst:26 -msgid "The :mod:`nis` module defines the following functions:" -msgstr "" - -#: ../../library/nis.rst:31 -msgid "" -"Return the match for *key* in map *mapname*, or raise an error (:exc:`nis." -"error`) if there is none. Both should be strings, *key* is 8-bit clean. " -"Return value is an arbitrary array of bytes (may contain ``NULL`` and other " -"joys)." -msgstr "" - -#: ../../library/nis.rst:36 ../../library/nis.rst:48 -msgid "Note that *mapname* is first checked if it is an alias to another name." -msgstr "" - -#: ../../library/nis.rst:38 ../../library/nis.rst:50 ../../library/nis.rst:58 -msgid "" -"The *domain* argument allows overriding the NIS domain used for the lookup. " -"If unspecified, lookup is in the default NIS domain." -msgstr "" - -#: ../../library/nis.rst:44 -msgid "" -"Return a dictionary mapping *key* to *value* such that ``match(key, " -"mapname)==value``. Note that both keys and values of the dictionary are " -"arbitrary arrays of bytes." -msgstr "" - -#: ../../library/nis.rst:56 -msgid "Return a list of all valid maps." -msgstr "" - -#: ../../library/nis.rst:64 -msgid "Return the system default NIS domain." -msgstr "" - -#: ../../library/nis.rst:67 -msgid "The :mod:`nis` module defines the following exception:" -msgstr "" - -#: ../../library/nis.rst:71 -msgid "An error raised when a NIS function returns an error code." -msgstr "" diff --git a/library/nntplib.po b/library/nntplib.po deleted file mode 100644 index d0720d6f85..0000000000 --- a/library/nntplib.po +++ /dev/null @@ -1,688 +0,0 @@ -# Copyright (C) 2001-2024, Python Software Foundation -# This file is distributed under the same license as the Python package. -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: Python 3.13\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-03 11:11+0800\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-" -"tw)\n" -"Language: zh_TW\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=1; plural=0;\n" - -#: ../../library/nntplib.rst:2 -msgid ":mod:`nntplib` --- NNTP protocol client" -msgstr ":mod:`nntplib` --- NNTP 協定客戶端" - -#: ../../library/nntplib.rst:8 -msgid "**Source code:** :source:`Lib/nntplib.py`" -msgstr "**原始碼:**\\ :source:`Lib/nntplib.py`" - -#: ../../library/nntplib.rst:14 -msgid "The :mod:`nntplib` module is deprecated (see :pep:`594` for details)." -msgstr ":mod:`nntlib` 模組 (module) 即將被棄用(詳見 :pep:`594`\\ )。" - -#: ../../library/nntplib.rst:36 -msgid "" -"This module defines the class :class:`NNTP` which implements the client side " -"of the Network News Transfer Protocol. It can be used to implement a news " -"reader or poster, or automated news processors. It is compatible with :rfc:" -"`3977` as well as the older :rfc:`977` and :rfc:`2980`." -msgstr "" - -#: ../../includes/wasm-notavail.rst:3 -msgid ":ref:`Availability `: not Emscripten, not WASI." -msgstr "" - -#: ../../includes/wasm-notavail.rst:5 -msgid "" -"This module does not work or is not available on WebAssembly platforms " -"``wasm32-emscripten`` and ``wasm32-wasi``. See :ref:`wasm-availability` for " -"more information." -msgstr "" -"此模組在 WebAssembly 平台 ``wasm32-emscripten`` 和 ``wasm32-wasi`` 上無法作用" -"或無法使用。有關更多資訊,請參閱 :ref:`wasm-availability`。" - -#: ../../library/nntplib.rst:43 -msgid "" -"Here are two small examples of how it can be used. To list some statistics " -"about a newsgroup and print the subjects of the last 10 articles::" -msgstr "" - -#: ../../library/nntplib.rst:46 -msgid "" -">>> s = nntplib.NNTP('news.gmane.io')\n" -">>> resp, count, first, last, name = s.group('gmane.comp.python." -"committers')\n" -">>> print('Group', name, 'has', count, 'articles, range', first, 'to', " -"last)\n" -"Group gmane.comp.python.committers has 1096 articles, range 1 to 1096\n" -">>> resp, overviews = s.over((last - 9, last))\n" -">>> for id, over in overviews:\n" -"... print(id, nntplib.decode_header(over['subject']))\n" -"...\n" -"1087 Re: Commit privileges for Łukasz Langa\n" -"1088 Re: 3.2 alpha 2 freeze\n" -"1089 Re: 3.2 alpha 2 freeze\n" -"1090 Re: Commit privileges for Łukasz Langa\n" -"1091 Re: Commit privileges for Łukasz Langa\n" -"1092 Updated ssh key\n" -"1093 Re: Updated ssh key\n" -"1094 Re: Updated ssh key\n" -"1095 Hello fellow committers!\n" -"1096 Re: Hello fellow committers!\n" -">>> s.quit()\n" -"'205 Bye!'" -msgstr "" -">>> s = nntplib.NNTP('news.gmane.io')\n" -">>> resp, count, first, last, name = s.group('gmane.comp.python." -"committers')\n" -">>> print('Group', name, 'has', count, 'articles, range', first, 'to', " -"last)\n" -"Group gmane.comp.python.committers has 1096 articles, range 1 to 1096\n" -">>> resp, overviews = s.over((last - 9, last))\n" -">>> for id, over in overviews:\n" -"... print(id, nntplib.decode_header(over['subject']))\n" -"...\n" -"1087 Re: Commit privileges for Łukasz Langa\n" -"1088 Re: 3.2 alpha 2 freeze\n" -"1089 Re: 3.2 alpha 2 freeze\n" -"1090 Re: Commit privileges for Łukasz Langa\n" -"1091 Re: Commit privileges for Łukasz Langa\n" -"1092 Updated ssh key\n" -"1093 Re: Updated ssh key\n" -"1094 Re: Updated ssh key\n" -"1095 Hello fellow committers!\n" -"1096 Re: Hello fellow committers!\n" -">>> s.quit()\n" -"'205 Bye!'" - -#: ../../library/nntplib.rst:67 -msgid "" -"To post an article from a binary file (this assumes that the article has " -"valid headers, and that you have right to post on the particular newsgroup)::" -msgstr "" - -#: ../../library/nntplib.rst:70 -msgid "" -">>> s = nntplib.NNTP('news.gmane.io')\n" -">>> f = open('article.txt', 'rb')\n" -">>> s.post(f)\n" -"'240 Article posted successfully.'\n" -">>> s.quit()\n" -"'205 Bye!'" -msgstr "" -">>> s = nntplib.NNTP('news.gmane.io')\n" -">>> f = open('article.txt', 'rb')\n" -">>> s.post(f)\n" -"'240 Article posted successfully.'\n" -">>> s.quit()\n" -"'205 Bye!'" - -#: ../../library/nntplib.rst:77 -msgid "The module itself defines the following classes:" -msgstr "" - -#: ../../library/nntplib.rst:82 -msgid "" -"Return a new :class:`NNTP` object, representing a connection to the NNTP " -"server running on host *host*, listening at port *port*. An optional " -"*timeout* can be specified for the socket connection. If the optional *user* " -"and *password* are provided, or if suitable credentials are present in :file:" -"`/.netrc` and the optional flag *usenetrc* is true, the ``AUTHINFO USER`` " -"and ``AUTHINFO PASS`` commands are used to identify and authenticate the " -"user to the server. If the optional flag *readermode* is true, then a " -"``mode reader`` command is sent before authentication is performed. Reader " -"mode is sometimes necessary if you are connecting to an NNTP server on the " -"local machine and intend to call reader-specific commands, such as " -"``group``. If you get unexpected :exc:`NNTPPermanentError`\\ s, you might " -"need to set *readermode*. The :class:`NNTP` class supports the :keyword:" -"`with` statement to unconditionally consume :exc:`OSError` exceptions and to " -"close the NNTP connection when done, e.g.:" -msgstr "" - -#: ../../library/nntplib.rst:105 ../../library/nntplib.rst:137 -msgid "" -"Raises an :ref:`auditing event ` ``nntplib.connect`` with " -"arguments ``self``, ``host``, ``port``." -msgstr "" -"引發一個附帶引數 ``self``、``host``、``port`` 的\\ :ref:`稽核事件 " -"` ``nntplib.connect``。" - -#: ../../library/nntplib.rst:107 ../../library/nntplib.rst:109 -#: ../../library/nntplib.rst:139 ../../library/nntplib.rst:141 -msgid "" -"All commands will raise an :ref:`auditing event ` ``nntplib." -"putline`` with arguments ``self`` and ``line``, where ``line`` is the bytes " -"about to be sent to the remote host." -msgstr "" - -#: ../../library/nntplib.rst:113 -msgid "*usenetrc* is now ``False`` by default." -msgstr "" - -#: ../../library/nntplib.rst:116 -msgid "Support for the :keyword:`with` statement was added." -msgstr "" - -#: ../../library/nntplib.rst:119 ../../library/nntplib.rst:152 -msgid "" -"If the *timeout* parameter is set to be zero, it will raise a :class:" -"`ValueError` to prevent the creation of a non-blocking socket." -msgstr "" - -#: ../../library/nntplib.rst:125 -msgid "" -"Return a new :class:`NNTP_SSL` object, representing an encrypted connection " -"to the NNTP server running on host *host*, listening at port *port*. :class:" -"`NNTP_SSL` objects have the same methods as :class:`NNTP` objects. If " -"*port* is omitted, port 563 (NNTPS) is used. *ssl_context* is also optional, " -"and is a :class:`~ssl.SSLContext` object. Please read :ref:`ssl-security` " -"for best practices. All other parameters behave the same as for :class:" -"`NNTP`." -msgstr "" - -#: ../../library/nntplib.rst:133 -msgid "" -"Note that SSL-on-563 is discouraged per :rfc:`4642`, in favor of STARTTLS as " -"described below. However, some servers only support the former." -msgstr "" - -#: ../../library/nntplib.rst:147 -msgid "" -"The class now supports hostname check with :attr:`ssl.SSLContext." -"check_hostname` and *Server Name Indication* (see :data:`ssl.HAS_SNI`)." -msgstr "" - -#: ../../library/nntplib.rst:158 -msgid "" -"Derived from the standard exception :exc:`Exception`, this is the base class " -"for all exceptions raised by the :mod:`nntplib` module. Instances of this " -"class have the following attribute:" -msgstr "" - -#: ../../library/nntplib.rst:164 -msgid "The response of the server if available, as a :class:`str` object." -msgstr "" - -#: ../../library/nntplib.rst:169 -msgid "Exception raised when an unexpected reply is received from the server." -msgstr "" - -#: ../../library/nntplib.rst:174 -msgid "" -"Exception raised when a response code in the range 400--499 is received." -msgstr "" - -#: ../../library/nntplib.rst:179 -msgid "" -"Exception raised when a response code in the range 500--599 is received." -msgstr "" - -#: ../../library/nntplib.rst:184 -msgid "" -"Exception raised when a reply is received from the server that does not " -"begin with a digit in the range 1--5." -msgstr "" - -#: ../../library/nntplib.rst:190 -msgid "Exception raised when there is some error in the response data." -msgstr "" - -#: ../../library/nntplib.rst:196 -msgid "NNTP Objects" -msgstr "NNTP 物件" - -#: ../../library/nntplib.rst:198 -msgid "" -"When connected, :class:`NNTP` and :class:`NNTP_SSL` objects support the " -"following methods and attributes." -msgstr "" - -#: ../../library/nntplib.rst:202 -msgid "Attributes" -msgstr "屬性" - -#: ../../library/nntplib.rst:206 -msgid "" -"An integer representing the version of the NNTP protocol supported by the " -"server. In practice, this should be ``2`` for servers advertising :rfc:" -"`3977` compliance and ``1`` for others." -msgstr "" - -#: ../../library/nntplib.rst:214 -msgid "" -"A string describing the software name and version of the NNTP server, or :" -"const:`None` if not advertised by the server." -msgstr "" - -#: ../../library/nntplib.rst:220 -msgid "Methods" -msgstr "方法" - -#: ../../library/nntplib.rst:222 -msgid "" -"The *response* that is returned as the first item in the return tuple of " -"almost all methods is the server's response: a string beginning with a three-" -"digit code. If the server's response indicates an error, the method raises " -"one of the above exceptions." -msgstr "" - -#: ../../library/nntplib.rst:227 -msgid "" -"Many of the following methods take an optional keyword-only argument *file*. " -"When the *file* argument is supplied, it must be either a :term:`file " -"object` opened for binary writing, or the name of an on-disk file to be " -"written to. The method will then write any data returned by the server " -"(except for the response line and the terminating dot) to the file; any list " -"of lines, tuples or objects that the method normally returns will be empty." -msgstr "" - -#: ../../library/nntplib.rst:234 -msgid "" -"Many of the following methods have been reworked and fixed, which makes them " -"incompatible with their 3.1 counterparts." -msgstr "" - -#: ../../library/nntplib.rst:241 -msgid "" -"Send a ``QUIT`` command and close the connection. Once this method has been " -"called, no other methods of the NNTP object should be called." -msgstr "" - -#: ../../library/nntplib.rst:247 -msgid "" -"Return the welcome message sent by the server in reply to the initial " -"connection. (This message sometimes contains disclaimers or help " -"information that may be relevant to the user.)" -msgstr "" - -#: ../../library/nntplib.rst:254 -msgid "" -"Return the :rfc:`3977` capabilities advertised by the server, as a :class:" -"`dict` instance mapping capability names to (possibly empty) lists of " -"values. On legacy servers which don't understand the ``CAPABILITIES`` " -"command, an empty dictionary is returned instead." -msgstr "" - -#: ../../library/nntplib.rst:268 -msgid "" -"Send ``AUTHINFO`` commands with the user name and password. If *user* and " -"*password* are ``None`` and *usenetrc* is true, credentials from ``~/." -"netrc`` will be used if possible." -msgstr "" - -#: ../../library/nntplib.rst:272 -msgid "" -"Unless intentionally delayed, login is normally performed during the :class:" -"`NNTP` object initialization and separately calling this function is " -"unnecessary. To force authentication to be delayed, you must not set *user* " -"or *password* when creating the object, and must set *usenetrc* to False." -msgstr "" - -#: ../../library/nntplib.rst:283 -msgid "" -"Send a ``STARTTLS`` command. This will enable encryption on the NNTP " -"connection. The *context* argument is optional and should be a :class:`ssl." -"SSLContext` object. Please read :ref:`ssl-security` for best practices." -msgstr "" - -#: ../../library/nntplib.rst:288 -msgid "" -"Note that this may not be done after authentication information has been " -"transmitted, and authentication occurs by default if possible during a :" -"class:`NNTP` object initialization. See :meth:`NNTP.login` for information " -"on suppressing this behavior." -msgstr "" - -#: ../../library/nntplib.rst:295 -msgid "" -"The method now supports hostname check with :attr:`ssl.SSLContext." -"check_hostname` and *Server Name Indication* (see :data:`ssl.HAS_SNI`)." -msgstr "" - -#: ../../library/nntplib.rst:302 -msgid "" -"Send a ``NEWGROUPS`` command. The *date* argument should be a :class:" -"`datetime.date` or :class:`datetime.datetime` object. Return a pair " -"``(response, groups)`` where *groups* is a list representing the groups that " -"are new since the given *date*. If *file* is supplied, though, then *groups* " -"will be empty." -msgstr "" - -#: ../../library/nntplib.rst:318 -msgid "" -"Send a ``NEWNEWS`` command. Here, *group* is a group name or ``'*'``, and " -"*date* has the same meaning as for :meth:`newgroups`. Return a pair " -"``(response, articles)`` where *articles* is a list of message ids." -msgstr "" - -#: ../../library/nntplib.rst:322 -msgid "This command is frequently disabled by NNTP server administrators." -msgstr "" - -#: ../../library/nntplib.rst:327 -msgid "" -"Send a ``LIST`` or ``LIST ACTIVE`` command. Return a pair ``(response, " -"list)`` where *list* is a list of tuples representing all the groups " -"available from this NNTP server, optionally matching the pattern string " -"*group_pattern*. Each tuple has the form ``(group, last, first, flag)``, " -"where *group* is a group name, *last* and *first* are the last and first " -"article numbers, and *flag* usually takes one of these values:" -msgstr "" - -#: ../../library/nntplib.rst:335 -msgid "``y``: Local postings and articles from peers are allowed." -msgstr "" - -#: ../../library/nntplib.rst:336 -msgid "``m``: The group is moderated and all postings must be approved." -msgstr "" - -#: ../../library/nntplib.rst:337 -msgid "``n``: No local postings are allowed, only articles from peers." -msgstr "" - -#: ../../library/nntplib.rst:338 -msgid "``j``: Articles from peers are filed in the junk group instead." -msgstr "" - -#: ../../library/nntplib.rst:339 -msgid "``x``: No local postings, and articles from peers are ignored." -msgstr "" - -#: ../../library/nntplib.rst:340 -msgid "``=foo.bar``: Articles are filed in the ``foo.bar`` group instead." -msgstr "" - -#: ../../library/nntplib.rst:342 -msgid "" -"If *flag* has another value, then the status of the newsgroup should be " -"considered unknown." -msgstr "" - -#: ../../library/nntplib.rst:345 -msgid "" -"This command can return very large results, especially if *group_pattern* is " -"not specified. It is best to cache the results offline unless you really " -"need to refresh them." -msgstr "" - -#: ../../library/nntplib.rst:349 -msgid "*group_pattern* was added." -msgstr "新增 *group_pattern*。" - -#: ../../library/nntplib.rst:355 -msgid "" -"Send a ``LIST NEWSGROUPS`` command, where *grouppattern* is a wildmat string " -"as specified in :rfc:`3977` (it's essentially the same as DOS or UNIX shell " -"wildcard strings). Return a pair ``(response, descriptions)``, where " -"*descriptions* is a dictionary mapping group names to textual descriptions." -msgstr "" - -#: ../../library/nntplib.rst:369 -msgid "" -"Get a description for a single group *group*. If more than one group " -"matches (if 'group' is a real wildmat string), return the first match. If " -"no group matches, return an empty string." -msgstr "" - -#: ../../library/nntplib.rst:373 -msgid "" -"This elides the response code from the server. If the response code is " -"needed, use :meth:`descriptions`." -msgstr "" - -#: ../../library/nntplib.rst:379 -msgid "" -"Send a ``GROUP`` command, where *name* is the group name. The group is " -"selected as the current group, if it exists. Return a tuple ``(response, " -"count, first, last, name)`` where *count* is the (estimated) number of " -"articles in the group, *first* is the first article number in the group, " -"*last* is the last article number in the group, and *name* is the group name." -msgstr "" - -#: ../../library/nntplib.rst:389 -msgid "" -"Send an ``OVER`` command, or an ``XOVER`` command on legacy servers. " -"*message_spec* can be either a string representing a message id, or a " -"``(first, last)`` tuple of numbers indicating a range of articles in the " -"current group, or a ``(first, None)`` tuple indicating a range of articles " -"starting from *first* to the last article in the current group, or :const:" -"`None` to select the current article in the current group." -msgstr "" - -#: ../../library/nntplib.rst:396 -msgid "" -"Return a pair ``(response, overviews)``. *overviews* is a list of " -"``(article_number, overview)`` tuples, one for each article selected by " -"*message_spec*. Each *overview* is a dictionary with the same number of " -"items, but this number depends on the server. These items are either " -"message headers (the key is then the lower-cased header name) or metadata " -"items (the key is then the metadata name prepended with ``\":\"``). The " -"following items are guaranteed to be present by the NNTP specification:" -msgstr "" - -#: ../../library/nntplib.rst:404 -msgid "" -"the ``subject``, ``from``, ``date``, ``message-id`` and ``references`` " -"headers" -msgstr "" - -#: ../../library/nntplib.rst:406 -msgid "" -"the ``:bytes`` metadata: the number of bytes in the entire raw article " -"(including headers and body)" -msgstr "" - -#: ../../library/nntplib.rst:408 -msgid "the ``:lines`` metadata: the number of lines in the article body" -msgstr "" - -#: ../../library/nntplib.rst:410 -msgid "" -"The value of each item is either a string, or :const:`None` if not present." -msgstr "" - -#: ../../library/nntplib.rst:412 -msgid "" -"It is advisable to use the :func:`decode_header` function on header values " -"when they may contain non-ASCII characters::" -msgstr "" - -#: ../../library/nntplib.rst:415 -msgid "" -">>> _, _, first, last, _ = s.group('gmane.comp.python.devel')\n" -">>> resp, overviews = s.over((last, last))\n" -">>> art_num, over = overviews[0]\n" -">>> art_num\n" -"117216\n" -">>> list(over.keys())\n" -"['xref', 'from', ':lines', ':bytes', 'references', 'date', 'message-id', " -"'subject']\n" -">>> over['from']\n" -"'=?UTF-8?B?Ik1hcnRpbiB2LiBMw7Z3aXMi?= '\n" -">>> nntplib.decode_header(over['from'])\n" -"'\"Martin v. Löwis\" '" -msgstr "" -">>> _, _, first, last, _ = s.group('gmane.comp.python.devel')\n" -">>> resp, overviews = s.over((last, last))\n" -">>> art_num, over = overviews[0]\n" -">>> art_num\n" -"117216\n" -">>> list(over.keys())\n" -"['xref', 'from', ':lines', ':bytes', 'references', 'date', 'message-id', " -"'subject']\n" -">>> over['from']\n" -"'=?UTF-8?B?Ik1hcnRpbiB2LiBMw7Z3aXMi?= '\n" -">>> nntplib.decode_header(over['from'])\n" -"'\"Martin v. Löwis\" '" - -#: ../../library/nntplib.rst:432 -msgid "" -"Send a ``HELP`` command. Return a pair ``(response, list)`` where *list* is " -"a list of help strings." -msgstr "" - -#: ../../library/nntplib.rst:438 -msgid "" -"Send a ``STAT`` command, where *message_spec* is either a message id " -"(enclosed in ``'<'`` and ``'>'``) or an article number in the current group. " -"If *message_spec* is omitted or :const:`None`, the current article in the " -"current group is considered. Return a triple ``(response, number, id)`` " -"where *number* is the article number and *id* is the message id." -msgstr "" - -#: ../../library/nntplib.rst:452 -msgid "Send a ``NEXT`` command. Return as for :meth:`.stat`." -msgstr "" - -#: ../../library/nntplib.rst:457 -msgid "Send a ``LAST`` command. Return as for :meth:`.stat`." -msgstr "" - -#: ../../library/nntplib.rst:462 -msgid "" -"Send an ``ARTICLE`` command, where *message_spec* has the same meaning as " -"for :meth:`.stat`. Return a tuple ``(response, info)`` where *info* is a :" -"class:`~collections.namedtuple` with three attributes *number*, *message_id* " -"and *lines* (in that order). *number* is the article number in the group " -"(or 0 if the information is not available), *message_id* the message id as a " -"string, and *lines* a list of lines (without terminating newlines) " -"comprising the raw message including headers and body." -msgstr "" - -#: ../../library/nntplib.rst:487 -msgid "" -"Same as :meth:`article`, but sends a ``HEAD`` command. The *lines* returned " -"(or written to *file*) will only contain the message headers, not the body." -msgstr "" - -#: ../../library/nntplib.rst:494 -msgid "" -"Same as :meth:`article`, but sends a ``BODY`` command. The *lines* returned " -"(or written to *file*) will only contain the message body, not the headers." -msgstr "" - -#: ../../library/nntplib.rst:501 -msgid "" -"Post an article using the ``POST`` command. The *data* argument is either " -"a :term:`file object` opened for binary reading, or any iterable of bytes " -"objects (representing raw lines of the article to be posted). It should " -"represent a well-formed news article, including the required headers. The :" -"meth:`post` method automatically escapes lines beginning with ``.`` and " -"appends the termination line." -msgstr "" - -#: ../../library/nntplib.rst:508 -msgid "" -"If the method succeeds, the server's response is returned. If the server " -"refuses posting, a :class:`NNTPReplyError` is raised." -msgstr "" - -#: ../../library/nntplib.rst:514 -msgid "" -"Send an ``IHAVE`` command. *message_id* is the id of the message to send to " -"the server (enclosed in ``'<'`` and ``'>'``). The *data* parameter and the " -"return value are the same as for :meth:`post`." -msgstr "" - -#: ../../library/nntplib.rst:521 -msgid "" -"Return a pair ``(response, date)``. *date* is a :class:`~datetime.datetime` " -"object containing the current date and time of the server." -msgstr "" - -#: ../../library/nntplib.rst:527 -msgid "Send a ``SLAVE`` command. Return the server's *response*." -msgstr "" - -#: ../../library/nntplib.rst:532 -msgid "" -"Set the instance's debugging level. This controls the amount of debugging " -"output printed. The default, ``0``, produces no debugging output. A value " -"of ``1`` produces a moderate amount of debugging output, generally a single " -"line per request or response. A value of ``2`` or higher produces the " -"maximum amount of debugging output, logging each line sent and received on " -"the connection (including message text)." -msgstr "" - -#: ../../library/nntplib.rst:540 -msgid "" -"The following are optional NNTP extensions defined in :rfc:`2980`. Some of " -"them have been superseded by newer commands in :rfc:`3977`." -msgstr "" - -#: ../../library/nntplib.rst:546 -msgid "" -"Send an ``XHDR`` command. The *hdr* argument is a header keyword, e.g. " -"``'subject'``. The *str* argument should have the form ``'first-last'`` " -"where *first* and *last* are the first and last article numbers to search. " -"Return a pair ``(response, list)``, where *list* is a list of pairs ``(id, " -"text)``, where *id* is an article number (as a string) and *text* is the " -"text of the requested header for that article. If the *file* parameter is " -"supplied, then the output of the ``XHDR`` command is stored in a file. If " -"*file* is a string, then the method will open a file with that name, write " -"to it then close it. If *file* is a :term:`file object`, then it will start " -"calling :meth:`write` on it to store the lines of the command output. If " -"*file* is supplied, then the returned *list* is an empty list." -msgstr "" - -#: ../../library/nntplib.rst:561 -msgid "" -"Send an ``XOVER`` command. *start* and *end* are article numbers delimiting " -"the range of articles to select. The return value is the same of for :meth:" -"`over`. It is recommended to use :meth:`over` instead, since it will " -"automatically use the newer ``OVER`` command if available." -msgstr "" - -#: ../../library/nntplib.rst:569 -msgid "Utility functions" -msgstr "" - -#: ../../library/nntplib.rst:571 -msgid "The module also defines the following utility function:" -msgstr "" - -#: ../../library/nntplib.rst:576 -msgid "" -"Decode a header value, un-escaping any escaped non-ASCII characters. " -"*header_str* must be a :class:`str` object. The unescaped value is " -"returned. Using this function is recommended to display some headers in a " -"human readable form::" -msgstr "" - -#: ../../library/nntplib.rst:581 -msgid "" -">>> decode_header(\"Some subject\")\n" -"'Some subject'\n" -">>> decode_header(\"=?ISO-8859-15?Q?D=E9buter_en_Python?=\")\n" -"'Débuter en Python'\n" -">>> decode_header(\"Re: =?UTF-8?B?cHJvYmzDqG1lIGRlIG1hdHJpY2U=?=\")\n" -"'Re: problème de matrice'" -msgstr "" -">>> decode_header(\"Some subject\")\n" -"'Some subject'\n" -">>> decode_header(\"=?ISO-8859-15?Q?D=E9buter_en_Python?=\")\n" -"'Débuter en Python'\n" -">>> decode_header(\"Re: =?UTF-8?B?cHJvYmzDqG1lIGRlIG1hdHJpY2U=?=\")\n" -"'Re: problème de matrice'" - -#: ../../library/nntplib.rst:10 -msgid "NNTP" -msgstr "NNTP" - -#: ../../library/nntplib.rst:10 -msgid "protocol" -msgstr "protocol(協定)" - -#: ../../library/nntplib.rst:10 -msgid "Network News Transfer Protocol" -msgstr "Network News Transfer Protocol(網路新聞傳輸協定)" diff --git a/library/os.po b/library/os.po index 8e1f1843ff..7968086daf 100644 --- a/library/os.po +++ b/library/os.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-23 07:52+0800\n" +"POT-Creation-Date: 2024-09-24 07:20+0000\n" "PO-Revision-Date: 2024-04-29 15:24+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -82,20 +82,19 @@ msgid "" msgstr "在 VxWorks, 不支援 os.popen、os.fork、os.execv 和 os.spawn*p*。" #: ../../library/os.rst:37 -#, fuzzy -msgid "" -"On WebAssembly platforms, and on iOS, large parts of the :mod:`os` module " -"are not available or behave differently. API related to processes (e.g. :" -"func:`~os.fork`, :func:`~os.execve`) and resources (e.g. :func:`~os.nice`) " -"are not available. Others like :func:`~os.getuid` and :func:`~os.getpid` are " -"emulated or stubs. WebAssembly platforms also lack support for signals (e." -"g. :func:`~os.kill`, :func:`~os.wait`)." -msgstr "" -"在 WebAssembly 平台 ``wasm32-emscripten`` 和 ``wasm32-wasi`` 上,大部分 :mod:" -"`os` 模組無法使用或行為不同。與行程(Process)(例如 :func:`~os.fork`、:func:" -"`~os.execve`\\ )、訊號(例如 :func:`~os.kill`、:func:`~os.wait`\\ ),與資源" +msgid "" +"On WebAssembly platforms, Android and iOS, large parts of the :mod:`os` " +"module are not available or behave differently. APIs related to processes (e." +"g. :func:`~os.fork`, :func:`~os.execve`) and resources (e.g. :func:`~os." +"nice`) are not available. Others like :func:`~os.getuid` and :func:`~os." +"getpid` are emulated or stubs. WebAssembly platforms also lack support for " +"signals (e.g. :func:`~os.kill`, :func:`~os.wait`)." +msgstr "" +"在 WebAssembly 平台和 Android 與 iOS 上,大部分 :mod:`os` 模組無法使用或行為" +"不同。與行程 (process)(例如 :func:`~os.fork`、:func:`~os.execve`\\ )與資源" "(例如 :func:`~os.nice`\\ )相關的 API 不可使用。其他諸如 :func:`~os.getuid` " -"和 :func:`~os.getpid` 的相關 API 是 emulated 或 stubs。" +"和 :func:`~os.getpid` 的相關 API 是 emulated 或 stubs。WebAssembly 平台也缺少" +"訊號相關支援(例如 :func:`~os.kill`、:func:`~os.wait`\\ )。" #: ../../library/os.rst:47 msgid "" @@ -309,29 +308,25 @@ msgstr "" #: ../../library/os.rst:181 ../../library/os.rst:358 ../../library/os.rst:367 #: ../../library/os.rst:389 ../../library/os.rst:398 ../../library/os.rst:434 #: ../../library/os.rst:442 ../../library/os.rst:480 ../../library/os.rst:491 -#: ../../library/os.rst:512 ../../library/os.rst:522 ../../library/os.rst:545 -#: ../../library/os.rst:579 ../../library/os.rst:586 ../../library/os.rst:593 -#: ../../library/os.rst:602 ../../library/os.rst:652 ../../library/os.rst:661 -#: ../../library/os.rst:678 ../../library/os.rst:687 ../../library/os.rst:694 -#: ../../library/os.rst:703 ../../library/os.rst:712 ../../library/os.rst:719 -#: ../../library/os.rst:726 ../../library/os.rst:735 ../../library/os.rst:1139 +#: ../../library/os.rst:512 ../../library/os.rst:522 ../../library/os.rst:602 +#: ../../library/os.rst:652 ../../library/os.rst:661 ../../library/os.rst:678 +#: ../../library/os.rst:719 ../../library/os.rst:726 ../../library/os.rst:1139 #: ../../library/os.rst:1183 ../../library/os.rst:1367 #: ../../library/os.rst:1393 ../../library/os.rst:1463 #: ../../library/os.rst:1535 ../../library/os.rst:1662 #: ../../library/os.rst:1682 ../../library/os.rst:1691 #: ../../library/os.rst:1772 ../../library/os.rst:1780 #: ../../library/os.rst:1800 ../../library/os.rst:2087 -#: ../../library/os.rst:2181 ../../library/os.rst:2221 -#: ../../library/os.rst:2514 ../../library/os.rst:2536 -#: ../../library/os.rst:4330 ../../library/os.rst:4337 -#: ../../library/os.rst:4344 ../../library/os.rst:4351 -#: ../../library/os.rst:4358 ../../library/os.rst:4365 -#: ../../library/os.rst:4372 ../../library/os.rst:4380 -#: ../../library/os.rst:4388 ../../library/os.rst:4395 -#: ../../library/os.rst:4402 ../../library/os.rst:4411 -#: ../../library/os.rst:4419 ../../library/os.rst:4427 -#: ../../library/os.rst:4434 ../../library/os.rst:4441 -#: ../../library/os.rst:4564 +#: ../../library/os.rst:2221 ../../library/os.rst:2514 +#: ../../library/os.rst:2536 ../../library/os.rst:4330 +#: ../../library/os.rst:4337 ../../library/os.rst:4344 +#: ../../library/os.rst:4351 ../../library/os.rst:4358 +#: ../../library/os.rst:4365 ../../library/os.rst:4372 +#: ../../library/os.rst:4380 ../../library/os.rst:4388 +#: ../../library/os.rst:4395 ../../library/os.rst:4402 +#: ../../library/os.rst:4411 ../../library/os.rst:4419 +#: ../../library/os.rst:4427 ../../library/os.rst:4434 +#: ../../library/os.rst:4441 ../../library/os.rst:4564 msgid ":ref:`Availability `: Unix, not WASI." msgstr ":ref:`適用 `:Unix、非 WASI。" @@ -599,9 +594,8 @@ msgid "" msgstr "" #: ../../library/os.rst:426 ../../library/os.rst:462 -#, fuzzy msgid ":ref:`Availability `: Unix, Windows, not WASI." -msgstr ":ref:`適用 `:Unix、非 WASI。" +msgstr ":ref:`適用 `:Unix、Windows、非 WASI。" #: ../../library/os.rst:431 msgid "" @@ -671,6 +665,13 @@ msgid "" "group id." msgstr "" +#: ../../library/os.rst:545 ../../library/os.rst:579 ../../library/os.rst:586 +#: ../../library/os.rst:593 ../../library/os.rst:687 ../../library/os.rst:694 +#: ../../library/os.rst:703 ../../library/os.rst:712 ../../library/os.rst:735 +#: ../../library/os.rst:2181 +msgid ":ref:`Availability `: Unix, not WASI, not Android." +msgstr ":ref:`適用 `:Unix、非 WASI、非 Android。" + #: ../../library/os.rst:554 msgid "" "Set the environment variable named *key* to the string *value*. Such " @@ -1176,7 +1177,6 @@ msgid "" msgstr "" #: ../../library/os.rst:1014 ../../library/os.rst:2244 -#, fuzzy msgid "Added support on Windows." msgstr "新增對 Windows 的支援。" @@ -2534,13 +2534,12 @@ msgid "" msgstr "" #: ../../library/os.rst:2239 -#, fuzzy msgid "" ":ref:`Availability `: Unix, Windows, not Linux, FreeBSD >= " "1.3, NetBSD >= 1.3, not OpenBSD" msgstr "" -":ref:`適用 `:Unix、非 Linux、FreeBSD 1.3 以上、NetBSD 1.3 以" -"上、非 OpenBSD。" +":ref:`適用 `:Unix、Windows、非 Linux、FreeBSD 1.3 以上、" +"NetBSD 1.3 以上、非 OpenBSD。" #: ../../library/os.rst:2249 msgid "" @@ -4424,15 +4423,15 @@ msgstr "" #: ../../library/os.rst:3881 msgid ":func:`read`" -msgstr "" +msgstr ":func:`read`" #: ../../library/os.rst:3882 msgid ":func:`~select.select`" -msgstr "" +msgstr ":func:`~select.select`" #: ../../library/os.rst:3883 msgid ":func:`~select.poll`" -msgstr "" +msgstr ":func:`~select.poll`" #: ../../library/os.rst:3885 msgid "" @@ -4456,13 +4455,12 @@ msgid "" msgstr "" #: ../../library/os.rst:3896 -#, fuzzy msgid ":const:`time.CLOCK_REALTIME`" -msgstr ":const:`stat.S_IREAD`" +msgstr ":const:`time.CLOCK_REALTIME`" #: ../../library/os.rst:3897 msgid ":const:`time.CLOCK_MONOTONIC`" -msgstr "" +msgstr ":const:`time.CLOCK_MONOTONIC`" #: ../../library/os.rst:3898 msgid ":const:`time.CLOCK_BOOTTIME` (Since Linux 3.15 for timerfd_create)" @@ -4497,14 +4495,12 @@ msgid "" msgstr "" #: ../../library/os.rst:3916 -#, fuzzy msgid ":const:`TFD_NONBLOCK`" -msgstr ":const:`stat.UF_NOUNLINK`" +msgstr ":const:`TFD_NONBLOCK`" #: ../../library/os.rst:3917 -#, fuzzy msgid ":const:`TFD_CLOEXEC`" -msgstr ":const:`stat.S_IEXEC`" +msgstr ":const:`TFD_CLOEXEC`" #: ../../library/os.rst:3919 msgid "" @@ -4525,9 +4521,8 @@ msgid "" msgstr "" #: ../../library/os.rst:3930 -#, fuzzy msgid "The :manpage:`timerfd_create(2)` man page." -msgstr "更多細節請見 :manpage:`pidfd_open(2)` 手冊頁。" +msgstr ":manpage:`timerfd_create(2)` 手冊頁。" #: ../../library/os.rst:3939 msgid "" @@ -4547,14 +4542,12 @@ msgid "" msgstr "" #: ../../library/os.rst:3948 -#, fuzzy msgid ":const:`TFD_TIMER_ABSTIME`" -msgstr ":const:`stat.UF_IMMUTABLE`" +msgstr ":const:`TFD_TIMER_ABSTIME`" #: ../../library/os.rst:3949 -#, fuzzy msgid ":const:`TFD_TIMER_CANCEL_ON_SET`" -msgstr ":const:`SEEK_SET`" +msgstr ":const:`TFD_TIMER_CANCEL_ON_SET`" #: ../../library/os.rst:3951 msgid "" @@ -4610,11 +4603,11 @@ msgstr "" #: ../../library/os.rst:3982 msgid "``settimeofday``" -msgstr "" +msgstr "``settimeofday``" #: ../../library/os.rst:3983 msgid "``clock_settime``" -msgstr "" +msgstr "``clock_settime``" #: ../../library/os.rst:3984 msgid "set the system date and time by ``date`` command" @@ -4939,12 +4932,14 @@ msgstr "" "引發一個附帶引數 ``path``、``args``、``env`` 的\\ :ref:`稽核事件 ` " "``os.exec``。" -#: ../../library/os.rst:4287 ../../library/os.rst:4541 -#: ../../library/os.rst:4852 ../../library/os.rst:4976 -#: ../../library/os.rst:5095 ../../library/os.rst:5264 -#, fuzzy -msgid ":ref:`Availability `: Unix, Windows, not WASI, not iOS." -msgstr ":ref:`適用 `:Unix、Windows、非 Emscripten、非 WASI。" +#: ../../library/os.rst:4287 ../../library/os.rst:4852 +#: ../../library/os.rst:4976 ../../library/os.rst:5095 +#: ../../library/os.rst:5264 +msgid "" +":ref:`Availability `: Unix, Windows, not WASI, not Android, " +"not iOS." +msgstr "" +":ref:`適用 `:Unix、Windows、非 WASI、非 Android、非 iOS。" #: ../../library/os.rst:4289 msgid "" @@ -5130,9 +5125,9 @@ msgid "" msgstr "" #: ../../library/os.rst:4490 ../../library/os.rst:4750 -#, fuzzy -msgid ":ref:`Availability `: POSIX, not WASI, not iOS." -msgstr ":ref:`適用 `:POSIX、非 Emscripten、非 WASI。" +msgid "" +":ref:`Availability `: POSIX, not WASI, not Android, not iOS." +msgstr ":ref:`適用 `:POSIX、非 WASI、非 Android、非 iOS。" #: ../../library/os.rst:4495 msgid "" @@ -5161,8 +5156,7 @@ msgid "" "fork`." msgstr "" -#: ../../library/os.rst:4517 ../../library/os.rst:4557 -#: ../../library/os.rst:4594 ../../library/os.rst:4734 +#: ../../library/os.rst:4517 ../../library/os.rst:4734 #: ../../library/os.rst:4783 ../../library/os.rst:5020 #: ../../library/os.rst:5054 ../../library/os.rst:5115 #: ../../library/os.rst:5129 ../../library/os.rst:5146 @@ -5174,9 +5168,9 @@ msgstr "" #: ../../library/os.rst:5310 ../../library/os.rst:5319 #: ../../library/os.rst:5328 ../../library/os.rst:5337 #: ../../library/os.rst:5346 -#, fuzzy -msgid ":ref:`Availability `: Unix, not WASI, not iOS." -msgstr ":ref:`適用 `:Unix、非 WASI。" +msgid "" +":ref:`Availability `: Unix, not WASI, not Android, not iOS." +msgstr ":ref:`適用 `:Unix、非 WASI、非 Android、非 iOS。" #: ../../library/os.rst:4526 msgid "" @@ -5207,6 +5201,10 @@ msgstr "" "引發一個附帶引數 ``pid``、``sig`` 的\\ :ref:`稽核事件 ` ``os." "kill``。" +#: ../../library/os.rst:4541 +msgid ":ref:`Availability `: Unix, Windows, not WASI, not iOS." +msgstr ":ref:`適用 `:Unix、Windows、非 WASI、非 iOS" + #: ../../library/os.rst:4553 msgid "Send the signal *sig* to the process group *pgid*." msgstr "" @@ -5219,6 +5217,10 @@ msgstr "" "引發一個附帶引數 ``pgid``、``sig`` 的\\ :ref:`稽核事件 ` ``os." "killpg``。" +#: ../../library/os.rst:4557 ../../library/os.rst:4594 +msgid ":ref:`Availability `: Unix, not WASI, not iOS." +msgstr ":ref:`適用 `:Unix、非 WASI、非 iOS。" + #: ../../library/os.rst:4562 msgid "" "Add *increment* to the process's \"niceness\". Return the new niceness." @@ -5294,9 +5296,8 @@ msgid "" msgstr "" #: ../../library/os.rst:4626 -#, fuzzy -msgid ":ref:`Availability `: not WASI, not iOS." -msgstr ":ref:`適用 `:非 WASI。" +msgid ":ref:`Availability `: not WASI, not Android, not iOS." +msgstr ":ref:`適用 `:非 WASI、非 Android、非 iOS。" #: ../../library/os.rst:4629 msgid "" @@ -5368,9 +5369,8 @@ msgid "Performs ``os.dup2(fd, new_fd)``." msgstr "" #: ../../library/os.rst:4679 -#, fuzzy msgid "(``os.POSIX_SPAWN_CLOSEFROM``, *fd*)" -msgstr "(``os.POSIX_SPAWN_CLOSE``, *fd*)" +msgstr "(``os.POSIX_SPAWN_CLOSEFROM``, *fd*)" #: ../../library/os.rst:4681 msgid "Performs ``os.closerange(fd, INF)``." @@ -6313,9 +6313,8 @@ msgid "" msgstr "" #: ../../library/os.rst:5469 -#, fuzzy msgid "See also the :func:`process_cpu_count` function." -msgstr ":func:`~os.setns` 函式。" +msgstr "也請見 :func:`process_cpu_count` 函式。" #: ../../library/os.rst:5475 msgid "Miscellaneous System Information" @@ -6398,9 +6397,8 @@ msgid "" msgstr "" #: ../../library/os.rst:5544 -#, fuzzy msgid "See also the :func:`sched_getaffinity` functions." -msgstr ":func:`~os.setns` 函式。" +msgstr "也請見 :func:`sched_getaffinity` 函式。" #: ../../library/os.rst:5551 msgid "" diff --git a/library/ossaudiodev.po b/library/ossaudiodev.po deleted file mode 100644 index 4daa2201eb..0000000000 --- a/library/ossaudiodev.po +++ /dev/null @@ -1,603 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) 2001-2022, Python Software Foundation -# This file is distributed under the same license as the Python package. -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: Python 3.13\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-03 11:11+0800\n" -"PO-Revision-Date: 2022-05-22 02:10+0800\n" -"Last-Translator: Liang-Bo Wang \n" -"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" -"tw)\n" -"Language: zh_TW\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Poedit 3.0.1\n" - -#: ../../library/ossaudiodev.rst:2 -msgid ":mod:`ossaudiodev` --- Access to OSS-compatible audio devices" -msgstr ":mod:`ossaudiodev` --- 對 OSS 相容聲音裝置的存取" - -#: ../../library/ossaudiodev.rst:9 -msgid "" -"The :mod:`ossaudiodev` module is deprecated (see :pep:`PEP 594 " -"<594#ossaudiodev>` for details)." -msgstr "" -":mod:`ossaudiodev` 模組 (module) 即將被棄用(詳見 :pep:`PEP 594 " -"<594#ossaudiodev>`\\ )。" - -#: ../../library/ossaudiodev.rst:15 -msgid "" -"This module allows you to access the OSS (Open Sound System) audio " -"interface. OSS is available for a wide range of open-source and commercial " -"Unices, and is the standard audio interface for Linux and recent versions of " -"FreeBSD." -msgstr "" - -#: ../../library/ossaudiodev.rst:47 -msgid "" -"Operations in this module now raise :exc:`OSError` where :exc:`IOError` was " -"raised." -msgstr "" - -#: ../../library/ossaudiodev.rst:54 -msgid "" -"`Open Sound System Programmer's Guide `_" -msgstr "" - -#: ../../library/ossaudiodev.rst:55 -msgid "the official documentation for the OSS C API" -msgstr "" - -#: ../../library/ossaudiodev.rst:57 -msgid "" -"The module defines a large number of constants supplied by the OSS device " -"driver; see ```` on either Linux or FreeBSD for a listing." -msgstr "" - -#: ../../library/ossaudiodev.rst:60 -msgid ":mod:`ossaudiodev` defines the following variables and functions:" -msgstr "" - -#: ../../library/ossaudiodev.rst:65 -msgid "" -"This exception is raised on certain errors. The argument is a string " -"describing what went wrong." -msgstr "" - -#: ../../library/ossaudiodev.rst:68 -msgid "" -"(If :mod:`ossaudiodev` receives an error from a system call such as :c:func:" -"`open`, :c:func:`write`, or :c:func:`ioctl`, it raises :exc:`OSError`. " -"Errors detected directly by :mod:`ossaudiodev` result in :exc:" -"`OSSAudioError`.)" -msgstr "" - -#: ../../library/ossaudiodev.rst:72 -msgid "" -"(For backwards compatibility, the exception class is also available as " -"``ossaudiodev.error``.)" -msgstr "" - -#: ../../library/ossaudiodev.rst:79 -msgid "" -"Open an audio device and return an OSS audio device object. This object " -"supports many file-like methods, such as :meth:`read`, :meth:`write`, and :" -"meth:`fileno` (although there are subtle differences between conventional " -"Unix read/write semantics and those of OSS audio devices). It also supports " -"a number of audio-specific methods; see below for the complete list of " -"methods." -msgstr "" - -#: ../../library/ossaudiodev.rst:85 -msgid "" -"*device* is the audio device filename to use. If it is not specified, this " -"module first looks in the environment variable :envvar:`AUDIODEV` for a " -"device to use. If not found, it falls back to :file:`/dev/dsp`." -msgstr "" - -#: ../../library/ossaudiodev.rst:89 -msgid "" -"*mode* is one of ``'r'`` for read-only (record) access, ``'w'`` for write-" -"only (playback) access and ``'rw'`` for both. Since many sound cards only " -"allow one process to have the recorder or player open at a time, it is a " -"good idea to open the device only for the activity needed. Further, some " -"sound cards are half-duplex: they can be opened for reading or writing, but " -"not both at once." -msgstr "" - -#: ../../library/ossaudiodev.rst:96 -msgid "" -"Note the unusual calling syntax: the *first* argument is optional, and the " -"second is required. This is a historical artifact for compatibility with " -"the older :mod:`linuxaudiodev` module which :mod:`ossaudiodev` supersedes." -msgstr "" - -#: ../../library/ossaudiodev.rst:107 -msgid "" -"Open a mixer device and return an OSS mixer device object. *device* is the " -"mixer device filename to use. If it is not specified, this module first " -"looks in the environment variable :envvar:`MIXERDEV` for a device to use. " -"If not found, it falls back to :file:`/dev/mixer`." -msgstr "" - -#: ../../library/ossaudiodev.rst:116 -msgid "Audio Device Objects" -msgstr "" - -#: ../../library/ossaudiodev.rst:118 -msgid "" -"Before you can write to or read from an audio device, you must call three " -"methods in the correct order:" -msgstr "" - -#: ../../library/ossaudiodev.rst:121 -msgid ":meth:`setfmt` to set the output format" -msgstr "" - -#: ../../library/ossaudiodev.rst:123 -msgid ":meth:`channels` to set the number of channels" -msgstr "" - -#: ../../library/ossaudiodev.rst:125 -msgid ":meth:`speed` to set the sample rate" -msgstr "" - -#: ../../library/ossaudiodev.rst:127 -msgid "" -"Alternately, you can use the :meth:`setparameters` method to set all three " -"audio parameters at once. This is more convenient, but may not be as " -"flexible in all cases." -msgstr "" - -#: ../../library/ossaudiodev.rst:131 -msgid "" -"The audio device objects returned by :func:`.open` define the following " -"methods and (read-only) attributes:" -msgstr "" - -#: ../../library/ossaudiodev.rst:137 -msgid "" -"Explicitly close the audio device. When you are done writing to or reading " -"from an audio device, you should explicitly close it. A closed device " -"cannot be used again." -msgstr "" - -#: ../../library/ossaudiodev.rst:144 -msgid "Return the file descriptor associated with the device." -msgstr "" - -#: ../../library/ossaudiodev.rst:149 -msgid "" -"Read *size* bytes from the audio input and return them as a Python string. " -"Unlike most Unix device drivers, OSS audio devices in blocking mode (the " -"default) will block :func:`read` until the entire requested amount of data " -"is available." -msgstr "" - -#: ../../library/ossaudiodev.rst:157 -msgid "" -"Write a :term:`bytes-like object` *data* to the audio device and return the " -"number of bytes written. If the audio device is in blocking mode (the " -"default), the entire data is always written (again, this is different from " -"usual Unix device semantics). If the device is in non-blocking mode, some " -"data may not be written---see :meth:`writeall`." -msgstr "" - -#: ../../library/ossaudiodev.rst:163 ../../library/ossaudiodev.rst:177 -msgid "Writable :term:`bytes-like object` is now accepted." -msgstr "" - -#: ../../library/ossaudiodev.rst:169 -msgid "" -"Write a :term:`bytes-like object` *data* to the audio device: waits until " -"the audio device is able to accept data, writes as much data as it will " -"accept, and repeats until *data* has been completely written. If the device " -"is in blocking mode (the default), this has the same effect as :meth:" -"`write`; :meth:`writeall` is only useful in non-blocking mode. Has no " -"return value, since the amount of data written is always equal to the amount " -"of data supplied." -msgstr "" - -#: ../../library/ossaudiodev.rst:181 -msgid "" -"Audio device objects also support the context management protocol, i.e. they " -"can be used in a :keyword:`with` statement." -msgstr "" - -#: ../../library/ossaudiodev.rst:186 -msgid "" -"The following methods each map to exactly one :c:func:`ioctl` system call. " -"The correspondence is obvious: for example, :meth:`setfmt` corresponds to " -"the ``SNDCTL_DSP_SETFMT`` ioctl, and :meth:`sync` to ``SNDCTL_DSP_SYNC`` " -"(this can be useful when consulting the OSS documentation). If the " -"underlying :c:func:`ioctl` fails, they all raise :exc:`OSError`." -msgstr "" - -#: ../../library/ossaudiodev.rst:195 -msgid "" -"Put the device into non-blocking mode. Once in non-blocking mode, there is " -"no way to return it to blocking mode." -msgstr "" - -#: ../../library/ossaudiodev.rst:201 -msgid "" -"Return a bitmask of the audio output formats supported by the soundcard. " -"Some of the formats supported by OSS are:" -msgstr "" - -#: ../../library/ossaudiodev.rst:205 -msgid "Format" -msgstr "格式" - -#: ../../library/ossaudiodev.rst:205 ../../library/ossaudiodev.rst:259 -msgid "Description" -msgstr "描述" - -#: ../../library/ossaudiodev.rst:207 -msgid ":const:`AFMT_MU_LAW`" -msgstr ":const:`AFMT_MU_LAW`" - -#: ../../library/ossaudiodev.rst:207 -msgid "" -"a logarithmic encoding (used by Sun ``.au`` files and :file:`/dev/audio`)" -msgstr "" - -#: ../../library/ossaudiodev.rst:210 -msgid ":const:`AFMT_A_LAW`" -msgstr ":const:`AFMT_A_LAW`" - -#: ../../library/ossaudiodev.rst:210 -msgid "a logarithmic encoding" -msgstr "" - -#: ../../library/ossaudiodev.rst:212 -msgid ":const:`AFMT_IMA_ADPCM`" -msgstr ":const:`AFMT_IMA_ADPCM`" - -#: ../../library/ossaudiodev.rst:212 -msgid "" -"a 4:1 compressed format defined by the Interactive Multimedia Association" -msgstr "" - -#: ../../library/ossaudiodev.rst:215 -msgid ":const:`AFMT_U8`" -msgstr ":const:`AFMT_U8`" - -#: ../../library/ossaudiodev.rst:215 -msgid "Unsigned, 8-bit audio" -msgstr "" - -#: ../../library/ossaudiodev.rst:217 -msgid ":const:`AFMT_S16_LE`" -msgstr ":const:`AFMT_S16_LE`" - -#: ../../library/ossaudiodev.rst:217 -msgid "" -"Signed, 16-bit audio, little-endian byte order (as used by Intel processors)" -msgstr "" - -#: ../../library/ossaudiodev.rst:220 -msgid ":const:`AFMT_S16_BE`" -msgstr ":const:`AFMT_S16_BE`" - -#: ../../library/ossaudiodev.rst:220 -msgid "" -"Signed, 16-bit audio, big-endian byte order (as used by 68k, PowerPC, Sparc)" -msgstr "" - -#: ../../library/ossaudiodev.rst:223 -msgid ":const:`AFMT_S8`" -msgstr ":const:`AFMT_S8`" - -#: ../../library/ossaudiodev.rst:223 -msgid "Signed, 8 bit audio" -msgstr "" - -#: ../../library/ossaudiodev.rst:225 -msgid ":const:`AFMT_U16_LE`" -msgstr ":const:`AFMT_U16_LE`" - -#: ../../library/ossaudiodev.rst:225 -msgid "Unsigned, 16-bit little-endian audio" -msgstr "" - -#: ../../library/ossaudiodev.rst:227 -msgid ":const:`AFMT_U16_BE`" -msgstr ":const:`AFMT_U16_BE`" - -#: ../../library/ossaudiodev.rst:227 -msgid "Unsigned, 16-bit big-endian audio" -msgstr "" - -#: ../../library/ossaudiodev.rst:230 -msgid "" -"Consult the OSS documentation for a full list of audio formats, and note " -"that most devices support only a subset of these formats. Some older " -"devices only support :const:`AFMT_U8`; the most common format used today is :" -"const:`AFMT_S16_LE`." -msgstr "" - -#: ../../library/ossaudiodev.rst:238 -msgid "" -"Try to set the current audio format to *format*---see :meth:`getfmts` for a " -"list. Returns the audio format that the device was set to, which may not be " -"the requested format. May also be used to return the current audio format---" -"do this by passing an \"audio format\" of :const:`AFMT_QUERY`." -msgstr "" - -#: ../../library/ossaudiodev.rst:246 -msgid "" -"Set the number of output channels to *nchannels*. A value of 1 indicates " -"monophonic sound, 2 stereophonic. Some devices may have more than 2 " -"channels, and some high-end devices may not support mono. Returns the number " -"of channels the device was set to." -msgstr "" - -#: ../../library/ossaudiodev.rst:254 -msgid "" -"Try to set the audio sampling rate to *samplerate* samples per second. " -"Returns the rate actually set. Most sound devices don't support arbitrary " -"sampling rates. Common rates are:" -msgstr "" - -#: ../../library/ossaudiodev.rst:259 -msgid "Rate" -msgstr "" - -#: ../../library/ossaudiodev.rst:261 -msgid "8000" -msgstr "8000" - -#: ../../library/ossaudiodev.rst:261 -msgid "default rate for :file:`/dev/audio`" -msgstr "" - -#: ../../library/ossaudiodev.rst:263 -msgid "11025" -msgstr "11025" - -#: ../../library/ossaudiodev.rst:263 -msgid "speech recording" -msgstr "" - -#: ../../library/ossaudiodev.rst:265 -msgid "22050" -msgstr "22050" - -#: ../../library/ossaudiodev.rst:267 -msgid "44100" -msgstr "44100" - -#: ../../library/ossaudiodev.rst:267 -msgid "CD quality audio (at 16 bits/sample and 2 channels)" -msgstr "" - -#: ../../library/ossaudiodev.rst:270 -msgid "96000" -msgstr "96000" - -#: ../../library/ossaudiodev.rst:270 -msgid "DVD quality audio (at 24 bits/sample)" -msgstr "" - -#: ../../library/ossaudiodev.rst:276 -msgid "" -"Wait until the sound device has played every byte in its buffer. (This " -"happens implicitly when the device is closed.) The OSS documentation " -"recommends closing and re-opening the device rather than using :meth:`sync`." -msgstr "" - -#: ../../library/ossaudiodev.rst:283 -msgid "" -"Immediately stop playing or recording and return the device to a state where " -"it can accept commands. The OSS documentation recommends closing and re-" -"opening the device after calling :meth:`reset`." -msgstr "" - -#: ../../library/ossaudiodev.rst:290 -msgid "" -"Tell the driver that there is likely to be a pause in the output, making it " -"possible for the device to handle the pause more intelligently. You might " -"use this after playing a spot sound effect, before waiting for user input, " -"or before doing disk I/O." -msgstr "" - -#: ../../library/ossaudiodev.rst:295 -msgid "" -"The following convenience methods combine several ioctls, or one ioctl and " -"some simple calculations." -msgstr "" - -#: ../../library/ossaudiodev.rst:301 -msgid "" -"Set the key audio sampling parameters---sample format, number of channels, " -"and sampling rate---in one method call. *format*, *nchannels*, and " -"*samplerate* should be as specified in the :meth:`setfmt`, :meth:`channels`, " -"and :meth:`speed` methods. If *strict* is true, :meth:`setparameters` " -"checks to see if each parameter was actually set to the requested value, and " -"raises :exc:`OSSAudioError` if not. Returns a tuple (*format*, *nchannels*, " -"*samplerate*) indicating the parameter values that were actually set by the " -"device driver (i.e., the same as the return values of :meth:`setfmt`, :meth:" -"`channels`, and :meth:`speed`)." -msgstr "" - -#: ../../library/ossaudiodev.rst:311 -msgid "For example, ::" -msgstr "舉例來說: ::" - -#: ../../library/ossaudiodev.rst:313 -msgid "(fmt, channels, rate) = dsp.setparameters(fmt, channels, rate)" -msgstr "(fmt, channels, rate) = dsp.setparameters(fmt, channels, rate)" - -#: ../../library/ossaudiodev.rst:315 -msgid "is equivalent to ::" -msgstr "等價於: ::" - -#: ../../library/ossaudiodev.rst:317 -msgid "" -"fmt = dsp.setfmt(fmt)\n" -"channels = dsp.channels(channels)\n" -"rate = dsp.rate(rate)" -msgstr "" -"fmt = dsp.setfmt(fmt)\n" -"channels = dsp.channels(channels)\n" -"rate = dsp.rate(rate)" - -#: ../../library/ossaudiodev.rst:324 -msgid "Returns the size of the hardware buffer, in samples." -msgstr "" - -#: ../../library/ossaudiodev.rst:329 -msgid "" -"Returns the number of samples that are in the hardware buffer yet to be " -"played." -msgstr "" - -#: ../../library/ossaudiodev.rst:334 -msgid "" -"Returns the number of samples that could be queued into the hardware buffer " -"to be played without blocking." -msgstr "" - -#: ../../library/ossaudiodev.rst:337 -msgid "Audio device objects also support several read-only attributes:" -msgstr "" - -#: ../../library/ossaudiodev.rst:342 -msgid "Boolean indicating whether the device has been closed." -msgstr "" - -#: ../../library/ossaudiodev.rst:347 -msgid "String containing the name of the device file." -msgstr "" - -#: ../../library/ossaudiodev.rst:352 -msgid "The I/O mode for the file, either ``\"r\"``, ``\"rw\"``, or ``\"w\"``." -msgstr "" - -#: ../../library/ossaudiodev.rst:358 -msgid "Mixer Device Objects" -msgstr "" - -#: ../../library/ossaudiodev.rst:360 -msgid "The mixer object provides two file-like methods:" -msgstr "" - -#: ../../library/ossaudiodev.rst:365 -msgid "" -"This method closes the open mixer device file. Any further attempts to use " -"the mixer after this file is closed will raise an :exc:`OSError`." -msgstr "" - -#: ../../library/ossaudiodev.rst:371 -msgid "Returns the file handle number of the open mixer device file." -msgstr "" - -#: ../../library/ossaudiodev.rst:373 -msgid "Mixer objects also support the context management protocol." -msgstr "" - -#: ../../library/ossaudiodev.rst:377 -msgid "The remaining methods are specific to audio mixing:" -msgstr "" - -#: ../../library/ossaudiodev.rst:382 -msgid "" -"This method returns a bitmask specifying the available mixer controls " -"(\"Control\" being a specific mixable \"channel\", such as :const:" -"`SOUND_MIXER_PCM` or :const:`SOUND_MIXER_SYNTH`). This bitmask indicates a " -"subset of all available mixer controls---the :const:`SOUND_MIXER_\\*` " -"constants defined at module level. To determine if, for example, the current " -"mixer object supports a PCM mixer, use the following Python code::" -msgstr "" - -#: ../../library/ossaudiodev.rst:389 -msgid "" -"mixer=ossaudiodev.openmixer()\n" -"if mixer.controls() & (1 << ossaudiodev.SOUND_MIXER_PCM):\n" -" # PCM is supported\n" -" ... code ..." -msgstr "" - -#: ../../library/ossaudiodev.rst:394 -msgid "" -"For most purposes, the :const:`SOUND_MIXER_VOLUME` (master volume) and :" -"const:`SOUND_MIXER_PCM` controls should suffice---but code that uses the " -"mixer should be flexible when it comes to choosing mixer controls. On the " -"Gravis Ultrasound, for example, :const:`SOUND_MIXER_VOLUME` does not exist." -msgstr "" - -#: ../../library/ossaudiodev.rst:402 -msgid "" -"Returns a bitmask indicating stereo mixer controls. If a bit is set, the " -"corresponding control is stereo; if it is unset, the control is either " -"monophonic or not supported by the mixer (use in combination with :meth:" -"`controls` to determine which)." -msgstr "" - -#: ../../library/ossaudiodev.rst:407 -msgid "" -"See the code example for the :meth:`controls` function for an example of " -"getting data from a bitmask." -msgstr "" - -#: ../../library/ossaudiodev.rst:413 -msgid "" -"Returns a bitmask specifying the mixer controls that may be used to record. " -"See the code example for :meth:`controls` for an example of reading from a " -"bitmask." -msgstr "" - -#: ../../library/ossaudiodev.rst:419 -msgid "" -"Returns the volume of a given mixer control. The returned volume is a 2-" -"tuple ``(left_volume,right_volume)``. Volumes are specified as numbers from " -"0 (silent) to 100 (full volume). If the control is monophonic, a 2-tuple is " -"still returned, but both volumes are the same." -msgstr "" - -#: ../../library/ossaudiodev.rst:424 -msgid "" -"Raises :exc:`OSSAudioError` if an invalid control is specified, or :exc:" -"`OSError` if an unsupported control is specified." -msgstr "" - -#: ../../library/ossaudiodev.rst:430 -msgid "" -"Sets the volume for a given mixer control to ``(left,right)``. ``left`` and " -"``right`` must be ints and between 0 (silent) and 100 (full volume). On " -"success, the new volume is returned as a 2-tuple. Note that this may not be " -"exactly the same as the volume specified, because of the limited resolution " -"of some soundcard's mixers." -msgstr "" - -#: ../../library/ossaudiodev.rst:436 -msgid "" -"Raises :exc:`OSSAudioError` if an invalid mixer control was specified, or if " -"the specified volumes were out-of-range." -msgstr "" - -#: ../../library/ossaudiodev.rst:442 -msgid "" -"This method returns a bitmask indicating which control(s) are currently " -"being used as a recording source." -msgstr "" - -#: ../../library/ossaudiodev.rst:448 -msgid "" -"Call this function to specify a recording source. Returns a bitmask " -"indicating the new recording source (or sources) if successful; raises :exc:" -"`OSError` if an invalid source was specified. To set the current recording " -"source to the microphone input::" -msgstr "" - -#: ../../library/ossaudiodev.rst:453 -msgid "mixer.setrecsrc (1 << ossaudiodev.SOUND_MIXER_MIC)" -msgstr "mixer.setrecsrc (1 << ossaudiodev.SOUND_MIXER_MIC)" diff --git a/library/pathlib.po b/library/pathlib.po index 43323de507..ffd0c4ac4f 100644 --- a/library/pathlib.po +++ b/library/pathlib.po @@ -2790,7 +2790,7 @@ msgstr "" #: ../../library/pathlib.rst:1661 msgid "``?``" -msgstr "" +msgstr "``?``" #: ../../library/pathlib.rst:1662 msgid "Matches one non-separator character." @@ -2798,7 +2798,7 @@ msgstr "" #: ../../library/pathlib.rst:1663 msgid "``[seq]``" -msgstr "" +msgstr "``[seq]``" #: ../../library/pathlib.rst:1664 msgid "Matches one character in *seq*." @@ -2806,7 +2806,7 @@ msgstr "" #: ../../library/pathlib.rst:1665 msgid "``[!seq]``" -msgstr "" +msgstr "``[!seq]``" #: ../../library/pathlib.rst:1666 msgid "Matches one character not in *seq*." diff --git a/library/pipes.po b/library/pipes.po deleted file mode 100644 index 67d5298f5b..0000000000 --- a/library/pipes.po +++ /dev/null @@ -1,144 +0,0 @@ -# Copyright (C) 2001-2024, Python Software Foundation -# This file is distributed under the same license as the Python package. -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: Python 3.13\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-03 11:11+0800\n" -"PO-Revision-Date: 2022-05-22 02:11+0800\n" -"Last-Translator: Liang-Bo Wang \n" -"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" -"tw)\n" -"Language: zh_TW\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Poedit 3.0.1\n" - -#: ../../library/pipes.rst:2 -msgid ":mod:`pipes` --- Interface to shell pipelines" -msgstr ":mod:`pipes` --- shell pipelines 介面" - -#: ../../library/pipes.rst:11 -msgid "**Source code:** :source:`Lib/pipes.py`" -msgstr "**原始碼:**\\ :source:`Lib/pipes.py`" - -#: ../../library/pipes.rst:13 -msgid "" -"The :mod:`pipes` module is deprecated (see :pep:`PEP 594 <594#pipes>` for " -"details). Please use the :mod:`subprocess` module instead." -msgstr "" -":mod:`pipes` 模組 (module) 即將被棄用(詳見 :pep:`PEP 594 <594#pipes>`\\ )。" -"請改用 :mod:`subprocess`。" - -#: ../../library/pipes.rst:20 -msgid "" -"The :mod:`pipes` module defines a class to abstract the concept of a " -"*pipeline* --- a sequence of converters from one file to another." -msgstr "" - -#: ../../library/pipes.rst:23 -msgid "" -"Because the module uses :program:`/bin/sh` command lines, a POSIX or " -"compatible shell for :func:`os.system` and :func:`os.popen` is required." -msgstr "" - -#: ../../library/pipes.rst:26 -msgid ":ref:`Availability `: Unix, not VxWorks." -msgstr ":ref:`適用 `:Unix,非 VxWorks。" - -#: ../../library/pipes.rst:28 -msgid "The :mod:`pipes` module defines the following class:" -msgstr "" - -#: ../../library/pipes.rst:33 -msgid "An abstraction of a pipeline." -msgstr "" - -#: ../../library/pipes.rst:35 -msgid "Example::" -msgstr "範例: ::" - -#: ../../library/pipes.rst:37 -msgid "" -">>> import pipes\n" -">>> t = pipes.Template()\n" -">>> t.append('tr a-z A-Z', '--')\n" -">>> f = t.open('pipefile', 'w')\n" -">>> f.write('hello world')\n" -">>> f.close()\n" -">>> open('pipefile').read()\n" -"'HELLO WORLD'" -msgstr "" -">>> import pipes\n" -">>> t = pipes.Template()\n" -">>> t.append('tr a-z A-Z', '--')\n" -">>> f = t.open('pipefile', 'w')\n" -">>> f.write('hello world')\n" -">>> f.close()\n" -">>> open('pipefile').read()\n" -"'HELLO WORLD'" - -#: ../../library/pipes.rst:50 -msgid "Template Objects" -msgstr "" - -#: ../../library/pipes.rst:52 -msgid "Template objects following methods:" -msgstr "" - -#: ../../library/pipes.rst:57 -msgid "Restore a pipeline template to its initial state." -msgstr "" - -#: ../../library/pipes.rst:62 -msgid "Return a new, equivalent, pipeline template." -msgstr "" - -#: ../../library/pipes.rst:67 -msgid "" -"If *flag* is true, turn debugging on. Otherwise, turn debugging off. When " -"debugging is on, commands to be executed are printed, and the shell is given " -"``set -x`` command to be more verbose." -msgstr "" - -#: ../../library/pipes.rst:74 -msgid "" -"Append a new action at the end. The *cmd* variable must be a valid bourne " -"shell command. The *kind* variable consists of two letters." -msgstr "" - -#: ../../library/pipes.rst:77 -msgid "" -"The first letter can be either of ``'-'`` (which means the command reads its " -"standard input), ``'f'`` (which means the commands reads a given file on the " -"command line) or ``'.'`` (which means the commands reads no input, and hence " -"must be first.)" -msgstr "" - -#: ../../library/pipes.rst:82 -msgid "" -"Similarly, the second letter can be either of ``'-'`` (which means the " -"command writes to standard output), ``'f'`` (which means the command writes " -"a file on the command line) or ``'.'`` (which means the command does not " -"write anything, and hence must be last.)" -msgstr "" - -#: ../../library/pipes.rst:90 -msgid "" -"Add a new action at the beginning. See :meth:`append` for explanations of " -"the arguments." -msgstr "" - -#: ../../library/pipes.rst:96 -msgid "" -"Return a file-like object, open to *file*, but read from or written to by " -"the pipeline. Note that only one of ``'r'``, ``'w'`` may be given." -msgstr "" - -#: ../../library/pipes.rst:102 -msgid "Copy *infile* to *outfile* through the pipe." -msgstr "" diff --git a/library/poplib.po b/library/poplib.po index 56f717a4f5..05056d6a9f 100644 --- a/library/poplib.po +++ b/library/poplib.po @@ -53,16 +53,15 @@ msgstr "" #: ../../includes/wasm-notavail.rst:3 msgid ":ref:`Availability `: not WASI." -msgstr "" +msgstr ":ref:`適用 `:非 WASI。" #: ../../includes/wasm-notavail.rst:5 -#, fuzzy msgid "" "This module does not work or is not available on WebAssembly. See :ref:`wasm-" "availability` for more information." msgstr "" -"此模組在 WebAssembly 平台 ``wasm32-emscripten`` 和 ``wasm32-wasi`` 上無法作用" -"或無法使用。有關更多資訊,請參閱 :ref:`wasm-availability`。" +"此模組在 WebAssembly 平台上不起作用或無法使用。更多資訊請參閱 :ref:`wasm-" +"availability`。" #: ../../library/poplib.rst:33 msgid "The :mod:`poplib` module provides two classes:" diff --git a/library/re.po b/library/re.po index 5059b8501a..ade794f4a6 100644 --- a/library/re.po +++ b/library/re.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-23 07:52+0800\n" +"POT-Creation-Date: 2024-09-24 07:20+0000\n" "PO-Revision-Date: 2023-09-16 14:49+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -169,7 +169,7 @@ msgstr "" msgid "The special characters are:" msgstr "" -#: ../../library/re.rst:101 ../../library/re.rst:1643 +#: ../../library/re.rst:101 ../../library/re.rst:1649 msgid "``.``" msgstr "``.``" @@ -829,53 +829,60 @@ msgid "" msgstr "" #: ../../library/re.rst:577 +msgid "" +"Note that ``\\B`` does not match an empty string, which differs from RE " +"implementations in other programming languages such as Perl. This behavior " +"is kept for compatibility reasons." +msgstr "" + +#: ../../library/re.rst:583 msgid "``\\d``" msgstr "``\\d``" -#: ../../library/re.rst:578 ../../library/re.rst:602 ../../library/re.rst:624 +#: ../../library/re.rst:584 ../../library/re.rst:608 ../../library/re.rst:630 msgid "For Unicode (str) patterns:" msgstr "" -#: ../../library/re.rst:579 +#: ../../library/re.rst:585 msgid "" "Matches any Unicode decimal digit (that is, any character in Unicode " "character category `[Nd]`__). This includes ``[0-9]``, and also many other " "digit characters." msgstr "" -#: ../../library/re.rst:583 +#: ../../library/re.rst:589 msgid "Matches ``[0-9]`` if the :py:const:`~re.ASCII` flag is used." msgstr "" -#: ../../library/re.rst:587 ../../library/re.rst:609 ../../library/re.rst:632 +#: ../../library/re.rst:593 ../../library/re.rst:615 ../../library/re.rst:638 msgid "For 8-bit (bytes) patterns:" msgstr "" -#: ../../library/re.rst:588 +#: ../../library/re.rst:594 msgid "" "Matches any decimal digit in the ASCII character set; this is equivalent to " "``[0-9]``." msgstr "" -#: ../../library/re.rst:593 +#: ../../library/re.rst:599 msgid "``\\D``" msgstr "``\\D``" -#: ../../library/re.rst:594 +#: ../../library/re.rst:600 msgid "" "Matches any character which is not a decimal digit. This is the opposite of " "``\\d``." msgstr "" -#: ../../library/re.rst:597 +#: ../../library/re.rst:603 msgid "Matches ``[^0-9]`` if the :py:const:`~re.ASCII` flag is used." msgstr "" -#: ../../library/re.rst:601 +#: ../../library/re.rst:607 msgid "``\\s``" msgstr "``\\s``" -#: ../../library/re.rst:603 +#: ../../library/re.rst:609 msgid "" "Matches Unicode whitespace characters (as defined by :py:meth:`str." "isspace`). This includes ``[ \\t\\n\\r\\f\\v]``, and also many other " @@ -883,48 +890,48 @@ msgid "" "in many languages." msgstr "" -#: ../../library/re.rst:607 +#: ../../library/re.rst:613 msgid "" "Matches ``[ \\t\\n\\r\\f\\v]`` if the :py:const:`~re.ASCII` flag is used." msgstr "" -#: ../../library/re.rst:610 +#: ../../library/re.rst:616 msgid "" "Matches characters considered whitespace in the ASCII character set; this is " "equivalent to ``[ \\t\\n\\r\\f\\v]``." msgstr "" -#: ../../library/re.rst:615 +#: ../../library/re.rst:621 msgid "``\\S``" msgstr "``\\S``" -#: ../../library/re.rst:616 +#: ../../library/re.rst:622 msgid "" "Matches any character which is not a whitespace character. This is the " "opposite of ``\\s``." msgstr "" -#: ../../library/re.rst:619 +#: ../../library/re.rst:625 msgid "" "Matches ``[^ \\t\\n\\r\\f\\v]`` if the :py:const:`~re.ASCII` flag is used." msgstr "" -#: ../../library/re.rst:623 +#: ../../library/re.rst:629 msgid "``\\w``" msgstr "``\\w``" -#: ../../library/re.rst:625 +#: ../../library/re.rst:631 msgid "" "Matches Unicode word characters; this includes all Unicode alphanumeric " "characters (as defined by :py:meth:`str.isalnum`), as well as the underscore " "(``_``)." msgstr "" -#: ../../library/re.rst:630 +#: ../../library/re.rst:636 msgid "Matches ``[a-zA-Z0-9_]`` if the :py:const:`~re.ASCII` flag is used." msgstr "" -#: ../../library/re.rst:633 +#: ../../library/re.rst:639 msgid "" "Matches characters considered alphanumeric in the ASCII character set; this " "is equivalent to ``[a-zA-Z0-9_]``. If the :py:const:`~re.LOCALE` flag is " @@ -932,42 +939,42 @@ msgid "" "the underscore." msgstr "" -#: ../../library/re.rst:640 +#: ../../library/re.rst:646 msgid "``\\W``" msgstr "``\\W``" -#: ../../library/re.rst:641 +#: ../../library/re.rst:647 msgid "" "Matches any character which is not a word character. This is the opposite of " "``\\w``. By default, matches non-underscore (``_``) characters for which :py:" "meth:`str.isalnum` returns ``False``." msgstr "" -#: ../../library/re.rst:646 +#: ../../library/re.rst:652 msgid "Matches ``[^a-zA-Z0-9_]`` if the :py:const:`~re.ASCII` flag is used." msgstr "" -#: ../../library/re.rst:648 +#: ../../library/re.rst:654 msgid "" "If the :py:const:`~re.LOCALE` flag is used, matches characters which are " "neither alphanumeric in the current locale nor the underscore." msgstr "" -#: ../../library/re.rst:654 +#: ../../library/re.rst:660 msgid "``\\Z``" msgstr "``\\Z``" -#: ../../library/re.rst:655 +#: ../../library/re.rst:661 msgid "Matches only at the end of the string." msgstr "" -#: ../../library/re.rst:671 +#: ../../library/re.rst:677 msgid "" "Most of the :ref:`escape sequences ` supported by Python " "string literals are also accepted by the regular expression parser::" msgstr "" -#: ../../library/re.rst:674 +#: ../../library/re.rst:680 msgid "" "\\a \\b \\f \\n\n" "\\N \\r \\t \\u\n" @@ -977,20 +984,20 @@ msgstr "" "\\N \\r \\t \\u\n" "\\U \\v \\x \\\\" -#: ../../library/re.rst:678 +#: ../../library/re.rst:684 msgid "" "(Note that ``\\b`` is used to represent word boundaries, and means " "\"backspace\" only inside character classes.)" msgstr "" -#: ../../library/re.rst:681 +#: ../../library/re.rst:687 msgid "" "``'\\u'``, ``'\\U'``, and ``'\\N'`` escape sequences are only recognized in " "Unicode (str) 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:687 +#: ../../library/re.rst:693 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. " @@ -998,27 +1005,27 @@ msgid "" "are always at most three digits in length." msgstr "" -#: ../../library/re.rst:692 +#: ../../library/re.rst:698 msgid "The ``'\\u'`` and ``'\\U'`` escape sequences have been added." msgstr "" -#: ../../library/re.rst:695 +#: ../../library/re.rst:701 msgid "" "Unknown escapes consisting of ``'\\'`` and an ASCII letter now are errors." msgstr "" -#: ../../library/re.rst:698 +#: ../../library/re.rst:704 msgid "" "The :samp:`'\\\\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:706 +#: ../../library/re.rst:712 msgid "Module Contents" msgstr "模組內容" -#: ../../library/re.rst:708 +#: ../../library/re.rst:714 msgid "" "The module defines several functions, constants, and an exception. Some of " "the functions are simplified versions of the full featured methods for " @@ -1026,26 +1033,26 @@ msgid "" "compiled form." msgstr "" -#: ../../library/re.rst:715 +#: ../../library/re.rst:721 msgid "Flags" msgstr "旗標" -#: ../../library/re.rst:717 +#: ../../library/re.rst:723 msgid "" "Flag constants are now instances of :class:`RegexFlag`, which is a subclass " "of :class:`enum.IntFlag`." msgstr "" -#: ../../library/re.rst:724 +#: ../../library/re.rst:730 msgid "" "An :class:`enum.IntFlag` class containing the regex options listed below." msgstr "" -#: ../../library/re.rst:726 +#: ../../library/re.rst:732 msgid "- added to ``__all__``" msgstr "" -#: ../../library/re.rst:731 +#: ../../library/re.rst:737 msgid "" "Make ``\\w``, ``\\W``, ``\\b``, ``\\B``, ``\\d``, ``\\D``, ``\\s`` and " "``\\S`` perform ASCII-only matching instead of full Unicode matching. This " @@ -1053,11 +1060,11 @@ msgid "" "patterns." msgstr "" -#: ../../library/re.rst:735 +#: ../../library/re.rst:741 msgid "Corresponds to the inline flag ``(?a)``." msgstr "" -#: ../../library/re.rst:739 +#: ../../library/re.rst:745 msgid "" "The :py:const:`~re.U` flag still exists for backward compatibility, but is " "redundant in Python 3 since matches are Unicode by default for ``str`` " @@ -1065,15 +1072,15 @@ msgid "" "`~re.UNICODE` and the inline flag ``(?u)`` are similarly redundant." msgstr "" -#: ../../library/re.rst:748 +#: ../../library/re.rst:754 msgid "Display debug information about compiled expression." msgstr "" -#: ../../library/re.rst:750 +#: ../../library/re.rst:756 msgid "No corresponding inline flag." msgstr "" -#: ../../library/re.rst:756 +#: ../../library/re.rst:762 msgid "" "Perform case-insensitive matching; expressions like ``[A-Z]`` will also " "match lowercase letters. Full Unicode matching (such as ``Ü`` matching " @@ -1082,11 +1089,11 @@ msgid "" "flag unless the :py:const:`~re.LOCALE` flag is also used." msgstr "" -#: ../../library/re.rst:764 +#: ../../library/re.rst:770 msgid "Corresponds to the inline flag ``(?i)``." msgstr "" -#: ../../library/re.rst:766 +#: ../../library/re.rst:772 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 " @@ -1097,18 +1104,18 @@ msgid "" "are matched." msgstr "" -#: ../../library/re.rst:777 +#: ../../library/re.rst:783 msgid "" "Make ``\\w``, ``\\W``, ``\\b``, ``\\B`` and case-insensitive matching " "dependent on the current locale. This flag can be used only with bytes " "patterns." msgstr "" -#: ../../library/re.rst:781 +#: ../../library/re.rst:787 msgid "Corresponds to the inline flag ``(?L)``." msgstr "" -#: ../../library/re.rst:785 +#: ../../library/re.rst:791 msgid "" "This flag is discouraged; consider Unicode matching instead. The locale " "mechanism is very unreliable as it only handles one \"culture\" at a time " @@ -1117,20 +1124,20 @@ msgid "" "languages." msgstr "" -#: ../../library/re.rst:792 +#: ../../library/re.rst:798 msgid "" ":py:const:`~re.LOCALE` can be used only with bytes patterns and is not " "compatible with :py:const:`~re.ASCII`." msgstr "" -#: ../../library/re.rst:796 +#: ../../library/re.rst:802 msgid "" "Compiled regular expression objects with the :py: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:805 +#: ../../library/re.rst:811 msgid "" "When specified, the pattern character ``'^'`` matches at the beginning of " "the string and at the beginning of each line (immediately following each " @@ -1141,11 +1148,11 @@ msgid "" "the end of the string." msgstr "" -#: ../../library/re.rst:812 +#: ../../library/re.rst:818 msgid "Corresponds to the inline flag ``(?m)``." msgstr "" -#: ../../library/re.rst:816 +#: ../../library/re.rst:822 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 " @@ -1153,35 +1160,35 @@ msgid "" "value::" msgstr "" -#: ../../library/re.rst:821 +#: ../../library/re.rst:827 msgid "" "def myfunc(text, flag=re.NOFLAG):\n" " return re.match(text, flag)" msgstr "" -#: ../../library/re.rst:829 +#: ../../library/re.rst:835 msgid "" "Make the ``'.'`` special character match any character at all, including a " "newline; without this flag, ``'.'`` will match anything *except* a newline." msgstr "" -#: ../../library/re.rst:832 +#: ../../library/re.rst:838 msgid "Corresponds to the inline flag ``(?s)``." msgstr "" -#: ../../library/re.rst:838 +#: ../../library/re.rst:844 msgid "" "In Python 3, Unicode characters are matched by default for ``str`` patterns. " "This flag is therefore redundant with **no effect** and is only kept for " "backward compatibility." msgstr "" -#: ../../library/re.rst:843 +#: ../../library/re.rst:849 msgid "" "See :py:const:`~re.ASCII` to restrict matching to ASCII characters instead." msgstr "" -#: ../../library/re.rst:850 +#: ../../library/re.rst:856 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 " @@ -1194,13 +1201,13 @@ msgid "" "ignored." msgstr "" -#: ../../library/re.rst:860 +#: ../../library/re.rst:866 msgid "" "This means that the two following regular expression objects that match a " "decimal number are functionally equal::" msgstr "" -#: ../../library/re.rst:863 +#: ../../library/re.rst:869 msgid "" "a = re.compile(r\"\"\"\\d + # the integral part\n" " \\. # the decimal point\n" @@ -1208,57 +1215,57 @@ msgid "" "b = re.compile(r\"\\d+\\.\\d*\")" msgstr "" -#: ../../library/re.rst:868 +#: ../../library/re.rst:874 msgid "Corresponds to the inline flag ``(?x)``." msgstr "" -#: ../../library/re.rst:872 +#: ../../library/re.rst:878 msgid "Functions" msgstr "" -#: ../../library/re.rst:876 +#: ../../library/re.rst:882 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:881 ../../library/re.rst:913 ../../library/re.rst:931 -#: ../../library/re.rst:942 ../../library/re.rst:988 ../../library/re.rst:1022 -#: ../../library/re.rst:1037 ../../library/re.rst:1096 -#: ../../library/re.rst:1132 +#: ../../library/re.rst:887 ../../library/re.rst:919 ../../library/re.rst:937 +#: ../../library/re.rst:948 ../../library/re.rst:994 ../../library/re.rst:1028 +#: ../../library/re.rst:1043 ../../library/re.rst:1102 +#: ../../library/re.rst:1138 msgid "" "The expression's behaviour can be modified by specifying a *flags* value. " "Values can be any of the `flags`_ variables, combined using bitwise OR (the " "``|`` operator)." msgstr "" -#: ../../library/re.rst:885 +#: ../../library/re.rst:891 msgid "The sequence ::" msgstr "" -#: ../../library/re.rst:887 +#: ../../library/re.rst:893 msgid "" "prog = re.compile(pattern)\n" "result = prog.match(string)" msgstr "" -#: ../../library/re.rst:890 +#: ../../library/re.rst:896 msgid "is equivalent to ::" msgstr "等價於: ::" -#: ../../library/re.rst:892 +#: ../../library/re.rst:898 msgid "result = re.match(pattern, string)" msgstr "" -#: ../../library/re.rst:894 +#: ../../library/re.rst:900 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:900 +#: ../../library/re.rst:906 msgid "" "The compiled versions of the most recent patterns passed to :func:`re." "compile` and the module-level matching functions are cached, so programs " @@ -1266,7 +1273,7 @@ msgid "" "compiling regular expressions." msgstr "" -#: ../../library/re.rst:908 +#: ../../library/re.rst:914 msgid "" "Scan through *string* looking for the first location where the regular " "expression *pattern* produces a match, and return a corresponding :class:" @@ -1275,7 +1282,7 @@ msgid "" "some point in the string." msgstr "" -#: ../../library/re.rst:920 +#: ../../library/re.rst:926 msgid "" "If zero or more characters at the beginning of *string* match the regular " "expression *pattern*, return a corresponding :class:`~re.Match`. Return " @@ -1283,26 +1290,26 @@ msgid "" "different from a zero-length match." msgstr "" -#: ../../library/re.rst:925 +#: ../../library/re.rst:931 msgid "" "Note that even in :const:`MULTILINE` mode, :func:`re.match` will only match " "at the beginning of the string and not at the beginning of each line." msgstr "" -#: ../../library/re.rst:928 +#: ../../library/re.rst:934 msgid "" "If you want to locate a match anywhere in *string*, use :func:`search` " "instead (see also :ref:`search-vs-match`)." msgstr "" -#: ../../library/re.rst:938 +#: ../../library/re.rst:944 msgid "" "If the whole *string* matches the regular expression *pattern*, return a " "corresponding :class:`~re.Match`. Return ``None`` if the string does not " "match the pattern; note that this is different from a zero-length match." msgstr "" -#: ../../library/re.rst:951 +#: ../../library/re.rst:957 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 " @@ -1311,8 +1318,7 @@ msgid "" "final element of the list. ::" msgstr "" -#: ../../library/re.rst:957 -#, fuzzy +#: ../../library/re.rst:963 msgid "" ">>> re.split(r'\\W+', 'Words, words, words.')\n" "['Words', 'words', 'words', '']\n" @@ -1327,19 +1333,19 @@ msgstr "" "['Words', 'words', 'words', '']\n" ">>> re.split(r'(\\W+)', 'Words, words, words.')\n" "['Words', ', ', 'words', ', ', 'words', '.', '']\n" -">>> re.split(r'\\W+', 'Words, words, words.', 1)\n" +">>> re.split(r'\\W+', 'Words, words, words.', maxsplit=1)\n" "['Words', 'words, words.']\n" ">>> re.split('[a-f]+', '0a3B9', flags=re.IGNORECASE)\n" "['0', '3', '9']" -#: ../../library/re.rst:966 +#: ../../library/re.rst:972 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:970 +#: ../../library/re.rst:976 msgid "" ">>> re.split(r'(\\W+)', '...words, words...')\n" "['', '...', 'words', ', ', 'words', '...', '']" @@ -1347,19 +1353,19 @@ msgstr "" ">>> re.split(r'(\\W+)', '...words, words...')\n" "['', '...', 'words', ', ', 'words', '...', '']" -#: ../../library/re.rst:973 +#: ../../library/re.rst:979 msgid "" "That way, separator components are always found at the same relative indices " "within the result list." msgstr "" -#: ../../library/re.rst:976 +#: ../../library/re.rst:982 msgid "" "Empty matches for the pattern split the string only when not adjacent to a " "previous empty match." msgstr "" -#: ../../library/re.rst:979 +#: ../../library/re.rst:985 msgid "" ">>> re.split(r'\\b', 'Words, words, words.')\n" "['', 'Words', ', ', 'words', ', ', 'words', '.']\n" @@ -1377,30 +1383,30 @@ msgstr "" "['', '...', '', '', 'w', '', 'o', '', 'r', '', 'd', '', 's', '...', '', '', " "'']" -#: ../../library/re.rst:992 ../../library/re.rst:1100 +#: ../../library/re.rst:998 ../../library/re.rst:1106 msgid "Added the optional flags argument." msgstr "新增可選的旗標引數。" -#: ../../library/re.rst:995 +#: ../../library/re.rst:1001 msgid "" "Added support of splitting on a pattern that could match an empty string." msgstr "" -#: ../../library/re.rst:998 +#: ../../library/re.rst:1004 msgid "" "Passing *maxsplit* and *flags* as positional arguments is deprecated. In " "future Python versions they will be :ref:`keyword-only parameters `." msgstr "" -#: ../../library/re.rst:1006 +#: ../../library/re.rst:1012 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:1010 +#: ../../library/re.rst:1016 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. " @@ -1410,11 +1416,11 @@ msgid "" "result." msgstr "" -#: ../../library/re.rst:1026 ../../library/re.rst:1041 +#: ../../library/re.rst:1032 ../../library/re.rst:1047 msgid "Non-empty matches can now start just after a previous empty match." msgstr "" -#: ../../library/re.rst:1032 +#: ../../library/re.rst:1038 msgid "" "Return an :term:`iterator` yielding :class:`~re.Match` objects over all non-" "overlapping matches for the RE *pattern* in *string*. The *string* is " @@ -1422,7 +1428,7 @@ msgid "" "matches are included in the result." msgstr "" -#: ../../library/re.rst:1047 +#: ../../library/re.rst:1053 msgid "" "Return the string obtained by replacing the leftmost non-overlapping " "occurrences of *pattern* in *string* by the replacement *repl*. If the " @@ -1436,7 +1442,7 @@ msgid "" "For example::" msgstr "" -#: ../../library/re.rst:1058 +#: ../../library/re.rst:1064 msgid "" ">>> re.sub(r'def\\s+([a-zA-Z_][a-zA-Z_0-9]*)\\s*\\(\\s*\\):',\n" "... r'static PyObject*\\npy_\\1(void)\\n{',\n" @@ -1448,14 +1454,14 @@ msgstr "" "... 'def myfunc():')\n" "'static PyObject*\\npy_myfunc(void)\\n{'" -#: ../../library/re.rst:1063 +#: ../../library/re.rst:1069 msgid "" "If *repl* is a function, it is called for every non-overlapping occurrence " "of *pattern*. The function takes a single :class:`~re.Match` argument, and " "returns the replacement string. For example::" msgstr "" -#: ../../library/re.rst:1067 +#: ../../library/re.rst:1073 msgid "" ">>> def dashrepl(matchobj):\n" "... if matchobj.group(0) == '-': return ' '\n" @@ -1477,11 +1483,11 @@ msgstr "" "IGNORECASE)\n" "'Baked Beans & Spam'" -#: ../../library/re.rst:1076 +#: ../../library/re.rst:1082 msgid "The pattern may be a string or a :class:`~re.Pattern`." msgstr "" -#: ../../library/re.rst:1078 +#: ../../library/re.rst:1084 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, " @@ -1490,7 +1496,7 @@ msgid "" "'abxd')`` returns ``'-a-b--d-'``." msgstr "" -#: ../../library/re.rst:1086 +#: ../../library/re.rst:1092 msgid "" "In string-type *repl* arguments, in addition to the character escapes and " "backreferences described above, ``\\g`` will use the substring matched " @@ -1503,51 +1509,51 @@ msgid "" "RE." msgstr "" -#: ../../library/re.rst:1103 ../../library/re.rst:1381 +#: ../../library/re.rst:1109 ../../library/re.rst:1387 msgid "Unmatched groups are replaced with an empty string." msgstr "" -#: ../../library/re.rst:1106 +#: ../../library/re.rst:1112 msgid "" "Unknown escapes in *pattern* consisting of ``'\\'`` and an ASCII letter now " "are errors." msgstr "" -#: ../../library/re.rst:1110 +#: ../../library/re.rst:1116 msgid "" "Unknown escapes in *repl* consisting of ``'\\'`` and an ASCII letter now are " "errors. Empty matches for the pattern are replaced when adjacent to a " "previous non-empty match." msgstr "" -#: ../../library/re.rst:1116 +#: ../../library/re.rst:1122 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:1121 +#: ../../library/re.rst:1127 msgid "" "Passing *count* and *flags* as positional arguments is deprecated. In future " "Python versions they will be :ref:`keyword-only parameters `." msgstr "" -#: ../../library/re.rst:1129 +#: ../../library/re.rst:1135 msgid "" "Perform the same operation as :func:`sub`, but return a tuple ``(new_string, " "number_of_subs_made)``." msgstr "" -#: ../../library/re.rst:1139 +#: ../../library/re.rst:1145 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:1143 +#: ../../library/re.rst:1149 msgid "" ">>> print(re.escape('https://www.python.org'))\n" "https://www\\.python\\.org\n" @@ -1573,13 +1579,13 @@ msgstr "" ">>> print('|'.join(map(re.escape, sorted(operators, reverse=True))))\n" "/|\\-|\\+|\\*\\*|\\*" -#: ../../library/re.rst:1154 +#: ../../library/re.rst:1160 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:1157 +#: ../../library/re.rst:1163 msgid "" ">>> digits_re = r'\\d+'\n" ">>> sample = '/usr/sbin/sendmail - 0 errors, 12 warnings'\n" @@ -1591,11 +1597,11 @@ msgstr "" ">>> print(re.sub(digits_re, digits_re.replace('\\\\', r'\\\\'), sample))\n" "/usr/sbin/sendmail - \\d+ errors, \\d+ warnings" -#: ../../library/re.rst:1162 +#: ../../library/re.rst:1168 msgid "The ``'_'`` character is no longer escaped." msgstr "" -#: ../../library/re.rst:1165 +#: ../../library/re.rst:1171 msgid "" "Only characters that can have special meaning in a regular expression are " "escaped. As a result, ``'!'``, ``'\"'``, ``'%'``, ``\"'\"``, ``','``, " @@ -1603,15 +1609,15 @@ msgid "" "are no longer escaped." msgstr "" -#: ../../library/re.rst:1174 +#: ../../library/re.rst:1180 msgid "Clear the regular expression cache." msgstr "" -#: ../../library/re.rst:1178 +#: ../../library/re.rst:1184 msgid "Exceptions" msgstr "" -#: ../../library/re.rst:1182 +#: ../../library/re.rst:1188 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 " @@ -1621,51 +1627,51 @@ msgid "" "attributes:" msgstr "" -#: ../../library/re.rst:1190 +#: ../../library/re.rst:1196 msgid "The unformatted error message." msgstr "" -#: ../../library/re.rst:1194 +#: ../../library/re.rst:1200 msgid "The regular expression pattern." msgstr "" -#: ../../library/re.rst:1198 +#: ../../library/re.rst:1204 msgid "The index in *pattern* where compilation failed (may be ``None``)." msgstr "" -#: ../../library/re.rst:1202 +#: ../../library/re.rst:1208 msgid "The line corresponding to *pos* (may be ``None``)." msgstr "" -#: ../../library/re.rst:1206 +#: ../../library/re.rst:1212 msgid "The column corresponding to *pos* (may be ``None``)." msgstr "" -#: ../../library/re.rst:1208 +#: ../../library/re.rst:1214 msgid "Added additional attributes." msgstr "新增額外屬性。" -#: ../../library/re.rst:1211 +#: ../../library/re.rst:1217 msgid "" "``PatternError`` was originally named ``error``; the latter is kept as an " "alias for backward compatibility." msgstr "" -#: ../../library/re.rst:1218 +#: ../../library/re.rst:1224 msgid "Regular Expression Objects" msgstr "" -#: ../../library/re.rst:1222 +#: ../../library/re.rst:1228 msgid "Compiled regular expression object returned by :func:`re.compile`." msgstr "" -#: ../../library/re.rst:1224 +#: ../../library/re.rst:1230 msgid "" ":py:class:`re.Pattern` supports ``[]`` to indicate a Unicode (str) or bytes " "pattern. See :ref:`types-genericalias`." msgstr "" -#: ../../library/re.rst:1230 +#: ../../library/re.rst:1236 msgid "" "Scan through *string* looking for the first location where this regular " "expression produces a match, and return a corresponding :class:`~re.Match`. " @@ -1674,7 +1680,7 @@ msgid "" "string." msgstr "" -#: ../../library/re.rst:1235 +#: ../../library/re.rst:1241 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 " @@ -1683,7 +1689,7 @@ msgid "" "necessarily at the index where the search is to start." msgstr "" -#: ../../library/re.rst:1241 +#: ../../library/re.rst:1247 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 " @@ -1693,7 +1699,7 @@ msgid "" "equivalent to ``rx.search(string[:50], 0)``. ::" msgstr "" -#: ../../library/re.rst:1248 +#: ../../library/re.rst:1254 msgid "" ">>> pattern = re.compile(\"d\")\n" ">>> pattern.search(\"dog\") # Match at index 0\n" @@ -1701,7 +1707,7 @@ msgid "" ">>> pattern.search(\"dog\", 1) # No match; search doesn't include the \"d\"" msgstr "" -#: ../../library/re.rst:1256 +#: ../../library/re.rst:1262 msgid "" "If zero or more characters at the *beginning* of *string* match this regular " "expression, return a corresponding :class:`~re.Match`. Return ``None`` if " @@ -1709,13 +1715,13 @@ msgid "" "zero-length match." msgstr "" -#: ../../library/re.rst:1261 ../../library/re.rst:1279 +#: ../../library/re.rst:1267 ../../library/re.rst:1285 msgid "" "The optional *pos* and *endpos* parameters have the same meaning as for the :" "meth:`~Pattern.search` method. ::" msgstr "" -#: ../../library/re.rst:1264 +#: ../../library/re.rst:1270 msgid "" ">>> pattern = re.compile(\"o\")\n" ">>> pattern.match(\"dog\") # No match as \"o\" is not at the start of " @@ -1725,20 +1731,20 @@ msgid "" "" msgstr "" -#: ../../library/re.rst:1269 +#: ../../library/re.rst:1275 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:1275 +#: ../../library/re.rst:1281 msgid "" "If the whole *string* matches this regular expression, return a " "corresponding :class:`~re.Match`. Return ``None`` if the string does not " "match the pattern; note that this is different from a zero-length match." msgstr "" -#: ../../library/re.rst:1282 +#: ../../library/re.rst:1288 msgid "" ">>> pattern = re.compile(\"o[gh]\")\n" ">>> pattern.fullmatch(\"dog\") # No match as \"o\" is not at the start " @@ -1749,72 +1755,72 @@ msgid "" "" msgstr "" -#: ../../library/re.rst:1293 +#: ../../library/re.rst:1299 msgid "Identical to the :func:`split` function, using the compiled pattern." msgstr "" -#: ../../library/re.rst:1298 +#: ../../library/re.rst:1304 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:1305 +#: ../../library/re.rst:1311 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:1312 +#: ../../library/re.rst:1318 msgid "Identical to the :func:`sub` function, using the compiled pattern." msgstr "" -#: ../../library/re.rst:1317 +#: ../../library/re.rst:1323 msgid "Identical to the :func:`subn` function, using the compiled pattern." msgstr "" -#: ../../library/re.rst:1322 +#: ../../library/re.rst:1328 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 :py:const:`~re.UNICODE` if the pattern is a Unicode string." msgstr "" -#: ../../library/re.rst:1329 +#: ../../library/re.rst:1335 msgid "The number of capturing groups in the pattern." msgstr "" -#: ../../library/re.rst:1334 +#: ../../library/re.rst:1340 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:1341 +#: ../../library/re.rst:1347 msgid "The pattern string from which the pattern object was compiled." msgstr "" -#: ../../library/re.rst:1344 +#: ../../library/re.rst:1350 msgid "" "Added support of :func:`copy.copy` and :func:`copy.deepcopy`. Compiled " "regular expression objects are considered atomic." msgstr "" -#: ../../library/re.rst:1352 +#: ../../library/re.rst:1358 msgid "Match Objects" msgstr "" -#: ../../library/re.rst:1354 +#: ../../library/re.rst:1360 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:1359 +#: ../../library/re.rst:1365 msgid "" "match = re.search(pattern, string)\n" "if match:\n" @@ -1824,17 +1830,17 @@ msgstr "" "if match:\n" " process(match)" -#: ../../library/re.rst:1365 +#: ../../library/re.rst:1371 msgid "Match object returned by successful ``match``\\ es and ``search``\\ es." msgstr "" -#: ../../library/re.rst:1367 +#: ../../library/re.rst:1373 msgid "" ":py:class:`re.Match` supports ``[]`` to indicate a Unicode (str) or bytes " "match. See :ref:`types-genericalias`." msgstr "" -#: ../../library/re.rst:1373 +#: ../../library/re.rst:1379 msgid "" "Return the string obtained by doing backslash substitution on the template " "string *template*, as done by the :meth:`~Pattern.sub` method. Escapes such " @@ -1844,7 +1850,7 @@ msgid "" "backreference ``\\g<0>`` will be replaced by the entire match." msgstr "" -#: ../../library/re.rst:1386 +#: ../../library/re.rst:1392 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 " @@ -1859,7 +1865,7 @@ msgid "" "the pattern that matched multiple times, the last match is returned. ::" msgstr "" -#: ../../library/re.rst:1398 +#: ../../library/re.rst:1404 msgid "" ">>> m = re.match(r\"(\\w+) (\\w+)\", \"Isaac Newton, physicist\")\n" ">>> m.group(0) # The entire match\n" @@ -1872,7 +1878,7 @@ msgid "" "('Isaac', 'Newton')" msgstr "" -#: ../../library/re.rst:1408 +#: ../../library/re.rst:1414 msgid "" "If the regular expression uses the ``(?P...)`` syntax, the *groupN* " "arguments may also be strings identifying groups by their group name. If a " @@ -1880,11 +1886,11 @@ msgid "" "`IndexError` exception is raised." msgstr "" -#: ../../library/re.rst:1413 +#: ../../library/re.rst:1419 msgid "A moderately complicated example::" msgstr "" -#: ../../library/re.rst:1415 +#: ../../library/re.rst:1421 msgid "" ">>> m = re.match(r\"(?P\\w+) (?P\\w+)\", \"Malcolm " "Reynolds\")\n" @@ -1900,11 +1906,11 @@ msgstr "" ">>> m.group('last_name')\n" "'Reynolds'" -#: ../../library/re.rst:1421 +#: ../../library/re.rst:1427 msgid "Named groups can also be referred to by their index::" msgstr "" -#: ../../library/re.rst:1423 +#: ../../library/re.rst:1429 msgid "" ">>> m.group(1)\n" "'Malcolm'\n" @@ -1916,24 +1922,24 @@ msgstr "" ">>> m.group(2)\n" "'Reynolds'" -#: ../../library/re.rst:1428 +#: ../../library/re.rst:1434 msgid "If a group matches multiple times, only the last match is accessible::" msgstr "" -#: ../../library/re.rst:1430 +#: ../../library/re.rst:1436 msgid "" ">>> m = re.match(r\"(..)+\", \"a1b2c3\") # Matches 3 times.\n" ">>> m.group(1) # Returns only the last match.\n" "'c3'" msgstr "" -#: ../../library/re.rst:1437 +#: ../../library/re.rst:1443 msgid "" "This is identical to ``m.group(g)``. This allows easier access to an " "individual group from a match::" msgstr "" -#: ../../library/re.rst:1440 +#: ../../library/re.rst:1446 msgid "" ">>> m = re.match(r\"(\\w+) (\\w+)\", \"Isaac Newton, physicist\")\n" ">>> m[0] # The entire match\n" @@ -1944,11 +1950,11 @@ msgid "" "'Newton'" msgstr "" -#: ../../library/re.rst:1448 +#: ../../library/re.rst:1454 msgid "Named groups are supported as well::" msgstr "" -#: ../../library/re.rst:1450 +#: ../../library/re.rst:1456 msgid "" ">>> m = re.match(r\"(?P\\w+) (?P\\w+)\", \"Isaac " "Newton\")\n" @@ -1964,18 +1970,18 @@ msgstr "" ">>> m['last_name']\n" "'Newton'" -#: ../../library/re.rst:1461 +#: ../../library/re.rst:1467 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:1465 ../../library/re.rst:1690 +#: ../../library/re.rst:1471 ../../library/re.rst:1696 msgid "For example::" msgstr "舉例來說: ::" -#: ../../library/re.rst:1467 +#: ../../library/re.rst:1473 msgid "" ">>> m = re.match(r\"(\\d+)\\.(\\d+)\", \"24.1632\")\n" ">>> m.groups()\n" @@ -1985,14 +1991,14 @@ msgstr "" ">>> m.groups()\n" "('24', '1632')" -#: ../../library/re.rst:1471 +#: ../../library/re.rst:1477 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:1475 +#: ../../library/re.rst:1481 msgid "" ">>> m = re.match(r\"(\\d+)\\.?(\\d+)?\", \"24\")\n" ">>> m.groups() # Second group defaults to None.\n" @@ -2001,14 +2007,14 @@ msgid "" "('24', '0')" msgstr "" -#: ../../library/re.rst:1484 +#: ../../library/re.rst:1490 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:1488 +#: ../../library/re.rst:1494 msgid "" ">>> m = re.match(r\"(?P\\w+) (?P\\w+)\", \"Malcolm " "Reynolds\")\n" @@ -2020,7 +2026,7 @@ msgstr "" ">>> m.groupdict()\n" "{'first_name': 'Malcolm', 'last_name': 'Reynolds'}" -#: ../../library/re.rst:1496 +#: ../../library/re.rst:1502 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 " @@ -2029,11 +2035,11 @@ msgid "" "matched by group *g* (equivalent to ``m.group(g)``) is ::" msgstr "" -#: ../../library/re.rst:1502 +#: ../../library/re.rst:1508 msgid "m.string[m.start(g):m.end(g)]" msgstr "m.string[m.start(g):m.end(g)]" -#: ../../library/re.rst:1504 +#: ../../library/re.rst:1510 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." @@ -2041,11 +2047,11 @@ msgid "" "2, and ``m.start(2)`` raises an :exc:`IndexError` exception." msgstr "" -#: ../../library/re.rst:1509 +#: ../../library/re.rst:1515 msgid "An example that will remove *remove_this* from email addresses::" msgstr "" -#: ../../library/re.rst:1511 +#: ../../library/re.rst:1517 msgid "" ">>> email = \"tony@tiremove_thisger.net\"\n" ">>> m = re.search(\"remove_this\", email)\n" @@ -2057,28 +2063,28 @@ msgstr "" ">>> email[:m.start()] + email[m.end():]\n" "'tony@tiger.net'" -#: ../../library/re.rst:1519 +#: ../../library/re.rst:1525 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:1526 +#: ../../library/re.rst:1532 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:1533 +#: ../../library/re.rst:1539 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:1540 +#: ../../library/re.rst:1546 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)" @@ -2087,43 +2093,43 @@ msgid "" "applied to the same string." msgstr "" -#: ../../library/re.rst:1549 +#: ../../library/re.rst:1555 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:1555 +#: ../../library/re.rst:1561 msgid "" "The :ref:`regular expression object ` whose :meth:`~Pattern." "match` or :meth:`~Pattern.search` method produced this match instance." msgstr "" -#: ../../library/re.rst:1561 +#: ../../library/re.rst:1567 msgid "The string passed to :meth:`~Pattern.match` or :meth:`~Pattern.search`." msgstr "" -#: ../../library/re.rst:1564 +#: ../../library/re.rst:1570 msgid "" "Added support of :func:`copy.copy` and :func:`copy.deepcopy`. Match objects " "are considered atomic." msgstr "" -#: ../../library/re.rst:1572 +#: ../../library/re.rst:1578 msgid "Regular Expression Examples" msgstr "" -#: ../../library/re.rst:1576 +#: ../../library/re.rst:1582 msgid "Checking for a Pair" msgstr "" -#: ../../library/re.rst:1578 +#: ../../library/re.rst:1584 msgid "" "In this example, we'll use the following helper function to display match " "objects a little more gracefully::" msgstr "" -#: ../../library/re.rst:1581 +#: ../../library/re.rst:1587 msgid "" "def displaymatch(match):\n" " if match is None:\n" @@ -2135,7 +2141,7 @@ msgstr "" " return None\n" " return '' % (match.group(), match.groups())" -#: ../../library/re.rst:1586 +#: ../../library/re.rst:1592 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 " @@ -2143,11 +2149,11 @@ msgid "" "\"2\" through \"9\" representing the card with that value." msgstr "" -#: ../../library/re.rst:1591 +#: ../../library/re.rst:1597 msgid "To see if a given string is a valid hand, one could do the following::" msgstr "" -#: ../../library/re.rst:1593 +#: ../../library/re.rst:1599 msgid "" ">>> valid = re.compile(r\"^[a2-9tjqk]{5}$\")\n" ">>> displaymatch(valid.match(\"akt5q\")) # Valid.\n" @@ -2158,14 +2164,14 @@ msgid "" "\"\"" msgstr "" -#: ../../library/re.rst:1601 +#: ../../library/re.rst:1607 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:1604 +#: ../../library/re.rst:1610 msgid "" ">>> pair = re.compile(r\".*(.).*\\1\")\n" ">>> displaymatch(pair.match(\"717ak\")) # Pair of 7s.\n" @@ -2175,13 +2181,13 @@ msgid "" "\"\"" msgstr "" -#: ../../library/re.rst:1611 +#: ../../library/re.rst:1617 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:1614 +#: ../../library/re.rst:1620 msgid "" ">>> pair = re.compile(r\".*(.).*\\1\")\n" ">>> pair.match(\"717ak\").group(1)\n" @@ -2199,11 +2205,11 @@ msgid "" "'a'" msgstr "" -#: ../../library/re.rst:1630 +#: ../../library/re.rst:1636 msgid "Simulating scanf()" msgstr "模擬 scanf()" -#: ../../library/re.rst:1634 +#: ../../library/re.rst:1640 msgid "" "Python does not currently have an equivalent to :c:func:`!scanf`. Regular " "expressions are generally more powerful, though also more verbose, than :c:" @@ -2212,130 +2218,130 @@ msgid "" "expressions." msgstr "" -#: ../../library/re.rst:1641 +#: ../../library/re.rst:1647 msgid ":c:func:`!scanf` Token" msgstr "" -#: ../../library/re.rst:1641 +#: ../../library/re.rst:1647 msgid "Regular Expression" msgstr "" -#: ../../library/re.rst:1643 +#: ../../library/re.rst:1649 msgid "``%c``" msgstr "``%c``" -#: ../../library/re.rst:1645 +#: ../../library/re.rst:1651 msgid "``%5c``" msgstr "``%5c``" -#: ../../library/re.rst:1645 +#: ../../library/re.rst:1651 msgid "``.{5}``" msgstr "``.{5}``" -#: ../../library/re.rst:1647 +#: ../../library/re.rst:1653 msgid "``%d``" msgstr "``%d``" -#: ../../library/re.rst:1647 +#: ../../library/re.rst:1653 msgid "``[-+]?\\d+``" msgstr "``[-+]?\\d+``" -#: ../../library/re.rst:1649 +#: ../../library/re.rst:1655 msgid "``%e``, ``%E``, ``%f``, ``%g``" msgstr "``%e``, ``%E``, ``%f``, ``%g``" -#: ../../library/re.rst:1649 +#: ../../library/re.rst:1655 msgid "``[-+]?(\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?``" msgstr "``[-+]?(\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?``" -#: ../../library/re.rst:1651 +#: ../../library/re.rst:1657 msgid "``%i``" msgstr "``%i``" -#: ../../library/re.rst:1651 +#: ../../library/re.rst:1657 msgid "``[-+]?(0[xX][\\dA-Fa-f]+|0[0-7]*|\\d+)``" msgstr "``[-+]?(0[xX][\\dA-Fa-f]+|0[0-7]*|\\d+)``" -#: ../../library/re.rst:1653 +#: ../../library/re.rst:1659 msgid "``%o``" msgstr "``%o``" -#: ../../library/re.rst:1653 +#: ../../library/re.rst:1659 msgid "``[-+]?[0-7]+``" msgstr "``[-+]?[0-7]+``" -#: ../../library/re.rst:1655 +#: ../../library/re.rst:1661 msgid "``%s``" msgstr "``%s``" -#: ../../library/re.rst:1655 +#: ../../library/re.rst:1661 msgid "``\\S+``" msgstr "``\\S+``" -#: ../../library/re.rst:1657 +#: ../../library/re.rst:1663 msgid "``%u``" msgstr "``%u``" -#: ../../library/re.rst:1657 +#: ../../library/re.rst:1663 msgid "``\\d+``" msgstr "``\\d+``" -#: ../../library/re.rst:1659 +#: ../../library/re.rst:1665 msgid "``%x``, ``%X``" msgstr "``%x``、``%X``" -#: ../../library/re.rst:1659 +#: ../../library/re.rst:1665 msgid "``[-+]?(0[xX])?[\\dA-Fa-f]+``" msgstr "``[-+]?(0[xX])?[\\dA-Fa-f]+``" -#: ../../library/re.rst:1662 +#: ../../library/re.rst:1668 msgid "To extract the filename and numbers from a string like ::" msgstr "" -#: ../../library/re.rst:1664 +#: ../../library/re.rst:1670 msgid "/usr/sbin/sendmail - 0 errors, 4 warnings" msgstr "/usr/sbin/sendmail - 0 errors, 4 warnings" -#: ../../library/re.rst:1666 +#: ../../library/re.rst:1672 msgid "you would use a :c:func:`!scanf` format like ::" msgstr "" -#: ../../library/re.rst:1668 +#: ../../library/re.rst:1674 msgid "%s - %d errors, %d warnings" msgstr "" -#: ../../library/re.rst:1670 +#: ../../library/re.rst:1676 msgid "The equivalent regular expression would be ::" msgstr "" -#: ../../library/re.rst:1672 +#: ../../library/re.rst:1678 msgid "(\\S+) - (\\d+) errors, (\\d+) warnings" msgstr "" -#: ../../library/re.rst:1678 +#: ../../library/re.rst:1684 msgid "search() vs. match()" msgstr "search() vs. match()" -#: ../../library/re.rst:1682 +#: ../../library/re.rst:1688 msgid "" "Python offers different primitive operations based on regular expressions:" msgstr "" -#: ../../library/re.rst:1684 +#: ../../library/re.rst:1690 msgid ":func:`re.match` checks for a match only at the beginning of the string" msgstr "" -#: ../../library/re.rst:1685 +#: ../../library/re.rst:1691 msgid "" ":func:`re.search` checks for a match anywhere in the string (this is what " "Perl does by default)" msgstr "" -#: ../../library/re.rst:1687 +#: ../../library/re.rst:1693 msgid ":func:`re.fullmatch` checks for entire string to be a match" msgstr "" -#: ../../library/re.rst:1692 +#: ../../library/re.rst:1698 msgid "" ">>> re.match(\"c\", \"abcdef\") # No match\n" ">>> re.search(\"c\", \"abcdef\") # Match\n" @@ -2345,13 +2351,13 @@ msgid "" ">>> re.fullmatch(\"r.*n\", \"python\") # No match" msgstr "" -#: ../../library/re.rst:1699 +#: ../../library/re.rst:1705 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:1702 +#: ../../library/re.rst:1708 msgid "" ">>> re.match(\"c\", \"abcdef\") # No match\n" ">>> re.search(\"^c\", \"abcdef\") # No match\n" @@ -2359,7 +2365,7 @@ msgid "" "" msgstr "" -#: ../../library/re.rst:1707 +#: ../../library/re.rst:1713 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 " @@ -2367,18 +2373,18 @@ msgid "" "line. ::" msgstr "" -#: ../../library/re.rst:1711 +#: ../../library/re.rst:1717 msgid "" ">>> re.match(\"X\", \"A\\nB\\nX\", re.MULTILINE) # No match\n" ">>> re.search(\"^X\", \"A\\nB\\nX\", re.MULTILINE) # Match\n" "" msgstr "" -#: ../../library/re.rst:1717 +#: ../../library/re.rst:1723 msgid "Making a Phonebook" msgstr "" -#: ../../library/re.rst:1719 +#: ../../library/re.rst:1725 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 " @@ -2386,13 +2392,13 @@ msgid "" "following example that creates a phonebook." msgstr "" -#: ../../library/re.rst:1724 +#: ../../library/re.rst:1730 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:1727 +#: ../../library/re.rst:1733 msgid "" ">>> text = \"\"\"Ross McFluff: 834.345.1254 155 Elm Street\n" "...\n" @@ -2410,13 +2416,13 @@ msgstr "" "...\n" "... Heather Albrecht: 548.326.4584 919 Park Place\"\"\"" -#: ../../library/re.rst:1737 +#: ../../library/re.rst:1743 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:1740 +#: ../../library/re.rst:1746 msgid "" ">>> entries = re.split(\"\\n+\", text)\n" ">>> entries\n" @@ -2432,15 +2438,14 @@ msgstr "" "'Frank Burger: 925.541.7625 662 South Dogwood Way',\n" "'Heather Albrecht: 548.326.4584 919 Park Place']" -#: ../../library/re.rst:1750 +#: ../../library/re.rst:1756 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:1754 -#, fuzzy +#: ../../library/re.rst:1760 msgid "" ">>> [re.split(\":? \", entry, maxsplit=3) for entry in entries]\n" "[['Ross', 'McFluff', '834.345.1254', '155 Elm Street'],\n" @@ -2448,21 +2453,20 @@ msgid "" "['Frank', 'Burger', '925.541.7625', '662 South Dogwood Way'],\n" "['Heather', 'Albrecht', '548.326.4584', '919 Park Place']]" msgstr "" -">>> [re.split(\":? \", entry, 3) for entry in entries]\n" +">>> [re.split(\":? \", entry, maxsplit=3) for entry in entries]\n" "[['Ross', 'McFluff', '834.345.1254', '155 Elm Street'],\n" "['Ronald', 'Heathmore', '892.345.3428', '436 Finley Avenue'],\n" "['Frank', 'Burger', '925.541.7625', '662 South Dogwood Way'],\n" "['Heather', 'Albrecht', '548.326.4584', '919 Park Place']]" -#: ../../library/re.rst:1763 +#: ../../library/re.rst:1769 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:1767 -#, fuzzy +#: ../../library/re.rst:1773 msgid "" ">>> [re.split(\":? \", entry, maxsplit=4) for entry in entries]\n" "[['Ross', 'McFluff', '834.345.1254', '155', 'Elm Street'],\n" @@ -2470,17 +2474,17 @@ msgid "" "['Frank', 'Burger', '925.541.7625', '662', 'South Dogwood Way'],\n" "['Heather', 'Albrecht', '548.326.4584', '919', 'Park Place']]" msgstr "" -">>> [re.split(\":? \", entry, 4) for entry in entries]\n" +">>> [re.split(\":? \", entry, maxsplit=4) for entry in entries]\n" "[['Ross', 'McFluff', '834.345.1254', '155', 'Elm Street'],\n" "['Ronald', 'Heathmore', '892.345.3428', '436', 'Finley Avenue'],\n" "['Frank', 'Burger', '925.541.7625', '662', 'South Dogwood Way'],\n" "['Heather', 'Albrecht', '548.326.4584', '919', 'Park Place']]" -#: ../../library/re.rst:1778 +#: ../../library/re.rst:1784 msgid "Text Munging" msgstr "" -#: ../../library/re.rst:1780 +#: ../../library/re.rst:1786 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 " @@ -2488,7 +2492,7 @@ msgid "" "each word of a sentence except for the first and last characters::" msgstr "" -#: ../../library/re.rst:1785 +#: ../../library/re.rst:1791 msgid "" ">>> def repl(m):\n" "... inner_word = list(m.group(2))\n" @@ -2512,11 +2516,11 @@ msgstr "" ">>> re.sub(r\"(\\w)(\\w+)(\\w)\", repl, text)\n" "'Pofsroser Aodlambelk, plasee reoprt yuor asnebces potlmrpy.'" -#: ../../library/re.rst:1798 +#: ../../library/re.rst:1804 msgid "Finding all Adverbs" msgstr "" -#: ../../library/re.rst:1800 +#: ../../library/re.rst:1806 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 " @@ -2524,7 +2528,7 @@ msgid "" "manner::" msgstr "" -#: ../../library/re.rst:1805 +#: ../../library/re.rst:1811 msgid "" ">>> text = \"He was carefully disguised but captured quickly by police.\"\n" ">>> re.findall(r\"\\w+ly\\b\", text)\n" @@ -2534,11 +2538,11 @@ msgstr "" ">>> re.findall(r\"\\w+ly\\b\", text)\n" "['carefully', 'quickly']" -#: ../../library/re.rst:1811 +#: ../../library/re.rst:1817 msgid "Finding all Adverbs and their Positions" msgstr "" -#: ../../library/re.rst:1813 +#: ../../library/re.rst:1819 msgid "" "If one wants more information about all matches of a pattern than the " "matched text, :func:`finditer` is useful as it provides :class:`~re.Match` " @@ -2547,7 +2551,7 @@ msgid "" "they would use :func:`finditer` in the following manner::" msgstr "" -#: ../../library/re.rst:1819 +#: ../../library/re.rst:1825 msgid "" ">>> text = \"He was carefully disguised but captured quickly by police.\"\n" ">>> for m in re.finditer(r\"\\w+ly\\b\", text):\n" @@ -2561,11 +2565,11 @@ msgstr "" "07-16: carefully\n" "40-47: quickly" -#: ../../library/re.rst:1827 +#: ../../library/re.rst:1833 msgid "Raw String Notation" msgstr "" -#: ../../library/re.rst:1829 +#: ../../library/re.rst:1835 msgid "" "Raw string notation (``r\"text\"``) keeps regular expressions sane. Without " "it, every backslash (``'\\'``) in a regular expression would have to be " @@ -2573,7 +2577,7 @@ msgid "" "lines of code are functionally identical::" msgstr "" -#: ../../library/re.rst:1834 +#: ../../library/re.rst:1840 msgid "" ">>> re.match(r\"\\W(.)\\1\\W\", \" ff \")\n" "\n" @@ -2585,7 +2589,7 @@ msgstr "" ">>> re.match(\"\\\\W(.)\\\\1\\\\W\", \" ff \")\n" "" -#: ../../library/re.rst:1839 +#: ../../library/re.rst:1845 msgid "" "When one wants to match a literal backslash, it must be escaped in the " "regular expression. With raw string notation, this means ``r\"\\\\\"``. " @@ -2593,7 +2597,7 @@ msgid "" "following lines of code functionally identical::" msgstr "" -#: ../../library/re.rst:1844 +#: ../../library/re.rst:1850 msgid "" ">>> re.match(r\"\\\\\", r\"\\\\\")\n" "\n" @@ -2605,25 +2609,25 @@ msgstr "" ">>> re.match(\"\\\\\\\\\", r\"\\\\\")\n" "" -#: ../../library/re.rst:1851 +#: ../../library/re.rst:1857 msgid "Writing a Tokenizer" msgstr "" -#: ../../library/re.rst:1853 +#: ../../library/re.rst:1859 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:1857 +#: ../../library/re.rst:1863 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:1861 +#: ../../library/re.rst:1867 msgid "" "from typing import NamedTuple\n" "import re\n" @@ -2679,11 +2683,11 @@ msgid "" " print(token)" msgstr "" -#: ../../library/re.rst:1913 +#: ../../library/re.rst:1919 msgid "The tokenizer produces the following output::" msgstr "" -#: ../../library/re.rst:1915 +#: ../../library/re.rst:1921 msgid "" "Token(type='IF', value='IF', line=2, column=4)\n" "Token(type='ID', value='quantity', line=2, column=7)\n" @@ -2725,7 +2729,7 @@ msgstr "" "Token(type='ENDIF', value='ENDIF', line=5, column=4)\n" "Token(type='END', value=';', line=5, column=9)" -#: ../../library/re.rst:1936 +#: ../../library/re.rst:1942 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 " @@ -2747,10 +2751,10 @@ msgstr ". (點)" #: ../../library/re.rst:448 ../../library/re.rst:455 ../../library/re.rst:462 #: ../../library/re.rst:489 ../../library/re.rst:499 ../../library/re.rst:522 #: ../../library/re.rst:534 ../../library/re.rst:539 ../../library/re.rst:561 -#: ../../library/re.rst:575 ../../library/re.rst:591 ../../library/re.rst:599 -#: ../../library/re.rst:613 ../../library/re.rst:621 ../../library/re.rst:638 -#: ../../library/re.rst:652 ../../library/re.rst:657 ../../library/re.rst:848 -#: ../../library/re.rst:1084 +#: ../../library/re.rst:581 ../../library/re.rst:597 ../../library/re.rst:605 +#: ../../library/re.rst:619 ../../library/re.rst:627 ../../library/re.rst:644 +#: ../../library/re.rst:658 ../../library/re.rst:663 ../../library/re.rst:854 +#: ../../library/re.rst:1090 msgid "in regular expressions" msgstr "於正規表示式中" @@ -2866,7 +2870,7 @@ msgstr "(?(" msgid "\\A" msgstr "\\A" -#: ../../library/re.rst:539 ../../library/re.rst:657 +#: ../../library/re.rst:539 ../../library/re.rst:663 msgid "\\b" msgstr "\\b" @@ -2874,87 +2878,87 @@ msgstr "\\b" msgid "\\B" msgstr "\\B" -#: ../../library/re.rst:575 +#: ../../library/re.rst:581 msgid "\\d" msgstr "\\d" -#: ../../library/re.rst:591 +#: ../../library/re.rst:597 msgid "\\D" msgstr "\\D" -#: ../../library/re.rst:599 +#: ../../library/re.rst:605 msgid "\\s" msgstr "\\s" -#: ../../library/re.rst:613 +#: ../../library/re.rst:619 msgid "\\S" msgstr "\\S" -#: ../../library/re.rst:621 +#: ../../library/re.rst:627 msgid "\\w" msgstr "\\w" -#: ../../library/re.rst:638 +#: ../../library/re.rst:644 msgid "\\W" msgstr "\\W" -#: ../../library/re.rst:652 +#: ../../library/re.rst:658 msgid "\\Z" msgstr "\\Z" -#: ../../library/re.rst:657 +#: ../../library/re.rst:663 msgid "\\a" msgstr "\\a" -#: ../../library/re.rst:657 +#: ../../library/re.rst:663 msgid "\\f" msgstr "\\f" -#: ../../library/re.rst:657 +#: ../../library/re.rst:663 msgid "\\n" msgstr "\\n" -#: ../../library/re.rst:657 +#: ../../library/re.rst:663 msgid "\\N" msgstr "\\N" -#: ../../library/re.rst:657 +#: ../../library/re.rst:663 msgid "\\r" msgstr "\\r" -#: ../../library/re.rst:657 +#: ../../library/re.rst:663 msgid "\\t" msgstr "\\t" -#: ../../library/re.rst:657 +#: ../../library/re.rst:663 msgid "\\u" msgstr "\\u" -#: ../../library/re.rst:657 +#: ../../library/re.rst:663 msgid "\\U" msgstr "\\U" -#: ../../library/re.rst:657 +#: ../../library/re.rst:663 msgid "\\v" msgstr "\\v" -#: ../../library/re.rst:657 +#: ../../library/re.rst:663 msgid "\\x" msgstr "\\x" -#: ../../library/re.rst:657 +#: ../../library/re.rst:663 msgid "\\\\" msgstr "\\\\" -#: ../../library/re.rst:848 +#: ../../library/re.rst:854 msgid "# (hash)" msgstr "# (井字號)" -#: ../../library/re.rst:1084 +#: ../../library/re.rst:1090 msgid "\\g" msgstr "\\g" -#: ../../library/re.rst:1632 +#: ../../library/re.rst:1638 msgid "scanf (C function)" msgstr "scanf(C 函式)" diff --git a/library/readline.po b/library/readline.po index 258923d199..40b729b026 100644 --- a/library/readline.po +++ b/library/readline.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-23 07:52+0800\n" +"POT-Creation-Date: 2024-09-24 07:20+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-" @@ -43,17 +43,17 @@ msgid "" "general." msgstr "" -#: ../../includes/wasm-ios-notavail.rst:3 -msgid ":ref:`Availability `: not WASI, not iOS." -msgstr "" +#: ../../includes/wasm-mobile-notavail.rst:3 +msgid ":ref:`Availability `: not Android, not iOS, not WASI." +msgstr ":ref:`適用 `:非 Android、非 iOS、非 WASI。" -#: ../../includes/wasm-ios-notavail.rst:5 +#: ../../includes/wasm-mobile-notavail.rst:5 msgid "" -"This module does not work or is not available on WebAssembly platforms, or " -"on iOS. See :ref:`wasm-availability` for more information on WASM " -"availability; see :ref:`iOS-availability` for more information on iOS " -"availability." +"This module is not supported on :ref:`mobile platforms ` or :ref:`WebAssembly platforms `." msgstr "" +"此模組在\\ :ref:`行動平台 `\\ 或\\ :ref:`WebAssembly 平" +"台 `\\ 上不支援。" #: ../../library/readline.rst:31 msgid "" diff --git a/library/select.po b/library/select.po index 9c9f95c416..17c60cfe83 100644 --- a/library/select.po +++ b/library/select.po @@ -42,18 +42,16 @@ msgid "" msgstr "" #: ../../includes/wasm-notavail.rst:3 -#, fuzzy msgid ":ref:`Availability `: not WASI." -msgstr ":ref:`適用 `:Unix。" +msgstr ":ref:`適用 `:非 WASI。" #: ../../includes/wasm-notavail.rst:5 -#, fuzzy msgid "" "This module does not work or is not available on WebAssembly. See :ref:`wasm-" "availability` for more information." msgstr "" -"此模組在 WebAssembly 平台 ``wasm32-emscripten`` 和 ``wasm32-wasi`` 上無法作用" -"或無法使用。有關更多資訊,請參閱 :ref:`wasm-availability`。" +"此模組在 WebAssembly 平台上不起作用或無法使用。更多資訊請參閱 :ref:`wasm-" +"availability`。" #: ../../library/select.rst:27 msgid "The module defines the following:" diff --git a/library/selectors.po b/library/selectors.po index 4ef9e9b455..bf3bb5b888 100644 --- a/library/selectors.po +++ b/library/selectors.po @@ -71,16 +71,15 @@ msgstr "" #: ../../includes/wasm-notavail.rst:3 msgid ":ref:`Availability `: not WASI." -msgstr "" +msgstr ":ref:`適用 `:非 WASI。" #: ../../includes/wasm-notavail.rst:5 -#, fuzzy msgid "" "This module does not work or is not available on WebAssembly. See :ref:`wasm-" "availability` for more information." msgstr "" -"此模組在 WebAssembly 平台 ``wasm32-emscripten`` 和 ``wasm32-wasi`` 上無法作用" -"或無法使用。有關更多資訊,請參閱 :ref:`wasm-availability`。" +"此模組在 WebAssembly 平台上不起作用或無法使用。更多資訊請參閱 :ref:`wasm-" +"availability`。" #: ../../library/selectors.rst:44 msgid "Classes" diff --git a/library/smtplib.po b/library/smtplib.po index 1f438f383e..b3e25996f0 100644 --- a/library/smtplib.po +++ b/library/smtplib.po @@ -36,16 +36,15 @@ msgstr "" #: ../../includes/wasm-notavail.rst:3 msgid ":ref:`Availability `: not WASI." -msgstr "" +msgstr ":ref:`適用 `:非 WASI。" #: ../../includes/wasm-notavail.rst:5 -#, fuzzy msgid "" "This module does not work or is not available on WebAssembly. See :ref:`wasm-" "availability` for more information." msgstr "" -"此模組在 WebAssembly 平台 ``wasm32-emscripten`` 和 ``wasm32-wasi`` 上無法作用" -"或無法使用。有關更多資訊,請參閱 :ref:`wasm-availability`。" +"此模組在 WebAssembly 平台上不起作用或無法使用。更多資訊請參閱 :ref:`wasm-" +"availability`。" #: ../../library/smtplib.rst:26 msgid "" diff --git a/library/sndhdr.po b/library/sndhdr.po deleted file mode 100644 index 13eead7a74..0000000000 --- a/library/sndhdr.po +++ /dev/null @@ -1,231 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) 2001-2022, Python Software Foundation -# This file is distributed under the same license as the Python package. -# -# Translators: -# Liang-Bo Wang , 2015 -# Matt Wang , 2021 -# -msgid "" -msgstr "" -"Project-Id-Version: Python 3.13\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-01 22:24+0800\n" -"PO-Revision-Date: 2022-06-11 15:40+0800\n" -"Last-Translator: Matt Wang \n" -"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" -"tw)\n" -"Language: zh_TW\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Poedit 3.1\n" - -#: ../../library/sndhdr.rst:2 -msgid ":mod:`sndhdr` --- Determine type of sound file" -msgstr ":mod:`sndhdr` --- 判定聲音檔案的型別" - -#: ../../library/sndhdr.rst:11 -msgid "**Source code:** :source:`Lib/sndhdr.py`" -msgstr "**原始碼:**\\ :source:`Lib/sndhdr.py`" - -#: ../../library/sndhdr.rst:17 -msgid "" -"The :mod:`sndhdr` module is deprecated (see :pep:`PEP 594 <594#sndhdr>` for " -"details and alternatives)." -msgstr "" -":mod:`sndhdr` 模組 (module) 即將被棄用(詳情與替代方案請見 :pep:`PEP 594 " -"<594#sndhdr>`)。" - -#: ../../library/sndhdr.rst:23 -msgid "" -"The :mod:`sndhdr` provides utility functions which attempt to determine the " -"type of sound data which is in a file. When these functions are able to " -"determine what type of sound data is stored in a file, they return a :func:" -"`~collections.namedtuple`, containing five attributes: (``filetype``, " -"``framerate``, ``nchannels``, ``nframes``, ``sampwidth``). The value for " -"*type* indicates the data type and will be one of the strings ``'aifc'``, " -"``'aiff'``, ``'au'``, ``'hcom'``, ``'sndr'``, ``'sndt'``, ``'voc'``, " -"``'wav'``, ``'8svx'``, ``'sb'``, ``'ub'``, or ``'ul'``. The *sampling_rate* " -"will be either the actual value or ``0`` if unknown or difficult to decode. " -"Similarly, *channels* will be either the number of channels or ``0`` if it " -"cannot be determined or if the value is difficult to decode. The value for " -"*frames* will be either the number of frames or ``-1``. The last item in " -"the tuple, *bits_per_sample*, will either be the sample size in bits or " -"``'A'`` for A-LAW or ``'U'`` for u-LAW." -msgstr "" -":mod:`sndhdr` 提供了企圖猜測檔案中聲音資料型別的工具函式。當這些函式可以推測" -"出儲存在檔案中聲音資料的型別,它們分別回傳一個 :func:`collections." -"namedtuple`,包含了五種屬性:(``filetype``、``framerate``、``nchannels``、" -"``nframes``、``sampwidth``)。這些 *type* 的值表示資料的型別,會是以下字串之" -"一:``'aifc'``、``'aiff'``、``'au'``、``'hcom'``、``'sndr'``、``'sndt'``、" -"``'voc'``、``'wav'``、``'8svx'``、``'sb'``、``'ub'`` 或 ``'ul'``。" -"*sampling_rate*\\ (取樣頻率)可能是實際值、或者當未知或者難以解碼時為 " -"``0``。同樣的,*channels*\\ (影像通道數)也會回傳實際值或者在無法推測或難以" -"解碼時回傳 ``0``。*frames*\\ (幀數)則是實際值或 ``-1``。tuple 的最後一項," -"*bits_per_sample* 為位元表示的取樣大小,或者在 A-LAW 時為 ``'A'``,u-LAW 時" -"為 ``'U'``。" - -#: ../../library/sndhdr.rst:40 -msgid "" -"Determines the type of sound data stored in the file *filename* using :func:" -"`whathdr`. If it succeeds, returns a namedtuple as described above, " -"otherwise ``None`` is returned." -msgstr "" -"使用 :func:`whathdr` 推測儲存在 *filename* 檔案中聲音資料的型別。如果成功,回" -"傳上述的 namedtuple(附名元組),否則回傳 ``None``。" - -#: ../../library/sndhdr.rst:44 ../../library/sndhdr.rst:54 -msgid "Result changed from a tuple to a namedtuple." -msgstr "結果從 tuple 改為 namedtuple。" - -#: ../../library/sndhdr.rst:50 -msgid "" -"Determines the type of sound data stored in a file based on the file " -"header. The name of the file is given by *filename*. This function returns " -"a namedtuple as described above on success, or ``None``." -msgstr "" -"根據檔案標頭 (header) 推測儲存在檔案中的聲音資料型別。檔名由 *filename* 給" -"定。這個函式在成功時回傳上述 namedtuple,或在失敗時回傳 ``None``。" - -#: ../../library/sndhdr.rst:57 -msgid "" -"The following sound header types are recognized, as listed below with the " -"return value from :func:`whathdr`: and :func:`what`:" -msgstr "" - -#: ../../library/sndhdr.rst:61 -msgid "Value" -msgstr "" - -#: ../../library/sndhdr.rst:61 -msgid "Sound header format" -msgstr "" - -#: ../../library/sndhdr.rst:63 -msgid "``'aifc'``" -msgstr "``'aifc'``" - -#: ../../library/sndhdr.rst:63 -msgid "Compressed Audio Interchange Files" -msgstr "" - -#: ../../library/sndhdr.rst:65 -msgid "``'aiff'``" -msgstr "``'aiff'``" - -#: ../../library/sndhdr.rst:65 -msgid "Audio Interchange Files" -msgstr "" - -#: ../../library/sndhdr.rst:67 -msgid "``'au'``" -msgstr "``'au'``" - -#: ../../library/sndhdr.rst:67 -msgid "Au Files" -msgstr "Au 檔案" - -#: ../../library/sndhdr.rst:69 -msgid "``'hcom'``" -msgstr "``'hcom'``" - -#: ../../library/sndhdr.rst:69 -msgid "HCOM Files" -msgstr "HCOM 檔案" - -#: ../../library/sndhdr.rst:71 -msgid "``'sndt'``" -msgstr "``'sndt'``" - -#: ../../library/sndhdr.rst:71 -msgid "Sndtool Sound Files" -msgstr "" - -#: ../../library/sndhdr.rst:73 -msgid "``'voc'``" -msgstr "``'voc'``" - -#: ../../library/sndhdr.rst:73 -msgid "Creative Labs Audio Files" -msgstr "" - -#: ../../library/sndhdr.rst:75 -msgid "``'wav'``" -msgstr "``'wav'``" - -#: ../../library/sndhdr.rst:75 -msgid "Waveform Audio File Format Files" -msgstr "" - -#: ../../library/sndhdr.rst:77 -msgid "``'8svx'``" -msgstr "``'8svx'``" - -#: ../../library/sndhdr.rst:77 -msgid "8-Bit Sampled Voice Files" -msgstr "" - -#: ../../library/sndhdr.rst:79 -msgid "``'sb'``" -msgstr "``'sb'``" - -#: ../../library/sndhdr.rst:79 -msgid "Signed Byte Audio Data Files" -msgstr "" - -#: ../../library/sndhdr.rst:81 -msgid "``'ub'``" -msgstr "``'ub'``" - -#: ../../library/sndhdr.rst:81 -msgid "UB Files" -msgstr "UB 檔案" - -#: ../../library/sndhdr.rst:83 -msgid "``'ul'``" -msgstr "``'ul'``" - -#: ../../library/sndhdr.rst:83 -msgid "uLAW Audio Files" -msgstr "uLAW 音檔" - -#: ../../library/sndhdr.rst:88 -msgid "" -"A list of functions performing the individual tests. Each function takes " -"two arguments: the byte-stream and an open file-like object. When :func:" -"`what` is called with a byte-stream, the file-like object will be ``None``." -msgstr "" - -#: ../../library/sndhdr.rst:92 -msgid "" -"The test function should return a string describing the image type if the " -"test succeeded, or ``None`` if it failed." -msgstr "" - -#: ../../library/sndhdr.rst:95 -msgid "Example:" -msgstr "範例:" - -#: ../../library/sndhdr.rst:97 -msgid "" -">>> import sndhdr\n" -">>> imghdr.what('bass.wav')\n" -"'wav'\n" -">>> imghdr.whathdr('bass.wav')\n" -"'wav'" -msgstr "" -">>> import sndhdr\n" -">>> imghdr.what('bass.wav')\n" -"'wav'\n" -">>> imghdr.whathdr('bass.wav')\n" -"'wav'" - -#: ../../library/sndhdr.rst:13 -msgid "A-LAW" -msgstr "A-LAW" - -#: ../../library/sndhdr.rst:13 -msgid "u-LAW" -msgstr "u-LAW" diff --git a/library/socket.po b/library/socket.po index d365183971..9d99c82d2a 100644 --- a/library/socket.po +++ b/library/socket.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-23 07:52+0800\n" +"POT-Creation-Date: 2024-09-24 07:20+0000\n" "PO-Revision-Date: 2018-05-23 16:10+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -51,13 +51,12 @@ msgid ":ref:`Availability `: not WASI." msgstr ":ref:`適用 `:非 WASI。" #: ../../includes/wasm-notavail.rst:5 -#, fuzzy msgid "" "This module does not work or is not available on WebAssembly. See :ref:`wasm-" "availability` for more information." msgstr "" -"此模組在 WebAssembly 平台 ``wasm32-emscripten`` 和 ``wasm32-wasi`` 上無法作用" -"或無法使用。有關更多資訊,請參閱 :ref:`wasm-availability`。" +"此模組在 WebAssembly 平台上不起作用或無法使用。更多資訊請參閱 :ref:`wasm-" +"availability`。" #: ../../library/socket.rst:24 msgid "" @@ -1552,10 +1551,10 @@ msgstr "" "引發一個附帶引數 ``name`` 的\\ :ref:`稽核事件 ` ``socket." "sethostname``。" -#: ../../library/socket.rst:1275 ../../library/socket.rst:1715 -#: ../../library/socket.rst:1759 -msgid ":ref:`Availability `: Unix." -msgstr ":ref:`適用 `:Unix。" +#: ../../library/socket.rst:1275 +#, fuzzy +msgid ":ref:`Availability `: Unix, not Android." +msgstr ":ref:`適用 `:Unix、非 WASI。" #: ../../library/socket.rst:1282 msgid "" @@ -2018,6 +2017,10 @@ msgid "" " return msg, list(fds)" msgstr "" +#: ../../library/socket.rst:1715 ../../library/socket.rst:1759 +msgid ":ref:`Availability `: Unix." +msgstr ":ref:`適用 `:Unix。" + #: ../../library/socket.rst:1729 msgid "" "Receive normal data and ancillary data from the socket, behaving as :meth:" diff --git a/library/socketserver.po b/library/socketserver.po index 656edd79ce..ac01c1ed20 100644 --- a/library/socketserver.po +++ b/library/socketserver.po @@ -33,16 +33,15 @@ msgstr "" #: ../../includes/wasm-notavail.rst:3 msgid ":ref:`Availability `: not WASI." -msgstr "" +msgstr ":ref:`適用 `:非 WASI。" #: ../../includes/wasm-notavail.rst:5 -#, fuzzy msgid "" "This module does not work or is not available on WebAssembly. See :ref:`wasm-" "availability` for more information." msgstr "" -"此模組在 WebAssembly 平台 ``wasm32-emscripten`` 和 ``wasm32-wasi`` 上無法作用" -"或無法使用。有關更多資訊,請參閱 :ref:`wasm-availability`。" +"此模組在 WebAssembly 平台上不起作用或無法使用。更多資訊請參閱 :ref:`wasm-" +"availability`。" #: ../../library/socketserver.rst:15 msgid "There are four basic concrete server classes:" diff --git a/library/spwd.po b/library/spwd.po deleted file mode 100644 index 3a1dae13ce..0000000000 --- a/library/spwd.po +++ /dev/null @@ -1,226 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) 2001-2022, Python Software Foundation -# This file is distributed under the same license as the Python package. -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: Python 3.13\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-07-20 00:03+0000\n" -"PO-Revision-Date: 2022-05-22 02:14+0800\n" -"Last-Translator: Adrian Liaw \n" -"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" -"tw)\n" -"Language: zh_TW\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Poedit 3.0.1\n" - -#: ../../library/spwd.rst:2 -msgid ":mod:`spwd` --- The shadow password database" -msgstr ":mod:`spwd` --- shadow 密碼資料庫" - -#: ../../library/spwd.rst:9 -msgid "" -"The :mod:`spwd` module is deprecated (see :pep:`PEP 594 <594#spwd>` for " -"details and alternatives)." -msgstr "" -":mod:`spwd` 模組 (module) 即將被棄用(詳情與替代方案請見 :pep:`PEP 594 " -"<594#spwd>`\\ )。" - -#: ../../library/spwd.rst:15 -msgid "" -"This module provides access to the Unix shadow password database. It is " -"available on various Unix versions." -msgstr "" - -#: ../../includes/wasm-notavail.rst:3 -msgid ":ref:`Availability `: not Emscripten, not WASI." -msgstr "" - -#: ../../includes/wasm-notavail.rst:5 -msgid "" -"This module does not work or is not available on WebAssembly platforms " -"``wasm32-emscripten`` and ``wasm32-wasi``. See :ref:`wasm-availability` for " -"more information." -msgstr "" -"此模組在 WebAssembly 平台 ``wasm32-emscripten`` 和 ``wasm32-wasi`` 上無法作用" -"或無法使用。有關更多資訊,請參閱 :ref:`wasm-availability`。" - -#: ../../library/spwd.rst:20 -msgid "" -"You must have enough privileges to access the shadow password database (this " -"usually means you have to be root)." -msgstr "" - -#: ../../library/spwd.rst:23 -msgid "" -"Shadow password database entries are reported as a tuple-like object, whose " -"attributes correspond to the members of the ``spwd`` structure (Attribute " -"field below, see ````):" -msgstr "" - -#: ../../library/spwd.rst:28 -msgid "Index" -msgstr "" - -#: ../../library/spwd.rst:28 -msgid "Attribute" -msgstr "屬性" - -#: ../../library/spwd.rst:28 -msgid "Meaning" -msgstr "含義" - -#: ../../library/spwd.rst:30 -msgid "0" -msgstr "0" - -#: ../../library/spwd.rst:30 -msgid "``sp_namp``" -msgstr "``sp_namp``" - -#: ../../library/spwd.rst:30 -msgid "Login name" -msgstr "" - -#: ../../library/spwd.rst:32 -msgid "1" -msgstr "1" - -#: ../../library/spwd.rst:32 -msgid "``sp_pwdp``" -msgstr "``sp_pwdp``" - -#: ../../library/spwd.rst:32 -msgid "Encrypted password" -msgstr "" - -#: ../../library/spwd.rst:34 -msgid "2" -msgstr "2" - -#: ../../library/spwd.rst:34 -msgid "``sp_lstchg``" -msgstr "``sp_lstchg``" - -#: ../../library/spwd.rst:34 -msgid "Date of last change" -msgstr "" - -#: ../../library/spwd.rst:36 -msgid "3" -msgstr "3" - -#: ../../library/spwd.rst:36 -msgid "``sp_min``" -msgstr "``sp_min``" - -#: ../../library/spwd.rst:36 -msgid "Minimal number of days between changes" -msgstr "" - -#: ../../library/spwd.rst:39 -msgid "4" -msgstr "4" - -#: ../../library/spwd.rst:39 -msgid "``sp_max``" -msgstr "``sp_max``" - -#: ../../library/spwd.rst:39 -msgid "Maximum number of days between changes" -msgstr "" - -#: ../../library/spwd.rst:42 -msgid "5" -msgstr "5" - -#: ../../library/spwd.rst:42 -msgid "``sp_warn``" -msgstr "``sp_warn``" - -#: ../../library/spwd.rst:42 -msgid "Number of days before password expires to warn user about it" -msgstr "" - -#: ../../library/spwd.rst:45 -msgid "6" -msgstr "6" - -#: ../../library/spwd.rst:45 -msgid "``sp_inact``" -msgstr "``sp_inact``" - -#: ../../library/spwd.rst:45 -msgid "Number of days after password expires until account is disabled" -msgstr "" - -#: ../../library/spwd.rst:49 -msgid "7" -msgstr "7" - -#: ../../library/spwd.rst:49 -msgid "``sp_expire``" -msgstr "``sp_expire``" - -#: ../../library/spwd.rst:49 -msgid "Number of days since 1970-01-01 when account expires" -msgstr "" - -#: ../../library/spwd.rst:52 -msgid "8" -msgstr "8" - -#: ../../library/spwd.rst:52 -msgid "``sp_flag``" -msgstr "``sp_flag``" - -#: ../../library/spwd.rst:52 -msgid "Reserved" -msgstr "" - -#: ../../library/spwd.rst:55 -msgid "" -"The sp_namp and sp_pwdp items are strings, all others are integers. :exc:" -"`KeyError` is raised if the entry asked for cannot be found." -msgstr "" - -#: ../../library/spwd.rst:58 -msgid "The following functions are defined:" -msgstr "" - -#: ../../library/spwd.rst:63 -msgid "Return the shadow password database entry for the given user name." -msgstr "" - -#: ../../library/spwd.rst:65 -msgid "" -"Raises a :exc:`PermissionError` instead of :exc:`KeyError` if the user " -"doesn't have privileges." -msgstr "" - -#: ../../library/spwd.rst:71 -msgid "" -"Return a list of all available shadow password database entries, in " -"arbitrary order." -msgstr "" - -#: ../../library/spwd.rst:77 -msgid "Module :mod:`grp`" -msgstr ":mod:`grp` 模組" - -#: ../../library/spwd.rst:78 -msgid "An interface to the group database, similar to this." -msgstr "" - -#: ../../library/spwd.rst:80 -msgid "Module :mod:`pwd`" -msgstr ":mod:`pwd` 模組" - -#: ../../library/spwd.rst:81 -msgid "An interface to the normal password database, similar to this." -msgstr "" diff --git a/library/sqlite3.po b/library/sqlite3.po index 547e4c0846..05aaa3758b 100644 --- a/library/sqlite3.po +++ b/library/sqlite3.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-23 07:52+0800\n" +"POT-Creation-Date: 2024-09-24 07:20+0000\n" "PO-Revision-Date: 2018-05-23 16:10+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -356,7 +356,7 @@ msgstr ":ref:`sqlite3-adapters`" msgid ":ref:`sqlite3-converters`" msgstr ":ref:`sqlite3-converters`" -#: ../../library/sqlite3.rst:244 ../../library/sqlite3.rst:616 +#: ../../library/sqlite3.rst:244 ../../library/sqlite3.rst:615 msgid ":ref:`sqlite3-connection-context-manager`" msgstr ":ref:`sqlite3-connection-context-manager`" @@ -723,8 +723,8 @@ msgid "SQLite threading mode" msgstr "" #: ../../library/sqlite3.rst:529 -msgid "`threadsafety`_" -msgstr "`threadsafety`_" +msgid ":pep:`threadsafety <0249#threadsafety>`" +msgstr "" #: ../../library/sqlite3.rst:529 msgid "`SQLITE_THREADSAFE`_" @@ -774,106 +774,106 @@ msgstr "3" msgid "Threads may share the module, connections and cursors" msgstr "" -#: ../../library/sqlite3.rst:545 +#: ../../library/sqlite3.rst:544 msgid "Set *threadsafety* dynamically instead of hard-coding it to ``1``." msgstr "" -#: ../../library/sqlite3.rst:550 +#: ../../library/sqlite3.rst:549 msgid "" "Version number of this module as a :class:`string `. This is not the " "version of the SQLite library." msgstr "" -#: ../../library/sqlite3.rst:553 ../../library/sqlite3.rst:563 +#: ../../library/sqlite3.rst:552 ../../library/sqlite3.rst:562 msgid "" "This constant used to reflect the version number of the ``pysqlite`` " "package, a third-party library which used to upstream changes to :mod:`!" "sqlite3`. Today, it carries no meaning or practical value." msgstr "" -#: ../../library/sqlite3.rst:560 +#: ../../library/sqlite3.rst:559 msgid "" "Version number of this module as a :class:`tuple` of :class:`integers " "`. This is not the version of the SQLite library." msgstr "" -#: ../../library/sqlite3.rst:587 +#: ../../library/sqlite3.rst:586 msgid "" "These constants are used for the :meth:`Connection.setconfig` and :meth:" "`~Connection.getconfig` methods." msgstr "" -#: ../../library/sqlite3.rst:590 +#: ../../library/sqlite3.rst:589 msgid "" "The availability of these constants varies depending on the version of " "SQLite Python was compiled with." msgstr "" -#: ../../library/sqlite3.rst:597 +#: ../../library/sqlite3.rst:596 msgid "https://www.sqlite.org/c3ref/c_dbconfig_defensive.html" msgstr "" -#: ../../library/sqlite3.rst:598 +#: ../../library/sqlite3.rst:597 msgid "SQLite docs: Database Connection Configuration Options" msgstr "" -#: ../../library/sqlite3.rst:604 +#: ../../library/sqlite3.rst:603 msgid "Connection objects" msgstr "Connection 物件" -#: ../../library/sqlite3.rst:608 +#: ../../library/sqlite3.rst:607 msgid "" "Each open SQLite database is represented by a ``Connection`` object, which " "is created using :func:`sqlite3.connect`. Their main purpose is creating :" "class:`Cursor` objects, and :ref:`sqlite3-controlling-transactions`." msgstr "" -#: ../../library/sqlite3.rst:615 +#: ../../library/sqlite3.rst:614 msgid ":ref:`sqlite3-connection-shortcuts`" msgstr ":ref:`sqlite3-connection-shortcuts`" -#: ../../library/sqlite3.rst:621 +#: ../../library/sqlite3.rst:620 msgid "" "A :exc:`ResourceWarning` is emitted if :meth:`close` is not called before a :" "class:`!Connection` object is deleted." msgstr "" -#: ../../library/sqlite3.rst:624 +#: ../../library/sqlite3.rst:623 msgid "An SQLite database connection has the following attributes and methods:" msgstr "" -#: ../../library/sqlite3.rst:628 +#: ../../library/sqlite3.rst:627 msgid "" "Create and return a :class:`Cursor` object. The cursor method accepts a " "single optional parameter *factory*. If supplied, this must be a :term:" "`callable` returning an instance of :class:`Cursor` or its subclasses." msgstr "" -#: ../../library/sqlite3.rst:635 +#: ../../library/sqlite3.rst:634 msgid "" "Open a :class:`Blob` handle to an existing :abbr:`BLOB (Binary Large " "OBject)`." msgstr "" -#: ../../library/sqlite3.rst:638 +#: ../../library/sqlite3.rst:637 msgid "The name of the table where the blob is located." msgstr "" -#: ../../library/sqlite3.rst:641 +#: ../../library/sqlite3.rst:640 msgid "The name of the column where the blob is located." msgstr "" -#: ../../library/sqlite3.rst:644 +#: ../../library/sqlite3.rst:643 msgid "The name of the row where the blob is located." msgstr "" -#: ../../library/sqlite3.rst:647 +#: ../../library/sqlite3.rst:646 msgid "" "Set to ``True`` if the blob should be opened without write permissions. " "Defaults to ``False``." msgstr "" -#: ../../library/sqlite3.rst:652 +#: ../../library/sqlite3.rst:651 msgid "" "The name of the database where the blob is located. Defaults to ``\"main\"``." msgstr "" @@ -882,17 +882,17 @@ msgstr "" msgid "Raises" msgstr "" -#: ../../library/sqlite3.rst:656 +#: ../../library/sqlite3.rst:655 msgid "When trying to open a blob in a ``WITHOUT ROWID`` table." msgstr "" -#: ../../library/sqlite3.rst:663 +#: ../../library/sqlite3.rst:662 msgid "" "The blob size cannot be changed using the :class:`Blob` class. Use the SQL " "function ``zeroblob`` to create a blob with a fixed size." msgstr "" -#: ../../library/sqlite3.rst:670 +#: ../../library/sqlite3.rst:669 msgid "" "Commit any pending transaction to the database. If :attr:`autocommit` is " "``True``, or there is no open transaction, this method does nothing. If :" @@ -900,7 +900,7 @@ msgid "" "pending transaction was committed by this method." msgstr "" -#: ../../library/sqlite3.rst:678 +#: ../../library/sqlite3.rst:677 msgid "" "Roll back to the start of any pending transaction. If :attr:`autocommit` is " "``True``, or there is no open transaction, this method does nothing. If :" @@ -908,7 +908,7 @@ msgid "" "pending transaction was rolled back by this method." msgstr "" -#: ../../library/sqlite3.rst:686 +#: ../../library/sqlite3.rst:685 msgid "" "Close the database connection. If :attr:`autocommit` is ``False``, any " "pending transaction is implicitly rolled back. If :attr:`!autocommit` is " @@ -917,63 +917,63 @@ msgid "" "losing pending changes." msgstr "" -#: ../../library/sqlite3.rst:696 +#: ../../library/sqlite3.rst:695 msgid "" "Create a new :class:`Cursor` object and call :meth:`~Cursor.execute` on it " "with the given *sql* and *parameters*. Return the new cursor object." msgstr "" -#: ../../library/sqlite3.rst:702 +#: ../../library/sqlite3.rst:701 msgid "" "Create a new :class:`Cursor` object and call :meth:`~Cursor.executemany` on " "it with the given *sql* and *parameters*. Return the new cursor object." msgstr "" -#: ../../library/sqlite3.rst:708 +#: ../../library/sqlite3.rst:707 msgid "" "Create a new :class:`Cursor` object and call :meth:`~Cursor.executescript` " "on it with the given *sql_script*. Return the new cursor object." msgstr "" -#: ../../library/sqlite3.rst:714 +#: ../../library/sqlite3.rst:713 msgid "Create or remove a user-defined SQL function." msgstr "" -#: ../../library/sqlite3.rst:716 +#: ../../library/sqlite3.rst:715 msgid "The name of the SQL function." msgstr "" -#: ../../library/sqlite3.rst:719 +#: ../../library/sqlite3.rst:718 msgid "" "The number of arguments the SQL function can accept. If ``-1``, it may take " "any number of arguments." msgstr "" -#: ../../library/sqlite3.rst:723 +#: ../../library/sqlite3.rst:722 msgid "" "A :term:`callable` that is called when the SQL function is invoked. The " "callable must return :ref:`a type natively supported by SQLite `. Set to ``None`` to remove an existing SQL function." msgstr "" -#: ../../library/sqlite3.rst:730 +#: ../../library/sqlite3.rst:729 msgid "" "If ``True``, the created SQL function is marked as `deterministic `_, which allows SQLite to perform additional " "optimizations." msgstr "" -#: ../../library/sqlite3.rst:735 +#: ../../library/sqlite3.rst:734 msgid "Added the *deterministic* parameter." msgstr "新增 *deterministic* 參數。" -#: ../../library/sqlite3.rst:738 ../../library/sqlite3.rst:782 -#: ../../library/sqlite3.rst:850 ../../library/sqlite3.rst:1129 -#: ../../library/sqlite3.rst:1551 ../../library/sqlite3.rst:1594 +#: ../../library/sqlite3.rst:737 ../../library/sqlite3.rst:781 +#: ../../library/sqlite3.rst:849 ../../library/sqlite3.rst:1128 +#: ../../library/sqlite3.rst:1550 ../../library/sqlite3.rst:1593 msgid "Example:" msgstr "範例:" -#: ../../library/sqlite3.rst:740 +#: ../../library/sqlite3.rst:739 msgid "" ">>> import hashlib\n" ">>> def md5sum(t):\n" @@ -995,27 +995,27 @@ msgstr "" "('acbd18db4cc2f85cedef654fccc4a4d8',)\n" ">>> con.close()" -#: ../../library/sqlite3.rst:754 +#: ../../library/sqlite3.rst:753 msgid "" "Passing *name*, *narg*, and *func* as keyword arguments is deprecated. These " "parameters will become positional-only in Python 3.15." msgstr "" -#: ../../library/sqlite3.rst:760 +#: ../../library/sqlite3.rst:759 msgid "Create or remove a user-defined SQL aggregate function." msgstr "" -#: ../../library/sqlite3.rst:762 +#: ../../library/sqlite3.rst:761 msgid "The name of the SQL aggregate function." msgstr "" -#: ../../library/sqlite3.rst:765 +#: ../../library/sqlite3.rst:764 msgid "" "The number of arguments the SQL aggregate function can accept. If ``-1``, it " "may take any number of arguments." msgstr "" -#: ../../library/sqlite3.rst:769 +#: ../../library/sqlite3.rst:768 msgid "" "A class must implement the following methods: * ``step()``: Add a row to " "the aggregate. * ``finalize()``: Return the final result of the aggregate " @@ -1024,31 +1024,31 @@ msgid "" "*n_arg*. Set to ``None`` to remove an existing SQL aggregate function." msgstr "" -#: ../../library/sqlite3.rst:770 +#: ../../library/sqlite3.rst:769 msgid "A class must implement the following methods:" msgstr "" -#: ../../library/sqlite3.rst:772 +#: ../../library/sqlite3.rst:771 msgid "``step()``: Add a row to the aggregate." msgstr "" -#: ../../library/sqlite3.rst:773 ../../library/sqlite3.rst:834 +#: ../../library/sqlite3.rst:772 ../../library/sqlite3.rst:833 msgid "" "``finalize()``: Return the final result of the aggregate as :ref:`a type " "natively supported by SQLite `." msgstr "" -#: ../../library/sqlite3.rst:776 +#: ../../library/sqlite3.rst:775 msgid "" "The number of arguments that the ``step()`` method must accept is controlled " "by *n_arg*." msgstr "" -#: ../../library/sqlite3.rst:779 +#: ../../library/sqlite3.rst:778 msgid "Set to ``None`` to remove an existing SQL aggregate function." msgstr "" -#: ../../library/sqlite3.rst:784 +#: ../../library/sqlite3.rst:783 msgid "" "class MySum:\n" " def __init__(self):\n" @@ -1090,27 +1090,27 @@ msgstr "" "\n" "con.close()" -#: ../../library/sqlite3.rst:813 +#: ../../library/sqlite3.rst:812 msgid "" "Passing *name*, *n_arg*, and *aggregate_class* as keyword arguments is " "deprecated. These parameters will become positional-only in Python 3.15." msgstr "" -#: ../../library/sqlite3.rst:819 +#: ../../library/sqlite3.rst:818 msgid "Create or remove a user-defined aggregate window function." msgstr "" -#: ../../library/sqlite3.rst:821 +#: ../../library/sqlite3.rst:820 msgid "The name of the SQL aggregate window function to create or remove." msgstr "" -#: ../../library/sqlite3.rst:824 +#: ../../library/sqlite3.rst:823 msgid "" "The number of arguments the SQL aggregate window function can accept. If " "``-1``, it may take any number of arguments." msgstr "" -#: ../../library/sqlite3.rst:828 +#: ../../library/sqlite3.rst:827 msgid "" "A class that must implement the following methods: * ``step()``: Add a row " "to the current window. * ``value()``: Return the current value of the " @@ -1122,39 +1122,39 @@ msgid "" "function." msgstr "" -#: ../../library/sqlite3.rst:829 +#: ../../library/sqlite3.rst:828 msgid "A class that must implement the following methods:" msgstr "" -#: ../../library/sqlite3.rst:831 +#: ../../library/sqlite3.rst:830 msgid "``step()``: Add a row to the current window." msgstr "" -#: ../../library/sqlite3.rst:832 +#: ../../library/sqlite3.rst:831 msgid "``value()``: Return the current value of the aggregate." msgstr "" -#: ../../library/sqlite3.rst:833 +#: ../../library/sqlite3.rst:832 msgid "``inverse()``: Remove a row from the current window." msgstr "" -#: ../../library/sqlite3.rst:837 +#: ../../library/sqlite3.rst:836 msgid "" "The number of arguments that the ``step()`` and ``value()`` methods must " "accept is controlled by *num_params*." msgstr "" -#: ../../library/sqlite3.rst:840 +#: ../../library/sqlite3.rst:839 msgid "Set to ``None`` to remove an existing SQL aggregate window function." msgstr "" -#: ../../library/sqlite3.rst:842 +#: ../../library/sqlite3.rst:841 msgid "" "If used with a version of SQLite older than 3.25.0, which does not support " "aggregate window functions." msgstr "" -#: ../../library/sqlite3.rst:852 +#: ../../library/sqlite3.rst:851 msgid "" "# Example taken from https://www.sqlite.org/windowfunctions.html#udfwinfunc\n" "class WindowSumInt:\n" @@ -1202,30 +1202,30 @@ msgid "" "con.close()" msgstr "" -#: ../../library/sqlite3.rst:906 +#: ../../library/sqlite3.rst:905 msgid "" "Create a collation named *name* using the collating function *callable*. " "*callable* is passed two :class:`string ` arguments, and it should " "return an :class:`integer `:" msgstr "" -#: ../../library/sqlite3.rst:910 +#: ../../library/sqlite3.rst:909 msgid "``1`` if the first is ordered higher than the second" msgstr "" -#: ../../library/sqlite3.rst:911 +#: ../../library/sqlite3.rst:910 msgid "``-1`` if the first is ordered lower than the second" msgstr "" -#: ../../library/sqlite3.rst:912 +#: ../../library/sqlite3.rst:911 msgid "``0`` if they are ordered equal" msgstr "" -#: ../../library/sqlite3.rst:914 +#: ../../library/sqlite3.rst:913 msgid "The following example shows a reverse sorting collation:" msgstr "" -#: ../../library/sqlite3.rst:916 +#: ../../library/sqlite3.rst:915 msgid "" "def collate_reverse(string1, string2):\n" " if string1 == string2:\n" @@ -1263,24 +1263,24 @@ msgstr "" " print(row)\n" "con.close()" -#: ../../library/sqlite3.rst:942 +#: ../../library/sqlite3.rst:941 msgid "Remove a collation function by setting *callable* to ``None``." msgstr "" -#: ../../library/sqlite3.rst:944 +#: ../../library/sqlite3.rst:943 msgid "" "The collation name can contain any Unicode character. Earlier, only ASCII " "characters were allowed." msgstr "" -#: ../../library/sqlite3.rst:951 +#: ../../library/sqlite3.rst:950 msgid "" "Call this method from a different thread to abort any queries that might be " "executing on the connection. Aborted queries will raise an :exc:" "`OperationalError`." msgstr "" -#: ../../library/sqlite3.rst:958 +#: ../../library/sqlite3.rst:957 msgid "" "Register :term:`callable` *authorizer_callback* to be invoked for each " "attempt to access a column of a table in the database. The callback should " @@ -1289,7 +1289,7 @@ msgid "" "underlying SQLite library." msgstr "" -#: ../../library/sqlite3.rst:965 +#: ../../library/sqlite3.rst:964 msgid "" "The first argument to the callback signifies what kind of operation is to be " "authorized. The second and third argument will be arguments or ``None`` " @@ -1299,7 +1299,7 @@ msgid "" "attempt or ``None`` if this access attempt is directly from input SQL code." msgstr "" -#: ../../library/sqlite3.rst:972 +#: ../../library/sqlite3.rst:971 msgid "" "Please consult the SQLite documentation about the possible values for the " "first argument and the meaning of the second and third argument depending on " @@ -1307,21 +1307,21 @@ msgid "" "module." msgstr "" -#: ../../library/sqlite3.rst:976 +#: ../../library/sqlite3.rst:975 msgid "Passing ``None`` as *authorizer_callback* will disable the authorizer." msgstr "" -#: ../../library/sqlite3.rst:978 +#: ../../library/sqlite3.rst:977 msgid "Added support for disabling the authorizer using ``None``." msgstr "" -#: ../../library/sqlite3.rst:981 +#: ../../library/sqlite3.rst:980 msgid "" "Passing *authorizer_callback* as a keyword argument is deprecated. The " "parameter will become positional-only in Python 3.15." msgstr "" -#: ../../library/sqlite3.rst:988 +#: ../../library/sqlite3.rst:987 msgid "" "Register :term:`callable` *progress_handler* to be invoked for every *n* " "instructions of the SQLite virtual machine. This is useful if you want to " @@ -1329,32 +1329,32 @@ msgid "" "a GUI." msgstr "" -#: ../../library/sqlite3.rst:993 +#: ../../library/sqlite3.rst:992 msgid "" "If you want to clear any previously installed progress handler, call the " "method with ``None`` for *progress_handler*." msgstr "" -#: ../../library/sqlite3.rst:996 +#: ../../library/sqlite3.rst:995 msgid "" "Returning a non-zero value from the handler function will terminate the " "currently executing query and cause it to raise a :exc:`DatabaseError` " "exception." msgstr "" -#: ../../library/sqlite3.rst:1000 +#: ../../library/sqlite3.rst:999 msgid "" "Passing *progress_handler* as a keyword argument is deprecated. The " "parameter will become positional-only in Python 3.15." msgstr "" -#: ../../library/sqlite3.rst:1007 +#: ../../library/sqlite3.rst:1006 msgid "" "Register :term:`callable` *trace_callback* to be invoked for each SQL " "statement that is actually executed by the SQLite backend." msgstr "" -#: ../../library/sqlite3.rst:1010 +#: ../../library/sqlite3.rst:1009 msgid "" "The only argument passed to the callback is the statement (as :class:`str`) " "that is being executed. The return value of the callback is ignored. Note " @@ -1364,24 +1364,24 @@ msgid "" "execution of triggers defined in the current database." msgstr "" -#: ../../library/sqlite3.rst:1018 +#: ../../library/sqlite3.rst:1017 msgid "Passing ``None`` as *trace_callback* will disable the trace callback." msgstr "" -#: ../../library/sqlite3.rst:1021 +#: ../../library/sqlite3.rst:1020 msgid "" "Exceptions raised in the trace callback are not propagated. As a development " "and debugging aid, use :meth:`~sqlite3.enable_callback_tracebacks` to enable " "printing tracebacks from exceptions raised in the trace callback." msgstr "" -#: ../../library/sqlite3.rst:1028 +#: ../../library/sqlite3.rst:1027 msgid "" "Passing *trace_callback* as a keyword argument is deprecated. The parameter " "will become positional-only in Python 3.15." msgstr "" -#: ../../library/sqlite3.rst:1035 +#: ../../library/sqlite3.rst:1034 msgid "" "Enable the SQLite engine to load SQLite extensions from shared libraries if " "*enabled* is ``True``; else, disallow loading SQLite extensions. SQLite " @@ -1390,7 +1390,7 @@ msgid "" "distributed with SQLite." msgstr "" -#: ../../library/sqlite3.rst:1044 +#: ../../library/sqlite3.rst:1043 msgid "" "The :mod:`!sqlite3` module is not built with loadable extension support by " "default, because some platforms (notably macOS) have SQLite libraries which " @@ -1399,7 +1399,7 @@ msgid "" "program:`configure`." msgstr "" -#: ../../library/sqlite3.rst:1051 +#: ../../library/sqlite3.rst:1050 msgid "" "Raises an :ref:`auditing event ` ``sqlite3.enable_load_extension`` " "with arguments ``connection``, ``enabled``." @@ -1407,11 +1407,11 @@ msgstr "" "引發一個附帶引數 ``connection``、``enabled`` 的\\ :ref:`稽核事件 ` " "``sqlite3.enable_load_extension``。" -#: ../../library/sqlite3.rst:1055 +#: ../../library/sqlite3.rst:1054 msgid "Added the ``sqlite3.enable_load_extension`` auditing event." msgstr "加入 ``sqlite3.enable_load_extension`` 稽核事件。" -#: ../../library/sqlite3.rst:1061 +#: ../../library/sqlite3.rst:1060 msgid "" "con.enable_load_extension(True)\n" "\n" @@ -1441,24 +1441,24 @@ msgid "" " print(row)" msgstr "" -#: ../../library/sqlite3.rst:1087 +#: ../../library/sqlite3.rst:1086 msgid "" "Load an SQLite extension from a shared library. Enable extension loading " "with :meth:`enable_load_extension` before calling this method." msgstr "" -#: ../../library/sqlite3.rst:1091 +#: ../../library/sqlite3.rst:1090 msgid "The path to the SQLite extension." msgstr "" -#: ../../library/sqlite3.rst:1095 +#: ../../library/sqlite3.rst:1094 msgid "" "Entry point name. If ``None`` (the default), SQLite will come up with an " "entry point name of its own; see the SQLite docs `Loading an Extension`_ for " "details." msgstr "" -#: ../../library/sqlite3.rst:1104 +#: ../../library/sqlite3.rst:1103 msgid "" "Raises an :ref:`auditing event ` ``sqlite3.load_extension`` with " "arguments ``connection``, ``path``." @@ -1466,29 +1466,29 @@ msgstr "" "引發一個附帶引數 ``connection``、``path`` 的\\ :ref:`稽核事件 ` " "``sqlite3.load_extension``。" -#: ../../library/sqlite3.rst:1108 +#: ../../library/sqlite3.rst:1107 msgid "Added the ``sqlite3.load_extension`` auditing event." msgstr "加入 ``sqlite3.load_extension`` 稽核事件。" -#: ../../library/sqlite3.rst:1111 +#: ../../library/sqlite3.rst:1110 msgid "Added the *entrypoint* parameter." msgstr "新增 *entrypoint* 參數。" -#: ../../library/sqlite3.rst:1118 +#: ../../library/sqlite3.rst:1117 msgid "" "Return an :term:`iterator` to dump the database as SQL source code. Useful " "when saving an in-memory database for later restoration. Similar to the ``." "dump`` command in the :program:`sqlite3` shell." msgstr "" -#: ../../library/sqlite3.rst:1122 +#: ../../library/sqlite3.rst:1121 msgid "" "An optional ``LIKE`` pattern for database objects to dump, e.g. " "``prefix_%``. If ``None`` (the default), all database objects will be " "included." msgstr "" -#: ../../library/sqlite3.rst:1131 +#: ../../library/sqlite3.rst:1130 msgid "" "# Convert file example.db to SQL dump file dump.sql\n" "con = sqlite3.connect('example.db')\n" @@ -1498,36 +1498,35 @@ msgid "" "con.close()" msgstr "" -#: ../../library/sqlite3.rst:1142 ../../library/sqlite3.rst:1216 +#: ../../library/sqlite3.rst:1141 ../../library/sqlite3.rst:1215 msgid ":ref:`sqlite3-howto-encoding`" msgstr ":ref:`sqlite3-howto-encoding`" -#: ../../library/sqlite3.rst:1144 -#, fuzzy +#: ../../library/sqlite3.rst:1143 msgid "Added the *filter* parameter." -msgstr "新增 *uri* 參數。" +msgstr "新增 *filter* 參數。" -#: ../../library/sqlite3.rst:1149 +#: ../../library/sqlite3.rst:1148 msgid "Create a backup of an SQLite database." msgstr "" -#: ../../library/sqlite3.rst:1151 +#: ../../library/sqlite3.rst:1150 msgid "" "Works even if the database is being accessed by other clients or " "concurrently by the same connection." msgstr "" -#: ../../library/sqlite3.rst:1154 +#: ../../library/sqlite3.rst:1153 msgid "The database connection to save the backup to." msgstr "" -#: ../../library/sqlite3.rst:1157 +#: ../../library/sqlite3.rst:1156 msgid "" "The number of pages to copy at a time. If equal to or less than ``0``, the " "entire database is copied in a single step. Defaults to ``-1``." msgstr "" -#: ../../library/sqlite3.rst:1163 +#: ../../library/sqlite3.rst:1162 msgid "" "If set to a :term:`callable`, it is invoked with three integer arguments for " "every backup iteration: the *status* of the last iteration, the *remaining* " @@ -1535,24 +1534,24 @@ msgid "" "Defaults to ``None``." msgstr "" -#: ../../library/sqlite3.rst:1172 +#: ../../library/sqlite3.rst:1171 msgid "" "The name of the database to back up. Either ``\"main\"`` (the default) for " "the main database, ``\"temp\"`` for the temporary database, or the name of a " "custom database as attached using the ``ATTACH DATABASE`` SQL statement." msgstr "" -#: ../../library/sqlite3.rst:1179 +#: ../../library/sqlite3.rst:1178 msgid "" "The number of seconds to sleep between successive attempts to back up " "remaining pages." msgstr "" -#: ../../library/sqlite3.rst:1183 +#: ../../library/sqlite3.rst:1182 msgid "Example 1, copy an existing database into another:" msgstr "" -#: ../../library/sqlite3.rst:1185 +#: ../../library/sqlite3.rst:1184 msgid "" "def progress(status, remaining, total):\n" " print(f'Copied {total-remaining} of {total} pages...')\n" @@ -1574,11 +1573,11 @@ msgstr "" "dst.close()\n" "src.close()" -#: ../../library/sqlite3.rst:1202 +#: ../../library/sqlite3.rst:1201 msgid "Example 2, copy an existing database into a transient copy:" msgstr "" -#: ../../library/sqlite3.rst:1204 +#: ../../library/sqlite3.rst:1203 msgid "" "src = sqlite3.connect('example.db')\n" "dst = sqlite3.connect(':memory:')\n" @@ -1592,25 +1591,25 @@ msgstr "" "dst.close()\n" "src.close()" -#: ../../library/sqlite3.rst:1220 +#: ../../library/sqlite3.rst:1219 msgid "Get a connection runtime limit." msgstr "" -#: ../../library/sqlite3.rst:1222 +#: ../../library/sqlite3.rst:1221 msgid "The `SQLite limit category`_ to be queried." msgstr "" -#: ../../library/sqlite3.rst:1227 ../../library/sqlite3.rst:1264 +#: ../../library/sqlite3.rst:1226 ../../library/sqlite3.rst:1263 msgid "If *category* is not recognised by the underlying SQLite library." msgstr "" -#: ../../library/sqlite3.rst:1230 +#: ../../library/sqlite3.rst:1229 msgid "" "Example, query the maximum length of an SQL statement for :class:" "`Connection` ``con`` (the default is 1000000000):" msgstr "" -#: ../../library/sqlite3.rst:1240 +#: ../../library/sqlite3.rst:1239 msgid "" ">>> con.getlimit(sqlite3.SQLITE_LIMIT_SQL_LENGTH)\n" "1000000000" @@ -1618,7 +1617,7 @@ msgstr "" ">>> con.getlimit(sqlite3.SQLITE_LIMIT_SQL_LENGTH)\n" "1000000000" -#: ../../library/sqlite3.rst:1250 +#: ../../library/sqlite3.rst:1249 msgid "" "Set a connection runtime limit. Attempts to increase a limit above its hard " "upper bound are silently truncated to the hard upper bound. Regardless of " @@ -1626,22 +1625,22 @@ msgid "" "returned." msgstr "" -#: ../../library/sqlite3.rst:1255 +#: ../../library/sqlite3.rst:1254 msgid "The `SQLite limit category`_ to be set." msgstr "" -#: ../../library/sqlite3.rst:1258 +#: ../../library/sqlite3.rst:1257 msgid "" "The value of the new limit. If negative, the current limit is unchanged." msgstr "" -#: ../../library/sqlite3.rst:1267 +#: ../../library/sqlite3.rst:1266 msgid "" "Example, limit the number of attached databases to 1 for :class:`Connection` " "``con`` (the default limit is 10):" msgstr "" -#: ../../library/sqlite3.rst:1270 +#: ../../library/sqlite3.rst:1269 msgid "" ">>> con.setlimit(sqlite3.SQLITE_LIMIT_ATTACHED, 1)\n" "10\n" @@ -1653,25 +1652,25 @@ msgstr "" ">>> con.getlimit(sqlite3.SQLITE_LIMIT_ATTACHED)\n" "1" -#: ../../library/sqlite3.rst:1288 +#: ../../library/sqlite3.rst:1287 msgid "Query a boolean connection configuration option." msgstr "" -#: ../../library/sqlite3.rst:1290 ../../library/sqlite3.rst:1301 +#: ../../library/sqlite3.rst:1289 ../../library/sqlite3.rst:1300 msgid "A :ref:`SQLITE_DBCONFIG code `." msgstr "" -#: ../../library/sqlite3.rst:1299 +#: ../../library/sqlite3.rst:1298 msgid "Set a boolean connection configuration option." msgstr "" -#: ../../library/sqlite3.rst:1304 +#: ../../library/sqlite3.rst:1303 msgid "" "``True`` if the configuration option should be enabled (default); ``False`` " "if it should be disabled." msgstr "" -#: ../../library/sqlite3.rst:1312 +#: ../../library/sqlite3.rst:1311 msgid "" "Serialize a database into a :class:`bytes` object. For an ordinary on-disk " "database file, the serialization is just a copy of the disk file. For an in-" @@ -1680,17 +1679,17 @@ msgid "" "backed up to disk." msgstr "" -#: ../../library/sqlite3.rst:1318 +#: ../../library/sqlite3.rst:1317 msgid "The database name to be serialized. Defaults to ``\"main\"``." msgstr "" -#: ../../library/sqlite3.rst:1326 +#: ../../library/sqlite3.rst:1325 msgid "" "This method is only available if the underlying SQLite library has the " "serialize API." msgstr "" -#: ../../library/sqlite3.rst:1334 +#: ../../library/sqlite3.rst:1333 msgid "" "Deserialize a :meth:`serialized ` database into a :class:" "`Connection`. This method causes the database connection to disconnect from " @@ -1698,96 +1697,96 @@ msgid "" "serialization contained in *data*." msgstr "" -#: ../../library/sqlite3.rst:1340 +#: ../../library/sqlite3.rst:1339 msgid "A serialized database." msgstr "" -#: ../../library/sqlite3.rst:1343 +#: ../../library/sqlite3.rst:1342 msgid "The database name to deserialize into. Defaults to ``\"main\"``." msgstr "" -#: ../../library/sqlite3.rst:1347 +#: ../../library/sqlite3.rst:1346 msgid "" "If the database connection is currently involved in a read transaction or a " "backup operation." msgstr "" -#: ../../library/sqlite3.rst:1351 +#: ../../library/sqlite3.rst:1350 msgid "If *data* does not contain a valid SQLite database." msgstr "" -#: ../../library/sqlite3.rst:1354 +#: ../../library/sqlite3.rst:1353 msgid "If :func:`len(data) ` is larger than ``2**63 - 1``." msgstr "" -#: ../../library/sqlite3.rst:1359 +#: ../../library/sqlite3.rst:1358 msgid "" "This method is only available if the underlying SQLite library has the " "deserialize API." msgstr "" -#: ../../library/sqlite3.rst:1366 +#: ../../library/sqlite3.rst:1365 msgid "" "This attribute controls :pep:`249`-compliant transaction behaviour. :attr:`!" "autocommit` has three allowed values:" msgstr "" -#: ../../library/sqlite3.rst:1369 +#: ../../library/sqlite3.rst:1368 msgid "" "``False``: Select :pep:`249`-compliant transaction behaviour, implying that :" "mod:`!sqlite3` ensures a transaction is always open. Use :meth:`commit` and :" "meth:`rollback` to close transactions." msgstr "" -#: ../../library/sqlite3.rst:1373 +#: ../../library/sqlite3.rst:1372 msgid "This is the recommended value of :attr:`!autocommit`." msgstr "" -#: ../../library/sqlite3.rst:1375 +#: ../../library/sqlite3.rst:1374 msgid "" "``True``: Use SQLite's `autocommit mode`_. :meth:`commit` and :meth:" "`rollback` have no effect in this mode." msgstr "" -#: ../../library/sqlite3.rst:1378 +#: ../../library/sqlite3.rst:1377 msgid "" ":data:`LEGACY_TRANSACTION_CONTROL`: Pre-Python 3.12 (non-:pep:`249`-" "compliant) transaction control. See :attr:`isolation_level` for more details." msgstr "" -#: ../../library/sqlite3.rst:1382 +#: ../../library/sqlite3.rst:1381 msgid "This is currently the default value of :attr:`!autocommit`." msgstr "" -#: ../../library/sqlite3.rst:1384 +#: ../../library/sqlite3.rst:1383 msgid "" "Changing :attr:`!autocommit` to ``False`` will open a new transaction, and " "changing it to ``True`` will commit any pending transaction." msgstr "" -#: ../../library/sqlite3.rst:1387 +#: ../../library/sqlite3.rst:1386 msgid "See :ref:`sqlite3-transaction-control-autocommit` for more details." msgstr "更多詳情請見 :ref:`sqlite3-transaction-control-autocommit`。" -#: ../../library/sqlite3.rst:1391 +#: ../../library/sqlite3.rst:1390 msgid "" "The :attr:`isolation_level` attribute has no effect unless :attr:" "`autocommit` is :data:`LEGACY_TRANSACTION_CONTROL`." msgstr "" -#: ../../library/sqlite3.rst:1398 +#: ../../library/sqlite3.rst:1397 msgid "" "This read-only attribute corresponds to the low-level SQLite `autocommit " "mode`_." msgstr "" -#: ../../library/sqlite3.rst:1401 +#: ../../library/sqlite3.rst:1400 msgid "" "``True`` if a transaction is active (there are uncommitted changes), " "``False`` otherwise." msgstr "" -#: ../../library/sqlite3.rst:1408 +#: ../../library/sqlite3.rst:1407 msgid "" "Controls the :ref:`legacy transaction handling mode ` of :mod:`!sqlite3`. If set to ``None``, " @@ -1797,13 +1796,13 @@ msgid "" "` is performed." msgstr "" -#: ../../library/sqlite3.rst:1416 +#: ../../library/sqlite3.rst:1415 msgid "" "If not overridden by the *isolation_level* parameter of :func:`connect`, the " "default is ``\"\"``, which is an alias for ``\"DEFERRED\"``." msgstr "" -#: ../../library/sqlite3.rst:1421 +#: ../../library/sqlite3.rst:1420 msgid "" "Using :attr:`autocommit` to control transaction handling is recommended over " "using :attr:`!isolation_level`. :attr:`!isolation_level` has no effect " @@ -1811,7 +1810,7 @@ msgid "" "default)." msgstr "" -#: ../../library/sqlite3.rst:1428 +#: ../../library/sqlite3.rst:1427 msgid "" "The initial :attr:`~Cursor.row_factory` for :class:`Cursor` objects created " "from this connection. Assigning to this attribute does not affect the :attr:" @@ -1820,33 +1819,33 @@ msgid "" "`tuple`." msgstr "" -#: ../../library/sqlite3.rst:1435 ../../library/sqlite3.rst:1721 -#: ../../library/sqlite3.rst:1744 +#: ../../library/sqlite3.rst:1434 ../../library/sqlite3.rst:1720 +#: ../../library/sqlite3.rst:1743 msgid "See :ref:`sqlite3-howto-row-factory` for more details." msgstr "更多詳情請見 :ref:`sqlite3-howto-row-factory`。" -#: ../../library/sqlite3.rst:1439 +#: ../../library/sqlite3.rst:1438 msgid "" "A :term:`callable` that accepts a :class:`bytes` parameter and returns a " "text representation of it. The callable is invoked for SQLite values with " "the ``TEXT`` data type. By default, this attribute is set to :class:`str`." msgstr "" -#: ../../library/sqlite3.rst:1444 +#: ../../library/sqlite3.rst:1443 msgid "See :ref:`sqlite3-howto-encoding` for more details." msgstr "更多詳情請見 :ref:`sqlite3-howto-encoding`。" -#: ../../library/sqlite3.rst:1448 +#: ../../library/sqlite3.rst:1447 msgid "" "Return the total number of database rows that have been modified, inserted, " "or deleted since the database connection was opened." msgstr "" -#: ../../library/sqlite3.rst:1455 +#: ../../library/sqlite3.rst:1454 msgid "Cursor objects" msgstr "Cursor 物件" -#: ../../library/sqlite3.rst:1457 +#: ../../library/sqlite3.rst:1456 msgid "" "A ``Cursor`` object represents a `database cursor`_ which is used to execute " "SQL statements, and manage the context of a fetch operation. Cursors are " @@ -1854,14 +1853,14 @@ msgid "" "`connection shortcut methods `." msgstr "" -#: ../../library/sqlite3.rst:1464 +#: ../../library/sqlite3.rst:1463 msgid "" "Cursor objects are :term:`iterators `, meaning that if you :meth:" "`~Cursor.execute` a ``SELECT`` query, you can simply iterate over the cursor " "to fetch the resulting rows:" msgstr "" -#: ../../library/sqlite3.rst:1475 +#: ../../library/sqlite3.rst:1474 msgid "" "for row in cur.execute(\"SELECT t FROM data\"):\n" " print(row)" @@ -1869,32 +1868,32 @@ msgstr "" "for row in cur.execute(\"SELECT t FROM data\"):\n" " print(row)" -#: ../../library/sqlite3.rst:1489 +#: ../../library/sqlite3.rst:1488 msgid "A :class:`Cursor` instance has the following attributes and methods." msgstr "" -#: ../../library/sqlite3.rst:1496 +#: ../../library/sqlite3.rst:1495 msgid "" "Execute a single SQL statement, optionally binding Python values using :ref:" "`placeholders `." msgstr "" -#: ../../library/sqlite3.rst:1500 +#: ../../library/sqlite3.rst:1499 msgid "A single SQL statement." msgstr "單一個 SQL 陳述式。" -#: ../../library/sqlite3.rst:1503 +#: ../../library/sqlite3.rst:1502 msgid "" "Python values to bind to placeholders in *sql*. A :class:`!dict` if named " "placeholders are used. A :term:`!sequence` if unnamed placeholders are used. " "See :ref:`sqlite3-placeholders`." msgstr "" -#: ../../library/sqlite3.rst:1510 +#: ../../library/sqlite3.rst:1509 msgid "If *sql* contains more than one SQL statement." msgstr "" -#: ../../library/sqlite3.rst:1513 +#: ../../library/sqlite3.rst:1512 msgid "" "If :attr:`~Connection.autocommit` is :data:`LEGACY_TRANSACTION_CONTROL`, :" "attr:`~Connection.isolation_level` is not ``None``, *sql* is an ``INSERT``, " @@ -1902,7 +1901,7 @@ msgid "" "transaction, a transaction is implicitly opened before executing *sql*." msgstr "" -#: ../../library/sqlite3.rst:1522 +#: ../../library/sqlite3.rst:1521 msgid "" ":exc:`DeprecationWarning` is emitted if :ref:`named placeholders ` are used and *parameters* is a sequence instead of a :class:" @@ -1910,37 +1909,37 @@ msgid "" "instead." msgstr "" -#: ../../library/sqlite3.rst:1528 +#: ../../library/sqlite3.rst:1527 msgid "Use :meth:`executescript` to execute multiple SQL statements." msgstr "" -#: ../../library/sqlite3.rst:1532 +#: ../../library/sqlite3.rst:1531 msgid "" "For every item in *parameters*, repeatedly execute the :ref:`parameterized " "` :abbr:`DML (Data Manipulation Language)` SQL " "statement *sql*." msgstr "" -#: ../../library/sqlite3.rst:1536 +#: ../../library/sqlite3.rst:1535 msgid "Uses the same implicit transaction handling as :meth:`~Cursor.execute`." msgstr "" -#: ../../library/sqlite3.rst:1538 +#: ../../library/sqlite3.rst:1537 msgid "A single SQL DML statement." msgstr "" -#: ../../library/sqlite3.rst:1541 +#: ../../library/sqlite3.rst:1540 msgid "" "An :term:`!iterable` of parameters to bind with the placeholders in *sql*. " "See :ref:`sqlite3-placeholders`." msgstr "" -#: ../../library/sqlite3.rst:1547 +#: ../../library/sqlite3.rst:1546 msgid "" "If *sql* contains more than one SQL statement, or is not a DML statement." msgstr "" -#: ../../library/sqlite3.rst:1553 +#: ../../library/sqlite3.rst:1552 msgid "" "rows = [\n" " (\"row1\",),\n" @@ -1956,13 +1955,13 @@ msgstr "" "# cur 是一個 sqlite3.Cursor 物件\n" "cur.executemany(\"INSERT INTO data VALUES(?)\", rows)" -#: ../../library/sqlite3.rst:1568 +#: ../../library/sqlite3.rst:1567 msgid "" "Any resulting rows are discarded, including DML statements with `RETURNING " "clauses`_." msgstr "" -#: ../../library/sqlite3.rst:1575 +#: ../../library/sqlite3.rst:1574 msgid "" ":exc:`DeprecationWarning` is emitted if :ref:`named placeholders ` are used and the items in *parameters* are sequences instead " @@ -1970,7 +1969,7 @@ msgid "" "be raised instead." msgstr "" -#: ../../library/sqlite3.rst:1584 +#: ../../library/sqlite3.rst:1583 msgid "" "Execute the SQL statements in *sql_script*. If the :attr:`~Connection." "autocommit` is :data:`LEGACY_TRANSACTION_CONTROL` and there is a pending " @@ -1979,11 +1978,11 @@ msgid "" "added to *sql_script*." msgstr "" -#: ../../library/sqlite3.rst:1592 +#: ../../library/sqlite3.rst:1591 msgid "*sql_script* must be a :class:`string `." msgstr "" -#: ../../library/sqlite3.rst:1596 +#: ../../library/sqlite3.rst:1595 msgid "" "# cur is an sqlite3.Cursor object\n" "cur.executescript(\"\"\"\n" @@ -2003,20 +2002,20 @@ msgstr "" " COMMIT;\n" "\"\"\")" -#: ../../library/sqlite3.rst:1609 +#: ../../library/sqlite3.rst:1608 msgid "" "If :attr:`~Cursor.row_factory` is ``None``, return the next row query result " "set as a :class:`tuple`. Else, pass it to the row factory and return its " "result. Return ``None`` if no more data is available." msgstr "" -#: ../../library/sqlite3.rst:1617 +#: ../../library/sqlite3.rst:1616 msgid "" "Return the next set of rows of a query result as a :class:`list`. Return an " "empty list if no more rows are available." msgstr "" -#: ../../library/sqlite3.rst:1620 +#: ../../library/sqlite3.rst:1619 msgid "" "The number of rows to fetch per call is specified by the *size* parameter. " "If *size* is not given, :attr:`arraysize` determines the number of rows to " @@ -2024,7 +2023,7 @@ msgid "" "available are returned." msgstr "" -#: ../../library/sqlite3.rst:1626 +#: ../../library/sqlite3.rst:1625 msgid "" "Note there are performance considerations involved with the *size* " "parameter. For optimal performance, it is usually best to use the arraysize " @@ -2032,36 +2031,36 @@ msgid "" "the same value from one :meth:`fetchmany` call to the next." msgstr "" -#: ../../library/sqlite3.rst:1633 +#: ../../library/sqlite3.rst:1632 msgid "" "Return all (remaining) rows of a query result as a :class:`list`. Return an " "empty list if no rows are available. Note that the :attr:`arraysize` " "attribute can affect the performance of this operation." msgstr "" -#: ../../library/sqlite3.rst:1640 +#: ../../library/sqlite3.rst:1639 msgid "Close the cursor now (rather than whenever ``__del__`` is called)." msgstr "" -#: ../../library/sqlite3.rst:1642 +#: ../../library/sqlite3.rst:1641 msgid "" "The cursor will be unusable from this point forward; a :exc:" "`ProgrammingError` exception will be raised if any operation is attempted " "with the cursor." msgstr "" -#: ../../library/sqlite3.rst:1647 ../../library/sqlite3.rst:1651 +#: ../../library/sqlite3.rst:1646 ../../library/sqlite3.rst:1650 msgid "Required by the DB-API. Does nothing in :mod:`!sqlite3`." msgstr "" -#: ../../library/sqlite3.rst:1655 +#: ../../library/sqlite3.rst:1654 msgid "" "Read/write attribute that controls the number of rows returned by :meth:" "`fetchmany`. The default value is 1 which means a single row would be " "fetched per call." msgstr "" -#: ../../library/sqlite3.rst:1660 +#: ../../library/sqlite3.rst:1659 msgid "" "Read-only attribute that provides the SQLite database :class:`Connection` " "belonging to the cursor. A :class:`Cursor` object created by calling :meth:" @@ -2069,7 +2068,7 @@ msgid "" "that refers to *con*:" msgstr "" -#: ../../library/sqlite3.rst:1665 +#: ../../library/sqlite3.rst:1664 msgid "" ">>> con = sqlite3.connect(\":memory:\")\n" ">>> cur = con.cursor()\n" @@ -2083,18 +2082,18 @@ msgstr "" "True\n" ">>> con.close()" -#: ../../library/sqlite3.rst:1675 +#: ../../library/sqlite3.rst:1674 msgid "" "Read-only attribute that provides the column names of the last query. To " "remain compatible with the Python DB API, it returns a 7-tuple for each " "column where the last six items of each tuple are ``None``." msgstr "" -#: ../../library/sqlite3.rst:1679 +#: ../../library/sqlite3.rst:1678 msgid "It is set for ``SELECT`` statements without any matching rows as well." msgstr "" -#: ../../library/sqlite3.rst:1683 +#: ../../library/sqlite3.rst:1682 msgid "" "Read-only attribute that provides the row id of the last inserted row. It is " "only updated after successful ``INSERT`` or ``REPLACE`` statements using " @@ -2104,15 +2103,15 @@ msgid "" "``None``." msgstr "" -#: ../../library/sqlite3.rst:1691 +#: ../../library/sqlite3.rst:1690 msgid "Inserts into ``WITHOUT ROWID`` tables are not recorded." msgstr "" -#: ../../library/sqlite3.rst:1693 +#: ../../library/sqlite3.rst:1692 msgid "Added support for the ``REPLACE`` statement." msgstr "新增 ``REPLACE`` 陳述式的支援。" -#: ../../library/sqlite3.rst:1698 +#: ../../library/sqlite3.rst:1697 msgid "" "Read-only attribute that provides the number of modified rows for " "``INSERT``, ``UPDATE``, ``DELETE``, and ``REPLACE`` statements; is ``-1`` " @@ -2122,7 +2121,7 @@ msgid "" "resulting rows must be fetched in order for :attr:`!rowcount` to be updated." msgstr "" -#: ../../library/sqlite3.rst:1709 +#: ../../library/sqlite3.rst:1708 msgid "" "Control how a row fetched from this :class:`!Cursor` is represented. If " "``None``, a row is represented as a :class:`tuple`. Can be set to the " @@ -2131,18 +2130,18 @@ msgid "" "and returns a custom object representing an SQLite row." msgstr "" -#: ../../library/sqlite3.rst:1716 +#: ../../library/sqlite3.rst:1715 msgid "" "Defaults to what :attr:`Connection.row_factory` was set to when the :class:`!" "Cursor` was created. Assigning to this attribute does not affect :attr:" "`Connection.row_factory` of the parent connection." msgstr "" -#: ../../library/sqlite3.rst:1732 +#: ../../library/sqlite3.rst:1731 msgid "Row objects" msgstr "Row 物件" -#: ../../library/sqlite3.rst:1736 +#: ../../library/sqlite3.rst:1735 msgid "" "A :class:`!Row` instance serves as a highly optimized :attr:`~Connection." "row_factory` for :class:`Connection` objects. It supports iteration, " @@ -2150,28 +2149,28 @@ msgid "" "index." msgstr "" -#: ../../library/sqlite3.rst:1741 +#: ../../library/sqlite3.rst:1740 msgid "" "Two :class:`!Row` objects compare equal if they have identical column names " "and values." msgstr "" -#: ../../library/sqlite3.rst:1748 +#: ../../library/sqlite3.rst:1747 msgid "" "Return a :class:`list` of column names as :class:`strings `. " "Immediately after a query, it is the first member of each tuple in :attr:" "`Cursor.description`." msgstr "" -#: ../../library/sqlite3.rst:1752 +#: ../../library/sqlite3.rst:1751 msgid "Added support of slicing." msgstr "新增對切片的支援。" -#: ../../library/sqlite3.rst:1759 +#: ../../library/sqlite3.rst:1758 msgid "Blob objects" msgstr "Blob 物件" -#: ../../library/sqlite3.rst:1765 +#: ../../library/sqlite3.rst:1764 msgid "" "A :class:`Blob` instance is a :term:`file-like object` that can read and " "write data in an SQLite :abbr:`BLOB (Binary Large OBject)`. Call :func:" @@ -2179,13 +2178,13 @@ msgid "" "and :term:`slices ` for direct access to the blob data." msgstr "" -#: ../../library/sqlite3.rst:1770 +#: ../../library/sqlite3.rst:1769 msgid "" "Use the :class:`Blob` as a :term:`context manager` to ensure that the blob " "handle is closed after use." msgstr "" -#: ../../library/sqlite3.rst:1773 +#: ../../library/sqlite3.rst:1772 msgid "" "con = sqlite3.connect(\":memory:\")\n" "con.execute(\"CREATE TABLE test(blob_col blob)\")\n" @@ -2207,18 +2206,18 @@ msgid "" "con.close()" msgstr "" -#: ../../library/sqlite3.rst:1801 +#: ../../library/sqlite3.rst:1800 msgid "Close the blob." msgstr "" -#: ../../library/sqlite3.rst:1803 +#: ../../library/sqlite3.rst:1802 msgid "" "The blob will be unusable from this point onward. An :class:`~sqlite3." "Error` (or subclass) exception will be raised if any further operation is " "attempted with the blob." msgstr "" -#: ../../library/sqlite3.rst:1809 +#: ../../library/sqlite3.rst:1808 msgid "" "Read *length* bytes of data from the blob at the current offset position. If " "the end of the blob is reached, the data up to :abbr:`EOF (End of File)` " @@ -2226,18 +2225,18 @@ msgid "" "`~Blob.read` will read until the end of the blob." msgstr "" -#: ../../library/sqlite3.rst:1817 +#: ../../library/sqlite3.rst:1816 msgid "" "Write *data* to the blob at the current offset. This function cannot change " "the blob length. Writing beyond the end of the blob will raise :exc:" "`ValueError`." msgstr "" -#: ../../library/sqlite3.rst:1823 +#: ../../library/sqlite3.rst:1822 msgid "Return the current access position of the blob." msgstr "" -#: ../../library/sqlite3.rst:1827 +#: ../../library/sqlite3.rst:1826 msgid "" "Set the current access position of the blob to *offset*. The *origin* " "argument defaults to :const:`os.SEEK_SET` (absolute blob positioning). Other " @@ -2245,26 +2244,26 @@ msgid "" "position) and :const:`os.SEEK_END` (seek relative to the blob’s end)." msgstr "" -#: ../../library/sqlite3.rst:1835 +#: ../../library/sqlite3.rst:1834 msgid "PrepareProtocol objects" msgstr "PrepareProtocol 物件" -#: ../../library/sqlite3.rst:1839 +#: ../../library/sqlite3.rst:1838 msgid "" "The PrepareProtocol type's single purpose is to act as a :pep:`246` style " "adaption protocol for objects that can :ref:`adapt themselves ` to :ref:`native SQLite types `." msgstr "" -#: ../../library/sqlite3.rst:1847 +#: ../../library/sqlite3.rst:1846 msgid "Exceptions" msgstr "例外" -#: ../../library/sqlite3.rst:1849 +#: ../../library/sqlite3.rst:1848 msgid "The exception hierarchy is defined by the DB-API 2.0 (:pep:`249`)." msgstr "" -#: ../../library/sqlite3.rst:1853 +#: ../../library/sqlite3.rst:1852 msgid "" "This exception is not currently raised by the :mod:`!sqlite3` module, but " "may be raised by applications using :mod:`!sqlite3`, for example if a user-" @@ -2272,39 +2271,39 @@ msgid "" "of :exc:`Exception`." msgstr "" -#: ../../library/sqlite3.rst:1860 +#: ../../library/sqlite3.rst:1859 msgid "" "The base class of the other exceptions in this module. Use this to catch all " "errors with one single :keyword:`except` statement. ``Error`` is a subclass " "of :exc:`Exception`." msgstr "" -#: ../../library/sqlite3.rst:1864 +#: ../../library/sqlite3.rst:1863 msgid "" "If the exception originated from within the SQLite library, the following " "two attributes are added to the exception:" msgstr "" -#: ../../library/sqlite3.rst:1869 +#: ../../library/sqlite3.rst:1868 msgid "" "The numeric error code from the `SQLite API `_" msgstr "" -#: ../../library/sqlite3.rst:1876 +#: ../../library/sqlite3.rst:1875 msgid "" "The symbolic name of the numeric error code from the `SQLite API `_" msgstr "" -#: ../../library/sqlite3.rst:1883 +#: ../../library/sqlite3.rst:1882 msgid "" "Exception raised for misuse of the low-level SQLite C API. In other words, " "if this exception is raised, it probably indicates a bug in the :mod:`!" "sqlite3` module. ``InterfaceError`` is a subclass of :exc:`Error`." msgstr "" -#: ../../library/sqlite3.rst:1890 +#: ../../library/sqlite3.rst:1889 msgid "" "Exception raised for errors that are related to the database. This serves as " "the base exception for several types of database errors. It is only raised " @@ -2312,14 +2311,14 @@ msgid "" "subclass of :exc:`Error`." msgstr "" -#: ../../library/sqlite3.rst:1897 +#: ../../library/sqlite3.rst:1896 msgid "" "Exception raised for errors caused by problems with the processed data, like " "numeric values out of range, and strings which are too long. ``DataError`` " "is a subclass of :exc:`DatabaseError`." msgstr "" -#: ../../library/sqlite3.rst:1903 +#: ../../library/sqlite3.rst:1902 msgid "" "Exception raised for errors that are related to the database's operation, " "and not necessarily under the control of the programmer. For example, the " @@ -2327,20 +2326,20 @@ msgid "" "``OperationalError`` is a subclass of :exc:`DatabaseError`." msgstr "" -#: ../../library/sqlite3.rst:1911 +#: ../../library/sqlite3.rst:1910 msgid "" "Exception raised when the relational integrity of the database is affected, " "e.g. a foreign key check fails. It is a subclass of :exc:`DatabaseError`." msgstr "" -#: ../../library/sqlite3.rst:1916 +#: ../../library/sqlite3.rst:1915 msgid "" "Exception raised when SQLite encounters an internal error. If this is " "raised, it may indicate that there is a problem with the runtime SQLite " "library. ``InternalError`` is a subclass of :exc:`DatabaseError`." msgstr "" -#: ../../library/sqlite3.rst:1923 +#: ../../library/sqlite3.rst:1922 msgid "" "Exception raised for :mod:`!sqlite3` API programming errors, for example " "supplying the wrong number of bindings to a query, or trying to operate on a " @@ -2348,7 +2347,7 @@ msgid "" "`DatabaseError`." msgstr "" -#: ../../library/sqlite3.rst:1930 +#: ../../library/sqlite3.rst:1929 msgid "" "Exception raised in case a method or database API is not supported by the " "underlying SQLite library. For example, setting *deterministic* to ``True`` " @@ -2357,78 +2356,78 @@ msgid "" "subclass of :exc:`DatabaseError`." msgstr "" -#: ../../library/sqlite3.rst:1940 +#: ../../library/sqlite3.rst:1939 msgid "SQLite and Python types" msgstr "" -#: ../../library/sqlite3.rst:1942 +#: ../../library/sqlite3.rst:1941 msgid "" "SQLite natively supports the following types: ``NULL``, ``INTEGER``, " "``REAL``, ``TEXT``, ``BLOB``." msgstr "" -#: ../../library/sqlite3.rst:1945 +#: ../../library/sqlite3.rst:1944 msgid "" "The following Python types can thus be sent to SQLite without any problem:" msgstr "" -#: ../../library/sqlite3.rst:1948 ../../library/sqlite3.rst:1965 +#: ../../library/sqlite3.rst:1947 ../../library/sqlite3.rst:1964 msgid "Python type" msgstr "" -#: ../../library/sqlite3.rst:1948 ../../library/sqlite3.rst:1965 +#: ../../library/sqlite3.rst:1947 ../../library/sqlite3.rst:1964 msgid "SQLite type" msgstr "" -#: ../../library/sqlite3.rst:1950 ../../library/sqlite3.rst:1967 +#: ../../library/sqlite3.rst:1949 ../../library/sqlite3.rst:1966 msgid "``None``" msgstr "``None``" -#: ../../library/sqlite3.rst:1950 ../../library/sqlite3.rst:1967 +#: ../../library/sqlite3.rst:1949 ../../library/sqlite3.rst:1966 msgid "``NULL``" msgstr "``NULL``" -#: ../../library/sqlite3.rst:1952 ../../library/sqlite3.rst:1969 +#: ../../library/sqlite3.rst:1951 ../../library/sqlite3.rst:1968 msgid ":class:`int`" msgstr ":class:`int`" -#: ../../library/sqlite3.rst:1952 ../../library/sqlite3.rst:1969 +#: ../../library/sqlite3.rst:1951 ../../library/sqlite3.rst:1968 msgid "``INTEGER``" msgstr "``INTEGER``" -#: ../../library/sqlite3.rst:1954 ../../library/sqlite3.rst:1971 +#: ../../library/sqlite3.rst:1953 ../../library/sqlite3.rst:1970 msgid ":class:`float`" msgstr ":class:`float`" -#: ../../library/sqlite3.rst:1954 ../../library/sqlite3.rst:1971 +#: ../../library/sqlite3.rst:1953 ../../library/sqlite3.rst:1970 msgid "``REAL``" msgstr "``REAL``" -#: ../../library/sqlite3.rst:1956 +#: ../../library/sqlite3.rst:1955 msgid ":class:`str`" msgstr ":class:`str`" -#: ../../library/sqlite3.rst:1956 ../../library/sqlite3.rst:1973 +#: ../../library/sqlite3.rst:1955 ../../library/sqlite3.rst:1972 msgid "``TEXT``" msgstr "``TEXT``" -#: ../../library/sqlite3.rst:1958 ../../library/sqlite3.rst:1976 +#: ../../library/sqlite3.rst:1957 ../../library/sqlite3.rst:1975 msgid ":class:`bytes`" msgstr ":class:`bytes`" -#: ../../library/sqlite3.rst:1958 ../../library/sqlite3.rst:1976 +#: ../../library/sqlite3.rst:1957 ../../library/sqlite3.rst:1975 msgid "``BLOB``" msgstr "``BLOB``" -#: ../../library/sqlite3.rst:1962 +#: ../../library/sqlite3.rst:1961 msgid "This is how SQLite types are converted to Python types by default:" msgstr "" -#: ../../library/sqlite3.rst:1973 +#: ../../library/sqlite3.rst:1972 msgid "depends on :attr:`~Connection.text_factory`, :class:`str` by default" msgstr "" -#: ../../library/sqlite3.rst:1979 +#: ../../library/sqlite3.rst:1978 msgid "" "The type system of the :mod:`!sqlite3` module is extensible in two ways: you " "can store additional Python types in an SQLite database via :ref:`object " @@ -2437,47 +2436,47 @@ msgid "" "converters>`." msgstr "" -#: ../../library/sqlite3.rst:1989 +#: ../../library/sqlite3.rst:1988 msgid "Default adapters and converters (deprecated)" msgstr "" -#: ../../library/sqlite3.rst:1993 +#: ../../library/sqlite3.rst:1992 msgid "" "The default adapters and converters are deprecated as of Python 3.12. " "Instead, use the :ref:`sqlite3-adapter-converter-recipes` and tailor them to " "your needs." msgstr "" -#: ../../library/sqlite3.rst:1997 +#: ../../library/sqlite3.rst:1996 msgid "The deprecated default adapters and converters consist of:" msgstr "" -#: ../../library/sqlite3.rst:1999 +#: ../../library/sqlite3.rst:1998 msgid "" "An adapter for :class:`datetime.date` objects to :class:`strings ` in " "`ISO 8601`_ format." msgstr "" -#: ../../library/sqlite3.rst:2001 +#: ../../library/sqlite3.rst:2000 msgid "" "An adapter for :class:`datetime.datetime` objects to strings in ISO 8601 " "format." msgstr "" -#: ../../library/sqlite3.rst:2003 +#: ../../library/sqlite3.rst:2002 msgid "" "A converter for :ref:`declared ` \"date\" types to :" "class:`datetime.date` objects." msgstr "" -#: ../../library/sqlite3.rst:2005 +#: ../../library/sqlite3.rst:2004 msgid "" "A converter for declared \"timestamp\" types to :class:`datetime.datetime` " "objects. Fractional parts will be truncated to 6 digits (microsecond " "precision)." msgstr "" -#: ../../library/sqlite3.rst:2011 +#: ../../library/sqlite3.rst:2010 msgid "" "The default \"timestamp\" converter ignores UTC offsets in the database and " "always returns a naive :class:`datetime.datetime` object. To preserve UTC " @@ -2485,42 +2484,42 @@ msgid "" "offset-aware converter with :func:`register_converter`." msgstr "" -#: ../../library/sqlite3.rst:2024 +#: ../../library/sqlite3.rst:2023 msgid "Command-line interface" msgstr "命令列介面" -#: ../../library/sqlite3.rst:2026 +#: ../../library/sqlite3.rst:2025 msgid "" "The :mod:`!sqlite3` module can be invoked as a script, using the " "interpreter's :option:`-m` switch, in order to provide a simple SQLite " "shell. The argument signature is as follows::" msgstr "" -#: ../../library/sqlite3.rst:2031 +#: ../../library/sqlite3.rst:2030 msgid "python -m sqlite3 [-h] [-v] [filename] [sql]" msgstr "python -m sqlite3 [-h] [-v] [filename] [sql]" -#: ../../library/sqlite3.rst:2033 +#: ../../library/sqlite3.rst:2032 msgid "Type ``.quit`` or CTRL-D to exit the shell." msgstr "" -#: ../../library/sqlite3.rst:2039 +#: ../../library/sqlite3.rst:2038 msgid "Print CLI help." msgstr "" -#: ../../library/sqlite3.rst:2043 +#: ../../library/sqlite3.rst:2042 msgid "Print underlying SQLite library version." msgstr "" -#: ../../library/sqlite3.rst:2051 +#: ../../library/sqlite3.rst:2050 msgid "How-to guides" msgstr "" -#: ../../library/sqlite3.rst:2056 +#: ../../library/sqlite3.rst:2055 msgid "How to use placeholders to bind values in SQL queries" msgstr "" -#: ../../library/sqlite3.rst:2058 +#: ../../library/sqlite3.rst:2057 msgid "" "SQL operations usually need to use values from Python variables. However, " "beware of using Python's string operations to assemble queries, as they are " @@ -2528,7 +2527,7 @@ msgid "" "close the single quote and inject ``OR TRUE`` to select all rows::" msgstr "" -#: ../../library/sqlite3.rst:2063 +#: ../../library/sqlite3.rst:2062 msgid "" ">>> # Never do this -- insecure!\n" ">>> symbol = input()\n" @@ -2539,7 +2538,7 @@ msgid "" ">>> cur.execute(sql)" msgstr "" -#: ../../library/sqlite3.rst:2071 +#: ../../library/sqlite3.rst:2070 msgid "" "Instead, use the DB-API's parameter substitution. To insert a variable into " "a query string, use a placeholder in the string, and substitute the actual " @@ -2547,7 +2546,7 @@ msgid "" "second argument of the cursor's :meth:`~Cursor.execute` method." msgstr "" -#: ../../library/sqlite3.rst:2076 +#: ../../library/sqlite3.rst:2075 msgid "" "An SQL statement may use one of two kinds of placeholders: question marks " "(qmark style) or named placeholders (named style). For the qmark style, " @@ -2558,7 +2557,7 @@ msgid "" "ignored. Here's an example of both styles:" msgstr "" -#: ../../library/sqlite3.rst:2087 +#: ../../library/sqlite3.rst:2086 msgid "" "con = sqlite3.connect(\":memory:\")\n" "cur = con.execute(\"CREATE TABLE lang(name, first_appeared)\")\n" @@ -2579,24 +2578,24 @@ msgid "" "con.close()" msgstr "" -#: ../../library/sqlite3.rst:2114 +#: ../../library/sqlite3.rst:2113 msgid "" ":pep:`249` numeric placeholders are *not* supported. If used, they will be " "interpreted as named placeholders." msgstr "" -#: ../../library/sqlite3.rst:2121 +#: ../../library/sqlite3.rst:2120 msgid "How to adapt custom Python types to SQLite values" msgstr "" -#: ../../library/sqlite3.rst:2123 +#: ../../library/sqlite3.rst:2122 msgid "" "SQLite supports only a limited set of data types natively. To store custom " "Python types in SQLite databases, *adapt* them to one of the :ref:`Python " "types SQLite natively understands `." msgstr "" -#: ../../library/sqlite3.rst:2127 +#: ../../library/sqlite3.rst:2126 msgid "" "There are two ways to adapt Python objects to SQLite types: letting your " "object adapt itself, or using an *adapter callable*. The latter will take " @@ -2606,11 +2605,11 @@ msgid "" "custom adapter functions." msgstr "" -#: ../../library/sqlite3.rst:2139 +#: ../../library/sqlite3.rst:2138 msgid "How to write adaptable objects" msgstr "" -#: ../../library/sqlite3.rst:2141 +#: ../../library/sqlite3.rst:2140 msgid "" "Suppose we have a :class:`!Point` class that represents a pair of " "coordinates, ``x`` and ``y``, in a Cartesian coordinate system. The " @@ -2620,7 +2619,7 @@ msgid "" "object passed to *protocol* will be of type :class:`PrepareProtocol`." msgstr "" -#: ../../library/sqlite3.rst:2149 +#: ../../library/sqlite3.rst:2148 msgid "" "class Point:\n" " def __init__(self, x, y):\n" @@ -2652,18 +2651,18 @@ msgstr "" "print(cur.fetchone()[0])\n" "con.close()" -#: ../../library/sqlite3.rst:2173 +#: ../../library/sqlite3.rst:2172 msgid "How to register adapter callables" msgstr "" -#: ../../library/sqlite3.rst:2175 +#: ../../library/sqlite3.rst:2174 msgid "" "The other possibility is to create a function that converts the Python " "object to an SQLite-compatible type. This function can then be registered " "using :func:`register_adapter`." msgstr "" -#: ../../library/sqlite3.rst:2179 +#: ../../library/sqlite3.rst:2178 msgid "" "class Point:\n" " def __init__(self, x, y):\n" @@ -2697,36 +2696,36 @@ msgstr "" "print(cur.fetchone()[0])\n" "con.close()" -#: ../../library/sqlite3.rst:2206 +#: ../../library/sqlite3.rst:2205 msgid "How to convert SQLite values to custom Python types" msgstr "" -#: ../../library/sqlite3.rst:2208 +#: ../../library/sqlite3.rst:2207 msgid "" "Writing an adapter lets you convert *from* custom Python types *to* SQLite " "values. To be able to convert *from* SQLite values *to* custom Python types, " "we use *converters*." msgstr "" -#: ../../library/sqlite3.rst:2213 +#: ../../library/sqlite3.rst:2212 msgid "" "Let's go back to the :class:`!Point` class. We stored the x and y " "coordinates separated via semicolons as strings in SQLite." msgstr "" -#: ../../library/sqlite3.rst:2216 +#: ../../library/sqlite3.rst:2215 msgid "" "First, we'll define a converter function that accepts the string as a " "parameter and constructs a :class:`!Point` object from it." msgstr "" -#: ../../library/sqlite3.rst:2221 +#: ../../library/sqlite3.rst:2220 msgid "" "Converter functions are **always** passed a :class:`bytes` object, no matter " "the underlying SQLite data type." msgstr "" -#: ../../library/sqlite3.rst:2224 +#: ../../library/sqlite3.rst:2223 msgid "" "def convert_point(s):\n" " x, y = map(float, s.split(b\";\"))\n" @@ -2736,32 +2735,32 @@ msgstr "" " x, y = map(float, s.split(b\";\"))\n" " return Point(x, y)" -#: ../../library/sqlite3.rst:2230 +#: ../../library/sqlite3.rst:2229 msgid "" "We now need to tell :mod:`!sqlite3` when it should convert a given SQLite " "value. This is done when connecting to a database, using the *detect_types* " "parameter of :func:`connect`. There are three options:" msgstr "" -#: ../../library/sqlite3.rst:2234 +#: ../../library/sqlite3.rst:2233 msgid "Implicit: set *detect_types* to :const:`PARSE_DECLTYPES`" msgstr "" -#: ../../library/sqlite3.rst:2235 +#: ../../library/sqlite3.rst:2234 msgid "Explicit: set *detect_types* to :const:`PARSE_COLNAMES`" msgstr "" -#: ../../library/sqlite3.rst:2236 +#: ../../library/sqlite3.rst:2235 msgid "" "Both: set *detect_types* to ``sqlite3.PARSE_DECLTYPES | sqlite3." "PARSE_COLNAMES``. Column names take precedence over declared types." msgstr "" -#: ../../library/sqlite3.rst:2240 +#: ../../library/sqlite3.rst:2239 msgid "The following example illustrates the implicit and explicit approaches:" msgstr "" -#: ../../library/sqlite3.rst:2242 +#: ../../library/sqlite3.rst:2241 msgid "" "class Point:\n" " def __init__(self, x, y):\n" @@ -2803,15 +2802,15 @@ msgid "" "con.close()" msgstr "" -#: ../../library/sqlite3.rst:2293 +#: ../../library/sqlite3.rst:2292 msgid "Adapter and converter recipes" msgstr "" -#: ../../library/sqlite3.rst:2295 +#: ../../library/sqlite3.rst:2294 msgid "This section shows recipes for common adapters and converters." msgstr "" -#: ../../library/sqlite3.rst:2297 +#: ../../library/sqlite3.rst:2296 msgid "" "import datetime\n" "import sqlite3\n" @@ -2849,11 +2848,11 @@ msgid "" "sqlite3.register_converter(\"timestamp\", convert_timestamp)" msgstr "" -#: ../../library/sqlite3.rst:2357 +#: ../../library/sqlite3.rst:2356 msgid "How to use connection shortcut methods" msgstr "" -#: ../../library/sqlite3.rst:2359 +#: ../../library/sqlite3.rst:2358 msgid "" "Using the :meth:`~Connection.execute`, :meth:`~Connection.executemany`, and :" "meth:`~Connection.executescript` methods of the :class:`Connection` class, " @@ -2865,7 +2864,7 @@ msgid "" "object." msgstr "" -#: ../../library/sqlite3.rst:2368 +#: ../../library/sqlite3.rst:2367 msgid "" "# Create and fill the table.\n" "con = sqlite3.connect(\":memory:\")\n" @@ -2889,11 +2888,11 @@ msgid "" "con.close()" msgstr "" -#: ../../library/sqlite3.rst:2400 +#: ../../library/sqlite3.rst:2399 msgid "How to use the connection context manager" msgstr "" -#: ../../library/sqlite3.rst:2402 +#: ../../library/sqlite3.rst:2401 msgid "" "A :class:`Connection` object can be used as a context manager that " "automatically commits or rolls back open transactions when leaving the body " @@ -2905,21 +2904,21 @@ msgid "" "rolling back." msgstr "" -#: ../../library/sqlite3.rst:2413 +#: ../../library/sqlite3.rst:2412 msgid "" "If there is no open transaction upon leaving the body of the ``with`` " "statement, or if :attr:`~Connection.autocommit` is ``True``, the context " "manager does nothing." msgstr "" -#: ../../library/sqlite3.rst:2418 +#: ../../library/sqlite3.rst:2417 msgid "" "The context manager neither implicitly opens a new transaction nor closes " "the connection. If you need a closing context manager, consider using :meth:" "`contextlib.closing`." msgstr "" -#: ../../library/sqlite3.rst:2422 +#: ../../library/sqlite3.rst:2421 msgid "" "con = sqlite3.connect(\":memory:\")\n" "con.execute(\"CREATE TABLE lang(id INTEGER PRIMARY KEY, name VARCHAR " @@ -2943,19 +2942,19 @@ msgid "" "con.close()" msgstr "" -#: ../../library/sqlite3.rst:2452 +#: ../../library/sqlite3.rst:2451 msgid "How to work with SQLite URIs" msgstr "" -#: ../../library/sqlite3.rst:2454 +#: ../../library/sqlite3.rst:2453 msgid "Some useful URI tricks include:" msgstr "" -#: ../../library/sqlite3.rst:2456 +#: ../../library/sqlite3.rst:2455 msgid "Open a database in read-only mode:" msgstr "" -#: ../../library/sqlite3.rst:2458 +#: ../../library/sqlite3.rst:2457 msgid "" ">>> con = sqlite3.connect(\"file:tutorial.db?mode=ro\", uri=True)\n" ">>> con.execute(\"CREATE TABLE readonly(data)\")\n" @@ -2967,13 +2966,13 @@ msgstr "" "Traceback (most recent call last):\n" "OperationalError: attempt to write a readonly database" -#: ../../library/sqlite3.rst:2465 +#: ../../library/sqlite3.rst:2464 msgid "" "Do not implicitly create a new database file if it does not already exist; " "will raise :exc:`~sqlite3.OperationalError` if unable to create a new file:" msgstr "" -#: ../../library/sqlite3.rst:2468 +#: ../../library/sqlite3.rst:2467 msgid "" ">>> con = sqlite3.connect(\"file:nosuchdb.db?mode=rw\", uri=True)\n" "Traceback (most recent call last):\n" @@ -2983,11 +2982,11 @@ msgstr "" "Traceback (most recent call last):\n" "OperationalError: unable to open database file" -#: ../../library/sqlite3.rst:2475 +#: ../../library/sqlite3.rst:2474 msgid "Create a shared named in-memory database:" msgstr "" -#: ../../library/sqlite3.rst:2477 +#: ../../library/sqlite3.rst:2476 msgid "" "db = \"file:mem1?mode=memory&cache=shared\"\n" "con1 = sqlite3.connect(db, uri=True)\n" @@ -3013,24 +3012,24 @@ msgstr "" "con1.close()\n" "con2.close()" -#: ../../library/sqlite3.rst:2491 +#: ../../library/sqlite3.rst:2490 msgid "" "More information about this feature, including a list of parameters, can be " "found in the `SQLite URI documentation`_." msgstr "" -#: ../../library/sqlite3.rst:2500 +#: ../../library/sqlite3.rst:2499 msgid "How to create and use row factories" msgstr "" -#: ../../library/sqlite3.rst:2502 +#: ../../library/sqlite3.rst:2501 msgid "" "By default, :mod:`!sqlite3` represents each row as a :class:`tuple`. If a :" "class:`!tuple` does not suit your needs, you can use the :class:`sqlite3." "Row` class or a custom :attr:`~Cursor.row_factory`." msgstr "" -#: ../../library/sqlite3.rst:2507 +#: ../../library/sqlite3.rst:2506 msgid "" "While :attr:`!row_factory` exists as an attribute both on the :class:" "`Cursor` and the :class:`Connection`, it is recommended to set :class:" @@ -3038,7 +3037,7 @@ msgid "" "use the same row factory." msgstr "" -#: ../../library/sqlite3.rst:2512 +#: ../../library/sqlite3.rst:2511 msgid "" ":class:`!Row` provides indexed and case-insensitive named access to columns, " "with minimal memory overhead and performance impact over a :class:`!tuple`. " @@ -3046,7 +3045,7 @@ msgid "" "attribute:" msgstr "" -#: ../../library/sqlite3.rst:2517 +#: ../../library/sqlite3.rst:2516 msgid "" ">>> con = sqlite3.connect(\":memory:\")\n" ">>> con.row_factory = sqlite3.Row" @@ -3054,11 +3053,11 @@ msgstr "" ">>> con = sqlite3.connect(\":memory:\")\n" ">>> con.row_factory = sqlite3.Row" -#: ../../library/sqlite3.rst:2522 +#: ../../library/sqlite3.rst:2521 msgid "Queries now return :class:`!Row` objects:" msgstr "" -#: ../../library/sqlite3.rst:2524 +#: ../../library/sqlite3.rst:2523 msgid "" ">>> res = con.execute(\"SELECT 'Earth' AS name, 6378 AS radius\")\n" ">>> row = res.fetchone()\n" @@ -3073,7 +3072,7 @@ msgid "" ">>> con.close()" msgstr "" -#: ../../library/sqlite3.rst:2540 +#: ../../library/sqlite3.rst:2539 msgid "" "The ``FROM`` clause can be omitted in the ``SELECT`` statement, as in the " "above example. In such cases, SQLite returns a single row with columns " @@ -3081,13 +3080,13 @@ msgid "" "alias``." msgstr "" -#: ../../library/sqlite3.rst:2545 +#: ../../library/sqlite3.rst:2544 msgid "" "You can create a custom :attr:`~Cursor.row_factory` that returns each row as " "a :class:`dict`, with column names mapped to values:" msgstr "" -#: ../../library/sqlite3.rst:2548 +#: ../../library/sqlite3.rst:2547 msgid "" "def dict_factory(cursor, row):\n" " fields = [column[0] for column in cursor.description]\n" @@ -3097,12 +3096,12 @@ msgstr "" " fields = [column[0] for column in cursor.description]\n" " return {key: value for key, value in zip(fields, row)}" -#: ../../library/sqlite3.rst:2554 +#: ../../library/sqlite3.rst:2553 msgid "" "Using it, queries now return a :class:`!dict` instead of a :class:`!tuple`:" msgstr "" -#: ../../library/sqlite3.rst:2556 +#: ../../library/sqlite3.rst:2555 msgid "" ">>> con = sqlite3.connect(\":memory:\")\n" ">>> con.row_factory = dict_factory\n" @@ -3118,11 +3117,11 @@ msgstr "" "{'a': 1, 'b': 2}\n" ">>> con.close()" -#: ../../library/sqlite3.rst:2565 +#: ../../library/sqlite3.rst:2564 msgid "The following row factory returns a :term:`named tuple`:" msgstr "" -#: ../../library/sqlite3.rst:2567 +#: ../../library/sqlite3.rst:2566 msgid "" "from collections import namedtuple\n" "\n" @@ -3138,11 +3137,11 @@ msgstr "" " cls = namedtuple(\"Row\", fields)\n" " return cls._make(row)" -#: ../../library/sqlite3.rst:2576 +#: ../../library/sqlite3.rst:2575 msgid ":func:`!namedtuple_factory` can be used as follows:" msgstr "" -#: ../../library/sqlite3.rst:2578 +#: ../../library/sqlite3.rst:2577 msgid "" ">>> con = sqlite3.connect(\":memory:\")\n" ">>> con.row_factory = namedtuple_factory\n" @@ -3168,18 +3167,18 @@ msgstr "" "2\n" ">>> con.close()" -#: ../../library/sqlite3.rst:2592 +#: ../../library/sqlite3.rst:2591 msgid "" "With some adjustments, the above recipe can be adapted to use a :class:" "`~dataclasses.dataclass`, or any other custom class, instead of a :class:" "`~collections.namedtuple`." msgstr "" -#: ../../library/sqlite3.rst:2600 +#: ../../library/sqlite3.rst:2599 msgid "How to handle non-UTF-8 text encodings" msgstr "" -#: ../../library/sqlite3.rst:2602 +#: ../../library/sqlite3.rst:2601 msgid "" "By default, :mod:`!sqlite3` uses :class:`str` to adapt SQLite values with " "the ``TEXT`` data type. This works well for UTF-8 encoded text, but it might " @@ -3187,7 +3186,7 @@ msgid "" "`~Connection.text_factory` to handle such cases." msgstr "" -#: ../../library/sqlite3.rst:2608 +#: ../../library/sqlite3.rst:2607 msgid "" "Because of SQLite's `flexible typing`_, it is not uncommon to encounter " "table columns with the ``TEXT`` data type containing non-UTF-8 encodings, or " @@ -3198,39 +3197,39 @@ msgid "" "text using this :attr:`~Connection.text_factory`:" msgstr "" -#: ../../library/sqlite3.rst:2617 +#: ../../library/sqlite3.rst:2616 msgid "con.text_factory = lambda data: str(data, encoding=\"latin2\")" msgstr "con.text_factory = lambda data: str(data, encoding=\"latin2\")" -#: ../../library/sqlite3.rst:2621 +#: ../../library/sqlite3.rst:2620 msgid "" "For invalid UTF-8 or arbitrary data in stored in ``TEXT`` table columns, you " "can use the following technique, borrowed from the :ref:`unicode-howto`:" msgstr "" -#: ../../library/sqlite3.rst:2624 +#: ../../library/sqlite3.rst:2623 msgid "con.text_factory = lambda data: str(data, errors=\"surrogateescape\")" msgstr "con.text_factory = lambda data: str(data, errors=\"surrogateescape\")" -#: ../../library/sqlite3.rst:2630 +#: ../../library/sqlite3.rst:2629 msgid "" "The :mod:`!sqlite3` module API does not support strings containing " "surrogates." msgstr "" -#: ../../library/sqlite3.rst:2635 +#: ../../library/sqlite3.rst:2634 msgid ":ref:`unicode-howto`" msgstr ":ref:`unicode-howto`" -#: ../../library/sqlite3.rst:2641 +#: ../../library/sqlite3.rst:2640 msgid "Explanation" msgstr "解釋" -#: ../../library/sqlite3.rst:2647 +#: ../../library/sqlite3.rst:2646 msgid "Transaction control" msgstr "" -#: ../../library/sqlite3.rst:2649 +#: ../../library/sqlite3.rst:2648 msgid "" ":mod:`!sqlite3` offers multiple methods of controlling whether, when and how " "database transactions are opened and closed. :ref:`sqlite3-transaction-" @@ -3238,24 +3237,24 @@ msgid "" "isolation-level` retains the pre-Python 3.12 behaviour." msgstr "" -#: ../../library/sqlite3.rst:2658 +#: ../../library/sqlite3.rst:2657 msgid "Transaction control via the ``autocommit`` attribute" msgstr "" -#: ../../library/sqlite3.rst:2660 +#: ../../library/sqlite3.rst:2659 msgid "" "The recommended way of controlling transaction behaviour is through the :" "attr:`Connection.autocommit` attribute, which should preferably be set using " "the *autocommit* parameter of :func:`connect`." msgstr "" -#: ../../library/sqlite3.rst:2665 +#: ../../library/sqlite3.rst:2664 msgid "" "It is suggested to set *autocommit* to ``False``, which implies :pep:`249`-" "compliant transaction control. This means:" msgstr "" -#: ../../library/sqlite3.rst:2669 +#: ../../library/sqlite3.rst:2668 msgid "" ":mod:`!sqlite3` ensures that a transaction is always open, so :func:" "`connect`, :meth:`Connection.commit`, and :meth:`Connection.rollback` will " @@ -3264,21 +3263,21 @@ msgid "" "when opening transactions." msgstr "" -#: ../../library/sqlite3.rst:2674 +#: ../../library/sqlite3.rst:2673 msgid "Transactions should be committed explicitly using :meth:`!commit`." msgstr "" -#: ../../library/sqlite3.rst:2675 +#: ../../library/sqlite3.rst:2674 msgid "Transactions should be rolled back explicitly using :meth:`!rollback`." msgstr "" -#: ../../library/sqlite3.rst:2676 +#: ../../library/sqlite3.rst:2675 msgid "" "An implicit rollback is performed if the database is :meth:`~Connection." "close`-ed with pending changes." msgstr "" -#: ../../library/sqlite3.rst:2679 +#: ../../library/sqlite3.rst:2678 msgid "" "Set *autocommit* to ``True`` to enable SQLite's `autocommit mode`_. In this " "mode, :meth:`Connection.commit` and :meth:`Connection.rollback` have no " @@ -3287,25 +3286,25 @@ msgid "" "in_transaction` to query the low-level SQLite autocommit mode." msgstr "" -#: ../../library/sqlite3.rst:2687 +#: ../../library/sqlite3.rst:2686 msgid "" "Set *autocommit* to :data:`LEGACY_TRANSACTION_CONTROL` to leave transaction " "control behaviour to the :attr:`Connection.isolation_level` attribute. See :" "ref:`sqlite3-transaction-control-isolation-level` for more information." msgstr "" -#: ../../library/sqlite3.rst:2696 +#: ../../library/sqlite3.rst:2695 msgid "Transaction control via the ``isolation_level`` attribute" msgstr "" -#: ../../library/sqlite3.rst:2700 +#: ../../library/sqlite3.rst:2699 msgid "" "The recommended way of controlling transactions is via the :attr:" "`~Connection.autocommit` attribute. See :ref:`sqlite3-transaction-control-" "autocommit`." msgstr "" -#: ../../library/sqlite3.rst:2704 +#: ../../library/sqlite3.rst:2703 msgid "" "If :attr:`Connection.autocommit` is set to :data:" "`LEGACY_TRANSACTION_CONTROL` (the default), transaction behaviour is " @@ -3313,7 +3312,7 @@ msgid "" "Otherwise, :attr:`!isolation_level` has no effect." msgstr "" -#: ../../library/sqlite3.rst:2710 +#: ../../library/sqlite3.rst:2709 msgid "" "If the connection attribute :attr:`~Connection.isolation_level` is not " "``None``, new transactions are implicitly opened before :meth:`~Cursor." @@ -3327,7 +3326,7 @@ msgid "" "attribute." msgstr "" -#: ../../library/sqlite3.rst:2723 +#: ../../library/sqlite3.rst:2722 msgid "" "If :attr:`~Connection.isolation_level` is set to ``None``, no transactions " "are implicitly opened at all. This leaves the underlying SQLite library in " @@ -3337,33 +3336,36 @@ msgid "" "in_transaction` attribute." msgstr "" -#: ../../library/sqlite3.rst:2731 +#: ../../library/sqlite3.rst:2730 msgid "" "The :meth:`~Cursor.executescript` method implicitly commits any pending " "transaction before execution of the given SQL script, regardless of the " "value of :attr:`~Connection.isolation_level`." msgstr "" -#: ../../library/sqlite3.rst:2735 +#: ../../library/sqlite3.rst:2734 msgid "" ":mod:`!sqlite3` used to implicitly commit an open transaction before DDL " "statements. This is no longer the case." msgstr "" -#: ../../library/sqlite3.rst:2739 +#: ../../library/sqlite3.rst:2738 msgid "" "The recommended way of controlling transactions is now via the :attr:" "`~Connection.autocommit` attribute." msgstr "" -#: ../../library/sqlite3.rst:1491 +#: ../../library/sqlite3.rst:1490 msgid "? (question mark)" msgstr "? (問號)" -#: ../../library/sqlite3.rst:1491 ../../library/sqlite3.rst:1492 +#: ../../library/sqlite3.rst:1490 ../../library/sqlite3.rst:1491 msgid "in SQL statements" msgstr "於 SQL 陳述式中" -#: ../../library/sqlite3.rst:1492 +#: ../../library/sqlite3.rst:1491 msgid ": (colon)" msgstr ": (冒號)" + +#~ msgid "`threadsafety`_" +#~ msgstr "`threadsafety`_" diff --git a/library/ssl.po b/library/ssl.po index 17af83b322..342879d494 100644 --- a/library/ssl.po +++ b/library/ssl.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-23 07:52+0800\n" +"POT-Creation-Date: 2024-09-24 07:20+0000\n" "PO-Revision-Date: 2024-08-28 00:43+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -60,18 +60,16 @@ msgstr "" "安全性認知,因為 ssl 模組的預設設定未必適合你的應用程式。" #: ../../includes/wasm-notavail.rst:3 -#, fuzzy msgid ":ref:`Availability `: not WASI." -msgstr ":ref:`適用 `:只有 Windows。" +msgstr ":ref:`適用 `:非 WASI。" #: ../../includes/wasm-notavail.rst:5 -#, fuzzy msgid "" "This module does not work or is not available on WebAssembly. See :ref:`wasm-" "availability` for more information." msgstr "" -"此模組在 WebAssembly 平台 ``wasm32-emscripten`` 和 ``wasm32-wasi`` 上無法作用" -"或無法使用。有關更多資訊,請參閱 :ref:`wasm-availability`。" +"此模組在 WebAssembly 平台上不起作用或無法使用。更多資訊請參閱 :ref:`wasm-" +"availability`。" #: ../../library/ssl.rst:38 msgid "" @@ -2234,8 +2232,7 @@ msgstr "" msgid "" "The *capath* string, if present, is the path to a directory containing " "several CA certificates in PEM format, following an `OpenSSL specific layout " -"`_." +"`_." msgstr "" #: ../../library/ssl.rst:1571 @@ -2343,10 +2340,10 @@ msgstr "" #: ../../library/ssl.rst:1642 msgid "" "Set the available ciphers for sockets created with this context. It should " -"be a string in the `OpenSSL cipher list format `_. If no cipher can be selected (because " -"compile-time options or other configuration forbids use of all the specified " -"ciphers), an :class:`SSLError` will be raised." +"be a string in the `OpenSSL cipher list format `_. If no cipher can be selected (because compile-time " +"options or other configuration forbids use of all the specified ciphers), " +"an :class:`SSLError` will be raised." msgstr "" #: ../../library/ssl.rst:1650 @@ -2640,9 +2637,9 @@ msgstr "" msgid "" "Get statistics about the SSL sessions created or managed by this context. A " "dictionary is returned which maps the names of each `piece of information " -"`_ to " -"their numeric values. For example, here is the total number of hits and " -"misses in the session cache since the context was created::" +"`_ to their " +"numeric values. For example, here is the total number of hits and misses in " +"the session cache since the context was created::" msgstr "" #: ../../library/ssl.rst:1881 @@ -2801,9 +2798,9 @@ msgstr "" #: ../../library/ssl.rst:2019 msgid "" -"An integer representing the `security level `_ for the context. This " -"attribute is read-only." +"An integer representing the `security level `_ for the context. This attribute is read-" +"only." msgstr "" #: ../../library/ssl.rst:2027 @@ -3655,14 +3652,12 @@ msgid ":meth:`~SSLSocket.getpeercert`" msgstr ":meth:`~SSLSocket.getpeercert`" #: ../../library/ssl.rst:2572 -#, fuzzy msgid ":meth:`~SSLSocket.get_verified_chain`" -msgstr ":meth:`~SSLSocket.version`" +msgstr ":meth:`~SSLSocket.get_verified_chain`" #: ../../library/ssl.rst:2573 -#, fuzzy msgid ":meth:`~SSLSocket.get_unverified_chain`" -msgstr ":meth:`~SSLSocket.get_channel_binding`" +msgstr ":meth:`~SSLSocket.get_unverified_chain`" #: ../../library/ssl.rst:2574 msgid ":meth:`~SSLSocket.selected_alpn_protocol`" @@ -3951,10 +3946,10 @@ msgid "" "`SSLContext.set_ciphers` method. Starting from Python 3.2.3, the ssl module " "disables certain weak ciphers by default, but you may want to further " "restrict the cipher choice. Be sure to read OpenSSL's documentation about " -"the `cipher list format `_. If you want to check which ciphers are enabled " -"by a given cipher list, use :meth:`SSLContext.get_ciphers` or the ``openssl " -"ciphers`` command on your system." +"the `cipher list format `_. If you want to check which ciphers are enabled by a given " +"cipher list, use :meth:`SSLContext.get_ciphers` or the ``openssl ciphers`` " +"command on your system." msgstr "" #: ../../library/ssl.rst:2768 diff --git a/library/statistics.po b/library/statistics.po index 54f51c864f..1337bd2d8f 100644 --- a/library/statistics.po +++ b/library/statistics.po @@ -143,18 +143,16 @@ msgid "Harmonic mean of data." msgstr "資料的調和平均數。" #: ../../library/statistics.rst:79 -#, fuzzy msgid ":func:`kde`" -msgstr ":func:`mode`" +msgstr ":func:`kde`" #: ../../library/statistics.rst:79 msgid "Estimate the probability density distribution of the data." msgstr "" #: ../../library/statistics.rst:80 -#, fuzzy msgid ":func:`kde_random`" -msgstr ":func:`mean`" +msgstr ":func:`kde_random`" #: ../../library/statistics.rst:80 msgid "Random sampling from the PDF generated by kde()." diff --git a/library/subprocess.po b/library/subprocess.po index a6c58c0908..d6d98f3bfc 100644 --- a/library/subprocess.po +++ b/library/subprocess.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-23 07:52+0800\n" +"POT-Creation-Date: 2024-09-24 07:20+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-" @@ -50,21 +50,17 @@ msgstr "" msgid ":pep:`324` -- PEP proposing the subprocess module" msgstr ":pep:`324` -- 提議 subprocess 模組的 PEP" -#: ../../includes/wasm-ios-notavail.rst:3 -#, fuzzy -msgid ":ref:`Availability `: not WASI, not iOS." -msgstr ":ref:`適用 `:Unix 和 Windows。" +#: ../../includes/wasm-mobile-notavail.rst:3 +msgid ":ref:`Availability `: not Android, not iOS, not WASI." +msgstr ":ref:`適用 `:、非 Android、非 iOS、非 WASI。" -#: ../../includes/wasm-ios-notavail.rst:5 -#, fuzzy +#: ../../includes/wasm-mobile-notavail.rst:5 msgid "" -"This module does not work or is not available on WebAssembly platforms, or " -"on iOS. See :ref:`wasm-availability` for more information on WASM " -"availability; see :ref:`iOS-availability` for more information on iOS " -"availability." +"This module is not supported on :ref:`mobile platforms ` or :ref:`WebAssembly platforms `." msgstr "" -"此模組在 WebAssembly 平台 ``wasm32-emscripten`` 和 ``wasm32-wasi`` 上無法作用" -"或無法使用。有關更多資訊,請參閱 :ref:`wasm-availability`。" +"此模組在\\ :ref:`行動平台 `\\ 或\\ :ref:`WebAssembly 平" +"台 `\\ 上不支援。" #: ../../library/subprocess.rst:31 msgid "Using the :mod:`subprocess` Module" @@ -2218,3 +2214,13 @@ msgstr "universal newlines" #: ../../library/subprocess.rst:296 msgid "subprocess module" msgstr "subprocess 模組" + +#, fuzzy +#~ msgid "" +#~ "This module does not work or is not available on WebAssembly platforms, " +#~ "or on iOS. See :ref:`wasm-availability` for more information on WASM " +#~ "availability; see :ref:`iOS-availability` for more information on iOS " +#~ "availability." +#~ msgstr "" +#~ "此模組在 WebAssembly 平台 ``wasm32-emscripten`` 和 ``wasm32-wasi`` 上無法" +#~ "作用或無法使用。有關更多資訊,請參閱 :ref:`wasm-availability`。" diff --git a/library/sunau.po b/library/sunau.po deleted file mode 100644 index c4917b1d20..0000000000 --- a/library/sunau.po +++ /dev/null @@ -1,386 +0,0 @@ -# Copyright (C) 2001-2022, Python Software Foundation -# This file is distributed under the same license as the Python package. -# -# Translators: -# Adrian Liaw , 2018 -# Matt Wang , 2022 -msgid "" -msgstr "" -"Project-Id-Version: Python 3.13\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-07-20 00:03+0000\n" -"PO-Revision-Date: 2018-05-23 16:11+0000\n" -"Last-Translator: Matt Wang \n" -"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" -"tw)\n" -"Language: zh_TW\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Poedit 3.0.1\n" - -#: ../../library/sunau.rst:2 -msgid ":mod:`sunau` --- Read and write Sun AU files" -msgstr ":mod:`sunau` --- 讀寫 Sun AU 檔案" - -#: ../../library/sunau.rst:10 -msgid "**Source code:** :source:`Lib/sunau.py`" -msgstr "**原始碼:**\\ :source:`Lib/sunau.py`" - -#: ../../library/sunau.rst:12 -msgid "" -"The :mod:`sunau` module is deprecated (see :pep:`PEP 594 <594#sunau>` for " -"details)." -msgstr "" -":mod:`sunau` 模組 (module) 即將被棄用(詳見 :pep:`PEP 594 <594#sunau>`\\ )。" - -#: ../../library/sunau.rst:18 -msgid "" -"The :mod:`sunau` module provides a convenient interface to the Sun AU sound " -"format. Note that this module is interface-compatible with the modules :mod:" -"`aifc` and :mod:`wave`." -msgstr "" -":mod:`sunau` 模組 (module) 提供了一個處理 Sun AU 聲音格式的便利介面。請注意此" -"模組與 :mod:`aifc` 和 :mod:`wave` 的介面是相容的。" - -#: ../../library/sunau.rst:22 -msgid "" -"An audio file consists of a header followed by the data. The fields of the " -"header are:" -msgstr "音訊檔案由標頭 (header) 和資料組成。標頭包含以下欄位:" - -#: ../../library/sunau.rst:26 -msgid "Field" -msgstr "欄位" - -#: ../../library/sunau.rst:26 -msgid "Contents" -msgstr "內容" - -#: ../../library/sunau.rst:28 -msgid "magic word" -msgstr "magic word" - -#: ../../library/sunau.rst:28 -msgid "The four bytes ``.snd``." -msgstr "四個位元組 ``.snd``。" - -#: ../../library/sunau.rst:30 -msgid "header size" -msgstr "header size" - -#: ../../library/sunau.rst:30 -msgid "Size of the header, including info, in bytes." -msgstr "標頭的大小,包括資訊,以位元組為單位。" - -#: ../../library/sunau.rst:32 -msgid "data size" -msgstr "data size" - -#: ../../library/sunau.rst:32 -msgid "Physical size of the data, in bytes." -msgstr "資料的物理大小,以位元組為單位。" - -#: ../../library/sunau.rst:34 -msgid "encoding" -msgstr "encoding" - -#: ../../library/sunau.rst:34 -msgid "Indicates how the audio samples are encoded." -msgstr "表示音訊取樣的編碼方式。" - -#: ../../library/sunau.rst:36 -msgid "sample rate" -msgstr "sample rate" - -#: ../../library/sunau.rst:36 -msgid "The sampling rate." -msgstr "取樣頻率。" - -#: ../../library/sunau.rst:38 -msgid "# of channels" -msgstr "# of channels" - -#: ../../library/sunau.rst:38 -msgid "The number of channels in the samples." -msgstr "取樣中的聲道數。" - -#: ../../library/sunau.rst:40 -msgid "info" -msgstr "info" - -#: ../../library/sunau.rst:40 -msgid "" -"ASCII string giving a description of the audio file (padded with null bytes)." -msgstr "音訊檔案描述的 ASCII 字串(會以空位元組填補 (pad))。" - -#: ../../library/sunau.rst:44 -msgid "" -"Apart from the info field, all header fields are 4 bytes in size. They are " -"all 32-bit unsigned integers encoded in big-endian byte order." -msgstr "" -"除了 info 欄位以外,所有其他標頭中欄位的大小都是 4 位元組,他們都是以 big-" -"endian 位元組順序所編碼的 32-bit(位元)unsigned integers(無符號整數)" - -#: ../../library/sunau.rst:47 -msgid "The :mod:`sunau` module defines the following functions:" -msgstr ":mod:`sunau` 模組定義了以下函式:" - -#: ../../library/sunau.rst:52 -msgid "" -"If *file* is a string, open the file by that name, otherwise treat it as a " -"seekable file-like object. *mode* can be any of" -msgstr "" -"如 *file* 是一個字串,則以此名開啟檔案,否則把它當作一個可以被搜尋的 file-" -"like object(類檔案物件)。*mode* 可以是以下任一" - -#: ../../library/sunau.rst:55 -msgid "``'r'``" -msgstr "``'r'``" - -#: ../../library/sunau.rst:56 -msgid "Read only mode." -msgstr "唯讀模式。" - -#: ../../library/sunau.rst:58 -msgid "``'w'``" -msgstr "``'w'``" - -#: ../../library/sunau.rst:59 -msgid "Write only mode." -msgstr "唯寫模式。" - -#: ../../library/sunau.rst:61 -msgid "Note that it does not allow read/write files." -msgstr "請注意這並不允許讀/寫檔案。" - -#: ../../library/sunau.rst:63 -msgid "" -"A *mode* of ``'r'`` returns an :class:`AU_read` object, while a *mode* of " -"``'w'`` or ``'wb'`` returns an :class:`AU_write` object." -msgstr "" -"*mode* 若設為 ``'r'`` 則會回傳一個 :class:`AU_read` 物件,若設為 ``'w'`` 或 " -"``'wb'`` 則回傳 :class:`AU_write` 物件。" - -#: ../../library/sunau.rst:67 -msgid "The :mod:`sunau` module defines the following exception:" -msgstr ":mod:`sunau` 模組定義了以下例外:" - -#: ../../library/sunau.rst:71 -msgid "" -"An error raised when something is impossible because of Sun AU specs or " -"implementation deficiency." -msgstr "在不符合 Sun AU 規格或實作上有所不足而無法達成某些目的時會引發的錯誤。" - -#: ../../library/sunau.rst:75 -msgid "The :mod:`sunau` module defines the following data items:" -msgstr ":mod:`sunau` 模組定義了以下資料條目:" - -#: ../../library/sunau.rst:79 -msgid "" -"An integer every valid Sun AU file begins with, stored in big-endian form. " -"This is the string ``.snd`` interpreted as an integer." -msgstr "" -"每個 Sun AU 檔案都會作為開頭的一個整數,以 big-endian 形式儲存。這也是 ``." -"snd`` 所直接轉譯成一個整數的字串。" - -#: ../../library/sunau.rst:90 -msgid "" -"Values of the encoding field from the AU header which are supported by this " -"module." -msgstr "此模組有支援的 AU 標頭中 encoding 欄位值。" - -#: ../../library/sunau.rst:101 -msgid "" -"Additional known values of the encoding field from the AU header, but which " -"are not supported by this module." -msgstr "額外已知的 AU 標頭中 encoding 欄位值,但不被此模組支援。" - -#: ../../library/sunau.rst:108 -msgid "AU_read Objects" -msgstr "AU_read 物件" - -#: ../../library/sunau.rst:110 -msgid "" -"AU_read objects, as returned by :func:`.open` above, have the following " -"methods:" -msgstr "如上述 :func:`.open` 所回傳的 AU_read 物件擁有以下 method(方法):" - -#: ../../library/sunau.rst:115 -msgid "" -"Close the stream, and make the instance unusable. (This is called " -"automatically on deletion.)" -msgstr "關閉串流 (stream),並使該實例無法被使用。(這會自動在刪除時呼叫。)" - -#: ../../library/sunau.rst:121 -msgid "Returns number of audio channels (1 for mono, 2 for stereo)." -msgstr "回傳音訊聲道數量(單聲道為 1,雙聲道為 2)。" - -#: ../../library/sunau.rst:126 -msgid "Returns sample width in bytes." -msgstr "回傳取樣位元組長度。" - -#: ../../library/sunau.rst:131 -msgid "Returns sampling frequency." -msgstr "回傳取樣頻率。" - -#: ../../library/sunau.rst:136 -msgid "Returns number of audio frames." -msgstr "回傳音訊總幀數。" - -#: ../../library/sunau.rst:141 -msgid "" -"Returns compression type. Supported compression types are ``'ULAW'``, " -"``'ALAW'`` and ``'NONE'``." -msgstr "回傳壓縮種類。支援的壓縮種類有 ``'ULAW'``、``'ALAW'`` 和 ``'NONE'``。" - -#: ../../library/sunau.rst:147 -msgid "" -"Human-readable version of :meth:`getcomptype`. The supported types have the " -"respective names ``'CCITT G.711 u-law'``, ``'CCITT G.711 A-law'`` and ``'not " -"compressed'``." -msgstr "" -"可被人類讀懂 (human-readable) 的 :meth:`getcomptype`。有被支援的種類分別有這" -"些名稱 ``'CCITT G.711 u-law'``、``'CCITT G.711 A-law'`` 和 ``'not " -"compressed'``。" - -#: ../../library/sunau.rst:154 -msgid "" -"Returns a :func:`~collections.namedtuple` ``(nchannels, sampwidth, " -"framerate, nframes, comptype, compname)``, equivalent to output of the :meth:" -"`get\\*` methods." -msgstr "" -"回傳一個 :func:`~collections.namedtuple` ``(nchannels, sampwidth, framerate, " -"nframes, comptype, compname)``,與 :meth:`get\\*` methods 的輸出相同。" - -#: ../../library/sunau.rst:161 -msgid "" -"Reads and returns at most *n* frames of audio, as a :class:`bytes` object. " -"The data will be returned in linear format. If the original data is in u-" -"LAW format, it will be converted." -msgstr "" -"讀取並以 :class:`bytes` 物件形式回傳音檔中至多 *n* 幀,資料會以線性格式 " -"(linear format) 回傳,如果原始資料是 u-LAW 格式,則它會被轉換。" - -#: ../../library/sunau.rst:168 -msgid "Rewind the file pointer to the beginning of the audio stream." -msgstr "重置檔案指標 (file pointer) 至音訊開頭。" - -#: ../../library/sunau.rst:170 -msgid "" -"The following two methods define a term \"position\" which is compatible " -"between them, and is otherwise implementation dependent." -msgstr "" -"以下兩個 methods 都定義了在它們之間相容的 \"position\",否則會與實作相依。" - -#: ../../library/sunau.rst:176 -msgid "" -"Set the file pointer to the specified position. Only values returned from :" -"meth:`tell` should be used for *pos*." -msgstr "" -"設定檔案指標至指定的位置,只有 :meth:`tell` 的回傳值應被做為 *pos* 使用。" - -#: ../../library/sunau.rst:182 -msgid "" -"Return current file pointer position. Note that the returned value has " -"nothing to do with the actual position in the file." -msgstr "回傳當前檔案指標位置,要注意回傳值和真實檔案中的位置無關。" - -#: ../../library/sunau.rst:185 -msgid "" -"The following two functions are defined for compatibility with the :mod:" -"`aifc`, and don't do anything interesting." -msgstr "以下兩個函式單純是為了和 :mod:`aifc` 相容而定義,並沒有做什麼特別的。" - -#: ../../library/sunau.rst:191 -msgid "Returns ``None``." -msgstr "回傳 ``None``。" - -#: ../../library/sunau.rst:196 -msgid "Raise an error." -msgstr "引發錯誤。" - -#: ../../library/sunau.rst:202 -msgid "AU_write Objects" -msgstr "AU_write 物件" - -#: ../../library/sunau.rst:204 -msgid "" -"AU_write objects, as returned by :func:`.open` above, have the following " -"methods:" -msgstr "如上述 :func:`.open` 所回傳的 AU_write 物件擁有以下 methods:" - -#: ../../library/sunau.rst:209 -msgid "Set the number of channels." -msgstr "設定聲道數。" - -#: ../../library/sunau.rst:214 -msgid "Set the sample width (in bytes.)" -msgstr "設定取樣寬度(以位元組為單位)。" - -#: ../../library/sunau.rst:216 -msgid "Added support for 24-bit samples." -msgstr "新增對於 24-bit 取樣的支援。" - -#: ../../library/sunau.rst:222 -msgid "Set the frame rate." -msgstr "設定影格率 (frame rate)。" - -#: ../../library/sunau.rst:227 -msgid "" -"Set the number of frames. This can be later changed, when and if more " -"frames are written." -msgstr "設定幀數,該值可以在寫入更多幀後修改。" - -#: ../../library/sunau.rst:233 -msgid "" -"Set the compression type and description. Only ``'NONE'`` and ``'ULAW'`` are " -"supported on output." -msgstr "設定壓縮種類和敘述,輸出只支援 ``'NONE'`` 和 ``'ULAW'``。" - -#: ../../library/sunau.rst:239 -msgid "" -"The *tuple* should be ``(nchannels, sampwidth, framerate, nframes, comptype, " -"compname)``, with values valid for the :meth:`set\\*` methods. Set all " -"parameters." -msgstr "" -"*tuple* 應為 ``(nchannels, sampwidth, framerate, nframes, comptype, " -"compname)`` 形式,各個值應該要是 :meth:`set\\*` methods 能有效接受的值。該函" -"數會一次設定所有參數。" - -#: ../../library/sunau.rst:246 -msgid "" -"Return current position in the file, with the same disclaimer for the :meth:" -"`AU_read.tell` and :meth:`AU_read.setpos` methods." -msgstr "" -"回傳當前檔案中的位置,帶有和 :meth:`AU_read.tell` 與 :meth:`AU_read.setpos` " -"方法相同的免責聲明 (disclaimer)。" - -#: ../../library/sunau.rst:252 -msgid "Write audio frames, without correcting *nframes*." -msgstr "寫入音訊資料但不更新 *nframes*。" - -#: ../../library/sunau.rst:254 ../../library/sunau.rst:262 -msgid "Any :term:`bytes-like object` is now accepted." -msgstr "現在可接受任意 :term:`bytes-like object`。" - -#: ../../library/sunau.rst:260 -msgid "Write audio frames and make sure *nframes* is correct." -msgstr "寫入音訊資料並更新 *nframes* 以確保其正確性。" - -#: ../../library/sunau.rst:268 -msgid "Make sure *nframes* is correct, and close the file." -msgstr "確保 *nframes* 是正確的,並關閉檔案。" - -#: ../../library/sunau.rst:270 -msgid "This method is called upon deletion." -msgstr "此 method 會在刪除時呼叫。" - -#: ../../library/sunau.rst:272 -msgid "" -"Note that it is invalid to set any parameters after calling :meth:" -"`writeframes` or :meth:`writeframesraw`." -msgstr "" -"請注意,在呼叫 :meth:`writeframes` 或 :meth:`writeframesraw` 後設定任何參數都" -"是無效的。" diff --git a/library/sys.monitoring.po b/library/sys.monitoring.po index 67cae05d1b..99edc3a8a0 100644 --- a/library/sys.monitoring.po +++ b/library/sys.monitoring.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-23 07:52+0800\n" +"POT-Creation-Date: 2024-09-24 07:20+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -418,7 +418,7 @@ msgid "" "Events can also be controlled on a per code object basis. The functions " "defined below which accept a :class:`types.CodeType` should be prepared to " "accept a look-alike object from functions which are not defined in Python " -"(see :ref:`monitoring`)." +"(see :ref:`c-api-monitoring`)." msgstr "" #: ../../library/sys.monitoring.rst:265 diff --git a/library/sys.po b/library/sys.po index 77f594eaca..32c11aa68d 100644 --- a/library/sys.po +++ b/library/sys.po @@ -1764,7 +1764,7 @@ msgstr "" #: ../../library/sys.rst:1388 msgid "``'ios'``" -msgstr "" +msgstr "``'ios'``" #: ../../library/sys.rst:1389 msgid "Linux" diff --git a/library/telnetlib.po b/library/telnetlib.po deleted file mode 100644 index 20603a5420..0000000000 --- a/library/telnetlib.po +++ /dev/null @@ -1,369 +0,0 @@ -# Copyright (C) 2001-2024, Python Software Foundation -# This file is distributed under the same license as the Python package. -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: Python 3.13\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-03 11:11+0800\n" -"PO-Revision-Date: 2022-05-22 02:15+0800\n" -"Last-Translator: Adrian Liaw \n" -"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" -"tw)\n" -"Language: zh_TW\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Poedit 3.0.1\n" - -#: ../../library/telnetlib.rst:2 -msgid ":mod:`telnetlib` --- Telnet client" -msgstr ":mod:`telnetlib` --- Telnet 客戶端" - -#: ../../library/telnetlib.rst:10 -msgid "**Source code:** :source:`Lib/telnetlib.py`" -msgstr "**原始碼:**\\ :source:`Lib/telnetlib.py`" - -#: ../../library/telnetlib.rst:14 -msgid "" -"The :mod:`telnetlib` module is deprecated (see :pep:`PEP 594 " -"<594#telnetlib>` for details and alternatives)." -msgstr "" -":mod:`telnetlib` 模組 (module) 即將被棄用(詳情與替代方案請見 :pep:`PEP 594 " -"<594#telnetlib>`\\ )。" - -#: ../../library/telnetlib.rst:20 -msgid "" -"The :mod:`telnetlib` module provides a :class:`Telnet` class that implements " -"the Telnet protocol. See :rfc:`854` for details about the protocol. In " -"addition, it provides symbolic constants for the protocol characters (see " -"below), and for the telnet options. The symbolic names of the telnet options " -"follow the definitions in ``arpa/telnet.h``, with the leading ``TELOPT_`` " -"removed. For symbolic names of options which are traditionally not included " -"in ``arpa/telnet.h``, see the module source itself." -msgstr "" - -#: ../../library/telnetlib.rst:28 -msgid "" -"The symbolic constants for the telnet commands are: IAC, DONT, DO, WONT, " -"WILL, SE (Subnegotiation End), NOP (No Operation), DM (Data Mark), BRK " -"(Break), IP (Interrupt process), AO (Abort output), AYT (Are You There), EC " -"(Erase Character), EL (Erase Line), GA (Go Ahead), SB (Subnegotiation Begin)." -msgstr "" - -#: ../../includes/wasm-notavail.rst:3 -msgid ":ref:`Availability `: not Emscripten, not WASI." -msgstr "" - -#: ../../includes/wasm-notavail.rst:5 -msgid "" -"This module does not work or is not available on WebAssembly platforms " -"``wasm32-emscripten`` and ``wasm32-wasi``. See :ref:`wasm-availability` for " -"more information." -msgstr "" -"此模組在 WebAssembly 平台 ``wasm32-emscripten`` 和 ``wasm32-wasi`` 上無法作用" -"或無法使用。有關更多資訊,請參閱 :ref:`wasm-availability`。" - -#: ../../library/telnetlib.rst:37 -msgid "" -":class:`Telnet` represents a connection to a Telnet server. The instance is " -"initially not connected by default; the :meth:`~Telnet.open` method must be " -"used to establish a connection. Alternatively, the host name and optional " -"port number can be passed to the constructor too, in which case the " -"connection to the server will be established before the constructor " -"returns. The optional *timeout* parameter specifies a timeout in seconds " -"for blocking operations like the connection attempt (if not specified, the " -"global default timeout setting will be used)." -msgstr "" - -#: ../../library/telnetlib.rst:46 -msgid "Do not reopen an already connected instance." -msgstr "" - -#: ../../library/telnetlib.rst:48 -msgid "" -"This class has many :meth:`read_\\*` methods. Note that some of them " -"raise :exc:`EOFError` when the end of the connection is read, because they " -"can return an empty string for other reasons. See the individual " -"descriptions below." -msgstr "" - -#: ../../library/telnetlib.rst:52 -msgid "" -"A :class:`Telnet` object is a context manager and can be used in a :keyword:" -"`with` statement. When the :keyword:`!with` block ends, the :meth:`close` " -"method is called::" -msgstr "" - -#: ../../library/telnetlib.rst:56 -msgid "" -">>> from telnetlib import Telnet\n" -">>> with Telnet('localhost', 23) as tn:\n" -"... tn.interact()\n" -"..." -msgstr "" -">>> from telnetlib import Telnet\n" -">>> with Telnet('localhost', 23) as tn:\n" -"... tn.interact()\n" -"..." - -#: ../../library/telnetlib.rst:61 -msgid "Context manager support added" -msgstr "" - -#: ../../library/telnetlib.rst:66 -msgid ":rfc:`854` - Telnet Protocol Specification" -msgstr "" - -#: ../../library/telnetlib.rst:67 -msgid "Definition of the Telnet protocol." -msgstr "" - -#: ../../library/telnetlib.rst:73 -msgid "Telnet Objects" -msgstr "" - -#: ../../library/telnetlib.rst:75 -msgid ":class:`Telnet` instances have the following methods:" -msgstr "" - -#: ../../library/telnetlib.rst:80 -msgid "" -"Read until a given byte string, *expected*, is encountered or until " -"*timeout* seconds have passed." -msgstr "" - -#: ../../library/telnetlib.rst:83 -msgid "" -"When no match is found, return whatever is available instead, possibly empty " -"bytes. Raise :exc:`EOFError` if the connection is closed and no cooked data " -"is available." -msgstr "" - -#: ../../library/telnetlib.rst:90 -msgid "Read all data until EOF as bytes; block until connection closed." -msgstr "" - -#: ../../library/telnetlib.rst:95 -msgid "" -"Read at least one byte of cooked data unless EOF is hit. Return ``b''`` if " -"EOF is hit. Block if no data is immediately available." -msgstr "" - -#: ../../library/telnetlib.rst:101 -msgid "Read everything that can be without blocking in I/O (eager)." -msgstr "" - -#: ../../library/telnetlib.rst:103 ../../library/telnetlib.rst:112 -msgid "" -"Raise :exc:`EOFError` if connection closed and no cooked data available. " -"Return ``b''`` if no cooked data available otherwise. Do not block unless in " -"the midst of an IAC sequence." -msgstr "" - -#: ../../library/telnetlib.rst:110 -msgid "Read readily available data." -msgstr "" - -#: ../../library/telnetlib.rst:119 -msgid "Process and return data already in the queues (lazy)." -msgstr "" - -#: ../../library/telnetlib.rst:121 -msgid "" -"Raise :exc:`EOFError` if connection closed and no data available. Return " -"``b''`` if no cooked data available otherwise. Do not block unless in the " -"midst of an IAC sequence." -msgstr "" - -#: ../../library/telnetlib.rst:128 -msgid "Return any data available in the cooked queue (very lazy)." -msgstr "" - -#: ../../library/telnetlib.rst:130 -msgid "" -"Raise :exc:`EOFError` if connection closed and no data available. Return " -"``b''`` if no cooked data available otherwise. This method never blocks." -msgstr "" - -#: ../../library/telnetlib.rst:136 -msgid "" -"Return the data collected between a SB/SE pair (suboption begin/end). The " -"callback should access these data when it was invoked with a ``SE`` command. " -"This method never blocks." -msgstr "" - -#: ../../library/telnetlib.rst:143 -msgid "" -"Connect to a host. The optional second argument is the port number, which " -"defaults to the standard Telnet port (23). The optional *timeout* parameter " -"specifies a timeout in seconds for blocking operations like the connection " -"attempt (if not specified, the global default timeout setting will be used)." -msgstr "" - -#: ../../library/telnetlib.rst:148 -msgid "Do not try to reopen an already connected instance." -msgstr "" - -#: ../../library/telnetlib.rst:150 -msgid "" -"Raises an :ref:`auditing event ` ``telnetlib.Telnet.open`` with " -"arguments ``self``, ``host``, ``port``." -msgstr "" -"引發一個附帶引數 ``self``、``host``、``port`` 的\\ :ref:`稽核事件 " -"` ``telnetlib.Telnet.open``。" - -#: ../../library/telnetlib.rst:155 -msgid "" -"Print a debug message when the debug level is ``>`` 0. If extra arguments " -"are present, they are substituted in the message using the standard string " -"formatting operator." -msgstr "" - -#: ../../library/telnetlib.rst:162 -msgid "" -"Set the debug level. The higher the value of *debuglevel*, the more debug " -"output you get (on ``sys.stdout``)." -msgstr "" - -#: ../../library/telnetlib.rst:168 -msgid "Close the connection." -msgstr "" - -#: ../../library/telnetlib.rst:173 -msgid "Return the socket object used internally." -msgstr "" - -#: ../../library/telnetlib.rst:178 -msgid "Return the file descriptor of the socket object used internally." -msgstr "" - -#: ../../library/telnetlib.rst:183 -msgid "" -"Write a byte string to the socket, doubling any IAC characters. This can " -"block if the connection is blocked. May raise :exc:`OSError` if the " -"connection is closed." -msgstr "" - -#: ../../library/telnetlib.rst:187 -msgid "" -"Raises an :ref:`auditing event ` ``telnetlib.Telnet.write`` with " -"arguments ``self``, ``buffer``." -msgstr "" -"引發一個附帶引數 ``self``、``buffer`` 的\\ :ref:`稽核事件 ` " -"``telnetlib.Telnet.write``。" - -#: ../../library/telnetlib.rst:189 -msgid "" -"This method used to raise :exc:`socket.error`, which is now an alias of :exc:" -"`OSError`." -msgstr "" - -#: ../../library/telnetlib.rst:196 -msgid "Interaction function, emulates a very dumb Telnet client." -msgstr "" - -#: ../../library/telnetlib.rst:201 -msgid "Multithreaded version of :meth:`interact`." -msgstr "" - -#: ../../library/telnetlib.rst:206 -msgid "Read until one from a list of a regular expressions matches." -msgstr "" - -#: ../../library/telnetlib.rst:208 -msgid "" -"The first argument is a list of regular expressions, either compiled (:ref:" -"`regex objects `) or uncompiled (byte strings). The optional " -"second argument is a timeout, in seconds; the default is to block " -"indefinitely." -msgstr "" - -#: ../../library/telnetlib.rst:213 -msgid "" -"Return a tuple of three items: the index in the list of the first regular " -"expression that matches; the match object returned; and the bytes read up " -"till and including the match." -msgstr "" - -#: ../../library/telnetlib.rst:217 -msgid "" -"If end of file is found and no bytes were read, raise :exc:`EOFError`. " -"Otherwise, when nothing matches, return ``(-1, None, data)`` where *data* is " -"the bytes received so far (may be empty bytes if a timeout happened)." -msgstr "" - -#: ../../library/telnetlib.rst:221 -msgid "" -"If a regular expression ends with a greedy match (such as ``.*``) or if more " -"than one expression can match the same input, the results are non-" -"deterministic, and may depend on the I/O timing." -msgstr "" - -#: ../../library/telnetlib.rst:228 -msgid "" -"Each time a telnet option is read on the input flow, this *callback* (if " -"set) is called with the following parameters: callback(telnet socket, " -"command (DO/DONT/WILL/WONT), option). No other action is done afterwards by " -"telnetlib." -msgstr "" - -#: ../../library/telnetlib.rst:236 -msgid "Telnet Example" -msgstr "Telnet 範例" - -#: ../../library/telnetlib.rst:241 -msgid "A simple example illustrating typical use::" -msgstr "" - -#: ../../library/telnetlib.rst:243 -msgid "" -"import getpass\n" -"import telnetlib\n" -"\n" -"HOST = \"localhost\"\n" -"user = input(\"Enter your remote account: \")\n" -"password = getpass.getpass()\n" -"\n" -"tn = telnetlib.Telnet(HOST)\n" -"\n" -"tn.read_until(b\"login: \")\n" -"tn.write(user.encode('ascii') + b\"\\n\")\n" -"if password:\n" -" tn.read_until(b\"Password: \")\n" -" tn.write(password.encode('ascii') + b\"\\n\")\n" -"\n" -"tn.write(b\"ls\\n\")\n" -"tn.write(b\"exit\\n\")\n" -"\n" -"print(tn.read_all().decode('ascii'))" -msgstr "" -"import getpass\n" -"import telnetlib\n" -"\n" -"HOST = \"localhost\"\n" -"user = input(\"Enter your remote account: \")\n" -"password = getpass.getpass()\n" -"\n" -"tn = telnetlib.Telnet(HOST)\n" -"\n" -"tn.read_until(b\"login: \")\n" -"tn.write(user.encode('ascii') + b\"\\n\")\n" -"if password:\n" -" tn.read_until(b\"Password: \")\n" -" tn.write(password.encode('ascii') + b\"\\n\")\n" -"\n" -"tn.write(b\"ls\\n\")\n" -"tn.write(b\"exit\\n\")\n" -"\n" -"print(tn.read_all().decode('ascii'))" - -#: ../../library/telnetlib.rst:12 -msgid "protocol" -msgstr "protocol(協定)" - -#: ../../library/telnetlib.rst:12 -msgid "Telnet" -msgstr "Telnet" diff --git a/library/threading.po b/library/threading.po index 82ec8c7c3b..13f67b22f7 100644 --- a/library/threading.po +++ b/library/threading.po @@ -74,18 +74,16 @@ msgid "" msgstr "" #: ../../includes/wasm-notavail.rst:3 -#, fuzzy msgid ":ref:`Availability `: not WASI." msgstr ":ref:`適用 `:非 WASI。" #: ../../includes/wasm-notavail.rst:5 -#, fuzzy msgid "" "This module does not work or is not available on WebAssembly. See :ref:`wasm-" "availability` for more information." msgstr "" -"此模組在 WebAssembly 平台 ``wasm32-emscripten`` 和 ``wasm32-wasi`` 上無法作用" -"或無法使用。有關更多資訊,請參閱 :ref:`wasm-availability`。" +"此模組在 WebAssembly 平台上不起作用或無法使用。更多資訊請參閱 :ref:`wasm-" +"availability`。" #: ../../library/threading.rst:50 msgid "This module defines the following functions:" diff --git a/library/time.po b/library/time.po index 8b03cadcce..a31807549b 100644 --- a/library/time.po +++ b/library/time.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-23 07:52+0800\n" +"POT-Creation-Date: 2024-09-24 07:20+0000\n" "PO-Revision-Date: 2024-08-14 16:05+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -282,8 +282,7 @@ msgstr "" "參閱 :ref:`time-clock-id-constants`。" #: ../../library/time.rst:161 ../../library/time.rst:174 -#: ../../library/time.rst:183 ../../library/time.rst:196 -#: ../../library/time.rst:205 ../../library/time.rst:745 +#: ../../library/time.rst:183 ../../library/time.rst:745 #: ../../library/time.rst:862 ../../library/time.rst:890 #: ../../library/time.rst:918 ../../library/time.rst:962 msgid ":ref:`Availability `: Unix." @@ -324,6 +323,10 @@ msgid "" msgstr "" "使用 :func:`clock_settime_ns` 以避免 :class:`float` 型別造成的精確度損失。" +#: ../../library/time.rst:196 ../../library/time.rst:205 +msgid ":ref:`Availability `: Unix, not Android, not iOS." +msgstr ":ref:`適用 `:Unix、非 Android、非 iOS。" + #: ../../library/time.rst:203 msgid "Similar to :func:`clock_settime` but set time with nanoseconds." msgstr "類似於 :func:`clock_settime`,但設定以奈秒為單位的時間。" diff --git a/library/tkinter.po b/library/tkinter.po index 60989d08ac..cff143b797 100644 --- a/library/tkinter.po +++ b/library/tkinter.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-23 07:52+0800\n" +"POT-Creation-Date: 2024-09-24 07:20+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-" @@ -125,13 +125,12 @@ msgid "By Mark Roseman. (ISBN 978-1999149567)" msgstr "由 Mark Roseman 所著。(ISBN 978-1999149567)" #: ../../library/tkinter.rst:61 -#, fuzzy msgid "" -"`Python GUI programming with Tkinter `_" +"`Python GUI programming with Tkinter `_" msgstr "" "`Python GUI programming with Tkinter `_" +"python-gui-programming-with-tkinter-9781788835886>`_" #: ../../library/tkinter.rst:62 msgid "By Alan D. Moore. (ISBN 978-1788835886)" diff --git a/library/tkinter.tix.po b/library/tkinter.tix.po deleted file mode 100644 index ad862d5ec0..0000000000 --- a/library/tkinter.tix.po +++ /dev/null @@ -1,553 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) 2001-2022, Python Software Foundation -# This file is distributed under the same license as the Python package. -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: Python 3.13\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-03 11:11+0800\n" -"PO-Revision-Date: 2022-10-01 14:35+0800\n" -"Last-Translator: Adrian Liaw \n" -"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" -"tw)\n" -"Language: zh_TW\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Poedit 3.1.1\n" - -#: ../../library/tkinter.tix.rst:2 -msgid ":mod:`tkinter.tix` --- Extension widgets for Tk" -msgstr ":mod:`tkinter.tix` --- Tk 擴充小工具" - -#: ../../library/tkinter.tix.rst:9 -msgid "**Source code:** :source:`Lib/tkinter/tix.py`" -msgstr "**原始碼:**\\ :source:`Lib/tkinter/tix.py`" - -#: ../../library/tkinter.tix.rst:13 -msgid "" -"This Tk extension is unmaintained and should not be used in new code. Use :" -"mod:`tkinter.ttk` instead." -msgstr "" - -#: ../../library/tkinter.tix.rst:19 -msgid "" -"The :mod:`tkinter.tix` (Tk Interface Extension) module provides an " -"additional rich set of widgets. Although the standard Tk library has many " -"useful widgets, they are far from complete. The :mod:`tkinter.tix` library " -"provides most of the commonly needed widgets that are missing from standard " -"Tk: :class:`HList`, :class:`ComboBox`, :class:`Control` (a.k.a. SpinBox) and " -"an assortment of scrollable widgets. :mod:`tkinter.tix` also includes many " -"more widgets that are generally useful in a wide range of applications: :" -"class:`NoteBook`, :class:`FileEntry`, :class:`PanedWindow`, etc; there are " -"more than 40 of them." -msgstr "" - -#: ../../library/tkinter.tix.rst:29 -msgid "" -"With all these new widgets, you can introduce new interaction techniques " -"into applications, creating more useful and more intuitive user interfaces. " -"You can design your application by choosing the most appropriate widgets to " -"match the special needs of your application and users." -msgstr "" - -#: ../../library/tkinter.tix.rst:36 -msgid "`Tix Homepage `_" -msgstr "`Tix 首頁 `_" - -#: ../../library/tkinter.tix.rst:37 -msgid "" -"The home page for :mod:`Tix`. This includes links to additional " -"documentation and downloads." -msgstr "" - -#: ../../library/tkinter.tix.rst:40 -msgid "`Tix Man Pages `_" -msgstr "`Tix 首頁 `_" - -#: ../../library/tkinter.tix.rst:41 -msgid "On-line version of the man pages and reference material." -msgstr "" - -#: ../../library/tkinter.tix.rst:43 -msgid "" -"`Tix Programming Guide `_" -msgstr "" -"`Tix 程式指南 `_" - -#: ../../library/tkinter.tix.rst:44 -msgid "On-line version of the programmer's reference material." -msgstr "" - -#: ../../library/tkinter.tix.rst:46 -msgid "" -"`Tix Development Applications `_" -msgstr "" -"`Tix 開發應用程式 `_" - -#: ../../library/tkinter.tix.rst:47 -msgid "" -"Tix applications for development of Tix and Tkinter programs. Tide " -"applications work under Tk or Tkinter, and include :program:`TixInspect`, an " -"inspector to remotely modify and debug Tix/Tk/Tkinter applications." -msgstr "" - -#: ../../library/tkinter.tix.rst:53 -msgid "Using Tix" -msgstr "" - -#: ../../library/tkinter.tix.rst:58 -msgid "" -"Toplevel widget of Tix which represents mostly the main window of an " -"application. It has an associated Tcl interpreter." -msgstr "" - -#: ../../library/tkinter.tix.rst:61 -msgid "" -"Classes in the :mod:`tkinter.tix` module subclasses the classes in the :mod:" -"`tkinter`. The former imports the latter, so to use :mod:`tkinter.tix` with " -"Tkinter, all you need to do is to import one module. In general, you can " -"just import :mod:`tkinter.tix`, and replace the toplevel call to :class:" -"`tkinter.Tk` with :class:`tix.Tk`::" -msgstr "" - -#: ../../library/tkinter.tix.rst:67 -msgid "" -"from tkinter import tix\n" -"from tkinter.constants import *\n" -"root = tix.Tk()" -msgstr "" -"from tkinter import tix\n" -"from tkinter.constants import *\n" -"root = tix.Tk()" - -#: ../../library/tkinter.tix.rst:71 -msgid "" -"To use :mod:`tkinter.tix`, you must have the Tix widgets installed, usually " -"alongside your installation of the Tk widgets. To test your installation, " -"try the following::" -msgstr "" - -#: ../../library/tkinter.tix.rst:75 -msgid "" -"from tkinter import tix\n" -"root = tix.Tk()\n" -"root.tk.eval('package require Tix')" -msgstr "" -"from tkinter import tix\n" -"root = tix.Tk()\n" -"root.tk.eval('package require Tix')" - -#: ../../library/tkinter.tix.rst:81 -msgid "Tix Widgets" -msgstr "" - -#: ../../library/tkinter.tix.rst:83 -msgid "" -"`Tix `_ introduces over 40 widget classes to the :mod:`tkinter` repertoire." -msgstr "" - -#: ../../library/tkinter.tix.rst:88 -msgid "Basic Widgets" -msgstr "" - -#: ../../library/tkinter.tix.rst:93 -msgid "" -"A `Balloon `_ that pops up over a widget to provide help. When the user " -"moves the cursor inside a widget to which a Balloon widget has been bound, a " -"small pop-up window with a descriptive message will be shown on the screen." -msgstr "" - -#: ../../library/tkinter.tix.rst:105 -msgid "" -"The `ButtonBox `_ widget creates a box of buttons, such as is commonly " -"used for ``Ok Cancel``." -msgstr "" - -#: ../../library/tkinter.tix.rst:115 -msgid "" -"The `ComboBox `_ widget is similar to the combo box control in MS Windows. " -"The user can select a choice by either typing in the entry subwidget or " -"selecting from the listbox subwidget." -msgstr "" - -#: ../../library/tkinter.tix.rst:127 -msgid "" -"The `Control `_ widget is also known as the :class:`SpinBox` widget. The " -"user can adjust the value by pressing the two arrow buttons or by entering " -"the value directly into the entry. The new value will be checked against the " -"user-defined upper and lower limits." -msgstr "" - -#: ../../library/tkinter.tix.rst:140 -msgid "" -"The `LabelEntry `_ widget packages an entry widget and a label into one " -"mega widget. It can be used to simplify the creation of \"entry-form\" type " -"of interface." -msgstr "" - -#: ../../library/tkinter.tix.rst:151 -msgid "" -"The `LabelFrame `_ widget packages a frame widget and a label into one " -"mega widget. To create widgets inside a LabelFrame widget, one creates the " -"new widgets relative to the :attr:`frame` subwidget and manage them inside " -"the :attr:`frame` subwidget." -msgstr "" - -#: ../../library/tkinter.tix.rst:163 -msgid "" -"The `Meter `_ widget can be used to show the progress of a background job " -"which may take a long time to execute." -msgstr "" - -#: ../../library/tkinter.tix.rst:174 -msgid "" -"The `OptionMenu `_ creates a menu button of options." -msgstr "" - -#: ../../library/tkinter.tix.rst:184 -msgid "" -"The `PopupMenu `_ widget can be used as a replacement of the ``tk_popup`` " -"command. The advantage of the :mod:`Tix` :class:`PopupMenu` widget is it " -"requires less application code to manipulate." -msgstr "" - -#: ../../library/tkinter.tix.rst:196 -msgid "" -"The `Select `_ widget is a container of button subwidgets. It can be used " -"to provide radio-box or check-box style of selection options for the user." -msgstr "" - -#: ../../library/tkinter.tix.rst:207 -msgid "" -"The `StdButtonBox `_ widget is a group of standard buttons for Motif-like " -"dialog boxes." -msgstr "" - -#: ../../library/tkinter.tix.rst:216 -msgid "File Selectors" -msgstr "" - -#: ../../library/tkinter.tix.rst:221 -msgid "" -"The `DirList `_ widget displays a list view of a directory, its previous " -"directories and its sub-directories. The user can choose one of the " -"directories displayed in the list or change to another directory." -msgstr "" - -#: ../../library/tkinter.tix.rst:233 -msgid "" -"The `DirTree `_ widget displays a tree view of a directory, its previous " -"directories and its sub-directories. The user can choose one of the " -"directories displayed in the list or change to another directory." -msgstr "" - -#: ../../library/tkinter.tix.rst:245 -msgid "" -"The `DirSelectDialog `_ widget presents the directories in the file " -"system in a dialog window. The user can use this dialog window to navigate " -"through the file system to select the desired directory." -msgstr "" - -#: ../../library/tkinter.tix.rst:257 -msgid "" -"The :class:`DirSelectBox` is similar to the standard Motif(TM) directory-" -"selection box. It is generally used for the user to choose a directory. " -"DirSelectBox stores the directories mostly recently selected into a ComboBox " -"widget so that they can be quickly selected again." -msgstr "" - -#: ../../library/tkinter.tix.rst:265 -msgid "" -"The `ExFileSelectBox `_ widget is usually embedded in a " -"tixExFileSelectDialog widget. It provides a convenient method for the user " -"to select files. The style of the :class:`ExFileSelectBox` widget is very " -"similar to the standard file dialog on MS Windows 3.1." -msgstr "" - -#: ../../library/tkinter.tix.rst:278 -msgid "" -"The `FileSelectBox `_ is similar to the standard Motif(TM) file-selection " -"box. It is generally used for the user to choose a file. FileSelectBox " -"stores the files mostly recently selected into a :class:`ComboBox` widget so " -"that they can be quickly selected again." -msgstr "" - -#: ../../library/tkinter.tix.rst:291 -msgid "" -"The `FileEntry `_ widget can be used to input a filename. The user can " -"type in the filename manually. Alternatively, the user can press the button " -"widget that sits next to the entry, which will bring up a file selection " -"dialog." -msgstr "" - -#: ../../library/tkinter.tix.rst:302 -msgid "Hierarchical ListBox" -msgstr "" - -#: ../../library/tkinter.tix.rst:307 -msgid "" -"The `HList `_ widget can be used to display any data that have a " -"hierarchical structure, for example, file system directory trees. The list " -"entries are indented and connected by branch lines according to their places " -"in the hierarchy." -msgstr "" - -#: ../../library/tkinter.tix.rst:319 -msgid "" -"The `CheckList `_ widget displays a list of items to be selected by the " -"user. CheckList acts similarly to the Tk checkbutton or radiobutton widgets, " -"except it is capable of handling many more items than checkbuttons or " -"radiobuttons." -msgstr "" - -#: ../../library/tkinter.tix.rst:335 -msgid "" -"The `Tree `_ widget can be used to display hierarchical data in a tree form. The " -"user can adjust the view of the tree by opening or closing parts of the tree." -msgstr "" - -#: ../../library/tkinter.tix.rst:347 -msgid "Tabular ListBox" -msgstr "" - -#: ../../library/tkinter.tix.rst:352 -msgid "" -"The `TList `_ widget can be used to display data in a tabular format. The " -"list entries of a :class:`TList` widget are similar to the entries in the Tk " -"listbox widget. The main differences are (1) the :class:`TList` widget can " -"display the list entries in a two dimensional format and (2) you can use " -"graphical images as well as multiple colors and fonts for the list entries." -msgstr "" - -#: ../../library/tkinter.tix.rst:375 -msgid "Manager Widgets" -msgstr "" - -#: ../../library/tkinter.tix.rst:380 -msgid "" -"The `PanedWindow `_ widget allows the user to interactively manipulate the " -"sizes of several panes. The panes can be arranged either vertically or " -"horizontally. The user changes the sizes of the panes by dragging the " -"resize handle between two panes." -msgstr "" - -#: ../../library/tkinter.tix.rst:392 -msgid "" -"The `ListNoteBook `_ widget is very similar to the :class:`TixNoteBook` " -"widget: it can be used to display many windows in a limited space using a " -"notebook metaphor. The notebook is divided into a stack of pages (windows). " -"At one time only one of these pages can be shown. The user can navigate " -"through these pages by choosing the name of the desired page in the :attr:" -"`hlist` subwidget." -msgstr "" - -#: ../../library/tkinter.tix.rst:406 -msgid "" -"The `NoteBook `_ widget can be used to display many windows in a limited " -"space using a notebook metaphor. The notebook is divided into a stack of " -"pages. At one time only one of these pages can be shown. The user can " -"navigate through these pages by choosing the visual \"tabs\" at the top of " -"the NoteBook widget." -msgstr "" - -#: ../../library/tkinter.tix.rst:428 -msgid "Image Types" -msgstr "" - -#: ../../library/tkinter.tix.rst:430 -msgid "The :mod:`tkinter.tix` module adds:" -msgstr "" - -#: ../../library/tkinter.tix.rst:432 -msgid "" -"`pixmap `_ capabilities to all :mod:`tkinter.tix` and :mod:`tkinter` widgets to " -"create color images from XPM files." -msgstr "" - -#: ../../library/tkinter.tix.rst:441 -msgid "" -"`Compound `_ image types can be used to create images that consists of multiple " -"horizontal lines; each line is composed of a series of items (texts, " -"bitmaps, images or spaces) arranged from left to right. For example, a " -"compound image can be used to display a bitmap and a text string " -"simultaneously in a Tk :class:`Button` widget." -msgstr "" - -#: ../../library/tkinter.tix.rst:460 -msgid "Miscellaneous Widgets" -msgstr "" - -#: ../../library/tkinter.tix.rst:465 -msgid "" -"The `InputOnly `_ widgets are to accept inputs from the user, which can be " -"done with the ``bind`` command (Unix only)." -msgstr "" - -#: ../../library/tkinter.tix.rst:472 -msgid "Form Geometry Manager" -msgstr "" - -#: ../../library/tkinter.tix.rst:474 -msgid "In addition, :mod:`tkinter.tix` augments :mod:`tkinter` by providing:" -msgstr "" - -#: ../../library/tkinter.tix.rst:479 -msgid "" -"The `Form `_ geometry manager based on attachment rules for all Tk widgets." -msgstr "" - -#: ../../library/tkinter.tix.rst:485 -msgid "Tix Commands" -msgstr "Tix 指令" - -#: ../../library/tkinter.tix.rst:490 -msgid "" -"The `tix commands `_ provide access to miscellaneous elements of :mod:`Tix`'s internal " -"state and the :mod:`Tix` application context. Most of the information " -"manipulated by these methods pertains to the application as a whole, or to a " -"screen or display, rather than to a particular window." -msgstr "" - -#: ../../library/tkinter.tix.rst:497 -msgid "To view the current settings, the common usage is::" -msgstr "" - -#: ../../library/tkinter.tix.rst:499 -msgid "" -"from tkinter import tix\n" -"root = tix.Tk()\n" -"print(root.tix_configure())" -msgstr "" -"from tkinter import tix\n" -"root = tix.Tk()\n" -"print(root.tix_configure())" - -#: ../../library/tkinter.tix.rst:506 -msgid "" -"Query or modify the configuration options of the Tix application context. If " -"no option is specified, returns a dictionary all of the available options. " -"If option is specified with no value, then the method returns a list " -"describing the one named option (this list will be identical to the " -"corresponding sublist of the value returned if no option is specified). If " -"one or more option-value pairs are specified, then the method modifies the " -"given option(s) to have the given value(s); in this case the method returns " -"an empty string. Option may be any of the configuration options." -msgstr "" - -#: ../../library/tkinter.tix.rst:518 -msgid "" -"Returns the current value of the configuration option given by *option*. " -"Option may be any of the configuration options." -msgstr "" - -#: ../../library/tkinter.tix.rst:524 -msgid "" -"Locates a bitmap file of the name ``name.xpm`` or ``name`` in one of the " -"bitmap directories (see the :meth:`tix_addbitmapdir` method). By using :" -"meth:`tix_getbitmap`, you can avoid hard coding the pathnames of the bitmap " -"files in your application. When successful, it returns the complete pathname " -"of the bitmap file, prefixed with the character ``@``. The returned value " -"can be used to configure the ``bitmap`` option of the Tk and Tix widgets." -msgstr "" - -#: ../../library/tkinter.tix.rst:534 -msgid "" -"Tix maintains a list of directories under which the :meth:`tix_getimage` " -"and :meth:`tix_getbitmap` methods will search for image files. The standard " -"bitmap directory is :file:`$TIX_LIBRARY/bitmaps`. The :meth:" -"`tix_addbitmapdir` method adds *directory* into this list. By using this " -"method, the image files of an applications can also be located using the :" -"meth:`tix_getimage` or :meth:`tix_getbitmap` method." -msgstr "" - -#: ../../library/tkinter.tix.rst:544 -msgid "" -"Returns the file selection dialog that may be shared among different calls " -"from this application. This method will create a file selection dialog " -"widget when it is called the first time. This dialog will be returned by all " -"subsequent calls to :meth:`tix_filedialog`. An optional dlgclass parameter " -"can be passed as a string to specified what type of file selection dialog " -"widget is desired. Possible options are ``tix``, ``FileSelectDialog`` or " -"``tixExFileSelectDialog``." -msgstr "" - -#: ../../library/tkinter.tix.rst:554 -msgid "" -"Locates an image file of the name :file:`name.xpm`, :file:`name.xbm` or :" -"file:`name.ppm` in one of the bitmap directories (see the :meth:" -"`tix_addbitmapdir` method above). If more than one file with the same name " -"(but different extensions) exist, then the image type is chosen according to " -"the depth of the X display: xbm images are chosen on monochrome displays and " -"color images are chosen on color displays. By using :meth:`tix_getimage`, " -"you can avoid hard coding the pathnames of the image files in your " -"application. When successful, this method returns the name of the newly " -"created image, which can be used to configure the ``image`` option of the Tk " -"and Tix widgets." -msgstr "" - -#: ../../library/tkinter.tix.rst:567 -msgid "Gets the options maintained by the Tix scheme mechanism." -msgstr "" - -#: ../../library/tkinter.tix.rst:572 -msgid "" -"Resets the scheme and fontset of the Tix application to *newScheme* and " -"*newFontSet*, respectively. This affects only those widgets created after " -"this call. Therefore, it is best to call the resetoptions method before the " -"creation of any widgets in a Tix application." -msgstr "" - -#: ../../library/tkinter.tix.rst:577 -msgid "" -"The optional parameter *newScmPrio* can be given to reset the priority level " -"of the Tk options set by the Tix schemes." -msgstr "" - -#: ../../library/tkinter.tix.rst:580 -msgid "" -"Because of the way Tk handles the X option database, after Tix has been has " -"imported and inited, it is not possible to reset the color schemes and font " -"sets using the :meth:`tix_config` method. Instead, the :meth:" -"`tix_resetoptions` method must be used." -msgstr "" - -#: ../../library/tkinter.tix.rst:11 -msgid "Tix" -msgstr "Tix" diff --git a/library/typing.po b/library/typing.po index 0840c1c64a..60f44beffd 100644 --- a/library/typing.po +++ b/library/typing.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-23 07:52+0800\n" +"POT-Creation-Date: 2024-09-24 07:20+0000\n" "PO-Revision-Date: 2024-07-11 11:12+0800\n" "Last-Translator: Li-Hung Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -2135,7 +2135,7 @@ msgid "" " year: int\n" "\n" "def mutate_movie(m: Movie) -> None:\n" -" m[\"year\"] = 1992 # allowed\n" +" m[\"year\"] = 1999 # allowed\n" " m[\"title\"] = \"The Matrix\" # typechecker error" msgstr "" @@ -4299,7 +4299,7 @@ msgstr "" #: ../../library/typing.rst:2792 msgid "" "`Unreachable Code and Exhaustiveness Checking `__ has more information about " +"en/latest/guides/unreachable.html>`__ has more information about " "exhaustiveness checking with static typing." msgstr "" @@ -5756,7 +5756,7 @@ msgstr ":class:`typing.Hashable` 和 :class:`typing.Sized`" #: ../../library/typing.rst:3888 ../../library/typing.rst:3892 msgid "3.12" -msgstr "" +msgstr "3.12" #: ../../library/typing.rst:3890 msgid ":gh:`94309`" @@ -5780,235 +5780,20 @@ msgstr "3.13" #: ../../library/typing.rst:3897 msgid "3.15" -msgstr "" +msgstr "3.15" #: ../../library/typing.rst:3898 -#, fuzzy msgid ":gh:`106309`" -msgstr ":gh:`94309`" +msgstr ":gh:`106309`" #: ../../library/typing.rst:3899 -#, fuzzy msgid ":data:`typing.AnyStr`" -msgstr ":data:`typing.Text`" +msgstr ":data:`typing.AnyStr`" #: ../../library/typing.rst:3901 msgid "3.18" -msgstr "" +msgstr "3.18" #: ../../library/typing.rst:3902 -#, fuzzy msgid ":gh:`105578`" -msgstr ":gh:`91896`" - -#~ msgid "Point2D = TypedDict('Point2D', x=int, y=int, label=str)" -#~ msgstr "Point2D = TypedDict('Point2D', x=int, y=int, label=str)" - -#~ msgid "``typing.io`` and ``typing.re`` submodules" -#~ msgstr "``typing.io`` 和 ``typing.re`` 子模組" - -#~ msgid "3.8" -#~ msgstr "3.8" - -#~ msgid ":issue:`38291`" -#~ msgstr ":issue:`38291`" - -#~ msgid "" -#~ "On older Python versions, :data:`NoReturn` may be used to express the " -#~ "same concept. ``Never`` was added to make the intended meaning more " -#~ "explicit." -#~ msgstr "" -#~ "在舊的 Python 版本當中,:data:`NoReturn` 可以用來當作一樣的概念使用。新增 " -#~ "``Never`` 之後,則讓這個含義變得更為明確。" - -#~ msgid "" -#~ "``NoReturn`` can also be used as a `bottom type `_, a type that has no values. Starting in Python 3.11, " -#~ "the :data:`Never` type should be used for this concept instead. Type " -#~ "checkers should treat the two equivalently." -#~ msgstr "" -#~ "``NoReturn`` 可以用來作為一個\\ `底部型別 `_,一個沒有值的型別。從 Python 3.11 開始,型別 :data:`Never` " -#~ "應該改用這個概念。型別檢查器應該將這兩種型別視為相等的。" - -#~ msgid "" -#~ "This module provides runtime support for type hints. For the original " -#~ "specification of the typing system, see :pep:`484`. For a simplified " -#~ "introduction to type hints, see :pep:`483`." -#~ msgstr "" -#~ "這個模組提供可以支援型別提示的 runtime。關於加註型別系統的原有規格,請看 :" -#~ "pep:`484`。關於型別提示的簡易介紹,請看 :pep:`483`。" - -#~ msgid "" -#~ "The function below takes and returns a string and is annotated as " -#~ "follows::" -#~ msgstr "以下函式接受及回傳都是使用字串,且註解方式如下: ::" - -#~ msgid "" -#~ "In the function ``greeting``, the argument ``name`` is expected to be of " -#~ "type :class:`str` and the return type :class:`str`. Subtypes are accepted " -#~ "as arguments." -#~ msgstr "" -#~ "在函式 ``greeting`` 當中,引數 ``name`` 的型別應為 :class:`str` 且回傳的型" -#~ "別也是 :class:`str`。該引數也可以接受其子型別。" - -#~ msgid "" -#~ "For a summary of deprecated features and a deprecation timeline, please " -#~ "see `Deprecation Timeline of Major Features`_." -#~ msgstr "" -#~ "棄用功能及其棄用時間線的簡介,請看\\ `Deprecation Timeline of Major " -#~ "Features`_ \\。" - -#~ msgid "Relevant PEPs" -#~ msgstr "相關的 PEPs" - -#~ msgid "" -#~ "Since the initial introduction of type hints in :pep:`484` and :pep:" -#~ "`483`, a number of PEPs have modified and enhanced Python's framework for " -#~ "type annotations:" -#~ msgstr "" -#~ "自從 :pep:`484` 及 :pep:`483` 對於型別提示的基礎引入,多個 PEPs 針對型別註" -#~ "釋的 Python 框架進行修訂及加強:" - -#~ msgid ":pep:`526`: Syntax for Variable Annotations" -#~ msgstr ":pep:`526`:變數註釋的語法" - -#~ msgid "" -#~ "*Introducing* syntax for annotating variables outside of function " -#~ "definitions, and :data:`ClassVar`" -#~ msgstr "*引入*\\ 在定義函式之外的變數註釋語法,以及 :data:`ClassVar`" - -#~ msgid ":pep:`544`: Protocols: Structural subtyping (static duck typing)" -#~ msgstr "" -#~ ":pep:`544`: 協定:結構子型別 (Structural Subtyping) (靜態鴨子型別," -#~ "Static Duck Typing)" - -#~ msgid "" -#~ "*Introducing* :class:`Protocol` and the :func:" -#~ "`@runtime_checkable` decorator" -#~ msgstr "" -#~ "*引入* :class:`Protocol` 以及 :func:" -#~ "`@runtime_checkable` 裝飾器 (decorator)" - -#~ msgid ":pep:`585`: Type Hinting Generics In Standard Collections" -#~ msgstr "" -#~ ":pep:`585`:基礎彙集 (collection) 中的型別提示泛型 (Type Hinting Generics " -#~ "In Standard Collections)" - -#~ msgid "" -#~ "*Introducing* :class:`types.GenericAlias` and the ability to use standard " -#~ "library classes as :ref:`generic types`" -#~ msgstr "" -#~ "*引入* :class:`types.GenericAlias` 以及使用基礎函式庫類別 :ref:`generic " -#~ "types` 的能力" - -#~ msgid ":pep:`586`: Literal Types" -#~ msgstr ":pep:`586`:文字型別" - -#~ msgid "*Introducing* :data:`Literal`" -#~ msgstr "*引入* :data:`Literal`" - -#~ msgid "" -#~ ":pep:`589`: TypedDict: Type Hints for Dictionaries with a Fixed Set of " -#~ "Keys" -#~ msgstr ":pep:`589`:TypedDict:含有一組固定 (fixed) 鍵值的型別提示字典" - -#~ msgid "*Introducing* :class:`TypedDict`" -#~ msgstr "*引入* :class:`TypedDict`" - -#~ msgid ":pep:`591`: Adding a final qualifier to typing" -#~ msgstr ":pep:`591`:為型別新增一個最終限定符 (final qualifier)" - -#~ msgid "*Introducing* :data:`Final` and the :func:`@final` decorator" -#~ msgstr "*引入* :data:`Final` 以及 :func:`@final` 裝飾器" - -#~ msgid ":pep:`593`: Flexible function and variable annotations" -#~ msgstr ":pep:`593`:彈性函式及變數註釋" - -#~ msgid "*Introducing* :data:`Annotated`" -#~ msgstr "*引入* :data:`Annotated`" - -#~ msgid ":pep:`604`: Allow writing union types as ``X | Y``" -#~ msgstr ":pep:`604`:允許寫入聯集型別 (union type) 為 ``X | Y``" - -#~ msgid "" -#~ "*Introducing* :data:`types.UnionType` and the ability to use the binary-" -#~ "or operator ``|`` to signify a :ref:`union of types`" -#~ msgstr "" -#~ "*引入* :data:`types.UnionType` 以及使用 binary-or 運算子 ``|`` 以表示\\ :" -#~ "ref:`型別聯合 `\\ 的能力" - -#~ msgid ":pep:`612`: Parameter Specification Variables" -#~ msgstr ":pep:`612`:參數規格變數 (Parameter Specification Variable)" - -#~ msgid "*Introducing* :class:`ParamSpec` and :data:`Concatenate`" -#~ msgstr "*引入* :class:`ParamSpec` 及 :data:`Concatenate`" - -#~ msgid ":pep:`613`: Explicit Type Aliases" -#~ msgstr ":pep:`613`:顯式型別別名 (Explicit Type Alias)" - -#~ msgid "*Introducing* :data:`TypeAlias`" -#~ msgstr "*引入* :data:`TypeAlias`" - -#~ msgid ":pep:`646`: Variadic Generics" -#~ msgstr ":pep:`646`:可變參數泛型 (Variadic Generic)" - -#~ msgid "*Introducing* :data:`TypeVarTuple`" -#~ msgstr "*引入* :data:`TypeVarTuple`" - -#~ msgid ":pep:`647`: User-Defined Type Guards" -#~ msgstr ":pep:`647`:使用者定義的型別防護 (Type Guard)" - -#~ msgid "*Introducing* :data:`TypeGuard`" -#~ msgstr "*引入* :data:`TypeGuard`" - -#~ msgid "" -#~ ":pep:`655`: Marking individual TypedDict items as required or potentially " -#~ "missing" -#~ msgstr ":pep:`655`:標記個別的 TypedDict 物件為必需的或可能遺失的" - -#~ msgid "*Introducing* :data:`Required` and :data:`NotRequired`" -#~ msgstr "*引入* :data:`Required` 和 :data:`NotRequired`" - -#~ msgid ":pep:`673`: Self type" -#~ msgstr ":pep:`673`:Self 型別" - -#~ msgid "*Introducing* :data:`Self`" -#~ msgstr "*引入* :data:`Self`" - -#~ msgid ":pep:`675`: Arbitrary Literal String Type" -#~ msgstr ":pep:`675`:任意的文本字串型別 (Arbitrary Literal String Type)" - -#~ msgid "*Introducing* :data:`LiteralString`" -#~ msgstr "*引入* :data:`LiteralString`" - -#~ msgid ":pep:`681`: Data Class Transforms" -#~ msgstr ":pep:`681`:資料類別轉換" - -#~ msgid "" -#~ "*Introducing* the :func:`@dataclass_transform` " -#~ "decorator" -#~ msgstr "*引入* :func:`@dataclass_transform` 裝飾器" - -#~ msgid ":pep:`692`: Using ``TypedDict`` for more precise ``**kwargs`` typing" -#~ msgstr ":pep:`692`:為更精準的 ``**kwargs`` 型別使用 ``TypedDict``" - -#~ msgid "" -#~ "*Introducing* a new way of typing ``**kwargs`` with :data:`Unpack` and :" -#~ "data:`TypedDict`" -#~ msgstr "" -#~ "*引入* 型別 ``**kwargs`` 的新方式 :data:`Unpack` 以及 :data:`TypedDict`" - -#~ msgid ":pep:`695`: Type Parameter Syntax" -#~ msgstr ":pep:`695`:型別參數語法" - -#~ msgid "" -#~ "*Introducing* builtin syntax for creating generic functions, classes, and " -#~ "type aliases." -#~ msgstr "*引入*\\ 建立泛型函式、類別、型別別名的內建語法。" - -#~ msgid ":pep:`698`: Adding an override decorator to typing" -#~ msgstr ":pep:`698`:為型別新增可覆寫的裝飾器" - -#~ msgid "*Introducing* the :func:`@override` decorator" -#~ msgstr "*引入* :func:`@override` 裝飾器" +msgstr ":gh:`105578`" diff --git a/library/undoc.po b/library/undoc.po deleted file mode 100644 index 6a66f5b73e..0000000000 --- a/library/undoc.po +++ /dev/null @@ -1,62 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) 2001-2022, Python Software Foundation -# This file is distributed under the same license as the Python package. -# FIRST AUTHOR , YEAR. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: Python 3.10\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-01-14 13:34+0800\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"Language: zh_TW\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" - -#: ../../library/undoc.rst:5 -msgid "Undocumented Modules" -msgstr "未紀錄於文件的模組" - -#: ../../library/undoc.rst:7 -msgid "" -"Here's a quick listing of modules that are currently undocumented, but that " -"should be documented. Feel free to contribute documentation for them! " -"(Send via email to docs@python.org.)" -msgstr "" - -#: ../../library/undoc.rst:11 -msgid "" -"The idea and original contents for this chapter were taken from a posting by " -"Fredrik Lundh; the specific contents of this chapter have been substantially " -"revised." -msgstr "" - -#: ../../library/undoc.rst:17 -msgid "Platform specific modules" -msgstr "" - -#: ../../library/undoc.rst:19 -msgid "" -"These modules are used to implement the :mod:`os.path` module, and are not " -"documented beyond this mention. There's little need to document these." -msgstr "" - -#: ../../library/undoc.rst:23 -msgid ":mod:`ntpath`" -msgstr ":mod:`ntpath`" - -#: ../../library/undoc.rst:23 -msgid "--- Implementation of :mod:`os.path` on Win32 and Win64 platforms." -msgstr "" - -#: ../../library/undoc.rst:25 -msgid ":mod:`posixpath`" -msgstr ":mod:`posixpath`" - -#: ../../library/undoc.rst:26 -msgid "--- Implementation of :mod:`os.path` on POSIX." -msgstr "" diff --git a/library/urllib.request.po b/library/urllib.request.po index 3fb995ae69..5720f797b8 100644 --- a/library/urllib.request.po +++ b/library/urllib.request.po @@ -55,16 +55,15 @@ msgstr "" #: ../../includes/wasm-notavail.rst:3 msgid ":ref:`Availability `: not WASI." -msgstr "" +msgstr ":ref:`適用 `:非 WASI。" #: ../../includes/wasm-notavail.rst:5 -#, fuzzy msgid "" "This module does not work or is not available on WebAssembly. See :ref:`wasm-" "availability` for more information." msgstr "" -"此模組在 WebAssembly 平台 ``wasm32-emscripten`` 和 ``wasm32-wasi`` 上無法作用" -"或無法使用。有關更多資訊,請參閱 :ref:`wasm-availability`。" +"此模組在 WebAssembly 平台上不起作用或無法使用。更多資訊請參閱 :ref:`wasm-" +"availability`。" #: ../../library/urllib.request.rst:34 msgid "The :mod:`urllib.request` module defines the following functions:" diff --git a/library/uu.po b/library/uu.po deleted file mode 100644 index 13affdd5a7..0000000000 --- a/library/uu.po +++ /dev/null @@ -1,110 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) 2001-202# SOME DESCRIPTIVE TITLE., Python Software Foundation -# This file is distributed under the same license as the Python package. -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: Python 3.13\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-07-20 00:03+0000\n" -"PO-Revision-Date: 2022-05-22 02:22+0800\n" -"Last-Translator: Liang-Bo Wang \n" -"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" -"tw)\n" -"Language: zh_TW\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Poedit 3.0.1\n" - -#: ../../library/uu.rst:2 -msgid ":mod:`uu` --- Encode and decode uuencode files" -msgstr ":mod:`xdrlib` --- uuencode 檔案的編碼與解碼" - -#: ../../library/uu.rst:10 -msgid "**Source code:** :source:`Lib/uu.py`" -msgstr "**原始碼:**\\ :source:`Lib/uu.py`" - -#: ../../library/uu.rst:12 -msgid "" -"The :mod:`uu` module is deprecated (see :pep:`PEP 594 <594#uu-and-the-uu-" -"encoding>` for details). :mod:`base64` is a modern alternative." -msgstr "" -":mod:`uu` 模組 (module) 即將被棄用(詳見 :pep:`PEP 594 <594#uu-and-the-uu-" -"encoding>`\\ )。:mod:`base64` 是個現時常用的替代方案。" - -#: ../../library/uu.rst:19 -msgid "" -"This module encodes and decodes files in uuencode format, allowing arbitrary " -"binary data to be transferred over ASCII-only connections. Wherever a file " -"argument is expected, the methods accept a file-like object. For backwards " -"compatibility, a string containing a pathname is also accepted, and the " -"corresponding file will be opened for reading and writing; the pathname " -"``'-'`` is understood to mean the standard input or output. However, this " -"interface is deprecated; it's better for the caller to open the file itself, " -"and be sure that, when required, the mode is ``'rb'`` or ``'wb'`` on Windows." -msgstr "" - -#: ../../library/uu.rst:32 -msgid "" -"This code was contributed by Lance Ellinghouse, and modified by Jack Jansen." -msgstr "" - -#: ../../library/uu.rst:34 -msgid "The :mod:`uu` module defines the following functions:" -msgstr "" - -#: ../../library/uu.rst:39 -msgid "" -"Uuencode file *in_file* into file *out_file*. The uuencoded file will have " -"the header specifying *name* and *mode* as the defaults for the results of " -"decoding the file. The default defaults are taken from *in_file*, or ``'-'`` " -"and ``0o666`` respectively. If *backtick* is true, zeros are represented by " -"``'`'`` instead of spaces." -msgstr "" - -#: ../../library/uu.rst:45 -msgid "Added the *backtick* parameter." -msgstr "新增 *backtick* 參數。" - -#: ../../library/uu.rst:51 -msgid "" -"This call decodes uuencoded file *in_file* placing the result on file " -"*out_file*. If *out_file* is a pathname, *mode* is used to set the " -"permission bits if the file must be created. Defaults for *out_file* and " -"*mode* are taken from the uuencode header. However, if the file specified " -"in the header already exists, a :exc:`uu.Error` is raised." -msgstr "" - -#: ../../library/uu.rst:57 -msgid "" -":func:`decode` may print a warning to standard error if the input was " -"produced by an incorrect uuencoder and Python could recover from that " -"error. Setting *quiet* to a true value silences this warning." -msgstr "" - -#: ../../library/uu.rst:64 -msgid "" -"Subclass of :exc:`Exception`, this can be raised by :func:`uu.decode` under " -"various situations, such as described above, but also including a badly " -"formatted header, or truncated input file." -msgstr "" - -#: ../../library/uu.rst:71 -msgid "Module :mod:`binascii`" -msgstr ":mod:`binascii` 模組" - -#: ../../library/uu.rst:72 -msgid "" -"Support module containing ASCII-to-binary and binary-to-ASCII conversions." -msgstr "" - -#: ../../library/uu.rst:28 -msgid "Jansen, Jack" -msgstr "Jansen, Jack" - -#: ../../library/uu.rst:28 -msgid "Ellinghouse, Lance" -msgstr "Ellinghouse, Lance" diff --git a/library/venv.po b/library/venv.po index f24d52177e..2318e51ea4 100644 --- a/library/venv.po +++ b/library/venv.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-23 07:52+0800\n" +"POT-Creation-Date: 2024-09-24 07:20+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-" @@ -91,20 +91,17 @@ msgid "" "environments/#create-and-use-virtual-environments>`__" msgstr "" -#: ../../includes/wasm-ios-notavail.rst:3 -msgid ":ref:`Availability `: not WASI, not iOS." -msgstr "" +#: ../../includes/wasm-mobile-notavail.rst:3 +msgid ":ref:`Availability `: not Android, not iOS, not WASI." +msgstr ":ref:`適用 `:非 Android、非 iOS、非 WASI。" -#: ../../includes/wasm-ios-notavail.rst:5 -#, fuzzy +#: ../../includes/wasm-mobile-notavail.rst:5 msgid "" -"This module does not work or is not available on WebAssembly platforms, or " -"on iOS. See :ref:`wasm-availability` for more information on WASM " -"availability; see :ref:`iOS-availability` for more information on iOS " -"availability." +"This module is not supported on :ref:`mobile platforms ` or :ref:`WebAssembly platforms `." msgstr "" -"此模組在 WebAssembly 平台 ``wasm32-emscripten`` 和 ``wasm32-wasi`` 上無法作用" -"或無法使用。有關更多資訊,請參閱 :ref:`wasm-availability`。" +"此模組在\\ :ref:`行動平台 `\\ 或\\ :ref:`WebAssembly 平" +"台 `\\ 上不支援。" #: ../../library/venv.rst:62 msgid "Creating virtual environments" @@ -1130,3 +1127,13 @@ msgstr "Environments (環境)" #: ../../library/venv.rst:14 msgid "virtual" msgstr "virtual (虛擬)" + +#, fuzzy +#~ msgid "" +#~ "This module does not work or is not available on WebAssembly platforms, " +#~ "or on iOS. See :ref:`wasm-availability` for more information on WASM " +#~ "availability; see :ref:`iOS-availability` for more information on iOS " +#~ "availability." +#~ msgstr "" +#~ "此模組在 WebAssembly 平台 ``wasm32-emscripten`` 和 ``wasm32-wasi`` 上無法" +#~ "作用或無法使用。有關更多資訊,請參閱 :ref:`wasm-availability`。" diff --git a/library/webbrowser.po b/library/webbrowser.po index 58e216d74c..425faf6782 100644 --- a/library/webbrowser.po +++ b/library/webbrowser.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-23 07:52+0800\n" +"POT-Creation-Date: 2024-09-24 07:20+0000\n" "PO-Revision-Date: 2017-09-22 18:27+0000\n" "Last-Translator: Liang-Bo Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -94,19 +94,10 @@ msgstr "" msgid "python -m webbrowser -t \"https://www.python.org\"" msgstr "python -m webbrowser -t \"https://www.python.org\"" -#: ../../includes/wasm-notavail.rst:3 -msgid ":ref:`Availability `: not WASI." +#: ../../library/webbrowser.rst:54 +msgid ":ref:`Availability `: not WASI, not Android." msgstr "" -#: ../../includes/wasm-notavail.rst:5 -#, fuzzy -msgid "" -"This module does not work or is not available on WebAssembly. See :ref:`wasm-" -"availability` for more information." -msgstr "" -"此模組在 WebAssembly 平台 ``wasm32-emscripten`` 和 ``wasm32-wasi`` 上無法作用" -"或無法使用。有關更多資訊,請參閱 :ref:`wasm-availability`。" - #: ../../library/webbrowser.rst:56 msgid "The following exception is defined:" msgstr "" @@ -362,11 +353,11 @@ msgstr "``'iosbrowser'``" #: ../../library/webbrowser.rst:167 msgid "``IOSBrowser``" -msgstr "" +msgstr "``IOSBrowser``" #: ../../library/webbrowser.rst:167 msgid "\\(4)" -msgstr "" +msgstr "\\(4)" #: ../../library/webbrowser.rst:170 msgid "Notes:" @@ -474,12 +465,3 @@ msgid "" "Executables named here without a full path will be searched in the " "directories given in the :envvar:`PATH` environment variable." msgstr "" - -#~ msgid ":class:`Konqueror()`" -#~ msgstr ":class:`Konqueror()`" - -#~ msgid ":class:`Opera()`" -#~ msgstr ":class:`Opera()`" - -#~ msgid ":class:`WindowsDefault`" -#~ msgstr ":class:`WindowsDefault`" diff --git a/library/wsgiref.po b/library/wsgiref.po index 364b60b0a9..240292a6a8 100644 --- a/library/wsgiref.po +++ b/library/wsgiref.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-23 07:52+0800\n" +"POT-Creation-Date: 2024-09-24 07:20+0000\n" "PO-Revision-Date: 2023-12-09 21:29+0800\n" "Last-Translator: Liang-Bo Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -1207,10 +1207,9 @@ msgid "" msgstr "這個模組提供在 :pep:`3333` 中所描述的各種用於靜態型別檢查的型別。" #: ../../library/wsgiref.rst:786 -#, fuzzy msgid "" -"A :class:`typing.Protocol` describing `start_response() `_ callables (:pep:`3333`)." +"A :class:`typing.Protocol` describing :pep:`start_response() <3333#the-start-" +"response-callable>` callables (:pep:`3333`)." msgstr "" "一個描述 :pep:`start_response() <3333#the-start-response-callable>` 可呼叫物" "件的 :class:`typing.Protocol` (:pep:`3333`)。" @@ -1224,29 +1223,26 @@ msgid "A type alias describing a WSGI application callable." msgstr "一個描述 WSGI 應用程式可呼叫物件的型別別名。" #: ../../library/wsgiref.rst:800 -#, fuzzy msgid "" -"A :class:`typing.Protocol` describing a `WSGI Input Stream `_." +"A :class:`typing.Protocol` describing a :pep:`WSGI Input Stream <3333#input-" +"and-error-streams>`." msgstr "" "一個描述 :pep:`WSGI 輸入串流 <3333#input-and-error-streams>`\\ 的 :class:" "`typing.Protocol`。" #: ../../library/wsgiref.rst:805 -#, fuzzy msgid "" -"A :class:`typing.Protocol` describing a `WSGI Error Stream `_." +"A :class:`typing.Protocol` describing a :pep:`WSGI Error Stream <3333#input-" +"and-error-streams>`." msgstr "" "一個描述 :pep:`WSGI 錯誤串流 <3333#input-and-error-streams>`\\ 的 :class:" "`typing.Protocol`。" #: ../../library/wsgiref.rst:810 -#, fuzzy msgid "" -"A :class:`typing.Protocol` describing a `file wrapper `_. See :class:" -"`wsgiref.util.FileWrapper` for a concrete implementation of this protocol." +"A :class:`typing.Protocol` describing a :pep:`file wrapper <3333#optional-" +"platform-specific-file-handling>`. See :class:`wsgiref.util.FileWrapper` for " +"a concrete implementation of this protocol." msgstr "" "一個描述\\ :pep:`檔案包裝器 <3333#optional-platform-specific-file-" "handling>`\\ 的 :class:`typing.Protocol`。請參閱 :class:`wsgiref.util." diff --git a/library/xdrlib.po b/library/xdrlib.po deleted file mode 100644 index ca29ccbfd4..0000000000 --- a/library/xdrlib.po +++ /dev/null @@ -1,347 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) 2001-2022, Python Software Foundation -# This file is distributed under the same license as the Python package. -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: Python 3.13\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-01 22:24+0800\n" -"PO-Revision-Date: 2016-01-31 07:33+0000\n" -"Last-Translator: Liang-Bo Wang \n" -"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" -"tw)\n" -"Language: zh_TW\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=1; plural=0;\n" - -#: ../../library/xdrlib.rst:2 -msgid ":mod:`xdrlib` --- Encode and decode XDR data" -msgstr ":mod:`xdrlib` --- XDR 資料的編碼與解碼" - -#: ../../library/xdrlib.rst:8 -msgid "**Source code:** :source:`Lib/xdrlib.py`" -msgstr "**原始碼:**\\ :source:`Lib/xdrlib.py`" - -#: ../../library/xdrlib.rst:14 -msgid "" -"The :mod:`xdrlib` module is deprecated (see :pep:`PEP 594 <594#xdrlib>` for " -"details)." -msgstr "" -":mod:`xdrlib` 模組 (module) 即將被棄用(詳見 :pep:`PEP 594 " -"<594#xdrlib>`\\ )。" - -#: ../../library/xdrlib.rst:20 -msgid "" -"The :mod:`xdrlib` module supports the External Data Representation Standard " -"as described in :rfc:`1014`, written by Sun Microsystems, Inc. June 1987. " -"It supports most of the data types described in the RFC." -msgstr "" - -#: ../../library/xdrlib.rst:24 -msgid "" -"The :mod:`xdrlib` module defines two classes, one for packing variables into " -"XDR representation, and another for unpacking from XDR representation. " -"There are also two exception classes." -msgstr "" - -#: ../../library/xdrlib.rst:31 -msgid "" -":class:`Packer` is the class for packing data into XDR representation. The :" -"class:`Packer` class is instantiated with no arguments." -msgstr "" - -#: ../../library/xdrlib.rst:37 -msgid "" -"``Unpacker`` is the complementary class which unpacks XDR data values from a " -"string buffer. The input buffer is given as *data*." -msgstr "" - -#: ../../library/xdrlib.rst:43 -msgid ":rfc:`1014` - XDR: External Data Representation Standard" -msgstr "" - -#: ../../library/xdrlib.rst:44 -msgid "" -"This RFC defined the encoding of data which was XDR at the time this module " -"was originally written. It has apparently been obsoleted by :rfc:`1832`." -msgstr "" - -#: ../../library/xdrlib.rst:47 -msgid ":rfc:`1832` - XDR: External Data Representation Standard" -msgstr "" - -#: ../../library/xdrlib.rst:48 -msgid "Newer RFC that provides a revised definition of XDR." -msgstr "" - -#: ../../library/xdrlib.rst:54 -msgid "Packer Objects" -msgstr "" - -#: ../../library/xdrlib.rst:56 -msgid ":class:`Packer` instances have the following methods:" -msgstr "" - -#: ../../library/xdrlib.rst:61 -msgid "Returns the current pack buffer as a string." -msgstr "" - -#: ../../library/xdrlib.rst:66 -msgid "Resets the pack buffer to the empty string." -msgstr "" - -#: ../../library/xdrlib.rst:68 -msgid "" -"In general, you can pack any of the most common XDR data types by calling " -"the appropriate ``pack_type()`` method. Each method takes a single " -"argument, the value to pack. The following simple data type packing methods " -"are supported: :meth:`pack_uint`, :meth:`pack_int`, :meth:`pack_enum`, :meth:" -"`pack_bool`, :meth:`pack_uhyper`, and :meth:`pack_hyper`." -msgstr "" - -#: ../../library/xdrlib.rst:77 -msgid "Packs the single-precision floating point number *value*." -msgstr "" - -#: ../../library/xdrlib.rst:82 -msgid "Packs the double-precision floating point number *value*." -msgstr "" - -#: ../../library/xdrlib.rst:84 -msgid "The following methods support packing strings, bytes, and opaque data:" -msgstr "" - -#: ../../library/xdrlib.rst:89 -msgid "" -"Packs a fixed length string, *s*. *n* is the length of the string but it is " -"*not* packed into the data buffer. The string is padded with null bytes if " -"necessary to guaranteed 4 byte alignment." -msgstr "" - -#: ../../library/xdrlib.rst:96 -msgid "" -"Packs a fixed length opaque data stream, similarly to :meth:`pack_fstring`." -msgstr "" - -#: ../../library/xdrlib.rst:101 -msgid "" -"Packs a variable length string, *s*. The length of the string is first " -"packed as an unsigned integer, then the string data is packed with :meth:" -"`pack_fstring`." -msgstr "" - -#: ../../library/xdrlib.rst:108 -msgid "" -"Packs a variable length opaque data string, similarly to :meth:`pack_string`." -msgstr "" - -#: ../../library/xdrlib.rst:113 -msgid "Packs a variable length byte stream, similarly to :meth:`pack_string`." -msgstr "" - -#: ../../library/xdrlib.rst:115 -msgid "The following methods support packing arrays and lists:" -msgstr "" - -#: ../../library/xdrlib.rst:120 -msgid "" -"Packs a *list* of homogeneous items. This method is useful for lists with " -"an indeterminate size; i.e. the size is not available until the entire list " -"has been walked. For each item in the list, an unsigned integer ``1`` is " -"packed first, followed by the data value from the list. *pack_item* is the " -"function that is called to pack the individual item. At the end of the " -"list, an unsigned integer ``0`` is packed." -msgstr "" - -#: ../../library/xdrlib.rst:127 -msgid "" -"For example, to pack a list of integers, the code might appear like this::" -msgstr "" - -#: ../../library/xdrlib.rst:129 -msgid "" -"import xdrlib\n" -"p = xdrlib.Packer()\n" -"p.pack_list([1, 2, 3], p.pack_int)" -msgstr "" -"import xdrlib\n" -"p = xdrlib.Packer()\n" -"p.pack_list([1, 2, 3], p.pack_int)" - -#: ../../library/xdrlib.rst:136 -msgid "" -"Packs a fixed length list (*array*) of homogeneous items. *n* is the length " -"of the list; it is *not* packed into the buffer, but a :exc:`ValueError` " -"exception is raised if ``len(array)`` is not equal to *n*. As above, " -"*pack_item* is the function used to pack each element." -msgstr "" - -#: ../../library/xdrlib.rst:144 -msgid "" -"Packs a variable length *list* of homogeneous items. First, the length of " -"the list is packed as an unsigned integer, then each element is packed as " -"in :meth:`pack_farray` above." -msgstr "" - -#: ../../library/xdrlib.rst:152 -msgid "Unpacker Objects" -msgstr "" - -#: ../../library/xdrlib.rst:154 -msgid "The :class:`Unpacker` class offers the following methods:" -msgstr "" - -#: ../../library/xdrlib.rst:159 -msgid "Resets the string buffer with the given *data*." -msgstr "" - -#: ../../library/xdrlib.rst:164 -msgid "Returns the current unpack position in the data buffer." -msgstr "" - -#: ../../library/xdrlib.rst:169 -msgid "" -"Sets the data buffer unpack position to *position*. You should be careful " -"about using :meth:`get_position` and :meth:`set_position`." -msgstr "" - -#: ../../library/xdrlib.rst:175 -msgid "Returns the current unpack data buffer as a string." -msgstr "" - -#: ../../library/xdrlib.rst:180 -msgid "" -"Indicates unpack completion. Raises an :exc:`Error` exception if all of the " -"data has not been unpacked." -msgstr "" - -#: ../../library/xdrlib.rst:183 -msgid "" -"In addition, every data type that can be packed with a :class:`Packer`, can " -"be unpacked with an :class:`Unpacker`. Unpacking methods are of the form " -"``unpack_type()``, and take no arguments. They return the unpacked object." -msgstr "" - -#: ../../library/xdrlib.rst:190 -msgid "Unpacks a single-precision floating point number." -msgstr "" - -#: ../../library/xdrlib.rst:195 -msgid "" -"Unpacks a double-precision floating point number, similarly to :meth:" -"`unpack_float`." -msgstr "" - -#: ../../library/xdrlib.rst:198 -msgid "" -"In addition, the following methods unpack strings, bytes, and opaque data:" -msgstr "" - -#: ../../library/xdrlib.rst:203 -msgid "" -"Unpacks and returns a fixed length string. *n* is the number of characters " -"expected. Padding with null bytes to guaranteed 4 byte alignment is assumed." -msgstr "" - -#: ../../library/xdrlib.rst:209 -msgid "" -"Unpacks and returns a fixed length opaque data stream, similarly to :meth:" -"`unpack_fstring`." -msgstr "" - -#: ../../library/xdrlib.rst:215 -msgid "" -"Unpacks and returns a variable length string. The length of the string is " -"first unpacked as an unsigned integer, then the string data is unpacked " -"with :meth:`unpack_fstring`." -msgstr "" - -#: ../../library/xdrlib.rst:222 -msgid "" -"Unpacks and returns a variable length opaque data string, similarly to :meth:" -"`unpack_string`." -msgstr "" - -#: ../../library/xdrlib.rst:228 -msgid "" -"Unpacks and returns a variable length byte stream, similarly to :meth:" -"`unpack_string`." -msgstr "" - -#: ../../library/xdrlib.rst:231 -msgid "The following methods support unpacking arrays and lists:" -msgstr "" - -#: ../../library/xdrlib.rst:236 -msgid "" -"Unpacks and returns a list of homogeneous items. The list is unpacked one " -"element at a time by first unpacking an unsigned integer flag. If the flag " -"is ``1``, then the item is unpacked and appended to the list. A flag of " -"``0`` indicates the end of the list. *unpack_item* is the function that is " -"called to unpack the items." -msgstr "" - -#: ../../library/xdrlib.rst:245 -msgid "" -"Unpacks and returns (as a list) a fixed length array of homogeneous items. " -"*n* is number of list elements to expect in the buffer. As above, " -"*unpack_item* is the function used to unpack each element." -msgstr "" - -#: ../../library/xdrlib.rst:252 -msgid "" -"Unpacks and returns a variable length *list* of homogeneous items. First, " -"the length of the list is unpacked as an unsigned integer, then each element " -"is unpacked as in :meth:`unpack_farray` above." -msgstr "" - -#: ../../library/xdrlib.rst:260 -msgid "Exceptions" -msgstr "例外" - -#: ../../library/xdrlib.rst:262 -msgid "Exceptions in this module are coded as class instances:" -msgstr "" - -#: ../../library/xdrlib.rst:267 -msgid "" -"The base exception class. :exc:`Error` has a single public attribute :attr:" -"`msg` containing the description of the error." -msgstr "" - -#: ../../library/xdrlib.rst:273 -msgid "" -"Class derived from :exc:`Error`. Contains no additional instance variables." -msgstr "" - -#: ../../library/xdrlib.rst:275 -msgid "Here is an example of how you would catch one of these exceptions::" -msgstr "" - -#: ../../library/xdrlib.rst:277 -msgid "" -"import xdrlib\n" -"p = xdrlib.Packer()\n" -"try:\n" -" p.pack_double(8.01)\n" -"except xdrlib.ConversionError as instance:\n" -" print('packing the double failed:', instance.msg)" -msgstr "" -"import xdrlib\n" -"p = xdrlib.Packer()\n" -"try:\n" -" p.pack_double(8.01)\n" -"except xdrlib.ConversionError as instance:\n" -" print('packing the double failed:', instance.msg)" - -#: ../../library/xdrlib.rst:10 -msgid "XDR" -msgstr "XDR" - -#: ../../library/xdrlib.rst:10 -msgid "External Data Representation" -msgstr "External Data Representation (外部資料表示)" diff --git a/library/xml.etree.elementtree.po b/library/xml.etree.elementtree.po index cb631dab21..b5a9518fc2 100644 --- a/library/xml.etree.elementtree.po +++ b/library/xml.etree.elementtree.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-23 07:52+0800\n" +"POT-Creation-Date: 2024-09-24 07:20+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-" @@ -1907,7 +1907,7 @@ msgstr "" #: ../../library/xml.etree.elementtree.rst:1376 msgid "" "Parameters are now :ref:`keyword-only `. The *html* " -"argument no longer supported." +"argument is no longer supported." msgstr "" #: ../../library/xml.etree.elementtree.rst:1383 diff --git a/library/xmlrpc.client.po b/library/xmlrpc.client.po index efbc83579f..927aeeba24 100644 --- a/library/xmlrpc.client.po +++ b/library/xmlrpc.client.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-23 07:52+0800\n" +"POT-Creation-Date: 2024-09-24 07:20+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-" @@ -49,16 +49,15 @@ msgstr "" #: ../../includes/wasm-notavail.rst:3 msgid ":ref:`Availability `: not WASI." -msgstr "" +msgstr ":ref:`適用 `:非 WASI。" #: ../../includes/wasm-notavail.rst:5 -#, fuzzy msgid "" "This module does not work or is not available on WebAssembly. See :ref:`wasm-" "availability` for more information." msgstr "" -"此模組在 WebAssembly 平台 ``wasm32-emscripten`` 和 ``wasm32-wasi`` 上無法作用" -"或無法使用。有關更多資訊,請參閱 :ref:`wasm-availability`。" +"此模組在 WebAssembly 平台上不起作用或無法使用。更多資訊請參閱 :ref:`wasm-" +"availability`。" #: ../../library/xmlrpc.client.rst:41 msgid "" @@ -282,8 +281,7 @@ msgstr "" #: ../../library/xmlrpc.client.rst:168 msgid "" -"`XML-RPC Introspection `_" +"`XML-RPC Introspection `_" msgstr "" #: ../../library/xmlrpc.client.rst:169 diff --git a/library/xmlrpc.server.po b/library/xmlrpc.server.po index c3daa17cde..7e1eba8c5a 100644 --- a/library/xmlrpc.server.po +++ b/library/xmlrpc.server.po @@ -43,16 +43,15 @@ msgstr "" #: ../../includes/wasm-notavail.rst:3 msgid ":ref:`Availability `: not WASI." -msgstr "" +msgstr ":ref:`適用 `:非 WASI。" #: ../../includes/wasm-notavail.rst:5 -#, fuzzy msgid "" "This module does not work or is not available on WebAssembly. See :ref:`wasm-" "availability` for more information." msgstr "" -"此模組在 WebAssembly 平台 ``wasm32-emscripten`` 和 ``wasm32-wasi`` 上無法作用" -"或無法使用。有關更多資訊,請參閱 :ref:`wasm-availability`。" +"此模組在 WebAssembly 平台上不起作用或無法使用。更多資訊請參閱 :ref:`wasm-" +"availability`。" #: ../../library/xmlrpc.server.rst:32 msgid "" diff --git a/library/zoneinfo.po b/library/zoneinfo.po index 3e5a4a6662..0859e10f69 100644 --- a/library/zoneinfo.po +++ b/library/zoneinfo.po @@ -56,16 +56,15 @@ msgstr "" #: ../../includes/wasm-notavail.rst:3 msgid ":ref:`Availability `: not WASI." -msgstr "" +msgstr ":ref:`適用 `:非 WASI。" #: ../../includes/wasm-notavail.rst:5 -#, fuzzy msgid "" "This module does not work or is not available on WebAssembly. See :ref:`wasm-" "availability` for more information." msgstr "" -"此模組在 WebAssembly 平台 ``wasm32-emscripten`` 和 ``wasm32-wasi`` 上無法作用" -"或無法使用。有關更多資訊,請參閱 :ref:`wasm-availability`。" +"此模組在 WebAssembly 平台上不起作用或無法使用。更多資訊請參閱 :ref:`wasm-" +"availability`。" #: ../../library/zoneinfo.rst:35 msgid "Using ``ZoneInfo``" diff --git a/reference/datamodel.po b/reference/datamodel.po index d9ac935995..66e8a576fa 100644 --- a/reference/datamodel.po +++ b/reference/datamodel.po @@ -1139,9 +1139,8 @@ msgid "" msgstr "" #: ../../reference/datamodel.rst:1002 -#, fuzzy msgid ":attr:`~class.__static_attributes__`" -msgstr ":attr:`~class.__bases__`" +msgstr ":attr:`~class.__static_attributes__`" #: ../../reference/datamodel.rst:1003 msgid "" @@ -1150,9 +1149,8 @@ msgid "" msgstr "" #: ../../reference/datamodel.rst:1006 -#, fuzzy msgid ":attr:`__firstlineno__`" -msgstr ":attr:`__file__`" +msgstr ":attr:`__firstlineno__`" #: ../../reference/datamodel.rst:1007 msgid "" diff --git a/reference/introduction.po b/reference/introduction.po index 94633cbb7f..41407dcc00 100644 --- a/reference/introduction.po +++ b/reference/introduction.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-23 07:52+0800\n" +"POT-Creation-Date: 2024-09-24 07:20+0000\n" "PO-Revision-Date: 2017-09-22 18:27+0000\n" "Last-Translator: Liang-Bo Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -137,8 +137,8 @@ msgid "" "support and a Just in Time compiler. One of the goals of the project is to " "encourage experimentation with the language itself by making it easier to " "modify the interpreter (since it is written in Python). Additional " -"information is available on `the PyPy project's home page `_." +"information is available on `the PyPy project's home page `_." msgstr "" #: ../../reference/introduction.rst:79 diff --git a/sphinx.po b/sphinx.po index 2e0b49145c..5729a9b54b 100644 --- a/sphinx.po +++ b/sphinx.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-23 07:52+0800\n" +"POT-Creation-Date: 2024-09-24 07:20+0000\n" "PO-Revision-Date: 2023-03-15 10:19+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -66,38 +66,18 @@ msgid "Packed as .tar.bz2" msgstr "打包成 .tar.bz2" #: ../../tools/templates/download.html:28 -msgid "PDF (US-Letter paper size)" -msgstr "PDF(美國信紙大小)" +msgid "PDF" +msgstr "PDF" #: ../../tools/templates/download.html:29 msgid "" -"Download " -"(ca. %(download_size)s MiB)" -msgstr "" -"下載 (ca. " -"%(download_size)s MiB)" - -#: ../../tools/templates/download.html:30 -msgid "" -"Download (ca. %(download_size)s MiB)" -msgstr "" -"下載 " -"(ca. %(download_size)s MiB)" - -#: ../../tools/templates/download.html:33 -msgid "PDF (A4 paper size)" -msgstr "PDF(A4 紙張大小)" - -#: ../../tools/templates/download.html:34 -msgid "" "Download (ca. " "%(download_size)s MiB)" msgstr "" "下載 (ca. " "%(download_size)s MiB)" -#: ../../tools/templates/download.html:35 +#: ../../tools/templates/download.html:30 msgid "" "Download " "(ca. %(download_size)s MiB)" @@ -105,11 +85,11 @@ msgstr "" "下載 (ca. " "%(download_size)s MiB)" -#: ../../tools/templates/download.html:38 +#: ../../tools/templates/download.html:33 msgid "HTML" msgstr "HTML" -#: ../../tools/templates/download.html:39 +#: ../../tools/templates/download.html:34 msgid "" "Download (ca. " "%(download_size)s MiB)" @@ -117,7 +97,7 @@ msgstr "" "下載 (ca. " "%(download_size)s MiB)" -#: ../../tools/templates/download.html:40 +#: ../../tools/templates/download.html:35 msgid "" "Download " "(ca. %(download_size)s MiB)" @@ -125,11 +105,11 @@ msgstr "" "下載 (ca. " "%(download_size)s MiB)" -#: ../../tools/templates/download.html:43 +#: ../../tools/templates/download.html:38 msgid "Plain text" msgstr "純文字" -#: ../../tools/templates/download.html:44 +#: ../../tools/templates/download.html:39 msgid "" "Download (ca. " "%(download_size)s MiB)" @@ -137,7 +117,7 @@ msgstr "" "下載 (ca. " "%(download_size)s MiB)" -#: ../../tools/templates/download.html:45 +#: ../../tools/templates/download.html:40 msgid "" "Download " "(ca. %(download_size)s MiB)" @@ -145,11 +125,11 @@ msgstr "" "下載 (ca. " "%(download_size)s MiB)" -#: ../../tools/templates/download.html:48 +#: ../../tools/templates/download.html:43 msgid "Texinfo" msgstr "Texinfo" -#: ../../tools/templates/download.html:49 +#: ../../tools/templates/download.html:44 msgid "" "Download (ca. " "%(download_size)s MiB)" @@ -157,7 +137,7 @@ msgstr "" "下載 (ca. " "%(download_size)s MiB)" -#: ../../tools/templates/download.html:50 +#: ../../tools/templates/download.html:45 msgid "" "Download " "(ca. %(download_size)s MiB)" @@ -165,11 +145,11 @@ msgstr "" "下載 (ca. " "%(download_size)s MiB)" -#: ../../tools/templates/download.html:53 +#: ../../tools/templates/download.html:48 msgid "EPUB" msgstr "EPUB" -#: ../../tools/templates/download.html:54 +#: ../../tools/templates/download.html:49 msgid "" "Download (ca. " "%(download_size)s MiB)" @@ -177,15 +157,15 @@ msgstr "" "下載 (ca. " "%(download_size)s MiB)" -#: ../../tools/templates/download.html:59 +#: ../../tools/templates/download.html:54 msgid "These archives contain all the content in the documentation." msgstr "這些歸檔包含了說明文件中的所有內容。" -#: ../../tools/templates/download.html:62 +#: ../../tools/templates/download.html:57 msgid "Unpacking" msgstr "解壓縮" -#: ../../tools/templates/download.html:64 +#: ../../tools/templates/download.html:59 msgid "" "Unix users should download the .tar.bz2 archives; these are bzipped tar\n" "archives and can be handled in the usual way using tar and the bzip2\n" @@ -200,7 +180,7 @@ msgstr "" "net\">Info-ZIP 解壓縮程式來處理 ZIP 歸檔。.tar.bz2 歸檔提供最佳壓縮率和最" "快的下載時間。" -#: ../../tools/templates/download.html:70 +#: ../../tools/templates/download.html:65 msgid "" "Windows users can use the ZIP archives since those are customary on that\n" "platform. These are created on Unix using the Info-ZIP zip program." @@ -208,11 +188,11 @@ msgstr "" "Windows 使用者可以使用 ZIP 歸檔,因為這在該平台上是常見的。這些是在 Unix 上使" "用 Info-ZIP zip 程式建立的。" -#: ../../tools/templates/download.html:74 +#: ../../tools/templates/download.html:69 msgid "Problems" msgstr "問題" -#: ../../tools/templates/download.html:76 +#: ../../tools/templates/download.html:71 msgid "" "If you have comments or suggestions for the Python documentation, please " "send\n" diff --git a/tutorial/errors.po b/tutorial/errors.po index 6e4e0d9bd0..fd65d5efcd 100644 --- a/tutorial/errors.po +++ b/tutorial/errors.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-03 11:11+0800\n" +"POT-Creation-Date: 2024-09-24 07:20+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-" @@ -99,30 +99,42 @@ msgid "" ">>> 10 * (1/0)\n" "Traceback (most recent call last):\n" " File \"\", line 1, in \n" +" 10 * (1/0)\n" +" ~^~\n" "ZeroDivisionError: division by zero\n" ">>> 4 + spam*3\n" "Traceback (most recent call last):\n" " File \"\", line 1, in \n" +" 4 + spam*3\n" +" ^^^^\n" "NameError: name 'spam' is not defined\n" ">>> '2' + 2\n" "Traceback (most recent call last):\n" " File \"\", line 1, in \n" +" '2' + 2\n" +" ~~~~^~~\n" "TypeError: can only concatenate str (not \"int\") to str" msgstr "" ">>> 10 * (1/0)\n" "Traceback (most recent call last):\n" " File \"\", line 1, in \n" +" 10 * (1/0)\n" +" ~^~\n" "ZeroDivisionError: division by zero\n" ">>> 4 + spam*3\n" "Traceback (most recent call last):\n" " File \"\", line 1, in \n" +" 4 + spam*3\n" +" ^^^^\n" "NameError: name 'spam' is not defined\n" ">>> '2' + 2\n" "Traceback (most recent call last):\n" " File \"\", line 1, in \n" +" '2' + 2\n" +" ~~~~^~~\n" "TypeError: can only concatenate str (not \"int\") to str" -#: ../../tutorial/errors.rst:58 +#: ../../tutorial/errors.rst:64 msgid "" "The last line of the error message indicates what happened. Exceptions come " "in different types, and the type is printed as part of the message: the " @@ -140,13 +152,13 @@ msgstr "" "需要遵守(雖然這是一個有用的慣例)。標準例外名稱是內建的識別字 (identifier)," "不是保留關鍵字 (reserved keyword)。" -#: ../../tutorial/errors.rst:66 +#: ../../tutorial/errors.rst:72 msgid "" "The rest of the line provides detail based on the type of exception and what " "caused it." msgstr "此行其餘部分,根據例外的類型及導致例外的原因,說明例外的細節。" -#: ../../tutorial/errors.rst:69 +#: ../../tutorial/errors.rst:75 msgid "" "The preceding part of the error message shows the context where the " "exception occurred, in the form of a stack traceback. In general it contains " @@ -157,16 +169,16 @@ msgstr "" "說,它含有一個列出源程式碼行 (source line) 的堆疊回溯;但它不會顯示從標準輸入" "中讀取的程式碼。" -#: ../../tutorial/errors.rst:74 +#: ../../tutorial/errors.rst:80 msgid "" ":ref:`bltin-exceptions` lists the built-in exceptions and their meanings." msgstr ":ref:`bltin-exceptions`\\ 章節列出內建的例外及它們的意義。" -#: ../../tutorial/errors.rst:80 +#: ../../tutorial/errors.rst:86 msgid "Handling Exceptions" msgstr "處理例外" -#: ../../tutorial/errors.rst:82 +#: ../../tutorial/errors.rst:88 msgid "" "It is possible to write programs that handle selected exceptions. Look at " "the following example, which asks the user for input until a valid integer " @@ -180,7 +192,7 @@ msgstr "" "令);請注意,由使用者產生的程式中斷會引發 :exc:`KeyboardInterrupt` 例外信" "號。 ::" -#: ../../tutorial/errors.rst:88 +#: ../../tutorial/errors.rst:94 msgid "" ">>> while True:\n" "... try:\n" @@ -198,11 +210,11 @@ msgstr "" "... print(\"Oops! That was no valid number. Try again...\")\n" "..." -#: ../../tutorial/errors.rst:96 +#: ../../tutorial/errors.rst:102 msgid "The :keyword:`try` statement works as follows." msgstr ":keyword:`try` 陳述式運作方式如下。" -#: ../../tutorial/errors.rst:98 +#: ../../tutorial/errors.rst:104 msgid "" "First, the *try clause* (the statement(s) between the :keyword:`try` and :" "keyword:`except` keywords) is executed." @@ -210,7 +222,7 @@ msgstr "" "首先,執行 *try 子句*\\ (\\ :keyword:`try` 和 :keyword:`except` 關鍵字之間的" "陳述式)。" -#: ../../tutorial/errors.rst:101 +#: ../../tutorial/errors.rst:107 msgid "" "If no exception occurs, the *except clause* is skipped and execution of the :" "keyword:`try` statement is finished." @@ -218,7 +230,7 @@ msgstr "" "如果沒有發生例外,則 *except 子句*\\ 會被跳過,:keyword:`try` 陳述式執行完" "畢。" -#: ../../tutorial/errors.rst:104 +#: ../../tutorial/errors.rst:110 msgid "" "If an exception occurs during execution of the :keyword:`try` clause, the " "rest of the clause is skipped. Then, if its type matches the exception " @@ -229,7 +241,7 @@ msgstr "" "例外的類型與 :keyword:`except` 關鍵字後面的例外名稱相符,則 *except 子句*\\ " "被執行,然後,繼續執行 try/except 區塊之後的程式碼。" -#: ../../tutorial/errors.rst:109 +#: ../../tutorial/errors.rst:115 msgid "" "If an exception occurs which does not match the exception named in the " "*except clause*, it is passed on to outer :keyword:`try` statements; if no " @@ -240,7 +252,7 @@ msgstr "" "`try` 陳述式;如果仍無法找到處理者,則它是一個\\ *未處理例外 (unhandled " "exception)*,執行將停止,並顯示錯誤訊息。" -#: ../../tutorial/errors.rst:113 +#: ../../tutorial/errors.rst:119 msgid "" "A :keyword:`try` statement may have more than one *except clause*, to " "specify handlers for different exceptions. At most one handler will be " @@ -254,7 +266,7 @@ msgstr "" "理同一 :keyword:`!try` 陳述式裡其他處理者內的例外。一個 *except 子句*\\ 可以" "用一組括號內的 tuple 列舉多個例外,例如: ::" -#: ../../tutorial/errors.rst:119 +#: ../../tutorial/errors.rst:125 msgid "" "... except (RuntimeError, TypeError, NameError):\n" "... pass" @@ -262,7 +274,7 @@ msgstr "" "... except (RuntimeError, TypeError, NameError):\n" "... pass" -#: ../../tutorial/errors.rst:122 +#: ../../tutorial/errors.rst:128 #, fuzzy msgid "" "A class in an :keyword:`except` clause matches exceptions which are " @@ -276,7 +288,7 @@ msgstr "" "derived class (衍生類別)的 *except 子句*\\ 並不能與 base class 相容。例如," "以下程式碼會依序印出 B、C、D: ::" -#: ../../tutorial/errors.rst:127 +#: ../../tutorial/errors.rst:133 msgid "" "class B(Exception):\n" " pass\n" @@ -316,7 +328,7 @@ msgstr "" " except B:\n" " print(\"B\")" -#: ../../tutorial/errors.rst:146 +#: ../../tutorial/errors.rst:152 msgid "" "Note that if the *except clauses* were reversed (with ``except B`` first), " "it would have printed B, B, B --- the first matching *except clause* is " @@ -325,7 +337,7 @@ msgstr "" "請注意,如果 *except 子句*\\ 的順序被反轉(把 ``except B`` 放到第一個),則會" "印出 B、B、B ­­——第一個符合的 *except 子句*\\ 會被觸發。" -#: ../../tutorial/errors.rst:149 +#: ../../tutorial/errors.rst:155 msgid "" "When an exception occurs, it may have associated values, also known as the " "exception's *arguments*. The presence and types of the arguments depend on " @@ -334,7 +346,7 @@ msgstr "" "當例外發生時,它可能有相關聯的值,也就是例外的\\ *引數*。引數的存在與否及它的" "類型,是取決於例外的類型。" -#: ../../tutorial/errors.rst:153 +#: ../../tutorial/errors.rst:159 msgid "" "The *except clause* may specify a variable after the exception name. The " "variable is bound to the exception instance which typically has an ``args`` " @@ -346,7 +358,7 @@ msgstr "" "(instance),其引數通常儲存在 ``args`` 屬性中。為了方便,內建例外型別定義了 :" "meth:`~object.__str__` 以印出所有引數而不需顯式地取用 ``.args``: ::" -#: ../../tutorial/errors.rst:159 +#: ../../tutorial/errors.rst:165 msgid "" ">>> try:\n" "... raise Exception('spam', 'eggs')\n" @@ -367,7 +379,7 @@ msgid "" "y = eggs" msgstr "" -#: ../../tutorial/errors.rst:176 +#: ../../tutorial/errors.rst:182 msgid "" "The exception's :meth:`~object.__str__` output is printed as the last part " "('detail') of the message for unhandled exceptions." @@ -375,7 +387,7 @@ msgstr "" "例外的 :meth:`~object.__str__` 輸出會被印在未處理例外訊息的最後一部分(「細" "節」)。" -#: ../../tutorial/errors.rst:179 +#: ../../tutorial/errors.rst:185 msgid "" ":exc:`BaseException` is the common base class of all exceptions. One of its " "subclasses, :exc:`Exception`, is the base class of all the non-fatal " @@ -391,7 +403,7 @@ msgstr "" "它們是用來指示程式應該終止。這些例外包括了由 :meth:`sys.exit` 所引發的 :exc:" "`SystemExit`,以及當使用者想要中斷程式時所引發的 :exc:`KeyboardInterrupt`。" -#: ../../tutorial/errors.rst:187 +#: ../../tutorial/errors.rst:193 msgid "" ":exc:`Exception` can be used as a wildcard that catches (almost) everything. " "However, it is good practice to be as specific as possible with the types of " @@ -402,7 +414,7 @@ msgstr "" "較好的做法是盡可能具體地說明我們打算處理的例外類型,並容許任何非預期例外的傳" "遞 (propagate)。" -#: ../../tutorial/errors.rst:192 +#: ../../tutorial/errors.rst:198 msgid "" "The most common pattern for handling :exc:`Exception` is to print or log the " "exception and then re-raise it (allowing a caller to handle the exception as " @@ -411,7 +423,7 @@ msgstr "" "處理 :exc:`Exception` 的最常見模式,是先將該例外印出或記錄,然後再重新引發它" "(也允許一個呼叫函式 (caller) 來處理該例外): ::" -#: ../../tutorial/errors.rst:196 +#: ../../tutorial/errors.rst:202 msgid "" "import sys\n" "\n" @@ -441,7 +453,7 @@ msgstr "" " print(f\"Unexpected {err=}, {type(err)=}\")\n" " raise" -#: ../../tutorial/errors.rst:210 +#: ../../tutorial/errors.rst:216 msgid "" "The :keyword:`try` ... :keyword:`except` statement has an optional *else " "clause*, which, when present, must follow all *except clauses*. It is " @@ -452,7 +464,7 @@ msgstr "" "時,該子句必須放在所有 *except 子句*\\ 之後。如果一段程式碼必須被執行,但 " "*try 子句*\\ 又沒有引發例外時,這個子句很有用。例如: ::" -#: ../../tutorial/errors.rst:215 +#: ../../tutorial/errors.rst:221 msgid "" "for arg in sys.argv[1:]:\n" " try:\n" @@ -472,7 +484,7 @@ msgstr "" " print(arg, 'has', len(f.readlines()), 'lines')\n" " f.close()" -#: ../../tutorial/errors.rst:224 +#: ../../tutorial/errors.rst:230 msgid "" "The use of the :keyword:`!else` clause is better than adding additional code " "to the :keyword:`try` clause because it avoids accidentally catching an " @@ -483,7 +495,7 @@ msgstr "" "這可以避免意外地捕獲不是由 :keyword:`!try` ... :keyword:`!except` 陳述式保護" "的程式碼所引發的例外。" -#: ../../tutorial/errors.rst:229 +#: ../../tutorial/errors.rst:235 msgid "" "Exception handlers do not handle only exceptions that occur immediately in " "the *try clause*, but also those that occur inside functions that are called " @@ -492,7 +504,7 @@ msgstr "" "例外的處理者不僅處理 *try 子句*\\ 內立即發生的例外,還處理 *try 子句*\\ 內" "(即使是間接地)呼叫的函式內部發生的例外。例如: ::" -#: ../../tutorial/errors.rst:233 +#: ../../tutorial/errors.rst:239 msgid "" ">>> def this_fails():\n" "... x = 1/0\n" @@ -514,29 +526,31 @@ msgstr "" "...\n" "Handling run-time error: division by zero" -#: ../../tutorial/errors.rst:247 +#: ../../tutorial/errors.rst:253 msgid "Raising Exceptions" msgstr "引發例外" -#: ../../tutorial/errors.rst:249 +#: ../../tutorial/errors.rst:255 msgid "" "The :keyword:`raise` statement allows the programmer to force a specified " "exception to occur. For example::" msgstr ":keyword:`raise` 陳述式可讓程式設計師強制引發指定的例外。例如: ::" -#: ../../tutorial/errors.rst:252 +#: ../../tutorial/errors.rst:258 msgid "" ">>> raise NameError('HiThere')\n" "Traceback (most recent call last):\n" " File \"\", line 1, in \n" +" raise NameError('HiThere')\n" "NameError: HiThere" msgstr "" ">>> raise NameError('HiThere')\n" "Traceback (most recent call last):\n" " File \"\", line 1, in \n" +" raise NameError('HiThere')\n" "NameError: HiThere" -#: ../../tutorial/errors.rst:257 +#: ../../tutorial/errors.rst:264 msgid "" "The sole argument to :keyword:`raise` indicates the exception to be raised. " "This must be either an exception instance or an exception class (a class " @@ -549,11 +563,11 @@ msgstr "" "的 subclass)。如果一個例外 class 被傳遞,它會不含引數地呼叫它的建構函式 " "(constructor) ,使它被自動建立實例 (implicitly instantiated): ::" -#: ../../tutorial/errors.rst:263 +#: ../../tutorial/errors.rst:270 msgid "raise ValueError # shorthand for 'raise ValueError()'" msgstr "raise ValueError # 'raise ValueError()' 的簡寫" -#: ../../tutorial/errors.rst:265 +#: ../../tutorial/errors.rst:272 msgid "" "If you need to determine whether an exception was raised but don't intend to " "handle it, a simpler form of the :keyword:`raise` statement allows you to re-" @@ -562,7 +576,7 @@ msgstr "" "如果你只想判斷是否引發了例外,但並不打算處理它,則可以使用簡單的 :keyword:" "`raise` 陳述式來重新引發該例外: ::" -#: ../../tutorial/errors.rst:269 +#: ../../tutorial/errors.rst:276 msgid "" ">>> try:\n" "... raise NameError('HiThere')\n" @@ -573,6 +587,7 @@ msgid "" "An exception flew by!\n" "Traceback (most recent call last):\n" " File \"\", line 2, in \n" +" raise NameError('HiThere')\n" "NameError: HiThere" msgstr "" ">>> try:\n" @@ -584,13 +599,14 @@ msgstr "" "An exception flew by!\n" "Traceback (most recent call last):\n" " File \"\", line 2, in \n" +" raise NameError('HiThere')\n" "NameError: HiThere" -#: ../../tutorial/errors.rst:284 +#: ../../tutorial/errors.rst:292 msgid "Exception Chaining" msgstr "例外鏈接 (Exception Chaining)" -#: ../../tutorial/errors.rst:286 +#: ../../tutorial/errors.rst:294 msgid "" "If an unhandled exception occurs inside an :keyword:`except` section, it " "will have the exception being handled attached to it and included in the " @@ -599,7 +615,7 @@ msgstr "" "如果在 :keyword:`except` 段落內部發生了一個未處理的例外,則它會讓這個將要被處" "理的例外附加在後,並將其包含在錯誤訊息中: ::" -#: ../../tutorial/errors.rst:290 +#: ../../tutorial/errors.rst:298 msgid "" ">>> try:\n" "... open(\"database.sqlite\")\n" @@ -608,12 +624,15 @@ msgid "" "...\n" "Traceback (most recent call last):\n" " File \"\", line 2, in \n" +" open(\"database.sqlite\")\n" +" ~~~~^^^^^^^^^^^^^^^^^^^\n" "FileNotFoundError: [Errno 2] No such file or directory: 'database.sqlite'\n" "\n" "During handling of the above exception, another exception occurred:\n" "\n" "Traceback (most recent call last):\n" " File \"\", line 4, in \n" +" raise RuntimeError(\"unable to handle error\")\n" "RuntimeError: unable to handle error" msgstr "" ">>> try:\n" @@ -623,15 +642,18 @@ msgstr "" "...\n" "Traceback (most recent call last):\n" " File \"\", line 2, in \n" +" open(\"database.sqlite\")\n" +" ~~~~^^^^^^^^^^^^^^^^^^^\n" "FileNotFoundError: [Errno 2] No such file or directory: 'database.sqlite'\n" "\n" "During handling of the above exception, another exception occurred:\n" "\n" "Traceback (most recent call last):\n" " File \"\", line 4, in \n" +" raise RuntimeError(\"unable to handle error\")\n" "RuntimeError: unable to handle error" -#: ../../tutorial/errors.rst:305 +#: ../../tutorial/errors.rst:316 msgid "" "To indicate that an exception is a direct consequence of another, the :" "keyword:`raise` statement allows an optional :keyword:`from` clause::" @@ -639,7 +661,7 @@ msgstr "" "為了表明一個例外是另一個例外直接造成的結果,:keyword:`raise` 陳述式容許一個選" "擇性的 :keyword:`from` 子句: ::" -#: ../../tutorial/errors.rst:308 +#: ../../tutorial/errors.rst:319 msgid "" "# exc must be exception instance or None.\n" "raise RuntimeError from exc" @@ -647,11 +669,11 @@ msgstr "" "# exc 必須是例外實例或 None。\n" "raise RuntimeError from exc" -#: ../../tutorial/errors.rst:311 +#: ../../tutorial/errors.rst:322 msgid "This can be useful when you are transforming exceptions. For example::" msgstr "要變換例外時,這種方式很有用。例如: ::" -#: ../../tutorial/errors.rst:313 +#: ../../tutorial/errors.rst:324 msgid "" ">>> def func():\n" "... raise ConnectionError\n" @@ -663,6 +685,8 @@ msgid "" "...\n" "Traceback (most recent call last):\n" " File \"\", line 2, in \n" +" func()\n" +" ~~~~^^\n" " File \"\", line 2, in func\n" "ConnectionError\n" "\n" @@ -670,6 +694,7 @@ msgid "" "\n" "Traceback (most recent call last):\n" " File \"\", line 4, in \n" +" raise RuntimeError('Failed to open database') from exc\n" "RuntimeError: Failed to open database" msgstr "" ">>> def func():\n" @@ -682,6 +707,8 @@ msgstr "" "...\n" "Traceback (most recent call last):\n" " File \"\", line 2, in \n" +" func()\n" +" ~~~~^^\n" " File \"\", line 2, in func\n" "ConnectionError\n" "\n" @@ -689,15 +716,16 @@ msgstr "" "\n" "Traceback (most recent call last):\n" " File \"\", line 4, in \n" +" raise RuntimeError('Failed to open database') from exc\n" "RuntimeError: Failed to open database" -#: ../../tutorial/errors.rst:332 +#: ../../tutorial/errors.rst:346 msgid "" "It also allows disabling automatic exception chaining using the ``from " "None`` idiom::" msgstr "它也容許使用慣用語 ``from None`` 來停用自動例外鏈接: ::" -#: ../../tutorial/errors.rst:335 +#: ../../tutorial/errors.rst:349 msgid "" ">>> try:\n" "... open('database.sqlite')\n" @@ -706,6 +734,7 @@ msgid "" "...\n" "Traceback (most recent call last):\n" " File \"\", line 4, in \n" +" raise RuntimeError from None\n" "RuntimeError" msgstr "" ">>> try:\n" @@ -715,18 +744,19 @@ msgstr "" "...\n" "Traceback (most recent call last):\n" " File \"\", line 4, in \n" +" raise RuntimeError from None\n" "RuntimeError" -#: ../../tutorial/errors.rst:344 +#: ../../tutorial/errors.rst:359 msgid "" "For more information about chaining mechanics, see :ref:`bltin-exceptions`." msgstr "更多關於鏈接機制的資訊,詳見\\ :ref:`bltin-exceptions`。" -#: ../../tutorial/errors.rst:350 +#: ../../tutorial/errors.rst:365 msgid "User-defined Exceptions" msgstr "使用者自定的例外" -#: ../../tutorial/errors.rst:352 +#: ../../tutorial/errors.rst:367 msgid "" "Programs may name their own exceptions by creating a new exception class " "(see :ref:`tut-classes` for more about Python classes). Exceptions should " @@ -737,7 +767,7 @@ msgstr "" "\\ :ref:`tut-classes`\\ )。不論是直接還是間接地,例外通常應該從 :exc:" "`Exception` class 衍生出來。" -#: ../../tutorial/errors.rst:356 +#: ../../tutorial/errors.rst:371 msgid "" "Exception classes can be defined which do anything any other class can do, " "but are usually kept simple, often only offering a number of attributes that " @@ -747,23 +777,23 @@ msgstr "" "例外 class 可被定義來做任何其他 class 能夠做的事,但通常會讓它維持簡單,只提" "供一些屬性,讓關於錯誤的資訊可被例外的處理者抽取出來。" -#: ../../tutorial/errors.rst:360 +#: ../../tutorial/errors.rst:375 msgid "" "Most exceptions are defined with names that end in \"Error\", similar to the " "naming of the standard exceptions." msgstr "大多數的例外定義,都會以「Error」作為名稱結尾,類似於標準例外的命名。" -#: ../../tutorial/errors.rst:363 +#: ../../tutorial/errors.rst:378 msgid "" "Many standard modules define their own exceptions to report errors that may " "occur in functions they define." msgstr "許多標準模組會定義它們自己的例外,以報告在其定義的函式中發生的錯誤。" -#: ../../tutorial/errors.rst:370 +#: ../../tutorial/errors.rst:385 msgid "Defining Clean-up Actions" msgstr "定義清理動作" -#: ../../tutorial/errors.rst:372 +#: ../../tutorial/errors.rst:387 msgid "" "The :keyword:`try` statement has another optional clause which is intended " "to define clean-up actions that must be executed under all circumstances. " @@ -772,7 +802,7 @@ msgstr "" ":keyword:`try` 陳述式有另一個選擇性子句,用於定義在所有情況下都必須被執行的清" "理動作。例如: ::" -#: ../../tutorial/errors.rst:376 +#: ../../tutorial/errors.rst:391 msgid "" ">>> try:\n" "... raise KeyboardInterrupt\n" @@ -782,6 +812,7 @@ msgid "" "Goodbye, world!\n" "Traceback (most recent call last):\n" " File \"\", line 2, in \n" +" raise KeyboardInterrupt\n" "KeyboardInterrupt" msgstr "" ">>> try:\n" @@ -792,9 +823,10 @@ msgstr "" "Goodbye, world!\n" "Traceback (most recent call last):\n" " File \"\", line 2, in \n" +" raise KeyboardInterrupt\n" "KeyboardInterrupt" -#: ../../tutorial/errors.rst:386 +#: ../../tutorial/errors.rst:402 msgid "" "If a :keyword:`finally` clause is present, the :keyword:`!finally` clause " "will execute as the last task before the :keyword:`try` statement completes. " @@ -807,7 +839,7 @@ msgstr "" "外,都會執行 :keyword:`!finally` 子句。以下幾點將探討例外發生時,比較複雜的情" "況:" -#: ../../tutorial/errors.rst:392 +#: ../../tutorial/errors.rst:408 msgid "" "If an exception occurs during execution of the :keyword:`!try` clause, the " "exception may be handled by an :keyword:`except` clause. If the exception is " @@ -818,7 +850,7 @@ msgstr "" "`except` 子句處理。如果該例外沒有被 :keyword:`!except` 子句處理,它會在 :" "keyword:`!finally` 子句執行後被重新引發。" -#: ../../tutorial/errors.rst:398 +#: ../../tutorial/errors.rst:414 msgid "" "An exception could occur during execution of an :keyword:`!except` or :" "keyword:`!else` clause. Again, the exception is re-raised after the :keyword:" @@ -827,7 +859,7 @@ msgstr "" "一個例外可能發生於 :keyword:`!except` 或 :keyword:`!else` 子句的執行過程。同" "樣地,該例外會在 :keyword:`!finally` 子句執行後被重新引發。" -#: ../../tutorial/errors.rst:402 +#: ../../tutorial/errors.rst:418 msgid "" "If the :keyword:`!finally` clause executes a :keyword:`break`, :keyword:" "`continue` or :keyword:`return` statement, exceptions are not re-raised." @@ -835,7 +867,7 @@ msgstr "" "如果 :keyword:`!finally` 子句執行 :keyword:`break`、:keyword:`continue` 或 :" "keyword:`return` 陳述式,則例外不會被重新引發。" -#: ../../tutorial/errors.rst:406 +#: ../../tutorial/errors.rst:422 msgid "" "If the :keyword:`!try` statement reaches a :keyword:`break`, :keyword:" "`continue` or :keyword:`return` statement, the :keyword:`!finally` clause " @@ -846,7 +878,7 @@ msgstr "" "keyword:`return` 陳述式,則 :keyword:`!finally` 子句會在執行 :keyword:`!" "break`、:keyword:`!continue` 或 :keyword:`!return` 陳述式之前先執行。" -#: ../../tutorial/errors.rst:412 +#: ../../tutorial/errors.rst:428 msgid "" "If a :keyword:`!finally` clause includes a :keyword:`!return` statement, the " "returned value will be the one from the :keyword:`!finally` clause's :" @@ -857,11 +889,11 @@ msgstr "" "自 :keyword:`!finally` 子句的 :keyword:`!return` 陳述式的回傳值,而不是來自 :" "keyword:`!try` 子句的 :keyword:`!return` 陳述式的回傳值。" -#: ../../tutorial/errors.rst:418 +#: ../../tutorial/errors.rst:434 msgid "For example::" msgstr "例如: ::" -#: ../../tutorial/errors.rst:420 +#: ../../tutorial/errors.rst:436 msgid "" ">>> def bool_return():\n" "... try:\n" @@ -881,11 +913,11 @@ msgstr "" ">>> bool_return()\n" "False" -#: ../../tutorial/errors.rst:429 +#: ../../tutorial/errors.rst:445 msgid "A more complicated example::" msgstr "另一個比較複雜的範例: ::" -#: ../../tutorial/errors.rst:431 +#: ../../tutorial/errors.rst:447 msgid "" ">>> def divide(x, y):\n" "... try:\n" @@ -907,7 +939,11 @@ msgid "" "executing finally clause\n" "Traceback (most recent call last):\n" " File \"\", line 1, in \n" +" divide(\"2\", \"0\")\n" +" ~~~~~~^^^^^^^^^^\n" " File \"\", line 3, in divide\n" +" result = x / y\n" +" ~~^~~\n" "TypeError: unsupported operand type(s) for /: 'str' and 'str'" msgstr "" ">>> def divide(x, y):\n" @@ -930,10 +966,14 @@ msgstr "" "executing finally clause\n" "Traceback (most recent call last):\n" " File \"\", line 1, in \n" +" divide(\"2\", \"0\")\n" +" ~~~~~~^^^^^^^^^^\n" " File \"\", line 3, in divide\n" +" result = x / y\n" +" ~~^~~\n" "TypeError: unsupported operand type(s) for /: 'str' and 'str'" -#: ../../tutorial/errors.rst:454 +#: ../../tutorial/errors.rst:474 msgid "" "As you can see, the :keyword:`finally` clause is executed in any event. " "The :exc:`TypeError` raised by dividing two strings is not handled by the :" @@ -944,7 +984,7 @@ msgstr "" "的 :exc:`TypeError` 沒有被 :keyword:`except` 子句處理,因此會在 :keyword:`!" "finally` 子句執行後被重新引發。" -#: ../../tutorial/errors.rst:459 +#: ../../tutorial/errors.rst:479 msgid "" "In real world applications, the :keyword:`finally` clause is useful for " "releasing external resources (such as files or network connections), " @@ -953,11 +993,11 @@ msgstr "" "在真實應用程式中,:keyword:`finally` 子句對於釋放外部資源(例如檔案或網路連" "線)很有用,無論該資源的使用是否成功。" -#: ../../tutorial/errors.rst:467 +#: ../../tutorial/errors.rst:487 msgid "Predefined Clean-up Actions" msgstr "預定義的清理動作" -#: ../../tutorial/errors.rst:469 +#: ../../tutorial/errors.rst:489 msgid "" "Some objects define standard clean-up actions to be undertaken when the " "object is no longer needed, regardless of whether or not the operation using " @@ -967,7 +1007,7 @@ msgstr "" "某些物件定義了在物件不再被需要時的標準清理動作,無論使用該物件的作業是成功或" "失敗。請看以下範例,它嘗試開啟一個檔案,並印出檔案內容至螢幕。 ::" -#: ../../tutorial/errors.rst:474 +#: ../../tutorial/errors.rst:494 msgid "" "for line in open(\"myfile.txt\"):\n" " print(line, end=\"\")" @@ -975,7 +1015,7 @@ msgstr "" "for line in open(\"myfile.txt\"):\n" " print(line, end=\"\")" -#: ../../tutorial/errors.rst:477 +#: ../../tutorial/errors.rst:497 msgid "" "The problem with this code is that it leaves the file open for an " "indeterminate amount of time after this part of the code has finished " @@ -989,7 +1029,7 @@ msgstr "" "keyword:`with` 陳述式讓物件(例如檔案)在被使用時,能保證它們總是及時、正確地" "被清理。 ::" -#: ../../tutorial/errors.rst:483 +#: ../../tutorial/errors.rst:503 msgid "" "with open(\"myfile.txt\") as f:\n" " for line in f:\n" @@ -999,7 +1039,7 @@ msgstr "" " for line in f:\n" " print(line, end=\"\")" -#: ../../tutorial/errors.rst:487 +#: ../../tutorial/errors.rst:507 msgid "" "After the statement is executed, the file *f* is always closed, even if a " "problem was encountered while processing the lines. Objects which, like " @@ -1009,11 +1049,11 @@ msgstr "" "陳述式執行完畢後,就算是在處理內容時遇到問題,檔案 *f* 總是會被關閉。和檔案一" "樣,提供預定義清理動作的物件會在說明文件中表明這一點。" -#: ../../tutorial/errors.rst:495 +#: ../../tutorial/errors.rst:515 msgid "Raising and Handling Multiple Unrelated Exceptions" msgstr "引發及處理多個無關的例外" -#: ../../tutorial/errors.rst:497 +#: ../../tutorial/errors.rst:517 msgid "" "There are situations where it is necessary to report several exceptions that " "have occurred. This is often the case in concurrency frameworks, when " @@ -1025,7 +1065,7 @@ msgstr "" "中經常會出現這種情況,當平行的 (parallel) 某些任務可能已經失效,但還有其他用" "例 (use case) 希望能繼續執行並收集多個例外,而不是只有引發第一個例外時。" -#: ../../tutorial/errors.rst:503 +#: ../../tutorial/errors.rst:523 msgid "" "The builtin :exc:`ExceptionGroup` wraps a list of exception instances so " "that they can be raised together. It is an exception itself, so it can be " @@ -1035,7 +1075,7 @@ msgstr "" "(串列),使得它們可以一起被引發。由於它本身就是一個例外,因此它也可以像任何" "其他例外一樣被捕獲。 ::" -#: ../../tutorial/errors.rst:507 +#: ../../tutorial/errors.rst:527 msgid "" ">>> def f():\n" "... excs = [OSError('error 1'), SystemError('error 2')]\n" @@ -1044,8 +1084,11 @@ msgid "" ">>> f()\n" " + Exception Group Traceback (most recent call last):\n" " | File \"\", line 1, in \n" +" | f()\n" +" | ~^^\n" " | File \"\", line 3, in f\n" -" | ExceptionGroup: there were problems\n" +" | raise ExceptionGroup('there were problems', excs)\n" +" | ExceptionGroup: there were problems (2 sub-exceptions)\n" " +-+---------------- 1 ----------------\n" " | OSError: error 1\n" " +---------------- 2 ----------------\n" @@ -1066,8 +1109,11 @@ msgstr "" ">>> f()\n" " + Exception Group Traceback (most recent call last):\n" " | File \"\", line 1, in \n" +" | f()\n" +" | ~^^\n" " | File \"\", line 3, in f\n" -" | ExceptionGroup: there were problems\n" +" | raise ExceptionGroup('there were problems', excs)\n" +" | ExceptionGroup: there were problems (2 sub-exceptions)\n" " +-+---------------- 1 ----------------\n" " | OSError: error 1\n" " +---------------- 2 ----------------\n" @@ -1081,7 +1127,7 @@ msgstr "" "caught : e\n" ">>>" -#: ../../tutorial/errors.rst:529 +#: ../../tutorial/errors.rst:552 msgid "" "By using ``except*`` instead of ``except``, we can selectively handle only " "the exceptions in the group that match a certain type. In the following " @@ -1094,7 +1140,7 @@ msgstr "" "``except*`` 子句分別從該群組中提取一個特定類型的例外,同時讓所有其他的例外都" "傳遞到其他子句,最後再被重新引發。 ::" -#: ../../tutorial/errors.rst:536 +#: ../../tutorial/errors.rst:559 msgid "" ">>> def f():\n" "... raise ExceptionGroup(\n" @@ -1123,10 +1169,15 @@ msgid "" "There were SystemErrors\n" " + Exception Group Traceback (most recent call last):\n" " | File \"\", line 2, in \n" +" | f()\n" +" | ~^^\n" " | File \"\", line 2, in f\n" -" | ExceptionGroup: group1\n" +" | raise ExceptionGroup(\n" +" | ...<12 lines>...\n" +" | )\n" +" | ExceptionGroup: group1 (1 sub-exception)\n" " +-+---------------- 1 ----------------\n" -" | ExceptionGroup: group2\n" +" | ExceptionGroup: group2 (1 sub-exception)\n" " +-+---------------- 1 ----------------\n" " | RecursionError: 4\n" " +------------------------------------\n" @@ -1159,16 +1210,21 @@ msgstr "" "There were SystemErrors\n" " + Exception Group Traceback (most recent call last):\n" " | File \"\", line 2, in \n" +" | f()\n" +" | ~^^\n" " | File \"\", line 2, in f\n" -" | ExceptionGroup: group1\n" +" | raise ExceptionGroup(\n" +" | ...<12 lines>...\n" +" | )\n" +" | ExceptionGroup: group1 (1 sub-exception)\n" " +-+---------------- 1 ----------------\n" -" | ExceptionGroup: group2\n" +" | ExceptionGroup: group2 (1 sub-exception)\n" " +-+---------------- 1 ----------------\n" " | RecursionError: 4\n" " +------------------------------------\n" ">>>" -#: ../../tutorial/errors.rst:572 +#: ../../tutorial/errors.rst:600 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 " @@ -1178,7 +1234,7 @@ msgstr "" "請注意,被巢套在例外群組中的例外必須是實例,而不是類型。這是因為在實務上,這" "些例外通常是已經被程式引發並捕獲的例外,類似以下的模式: ::" -#: ../../tutorial/errors.rst:577 +#: ../../tutorial/errors.rst:605 msgid "" ">>> excs = []\n" "... for test in tests:\n" @@ -1202,11 +1258,11 @@ msgstr "" "... raise ExceptionGroup(\"Test Failures\", excs)\n" "..." -#: ../../tutorial/errors.rst:592 +#: ../../tutorial/errors.rst:620 msgid "Enriching Exceptions with Notes" msgstr "用註解使例外更詳細" -#: ../../tutorial/errors.rst:594 +#: ../../tutorial/errors.rst:622 msgid "" "When an exception is created in order to be raised, it is usually " "initialized with information that describes the error that has occurred. " @@ -1222,7 +1278,7 @@ msgstr "" "的註解清單中。標準的回溯呈現會在例外之後列出所有的註解,並按照其被添加的順序" "來排列。 ::" -#: ../../tutorial/errors.rst:601 +#: ../../tutorial/errors.rst:629 msgid "" ">>> try:\n" "... raise TypeError('bad type')\n" @@ -1233,6 +1289,7 @@ msgid "" "...\n" "Traceback (most recent call last):\n" " File \"\", line 2, in \n" +" raise TypeError('bad type')\n" "TypeError: bad type\n" "Add some information\n" "Add some more information\n" @@ -1247,12 +1304,13 @@ msgstr "" "...\n" "Traceback (most recent call last):\n" " File \"\", line 2, in \n" +" raise TypeError('bad type')\n" "TypeError: bad type\n" "Add some information\n" "Add some more information\n" ">>>" -#: ../../tutorial/errors.rst:615 +#: ../../tutorial/errors.rst:644 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 " @@ -1261,7 +1319,7 @@ msgstr "" "例如,在將例外收集到例外群組中時,我們可能希望為各個錯誤添加一些上下文的資" "訊。在以下範例中,群組中的每個例外都有一條註解,指示此錯誤是在何時發生。 ::" -#: ../../tutorial/errors.rst:619 +#: ../../tutorial/errors.rst:648 msgid "" ">>> def f():\n" "... raise OSError('operation failed')\n" @@ -1277,23 +1335,33 @@ msgid "" ">>> raise ExceptionGroup('We have some problems', excs)\n" " + Exception Group Traceback (most recent call last):\n" " | File \"\", line 1, in \n" +" | raise ExceptionGroup('We have some problems', excs)\n" " | ExceptionGroup: We have some problems (3 sub-exceptions)\n" " +-+---------------- 1 ----------------\n" " | Traceback (most recent call last):\n" " | File \"\", line 3, in \n" +" | f()\n" +" | ~^^\n" " | File \"\", line 2, in f\n" +" | raise OSError('operation failed')\n" " | OSError: operation failed\n" " | Happened in Iteration 1\n" " +---------------- 2 ----------------\n" " | Traceback (most recent call last):\n" " | File \"\", line 3, in \n" +" | f()\n" +" | ~^^\n" " | File \"\", line 2, in f\n" +" | raise OSError('operation failed')\n" " | OSError: operation failed\n" " | Happened in Iteration 2\n" " +---------------- 3 ----------------\n" " | Traceback (most recent call last):\n" " | File \"\", line 3, in \n" +" | f()\n" +" | ~^^\n" " | File \"\", line 2, in f\n" +" | raise OSError('operation failed')\n" " | OSError: operation failed\n" " | Happened in Iteration 3\n" " +------------------------------------\n" @@ -1313,23 +1381,33 @@ msgstr "" ">>> raise ExceptionGroup('We have some problems', excs)\n" " + Exception Group Traceback (most recent call last):\n" " | File \"\", line 1, in \n" +" | raise ExceptionGroup('We have some problems', excs)\n" " | ExceptionGroup: We have some problems (3 sub-exceptions)\n" " +-+---------------- 1 ----------------\n" " | Traceback (most recent call last):\n" " | File \"\", line 3, in \n" +" | f()\n" +" | ~^^\n" " | File \"\", line 2, in f\n" +" | raise OSError('operation failed')\n" " | OSError: operation failed\n" " | Happened in Iteration 1\n" " +---------------- 2 ----------------\n" " | Traceback (most recent call last):\n" " | File \"\", line 3, in \n" +" | f()\n" +" | ~^^\n" " | File \"\", line 2, in f\n" +" | raise OSError('operation failed')\n" " | OSError: operation failed\n" " | Happened in Iteration 2\n" " +---------------- 3 ----------------\n" " | Traceback (most recent call last):\n" " | File \"\", line 3, in \n" +" | f()\n" +" | ~^^\n" " | File \"\", line 2, in f\n" +" | raise OSError('operation failed')\n" " | OSError: operation failed\n" " | Happened in Iteration 3\n" " +------------------------------------\n" diff --git a/using/android.po b/using/android.po new file mode 100644 index 0000000000..dbb98acccb --- /dev/null +++ b/using/android.po @@ -0,0 +1,144 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001-2024, Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.13\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-09-24 07:20+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: zh_TW\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../using/android.rst:5 +msgid "Using Python on Android" +msgstr "" + +#: ../../using/android.rst:7 +msgid "" +"Python on Android is unlike Python on desktop platforms. On a desktop " +"platform, Python is generally installed as a system resource that can be " +"used by any user of that computer. Users then interact with Python by " +"running a :program:`python` executable and entering commands at an " +"interactive prompt, or by running a Python script." +msgstr "" + +#: ../../using/android.rst:13 +msgid "" +"On Android, there is no concept of installing as a system resource. The only " +"unit of software distribution is an \"app\". There is also no console where " +"you could run a :program:`python` executable, or interact with a Python REPL." +msgstr "" + +#: ../../using/android.rst:17 +msgid "" +"As a result, the only way you can use Python on Android is in embedded mode " +"– that is, by writing a native Android application, embedding a Python " +"interpreter using ``libpython``, and invoking Python code using the :ref:" +"`Python embedding API `. The full Python interpreter, the " +"standard library, and all your Python code is then packaged into your app " +"for its own private use." +msgstr "" + +#: ../../using/android.rst:23 +msgid "" +"The Python standard library has some notable omissions and restrictions on " +"Android. See the :ref:`API availability guide ` for " +"details." +msgstr "" + +#: ../../using/android.rst:28 +msgid "Adding Python to an Android app" +msgstr "" + +#: ../../using/android.rst:30 +msgid "" +"These instructions are only needed if you're planning to compile Python for " +"Android yourself. Most users should *not* need to do this. Instead, use one " +"of the following tools, which will provide a much easier experience:" +msgstr "" + +#: ../../using/android.rst:34 +msgid "" +"`Briefcase `__, from the BeeWare project" +msgstr "" + +#: ../../using/android.rst:35 +msgid "`Buildozer `__, from the Kivy project" +msgstr "" + +#: ../../using/android.rst:36 +msgid "`Chaquopy `__" +msgstr "" + +#: ../../using/android.rst:37 +msgid "" +"`pyqtdeploy `__" +msgstr "" + +#: ../../using/android.rst:38 +msgid "`Termux `__" +msgstr "" + +#: ../../using/android.rst:40 +msgid "" +"If you're sure you want to do all of this manually, read on. You can use " +"the :source:`testbed app ` as a guide; each step below " +"contains a link to the relevant file." +msgstr "" + +#: ../../using/android.rst:44 +msgid "" +"Build Python by following the instructions in :source:`Android/README.md`." +msgstr "" + +#: ../../using/android.rst:46 +msgid "" +"Add code to your :source:`build.gradle ` file to copy the following items into your project. All except your " +"own Python code can be copied from ``cross-build/HOST/prefix/lib``:" +msgstr "" + +#: ../../using/android.rst:50 +msgid "In your JNI libraries:" +msgstr "" + +#: ../../using/android.rst:52 +msgid "``libpython*.*.so``" +msgstr "``libpython*.*.so``" + +#: ../../using/android.rst:53 +msgid "``lib*_python.so`` (external libraries such as OpenSSL)" +msgstr "" + +#: ../../using/android.rst:55 +msgid "In your assets:" +msgstr "" + +#: ../../using/android.rst:57 +msgid "``python*.*`` (the Python standard library)" +msgstr "" + +#: ../../using/android.rst:58 +msgid "``python*.*/site-packages`` (your own Python code)" +msgstr "" + +#: ../../using/android.rst:60 +msgid "" +"Add code to your app to :source:`extract the assets to the filesystem " +"`." +msgstr "" + +#: ../../using/android.rst:63 +msgid "" +"Add code to your app to :source:`start Python in embedded mode `. This will need to be C code called " +"via JNI." +msgstr "" diff --git a/using/ios.po b/using/ios.po index 2d702dba27..f2c2df9111 100644 --- a/using/ios.po +++ b/using/ios.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-23 07:52+0800\n" +"POT-Creation-Date: 2024-09-24 07:20+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -115,7 +115,7 @@ msgstr "" #: ../../using/ios.rst:65 msgid "" "The Python standard library has some notable omissions and restrictions on " -"iOS. See the :ref:`API availability guide for iOS ` for " +"iOS. See the :ref:`API availability guide for iOS ` for " "details." msgstr "" diff --git a/using/mac.po b/using/mac.po index 9ece55a5c4..f346362e0e 100644 --- a/using/mac.po +++ b/using/mac.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-23 07:52+0800\n" +"POT-Creation-Date: 2024-09-24 07:20+0000\n" "PO-Revision-Date: 2022-08-31 22:26+0800\n" "Last-Translator: Matt Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -289,10 +289,9 @@ msgid "A number of alternative macOS GUI toolkits are available:" msgstr "有許多替代 macOS GUI 工具套件可用:" #: ../../using/mac.rst:157 -#, fuzzy msgid "" "`PySide `__: Official Python bindings to " -"the `Qt GUI toolkit `__." +"the `Qt GUI toolkit `__." msgstr "" "`PySide `__:`Qt GUI 工具包 `__\\ 的官方 Python 繫結。" diff --git a/using/windows.po b/using/windows.po index 2ef76eb5e5..a61e7c9881 100644 --- a/using/windows.po +++ b/using/windows.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-23 07:52+0800\n" +"POT-Creation-Date: 2024-09-24 07:20+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-" @@ -1145,8 +1145,8 @@ msgid "" msgstr "" #: ../../using/windows.rst:611 -#, fuzzy -msgid "`Enthought Deployment Manager `_" +msgid "" +"`Enthought Deployment Manager `_" msgstr "" "`Enthought Deployment Manager `_" @@ -2300,9 +2300,8 @@ msgid "" msgstr "" #: ../../using/windows.rst:1308 -#, fuzzy msgid "" -"`Win32 How Do I...? `_" +"`Win32 How Do I...? `_" msgstr "" "`Win32 How Do I...? `_" diff --git a/whatsnew/2.4.po b/whatsnew/2.4.po index f8d6f7d7ed..7c50822863 100644 --- a/whatsnew/2.4.po +++ b/whatsnew/2.4.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-23 07:52+0800\n" +"POT-Creation-Date: 2024-09-24 07:20+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-" @@ -1043,8 +1043,12 @@ msgid "" msgstr "" #: ../../whatsnew/2.4.rst:687 -msgid "http://www.lahey.com/float.htm" +msgid "" +"`http://www.lahey.com/float.htm `__" msgstr "" +"`http://www.lahey.com/float.htm `__" #: ../../whatsnew/2.4.rst:688 msgid "" @@ -1053,8 +1057,7 @@ msgid "" msgstr "" #: ../../whatsnew/2.4.rst:691 -#, fuzzy -msgid "http://speleotrove.com/decimal/" +msgid "https://speleotrove.com/decimal/" msgstr "https://speleotrove.com/decimal/" #: ../../whatsnew/2.4.rst:692 @@ -1159,11 +1162,12 @@ msgstr "" #: ../../whatsnew/2.4.rst:759 msgid "" -"The code for these functions came from the GLib library (https://developer-" -"old.gnome.org/glib/2.26/), whose developers kindly relicensed the relevant " -"functions and donated them to the Python Software Foundation. The :mod:" -"`locale` module can now change the numeric locale, letting extensions such " -"as GTK+ produce the correct results." +"The code for these functions came from the GLib library (`https://developer-" +"old.gnome.org/glib/2.26/ `__), whose developers kindly relicensed the " +"relevant functions and donated them to the Python Software Foundation. The :" +"mod:`locale` module can now change the numeric locale, letting extensions " +"such as GTK+ produce the correct results." msgstr "" #: ../../whatsnew/2.4.rst:768 @@ -2373,10 +2377,3 @@ msgstr "universal newlines" #: ../../whatsnew/2.4.rst:415 msgid "What's new" msgstr "What's new(有什麼新功能)" - -#~ msgid "" -#~ "`http://www.lahey.com/float.htm `__" -#~ msgstr "" -#~ "`http://www.lahey.com/float.htm `__" diff --git a/whatsnew/2.7.po b/whatsnew/2.7.po index 381ebe4260..8eaa5f46cd 100644 --- a/whatsnew/2.7.po +++ b/whatsnew/2.7.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-23 07:52+0800\n" +"POT-Creation-Date: 2024-09-24 07:20+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-" @@ -2132,8 +2132,8 @@ msgid "" "The :func:`~ssl.SSLContext.wrap_socket` constructor function now takes a " "*ciphers* argument that's a string listing the encryption algorithms to be " "allowed; the format of the string is described `in the OpenSSL documentation " -"`__. (Added by " -"Antoine Pitrou; :issue:`8322`.)" +"`__. (Added by Antoine " +"Pitrou; :issue:`8322`.)" msgstr "" #: ../../whatsnew/2.7.rst:1554 @@ -2846,14 +2846,14 @@ msgid "" "ElementTree's code for converting trees to a string has been significantly " "reworked, making it roughly twice as fast in many cases. The :meth:" "`ElementTree.write() ` and :meth:" -"`Element.write` methods now have a *method* parameter that can be \"xml\" " -"(the default), \"html\", or \"text\". HTML mode will output empty elements " -"as ```` instead of ````, and text mode will skip over " -"elements and only output the text chunks. If you set the :attr:`~xml.etree." -"ElementTree.Element.tag` attribute of an element to ``None`` but leave its " -"children in place, the element will be omitted when the tree is written out, " -"so you don't need to do more extensive rearrangement to remove a single " -"element." +"`Element.write` methods now have a *method* parameter that can be " +"\"xml\" (the default), \"html\", or \"text\". HTML mode will output empty " +"elements as ```` instead of ````, and text mode will " +"skip over elements and only output the text chunks. If you set the :attr:" +"`~xml.etree.ElementTree.Element.tag` attribute of an element to ``None`` but " +"leave its children in place, the element will be omitted when the tree is " +"written out, so you don't need to do more extensive rearrangement to remove " +"a single element." msgstr "" #: ../../whatsnew/2.7.rst:2044 @@ -3675,17 +3675,18 @@ msgstr "" #: ../../whatsnew/2.7.rst:2683 msgid "" -"As `discussed in the PEP`__, platform packagers may choose not to install " -"these commands by default, as long as, when invoked, they provide clear and " -"simple directions on how to install them on that platform (usually using the " -"system package manager)." +"As :pep:`discussed in the PEP <0477#disabling-ensurepip-by-downstream-" +"distributors>`, platform packagers may choose not to install these commands " +"by default, as long as, when invoked, they provide clear and simple " +"directions on how to install them on that platform (usually using the system " +"package manager)." msgstr "" -#: ../../whatsnew/2.7.rst:2692 +#: ../../whatsnew/2.7.rst:2690 msgid "Documentation Changes" msgstr "" -#: ../../whatsnew/2.7.rst:2694 +#: ../../whatsnew/2.7.rst:2692 msgid "" "As part of this change, the :ref:`installing-index` and :ref:`distributing-" "index` sections of the documentation have been completely redesigned as " @@ -3695,29 +3696,29 @@ msgid "" "of the individual projects." msgstr "" -#: ../../whatsnew/2.7.rst:2702 +#: ../../whatsnew/2.7.rst:2700 msgid "" "However, as this migration is currently still incomplete, the legacy " "versions of those guides remaining available as :ref:`install-index` and :" "ref:`setuptools-index`." msgstr "" -#: ../../whatsnew/2.7.rst:2708 +#: ../../whatsnew/2.7.rst:2706 msgid ":pep:`453` -- Explicit bootstrapping of pip in Python installations" msgstr "" -#: ../../whatsnew/2.7.rst:2709 +#: ../../whatsnew/2.7.rst:2707 msgid "" "PEP written by Donald Stufft and Nick Coghlan, implemented by Donald Stufft, " "Nick Coghlan, Martin von Löwis and Ned Deily." msgstr "" -#: ../../whatsnew/2.7.rst:2713 +#: ../../whatsnew/2.7.rst:2711 msgid "" "PEP 476: Enabling certificate verification by default for stdlib http clients" msgstr "" -#: ../../whatsnew/2.7.rst:2715 +#: ../../whatsnew/2.7.rst:2713 msgid "" ":pep:`476` updated :mod:`httplib ` and modules which use it, such as :" "mod:`urllib2 ` and :mod:`xmlrpclib `, to now " @@ -3727,13 +3728,13 @@ msgid "" "for many applications. This change was made in the Python 2.7.9 release." msgstr "" -#: ../../whatsnew/2.7.rst:2723 +#: ../../whatsnew/2.7.rst:2721 msgid "" "For applications which require the old previous behavior, they can pass an " "alternate context::" msgstr "" -#: ../../whatsnew/2.7.rst:2726 +#: ../../whatsnew/2.7.rst:2724 msgid "" "import urllib2\n" "import ssl\n" @@ -3748,11 +3749,11 @@ msgid "" "urllib2.urlopen(\"https://invalid-cert\", context=context)" msgstr "" -#: ../../whatsnew/2.7.rst:2740 +#: ../../whatsnew/2.7.rst:2738 msgid "PEP 493: HTTPS verification migration tools for Python 2.7" msgstr "" -#: ../../whatsnew/2.7.rst:2742 +#: ../../whatsnew/2.7.rst:2740 msgid "" ":pep:`493` provides additional migration tools to support a more incremental " "infrastructure upgrade process for environments containing applications and " @@ -3761,14 +3762,14 @@ msgid "" "were made in the Python 2.7.12 release." msgstr "" -#: ../../whatsnew/2.7.rst:2748 +#: ../../whatsnew/2.7.rst:2746 msgid "" "These tools are intended for use in cases where affected applications and " "services can't be modified to explicitly pass a more permissive SSL context " "when establishing the connection." msgstr "" -#: ../../whatsnew/2.7.rst:2752 +#: ../../whatsnew/2.7.rst:2750 msgid "" "For applications and services which can't be modified at all, the new " "``PYTHONHTTPSVERIFY`` environment variable may be set to ``0`` to revert an " @@ -3776,18 +3777,18 @@ msgid "" "2.7.8 and earlier." msgstr "" -#: ../../whatsnew/2.7.rst:2757 +#: ../../whatsnew/2.7.rst:2755 msgid "" "For cases where the connection establishment code can't be modified, but the " "overall application can be, the new :func:`!ssl._https_verify_certificates` " "function can be used to adjust the default behaviour at runtime." msgstr "" -#: ../../whatsnew/2.7.rst:2763 +#: ../../whatsnew/2.7.rst:2761 msgid "New ``make regen-all`` build target" msgstr "" -#: ../../whatsnew/2.7.rst:2765 +#: ../../whatsnew/2.7.rst:2763 msgid "" "To simplify cross-compilation, and to ensure that CPython can reliably be " "compiled without requiring an existing version of Python to already be " @@ -3795,43 +3796,43 @@ msgid "" "recompile generated files based on file modification times." msgstr "" -#: ../../whatsnew/2.7.rst:2770 +#: ../../whatsnew/2.7.rst:2768 msgid "" "Instead, a new ``make regen-all`` command has been added to force " "regeneration of these files when desired (e.g. after an initial version of " "Python has already been built based on the pregenerated versions)." msgstr "" -#: ../../whatsnew/2.7.rst:2774 +#: ../../whatsnew/2.7.rst:2772 msgid "" "More selective regeneration targets are also defined - see :source:`Makefile." "pre.in` for details." msgstr "" -#: ../../whatsnew/2.7.rst:2777 ../../whatsnew/2.7.rst:2790 +#: ../../whatsnew/2.7.rst:2775 ../../whatsnew/2.7.rst:2788 msgid "(Contributed by Victor Stinner in :issue:`23404`.)" msgstr "(由 Victor Stinner 於 :issue:`23404` 中貢獻。)" -#: ../../whatsnew/2.7.rst:2783 +#: ../../whatsnew/2.7.rst:2781 msgid "Removal of ``make touch`` build target" msgstr "" -#: ../../whatsnew/2.7.rst:2785 +#: ../../whatsnew/2.7.rst:2783 msgid "" "The ``make touch`` build target previously used to request implicit " "regeneration of generated files by updating their modification times has " "been removed." msgstr "" -#: ../../whatsnew/2.7.rst:2788 +#: ../../whatsnew/2.7.rst:2786 msgid "It has been replaced by the new ``make regen-all`` target." msgstr "" -#: ../../whatsnew/2.7.rst:2799 +#: ../../whatsnew/2.7.rst:2797 msgid "Acknowledgements" msgstr "致謝" -#: ../../whatsnew/2.7.rst:2801 +#: ../../whatsnew/2.7.rst:2799 msgid "" "The author would like to thank the following people for offering " "suggestions, corrections and assistance with various drafts of this article: " diff --git a/whatsnew/3.11.po b/whatsnew/3.11.po index bf12f1484a..ee765c9437 100644 --- a/whatsnew/3.11.po +++ b/whatsnew/3.11.po @@ -3188,99 +3188,80 @@ msgid "" msgstr ":pep:`594` 引領下列模組的棄用,並排訂於 Python 3.13 移除:" #: ../../whatsnew/3.11.rst:1752 -#, fuzzy msgid ":mod:`!aifc`" -msgstr ":mod:`aifc`" +msgstr ":mod:`!aifc`" #: ../../whatsnew/3.11.rst:1752 -#, fuzzy msgid ":mod:`!chunk`" -msgstr ":mod:`chunk`" +msgstr ":mod:`!chunk`" #: ../../whatsnew/3.11.rst:1752 -#, fuzzy msgid ":mod:`!msilib`" -msgstr ":mod:`msilib`" +msgstr ":mod:`!msilib`" #: ../../whatsnew/3.11.rst:1752 -#, fuzzy msgid ":mod:`!pipes`" -msgstr ":mod:`pipes`" +msgstr ":mod:`!pipes`" #: ../../whatsnew/3.11.rst:1752 -#, fuzzy msgid ":mod:`!telnetlib`" -msgstr ":mod:`telnetlib`" +msgstr ":mod:`!telnetlib`" #: ../../whatsnew/3.11.rst:1754 -#, fuzzy msgid ":mod:`!audioop`" -msgstr ":mod:`audioop`" +msgstr ":mod:`!audioop`" #: ../../whatsnew/3.11.rst:1754 -#, fuzzy msgid ":mod:`!crypt`" -msgstr ":mod:`crypt`" +msgstr ":mod:`!crypt`" #: ../../whatsnew/3.11.rst:1754 -#, fuzzy msgid ":mod:`!nis`" -msgstr ":mod:`nis`" +msgstr ":mod:`!nis`" #: ../../whatsnew/3.11.rst:1754 -#, fuzzy msgid ":mod:`!sndhdr`" -msgstr ":mod:`sndhdr`" +msgstr ":mod:`!sndhdr`" #: ../../whatsnew/3.11.rst:1754 -#, fuzzy msgid ":mod:`!uu`" -msgstr ":mod:`uu`" +msgstr ":mod:`!uu`" #: ../../whatsnew/3.11.rst:1756 -#, fuzzy msgid ":mod:`!cgi`" -msgstr ":mod:`cgi`" +msgstr ":mod:`!cgi`" #: ../../whatsnew/3.11.rst:1756 -#, fuzzy msgid ":mod:`!imghdr`" -msgstr ":mod:`imghdr`" +msgstr ":mod:`!imghdr`" #: ../../whatsnew/3.11.rst:1756 -#, fuzzy msgid ":mod:`!nntplib`" -msgstr ":mod:`nntplib`" +msgstr ":mod:`!nntplib`" #: ../../whatsnew/3.11.rst:1756 -#, fuzzy msgid ":mod:`!spwd`" -msgstr ":mod:`spwd`" +msgstr ":mod:`!spwd`" #: ../../whatsnew/3.11.rst:1756 -#, fuzzy msgid ":mod:`!xdrlib`" -msgstr ":mod:`xdrlib`" +msgstr ":mod:`!xdrlib`" #: ../../whatsnew/3.11.rst:1758 -#, fuzzy msgid ":mod:`!cgitb`" -msgstr ":mod:`cgitb`" +msgstr ":mod:`!cgitb`" #: ../../whatsnew/3.11.rst:1758 -#, fuzzy msgid ":mod:`!mailcap`" -msgstr ":mod:`mailcap`" +msgstr ":mod:`!mailcap`" #: ../../whatsnew/3.11.rst:1758 -#, fuzzy msgid ":mod:`!ossaudiodev`" -msgstr ":mod:`ossaudiodev`" +msgstr ":mod:`!ossaudiodev`" #: ../../whatsnew/3.11.rst:1758 -#, fuzzy msgid ":mod:`!sunau`" -msgstr ":mod:`sunau`" +msgstr ":mod:`!sunau`" #: ../../whatsnew/3.11.rst:1761 msgid "" @@ -3378,39 +3359,32 @@ msgstr "" "案:" #: ../../whatsnew/3.11.rst:1806 -#, fuzzy msgid ":func:`!importlib.resources.contents`" -msgstr ":func:`importlib.resources.contents`" +msgstr ":func:`!importlib.resources.contents`" #: ../../whatsnew/3.11.rst:1807 -#, fuzzy msgid ":func:`!importlib.resources.is_resource`" -msgstr ":func:`importlib.resources.is_resource`" +msgstr ":func:`!importlib.resources.is_resource`" #: ../../whatsnew/3.11.rst:1808 -#, fuzzy msgid ":func:`!importlib.resources.open_binary`" -msgstr ":func:`importlib.resources.open_binary`" +msgstr ":func:`!importlib.resources.open_binary`" #: ../../whatsnew/3.11.rst:1809 -#, fuzzy msgid ":func:`!importlib.resources.open_text`" -msgstr ":func:`importlib.resources.open_text`" +msgstr ":func:`!importlib.resources.open_text`" #: ../../whatsnew/3.11.rst:1810 -#, fuzzy msgid ":func:`!importlib.resources.read_binary`" -msgstr ":func:`importlib.resources.read_binary`" +msgstr ":func:`!importlib.resources.read_binary`" #: ../../whatsnew/3.11.rst:1811 -#, fuzzy msgid ":func:`!importlib.resources.read_text`" -msgstr ":func:`importlib.resources.read_text`" +msgstr ":func:`!importlib.resources.read_text`" #: ../../whatsnew/3.11.rst:1812 -#, fuzzy msgid ":func:`!importlib.resources.path`" -msgstr ":func:`importlib.resources.path`" +msgstr ":func:`!importlib.resources.path`" #: ../../whatsnew/3.11.rst:1814 msgid "" diff --git a/whatsnew/3.12.po b/whatsnew/3.12.po index 3c3f4d6e2c..b3a08c1401 100644 --- a/whatsnew/3.12.po +++ b/whatsnew/3.12.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-23 07:52+0800\n" +"POT-Creation-Date: 2024-09-24 07:20+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-" @@ -239,11 +239,11 @@ msgstr "" #: ../../whatsnew/3.12.rst:156 msgid "" -":pep:`632`: Remove the :mod:`!distutils` package. See `the migration guide " -"`_ for advice replacing " -"the APIs it provided. The third-party `Setuptools `__ package continues to " -"provide :mod:`!distutils`, if you still require it in Python 3.12 and beyond." +":pep:`632`: Remove the :mod:`!distutils` package. See :pep:`the migration " +"guide <0632#migration-advice>` for advice replacing the APIs it provided. " +"The third-party `Setuptools `__ package continues to provide :mod:`!distutils`, if " +"you still require it in Python 3.12 and beyond." msgstr "" #: ../../whatsnew/3.12.rst:163 @@ -525,7 +525,7 @@ msgstr "" #: ../../whatsnew/3.12.rst:361 msgid "" "For further examples how to use the C-API for sub-interpreters with a per-" -"interpreter GIL, see :source:`Modules/_xxsubinterpretersmodule.c`." +"interpreter GIL, see ``Modules/_xxsubinterpretersmodule.c``." msgstr "" #: ../../whatsnew/3.12.rst:364 @@ -1936,8 +1936,9 @@ msgid "" "warning to raise awareness as issues encountered by code doing this are " "becoming more frequent. See the :func:`os.fork` documentation for more " "details along with `this discussion on fork being incompatible with threads " -"`_ for *why* we're now surfacing this " -"longstanding platform compatibility problem to developers." +"`_ for *why* we're now surfacing this longstanding " +"platform compatibility problem to developers." msgstr "" #: ../../whatsnew/3.12.rst:1260 @@ -1993,6 +1994,7 @@ msgid "" msgstr "" #: ../../whatsnew/3.12.rst:1290 +#: ../../deprecations/pending-removal-in-3.15.rst:50 msgid ":mod:`typing`:" msgstr ":mod:`typing`:" @@ -2405,142 +2407,215 @@ msgid "Pending Removal in Python 3.15" msgstr "Python 3.15 中待移除的項目" #: ../../deprecations/pending-removal-in-3.15.rst:4 +msgid ":mod:`ctypes`:" +msgstr ":mod:`ctypes`:" + +#: ../../deprecations/pending-removal-in-3.15.rst:6 msgid "" -":class:`http.server.CGIHTTPRequestHandler` will be removed along with its " -"related ``--cgi`` flag to ``python -m http.server``. It was obsolete and " -"rarely used. No direct replacement exists. *Anything* is better than CGI " -"to interface a web server with a request handler." +"The undocumented :func:`!ctypes.SetPointerType` function has been deprecated " +"since Python 3.13." msgstr "" -":class:`http.server.CGIHTTPRequestHandler` 將會被移除,連同其相關的 ``--" -"cgi`` 旗標到 ``python -m http.server``。它已經過時且很少被使用。沒有直接的替" -"代方案。*任何東西*\\ 都比 CGI 更好的來介接一個帶有請求處理器的網頁伺服器。" +"自 Python 3.13 起,未記錄的 :func:`!ctypes.SetPointerType` 函式已被棄用。" #: ../../deprecations/pending-removal-in-3.15.rst:9 +msgid ":mod:`http.server`:" +msgstr ":mod:`http.server`:" + +#: ../../deprecations/pending-removal-in-3.15.rst:11 msgid "" -":class:`locale`: :func:`locale.getdefaultlocale` was deprecated in Python " -"3.11 and originally planned for removal in Python 3.13 (:gh:`90817`), but " -"removal has been postponed to Python 3.15. Use :func:`locale.setlocale`, :" -"func:`locale.getencoding` and :func:`locale.getlocale` instead. (Contributed " -"by Hugo van Kemenade in :gh:`111187`.)" +"The obsolete and rarely used :class:`~http.server.CGIHTTPRequestHandler` has " +"been deprecated since Python 3.13. No direct replacement exists. *Anything* " +"is better than CGI to interface a web server with a request handler." msgstr "" -":class:`locale`::func:`locale.getdefaultlocale` 已在 Python 3.11 中被棄用," -"原本計劃在 Python 3.13 中移除 (:gh:`90817`),但被延後至 Python 3.15。請改用 :" -"func:`locale.setlocale`、:func:`locale.getencoding` 和 :func:`locale." -"getlocale`。 (由 Hugo van Kemenade 於 :gh:`111187` 貢獻。)" +"過時且很少使用的 :class:`~http.server.CGIHTTPRequestHandler` 自 Python 3.13 " +"起已被棄用。不存在直接的替代。*任何東西*\\ 都比 CGI 更好地將 Web 伺服器與請求" +"處理程序介接起來。" -#: ../../deprecations/pending-removal-in-3.15.rst:16 +#: ../../deprecations/pending-removal-in-3.15.rst:17 msgid "" -":mod:`pathlib`: :meth:`pathlib.PurePath.is_reserved` is deprecated and " -"scheduled for removal in Python 3.15. Use :func:`os.path.isreserved` to " -"detect reserved paths on Windows." +"The :option:`!--cgi` flag to the :program:`python -m http.server` command-" +"line interface has been deprecated since Python 3.13." msgstr "" -":mod:`pathlib`::meth:`pathlib.PurePath.is_reserved` 已被棄用並計劃在 Python " -"3.15 中移除。請用 :func:`os.path.isreserved` 來偵測 Windows 上的保留路徑。" +"自 Python 3.13 起,:program:`python -m http.server` 命令列介面的 :option:`!--" +"cgi` 旗標已被棄用。" + +#: ../../deprecations/pending-removal-in-3.15.rst:20 +msgid ":class:`locale`:" +msgstr ":class:`locale`:" -#: ../../deprecations/pending-removal-in-3.15.rst:21 +#: ../../deprecations/pending-removal-in-3.15.rst:22 msgid "" -":mod:`platform`: :func:`~platform.java_ver` is deprecated and will be " -"removed in 3.15. It was largely untested, had a confusing API, and was only " -"useful for Jython support. (Contributed by Nikita Sobolev in :gh:`116349`.)" +"The :func:`~locale.getdefaultlocale` function has been deprecated since " +"Python 3.11. Its removal was originally planned for Python 3.13 (:gh:" +"`90817`), but has been postponed to Python 3.15. Use :func:`~locale." +"getlocale`, :func:`~locale.setlocale`, and :func:`~locale.getencoding` " +"instead. (Contributed by Hugo van Kemenade in :gh:`111187`.)" msgstr "" -":mod:`platform`::func:`~platform.java_ver` 已被棄用並將在 3.15 中移除。它幾" -"乎沒有被測試過,API 令人困惑並且只對 Jython 支援有用。 (由 Nikita Sobolev " -"於 :gh:`116349` 貢獻。)" +":func:`~locale.getdefaultlocale` 已在 Python 3.11 中被棄用,原本計劃在 " +"Python 3.13 中移除 (:gh:`90817`),但被延後至 Python 3.15。請改用 :func:" +"`~locale.getlocale`、:func:`~locale.setlocale` 和 :func:`~locale." +"getencoding`。 (由 Hugo van Kemenade 於 :gh:`111187` 貢獻。)" -#: ../../deprecations/pending-removal-in-3.15.rst:27 +#: ../../deprecations/pending-removal-in-3.15.rst:30 +msgid ":mod:`pathlib`:" +msgstr ":mod:`pathlib`:" + +#: ../../deprecations/pending-removal-in-3.15.rst:32 msgid "" -":mod:`threading`: Passing any arguments to :func:`threading.RLock` is now " -"deprecated. C version allows any numbers of args and kwargs, but they are " -"just ignored. Python version does not allow any arguments. All arguments " -"will be removed from :func:`threading.RLock` in Python 3.15. (Contributed by " -"Nikita Sobolev in :gh:`102029`.)" +":meth:`.PurePath.is_reserved` has been deprecated since Python 3.13. Use :" +"func:`os.path.isreserved` to detect reserved paths on Windows." msgstr "" -":mod:`threading`:對 :func:`threading.RLock` 傳遞任何引數現在已被棄用。C 版本" -"允許任意數量的引數和關鍵字引數,但它們會被忽略。Python 版本不允許任何引數。所" -"有引數將在 Python 3.15 中從 :func:`threading.RLock` 中移除。 (由 Nikita " -"Sobolev 於 :gh:`102029` 貢獻。)" - -#: ../../deprecations/pending-removal-in-3.15.rst:34 -msgid ":class:`typing.NamedTuple`:" -msgstr ":class:`typing.NamedTuple`:" +":meth:`.PurePath.is_reserved` 已自 Python 3.13 被棄用。請用 :func:`os.path." +"isreserved` 來偵測 Windows 上的保留路徑。" #: ../../deprecations/pending-removal-in-3.15.rst:36 +msgid ":mod:`platform`:" +msgstr ":mod:`platform`:" + +#: ../../deprecations/pending-removal-in-3.15.rst:38 msgid "" -"The undocumented keyword argument syntax for creating :class:`!NamedTuple` " -"classes (``NT = NamedTuple(\"NT\", x=int)``) is deprecated, and will be " -"disallowed in 3.15. Use the class-based syntax or the functional syntax " -"instead." +":func:`~platform.java_ver` has been deprecated since Python 3.13. This " +"function is only useful for Jython support, has a confusing API, and is " +"largely untested." +msgstr "" +"自 Python 3.13 起,:func:`~platform.java_ver` 已被棄用。此函式僅對 Jython 支" +"援有用,具有令人困惑的 API,基本上未經測試。" + +#: ../../deprecations/pending-removal-in-3.15.rst:42 +msgid ":mod:`threading`:" +msgstr ":mod:`threading`:" + +#: ../../deprecations/pending-removal-in-3.15.rst:44 +msgid "" +":func:`~threading.RLock` will take no arguments in Python 3.15. Passing any " +"arguments has been deprecated since Python 3.14, as the Python version does " +"not permit any arguments, but the C version allows any number of positional " +"or keyword arguments, ignoring every argument." +msgstr "" +":func:`~threading.RLock` 在 Python 3.15 中將不接受任何引數。自 Python 3.14 " +"起,傳遞任何引數的用法已被棄用,因為 Python 版本不允許任何引數,但 C 版本允許" +"任意數量的位置或關鍵字引數,並忽略每個引數。" + +#: ../../deprecations/pending-removal-in-3.15.rst:52 +msgid "" +"The undocumented keyword argument syntax for creating :class:`~typing." +"NamedTuple` classes (e.g. ``Point = NamedTuple(\"Point\", x=int, y=int)``) " +"has been deprecated since Python 3.13. Use the class-based syntax or the " +"functional syntax instead." +msgstr "" +"用於建立 :class:`~typing.NamedTuple` 類別的未以文件記錄之關鍵字引數語法 " +"(``Point = NamedTuple(\"Point\", x=int, y=int)``) 已自 Python 3.13 棄用。請改" +"用基於類別的語法或函式語法 (functional syntax)。" + +#: ../../deprecations/pending-removal-in-3.15.rst:58 +msgid "" +"The :func:`typing.no_type_check_decorator` decorator function has been " +"deprecated since Python 3.13. After eight years in the :mod:`typing` module, " +"it has yet to be supported by any major type checker." msgstr "" -"用於建立 :class:`!NamedTuple` 類別的未以文件記錄之關鍵字引數語法 (``NT = " -"NamedTuple(\"NT\", x=int)``) 已棄用,並將在 3.15 中被禁止。請改用基於類別的語" -"法或函式語法 (functional syntax)。" - -#: ../../deprecations/pending-removal-in-3.15.rst:40 -msgid "" -"When using the functional syntax to create a :class:`!NamedTuple` class, " -"failing to pass a value to the *fields* parameter (``NT = " -"NamedTuple(\"NT\")``) is deprecated. Passing ``None`` to the *fields* " -"parameter (``NT = NamedTuple(\"NT\", None)``) is also deprecated. Both will " -"be disallowed in Python 3.15. To create a :class:`!NamedTuple` class with 0 " -"fields, use ``class NT(NamedTuple): pass`` or ``NT = NamedTuple(\"NT\", " -"[])``." -msgstr "" -"當使用函式語法來建立 :class:`!NamedTuple` 類別時,沒將值傳遞給 *fields* 參數" -"的方式 (``NT = NamedTuple(\"NT\")``) 已被棄用,將 ``None`` 傳遞給 *fields* 參" -"數(``NT = NamedTuple(\"NT\", None)``)也已被棄用。這兩者將在 Python 3.15 中" -"會被禁止。要建立一個沒有欄位的 :class:`!NamedTuple` 類別,請使用 ``class " -"NT(NamedTuple): pass`` 或 ``NT = NamedTuple(\"NT\", [])``。" - -#: ../../deprecations/pending-removal-in-3.15.rst:47 -msgid "" -":class:`typing.TypedDict`: When using the functional syntax to create a :" -"class:`!TypedDict` class, failing to pass a value to the *fields* parameter " -"(``TD = TypedDict(\"TD\")``) is deprecated. Passing ``None`` to the *fields* " -"parameter (``TD = TypedDict(\"TD\", None)``) is also deprecated. Both will " -"be disallowed in Python 3.15. To create a :class:`!TypedDict` class with 0 " -"fields, use ``class TD(TypedDict): pass`` or ``TD = TypedDict(\"TD\", {})``." -msgstr "" -":class:`typing.TypedDict`:當使用函式語法來建立 :class:`!TypedDict` 類別時," -"沒將值傳遞給 *fields* 參數的方式(``TD = TypedDict(\"TD\")``)已被棄用,將 " -"``None`` 傳遞給 *fields* 參數(``TD = TypedDict(\"TD\", None)``)也已被棄用。" -"這兩者將在 Python 3.15 中會被禁止。要建立一個沒有欄位的 :class:`!TypedDict` " -"類別,請使用 ``class TD(TypedDict): pass`` 或 ``TD = TypedDict(\"TD\", " -"{})``。" - -#: ../../deprecations/pending-removal-in-3.15.rst:54 -msgid "" -":mod:`wave`: Deprecate the ``getmark()``, ``setmark()`` and ``getmarkers()`` " -"methods of the :class:`wave.Wave_read` and :class:`wave.Wave_write` classes. " -"They will be removed in Python 3.15. (Contributed by Victor Stinner in :gh:" -"`105096`.)" -msgstr "" -":mod:`wave`:已棄用 :class:`wave.Wave_read` 和 :class:`wave.Wave_write` 類別" -"的 ``getmark()``、``setmark()`` 和 ``getmarkers()`` 方法。它們將在 Python " -"3.15 中被移除。 (由 Victor Stinner 於 :gh:`105096` 貢獻。)" +"自 Python 3.13 起,:func:`typing.no_type_check_decorator` 裝飾器函式已被棄" +"用。在 :mod:`typing` 模組中使用了八年之後,它尚未得到任何主要型別檢查器的支" +"援。" + +#: ../../deprecations/pending-removal-in-3.15.rst:63 +msgid ":mod:`wave`:" +msgstr ":mod:`wave`:" + +#: ../../deprecations/pending-removal-in-3.15.rst:65 +msgid "" +"The :meth:`~wave.Wave_read.getmark`, :meth:`!setmark`, and :meth:`~wave." +"Wave_read.getmarkers` methods of the :class:`~wave.Wave_read` and :class:" +"`~wave.Wave_write` classes have been deprecated since Python 3.13." +msgstr "" +"已棄用 :class:`~wave.Wave_read` 和 :class:`~wave.Wave_write` 類別的 :meth:" +"`~wave.Wave_read.getmark`、:meth:`!setmark` 和 :meth:`~wave.Wave_read." +"getmarkers` 方法自 Python 3.13 被棄用。" #: ../../deprecations/pending-removal-in-3.16.rst:2 msgid "Pending Removal in Python 3.16" msgstr "Python 3.16 中待移除的項目" #: ../../deprecations/pending-removal-in-3.16.rst:4 +#: ../../deprecations/pending-removal-in-future.rst:12 +msgid ":mod:`builtins`:" +msgstr ":mod:`builtins`:" + +#: ../../deprecations/pending-removal-in-3.16.rst:6 +msgid "" +"Bitwise inversion on boolean types, ``~True`` or ``~False`` has been " +"deprecated since Python 3.12, as it produces surprising and unintuitive " +"results (``-2`` and ``-1``). Use ``not x`` instead for the logical negation " +"of a Boolean. In the rare case that you need the bitwise inversion of the " +"underlying integer, convert to ``int`` explicitly (``~int(x)``)." +msgstr "" +"自 Python 3.12 起,布林型別的位元反轉 ``~True`` 或 ``~False`` 已被棄用,因為" +"它會產生不預期且不直觀的結果(``-2`` 和 ``-1``)。使用 ``not x`` 代替布林值的" +"邏輯否定。在極少數情況下,你需要對底層的整數進行位元反轉,請明確轉換為 " +"``~int(x)`` (``~int(x)``)。" + +#: ../../deprecations/pending-removal-in-3.16.rst:13 +msgid ":mod:`array`:" +msgstr ":mod:`array`:" + +#: ../../deprecations/pending-removal-in-3.16.rst:15 +msgid "" +"The ``'u'`` format code (:c:type:`wchar_t`) has been deprecated in " +"documentation since Python 3.3 and at runtime since Python 3.13. Use the " +"``'w'`` format code (:c:type:`Py_UCS4`) for Unicode characters instead." +msgstr "" +"自 Python 3.3 起,``'u'`` 格式碼 (:c:type:`wchar_t`) 在文件中已被棄用,自 " +"Python 3.13 起在 runtime 已被棄用。請使用 ``'w'`` 格式碼 (:c:type:`Py_UCS4`) " +"來取代 Unicode 字元。" + +#: ../../deprecations/pending-removal-in-3.16.rst:21 +msgid ":mod:`shutil`:" +msgstr ":mod:`shutil`:" + +#: ../../deprecations/pending-removal-in-3.16.rst:23 msgid "" -":mod:`array`: :class:`array.array` ``'u'`` type (:c:type:`wchar_t`): use the " -"``'w'`` type instead (``Py_UCS4``)." +"The :class:`!ExecError` exception has been deprecated since Python 3.14. It " +"has not been used by any function in :mod:`!shutil` since Python 3.4, and is " +"now an alias of :exc:`RuntimeError`." msgstr "" -":mod:`array`::class:`array.array` ``'u'`` 型別 (:c:type:`wchar_t`):請改用 " -"``'w'`` 型別 (``Py_UCS4``)。" +"自 Python 3.14 起,:class:`!ExecError` 例外已被棄用。自 Python 3.4 以來,它尚" +"未被 :mod:`!shutil` 中的任何函式使用,現在是 :exc:`RuntimeError` 的別名。" -#: ../../deprecations/pending-removal-in-3.16.rst:8 -msgid ":mod:`builtins`: ``~bool``, bitwise inversion on bool." -msgstr ":mod:`builtins`:``~bool``,對 bool 進行位元反轉。" +#: ../../deprecations/pending-removal-in-3.16.rst:28 +msgid ":mod:`symtable`:" +msgstr ":mod:`symtable`:" -#: ../../deprecations/pending-removal-in-3.16.rst:11 +#: ../../deprecations/pending-removal-in-3.16.rst:30 msgid "" -":mod:`symtable`: Deprecate :meth:`symtable.Class.get_methods` due to the " -"lack of interest. (Contributed by Bénédikt Tran in :gh:`119698`.)" +"The :meth:`Class.get_methods ` method has been " +"deprecated since Python 3.14." msgstr "" -":mod:`symtable`:由於並沒有太多關注,已棄用 :meth:`symtable.Class." -"get_methods`。 (由 Bénédikt Tran 於 :gh:`119698` 貢獻。)" +"自 Python 3.14 起,:meth:`Class.get_methods ` 方" +"法已被棄用。" + +#: ../../deprecations/pending-removal-in-3.16.rst:33 +msgid ":mod:`sys`:" +msgstr ":mod:`sys`:" + +#: ../../deprecations/pending-removal-in-3.16.rst:35 +msgid "" +"The :func:`~sys._enablelegacywindowsfsencoding` function has been deprecated " +"since Python 3.13. Use the :envvar:`PYTHONLEGACYWINDOWSFSENCODING` " +"environment variable instead." +msgstr "" +"自 Python 3.13 起,:func:`~sys._enablelegacywindowsfsencoding` 函式已被棄用。" +"請改用 :envvar:`PYTHONLEGACYWINDOWSFSENCODING` 環境變數。" + +#: ../../deprecations/pending-removal-in-3.16.rst:39 +msgid ":mod:`tarfile`:" +msgstr ":mod:`tarfile`:" + +#: ../../deprecations/pending-removal-in-3.16.rst:41 +msgid "" +"The undocumented and unused :attr:`!TarFile.tarfile` attribute has been " +"deprecated since Python 3.13." +msgstr "" +"自 Python 3.13 起,未以文件記錄和未被使用的 :attr:`!TarFile.tarfile` 屬性已被" +"棄用。" #: ../../deprecations/c-api-pending-removal-in-future.rst:2 #: ../../deprecations/pending-removal-in-future.rst:2 @@ -2563,10 +2638,6 @@ msgstr ":mod:`argparse`:已棄用巢狀引數群組和巢狀互斥群組。" msgid ":mod:`array`'s ``'u'`` format code (:gh:`57281`)" msgstr ":mod:`array` 的 ``'u'`` 格式碼 (:gh:`57281`)" -#: ../../deprecations/pending-removal-in-future.rst:12 -msgid ":mod:`builtins`:" -msgstr ":mod:`builtins`:" - #: ../../deprecations/pending-removal-in-future.rst:14 msgid "``bool(NotImplemented)``." msgstr "``bool(NotImplemented)``。" @@ -4704,164 +4775,167 @@ msgid "" msgstr "設定 Python 初始化的函式,Python 3.11 中已被棄用:" #: ../../deprecations/c-api-pending-removal-in-3.14.rst:12 -msgid "``PySys_SetArgvEx()``: set :c:member:`PyConfig.argv` instead." -msgstr "``PySys_SetArgvEx()``:請改以 :c:member:`PyConfig.argv` 設定。" - -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:13 -msgid "``PySys_SetArgv()``: set :c:member:`PyConfig.argv` instead." -msgstr "``PySys_SetArgv()``:請改以 :c:member:`PyConfig.argv` 設定。" +msgid ":c:func:`!PySys_SetArgvEx()`: Set :c:member:`PyConfig.argv` instead." +msgstr ":c:func:`!PySys_SetArgvEx()`:請改以 :c:member:`PyConfig.argv` 設定。" #: ../../deprecations/c-api-pending-removal-in-3.14.rst:14 -msgid "``Py_SetProgramName()``: set :c:member:`PyConfig.program_name` instead." +msgid ":c:func:`!PySys_SetArgv()`: Set :c:member:`PyConfig.argv` instead." +msgstr ":c:func:`!PySys_SetArgv()`:請改以 :c:member:`PyConfig.argv` 設定。" + +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:16 +msgid "" +":c:func:`!Py_SetProgramName()`: Set :c:member:`PyConfig.program_name` " +"instead." msgstr "" -"``Py_SetProgramName()``:請改以 :c:member:`PyConfig.program_name` 設定。" +":c:func:`!Py_SetProgramName()``:請改以 :c:member:`PyConfig.program_name` 設" +"定。" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:15 -msgid "``Py_SetPythonHome()``: set :c:member:`PyConfig.home` instead." -msgstr "``Py_SetPythonHome()``:請改以 :c:member:`PyConfig.home` 設定。" +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:18 +msgid ":c:func:`!Py_SetPythonHome()`: Set :c:member:`PyConfig.home` instead." +msgstr ":c:func:`!Py_SetPythonHome()`:請改以 :c:member:`PyConfig.home` 設定。" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:17 -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:45 +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:21 +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:71 msgid "" "The :c:func:`Py_InitializeFromConfig` API should be used with :c:type:" "`PyConfig` instead." msgstr "" ":c:func:`Py_InitializeFromConfig` API 應該與 :c:type:`PyConfig` 一起使用。" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:20 +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:24 msgid "Global configuration variables:" msgstr "全域設定變數:" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:22 -msgid ":c:var:`Py_DebugFlag`: use :c:member:`PyConfig.parser_debug` instead." +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:26 +msgid ":c:var:`Py_DebugFlag`: Use :c:member:`PyConfig.parser_debug` instead." msgstr ":c:var:`Py_DebugFlag`:請改用 :c:member:`PyConfig.parser_debug`。" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:23 -msgid ":c:var:`Py_VerboseFlag`: use :c:member:`PyConfig.verbose` instead." +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:28 +msgid ":c:var:`Py_VerboseFlag`: Use :c:member:`PyConfig.verbose` instead." msgstr ":c:var:`Py_VerboseFlag`:請改用 :c:member:`PyConfig.verbose`。" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:24 -msgid ":c:var:`Py_QuietFlag`: use :c:member:`PyConfig.quiet` instead." +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:30 +msgid ":c:var:`Py_QuietFlag`: Use :c:member:`PyConfig.quiet` instead." msgstr ":c:var:`Py_QuietFlag`:請改用 :c:member:`PyConfig.quiet`。" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:25 +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:32 msgid "" -":c:var:`Py_InteractiveFlag`: use :c:member:`PyConfig.interactive` instead." +":c:var:`Py_InteractiveFlag`: Use :c:member:`PyConfig.interactive` instead." msgstr ":c:var:`Py_InteractiveFlag`:請改用 :c:member:`PyConfig.interactive`。" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:26 -msgid ":c:var:`Py_InspectFlag`: use :c:member:`PyConfig.inspect` instead." +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:34 +msgid ":c:var:`Py_InspectFlag`: Use :c:member:`PyConfig.inspect` instead." msgstr ":c:var:`Py_InspectFlag`:請改用 :c:member:`PyConfig.inspect`。" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:27 +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:36 msgid "" -":c:var:`Py_OptimizeFlag`: use :c:member:`PyConfig.optimization_level` " +":c:var:`Py_OptimizeFlag`: Use :c:member:`PyConfig.optimization_level` " "instead." msgstr "" ":c:var:`Py_OptimizeFlag`:請改用 :c:member:`PyConfig.optimization_level`。" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:28 -msgid ":c:var:`Py_NoSiteFlag`: use :c:member:`PyConfig.site_import` instead." +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:38 +msgid ":c:var:`Py_NoSiteFlag`: Use :c:member:`PyConfig.site_import` instead." msgstr ":c:var:`Py_NoSiteFlag`:請改用 :c:member:`PyConfig.site_import`。" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:29 +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:40 msgid "" -":c:var:`Py_BytesWarningFlag`: use :c:member:`PyConfig.bytes_warning` instead." +":c:var:`Py_BytesWarningFlag`: Use :c:member:`PyConfig.bytes_warning` instead." msgstr "" ":c:var:`Py_BytesWarningFlag`:請改用 :c:member:`PyConfig.bytes_warning`。" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:30 +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:42 msgid "" -":c:var:`Py_FrozenFlag`: use :c:member:`PyConfig.pathconfig_warnings` instead." +":c:var:`Py_FrozenFlag`: Use :c:member:`PyConfig.pathconfig_warnings` instead." msgstr "" ":c:var:`Py_FrozenFlag`:請改用 :c:member:`PyConfig.pathconfig_warnings`。" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:31 +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:44 msgid "" -":c:var:`Py_IgnoreEnvironmentFlag`: use :c:member:`PyConfig.use_environment` " +":c:var:`Py_IgnoreEnvironmentFlag`: Use :c:member:`PyConfig.use_environment` " "instead." msgstr "" ":c:var:`Py_IgnoreEnvironmentFlag`:請改用 :c:member:`PyConfig." "use_environment`。" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:32 +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:46 msgid "" -":c:var:`Py_DontWriteBytecodeFlag`: use :c:member:`PyConfig.write_bytecode` " +":c:var:`Py_DontWriteBytecodeFlag`: Use :c:member:`PyConfig.write_bytecode` " "instead." msgstr "" ":c:var:`Py_DontWriteBytecodeFlag`:請改用 :c:member:`PyConfig." "write_bytecode`。" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:33 +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:48 msgid "" -":c:var:`Py_NoUserSiteDirectory`: use :c:member:`PyConfig." +":c:var:`Py_NoUserSiteDirectory`: Use :c:member:`PyConfig." "user_site_directory` instead." msgstr "" ":c:var:`Py_NoUserSiteDirectory`:請改用 :c:member:`PyConfig." "user_site_directory`。" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:34 +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:50 msgid "" -":c:var:`Py_UnbufferedStdioFlag`: use :c:member:`PyConfig.buffered_stdio` " +":c:var:`Py_UnbufferedStdioFlag`: Use :c:member:`PyConfig.buffered_stdio` " "instead." msgstr "" ":c:var:`Py_UnbufferedStdioFlag`:請改用 :c:member:`PyConfig.buffered_stdio`。" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:35 +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:52 msgid "" -":c:var:`Py_HashRandomizationFlag`: use :c:member:`PyConfig.use_hash_seed` " +":c:var:`Py_HashRandomizationFlag`: Use :c:member:`PyConfig.use_hash_seed` " "and :c:member:`PyConfig.hash_seed` instead." msgstr "" ":c:var:`Py_HashRandomizationFlag`:請改用 :c:member:`PyConfig.use_hash_seed` " "和 :c:member:`PyConfig.hash_seed`。" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:37 -msgid ":c:var:`Py_IsolatedFlag`: use :c:member:`PyConfig.isolated` instead." +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:55 +msgid ":c:var:`Py_IsolatedFlag`: Use :c:member:`PyConfig.isolated` instead." msgstr ":c:var:`Py_IsolatedFlag`:請改用 :c:member:`PyConfig.isolated`。" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:38 +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:57 msgid "" -":c:var:`Py_LegacyWindowsFSEncodingFlag`: use :c:member:`PyPreConfig." +":c:var:`Py_LegacyWindowsFSEncodingFlag`: Use :c:member:`PyPreConfig." "legacy_windows_fs_encoding` instead." msgstr "" ":c:var:`Py_LegacyWindowsFSEncodingFlag`:請改用 :c:member:`PyPreConfig." "legacy_windows_fs_encoding`。" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:39 +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:59 msgid "" -":c:var:`Py_LegacyWindowsStdioFlag`: use :c:member:`PyConfig." +":c:var:`Py_LegacyWindowsStdioFlag`: Use :c:member:`PyConfig." "legacy_windows_stdio` instead." msgstr "" ":c:var:`Py_LegacyWindowsStdioFlag`:請改用 :c:member:`PyConfig." "legacy_windows_stdio`。" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:40 +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:61 msgid "" -":c:var:`!Py_FileSystemDefaultEncoding`: use :c:member:`PyConfig." +":c:var:`!Py_FileSystemDefaultEncoding`: Use :c:member:`PyConfig." "filesystem_encoding` instead." msgstr "" ":c:var:`!Py_FileSystemDefaultEncoding`:請改用 :c:member:`PyConfig." "filesystem_encoding`。" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:41 +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:63 msgid "" -":c:var:`!Py_HasFileSystemDefaultEncoding`: use :c:member:`PyConfig." +":c:var:`!Py_HasFileSystemDefaultEncoding`: Use :c:member:`PyConfig." "filesystem_encoding` instead." msgstr "" ":c:var:`!Py_HasFileSystemDefaultEncoding`:請改用 :c:member:`PyConfig." "filesystem_encoding`。" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:42 +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:65 msgid "" -":c:var:`!Py_FileSystemDefaultEncodeErrors`: use :c:member:`PyConfig." +":c:var:`!Py_FileSystemDefaultEncodeErrors`: Use :c:member:`PyConfig." "filesystem_errors` instead." msgstr "" ":c:var:`!Py_FileSystemDefaultEncodeErrors`:請改用 :c:member:`PyConfig." "filesystem_errors`。" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:43 +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:67 msgid "" -":c:var:`!Py_UTF8Mode`: use :c:member:`PyPreConfig.utf8_mode` instead. (see :" +":c:var:`!Py_UTF8Mode`: Use :c:member:`PyPreConfig.utf8_mode` instead. (see :" "c:func:`Py_PreInitialize`)" msgstr "" ":c:var:`!Py_UTF8Mode`:請改用 :c:member:`PyPreConfig.utf8_mode`。(請見 :c:" @@ -4873,63 +4947,63 @@ msgstr "``libmpdecimal`` 的打包副本 (bundled copy)。" #: ../../deprecations/c-api-pending-removal-in-3.15.rst:5 msgid "" -":c:func:`PyImport_ImportModuleNoBlock`: use :c:func:`PyImport_ImportModule` " -"instead." +"The :c:func:`PyImport_ImportModuleNoBlock`: Use :c:func:" +"`PyImport_ImportModule` instead." msgstr "" ":c:func:`PyImport_ImportModuleNoBlock`:請改用 :c:func:" "`PyImport_ImportModule`。" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:6 -msgid ":c:func:`PyWeakref_GET_OBJECT`: use :c:func:`PyWeakref_GetRef` instead." -msgstr ":c:func:`PyWeakref_GET_OBJECT`:請改用 :c:func:`PyWeakref_GetRef`。" - #: ../../deprecations/c-api-pending-removal-in-3.15.rst:7 -msgid ":c:func:`PyWeakref_GetObject`: use :c:func:`PyWeakref_GetRef` instead." -msgstr ":c:func:`PyWeakref_GetObject`:請改用 :c:func:`PyWeakref_GetRef`。" - -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:8 -msgid ":c:type:`!Py_UNICODE_WIDE` type: use :c:type:`wchar_t` instead." -msgstr ":c:type:`!Py_UNICODE_WIDE` type:請改用 :c:type:`wchar_t`。" +msgid "" +":c:func:`PyWeakref_GetObject` and :c:func:`PyWeakref_GET_OBJECT`: Use :c:" +"func:`PyWeakref_GetRef` instead." +msgstr "" +":c:func:`PyWeakref_GetObject` 和 :c:func:`PyWeakref_GET_OBJECT`:請改用 :c:" +"func:`PyWeakref_GetRef`。" #: ../../deprecations/c-api-pending-removal-in-3.15.rst:9 -msgid ":c:type:`Py_UNICODE` type: use :c:type:`wchar_t` instead." -msgstr ":c:type:`Py_UNICODE` type:請改用 :c:type:`wchar_t`。" +msgid "" +":c:type:`Py_UNICODE` type and the :c:macro:`!Py_UNICODE_WIDE` macro: Use :c:" +"type:`wchar_t` instead." +msgstr "" +":c:type:`Py_UNICODE` 型別與 :c:macro:`!Py_UNICODE_WIDE` 巨集:請改用 :c:type:" +"`wchar_t`。" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:10 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:11 msgid "Python initialization functions:" msgstr "Python 初始化函式:" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:12 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:13 msgid "" -":c:func:`PySys_ResetWarnOptions`: clear :data:`sys.warnoptions` and :data:`!" +":c:func:`PySys_ResetWarnOptions`: Clear :data:`sys.warnoptions` and :data:`!" "warnings.filters` instead." msgstr "" ":c:func:`PySys_ResetWarnOptions`:請改為清除 :data:`sys.warnoptions` 和 :" "data:`!warnings.filters`。" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:14 -msgid ":c:func:`Py_GetExecPrefix`: get :data:`sys.exec_prefix` instead." +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:15 +msgid ":c:func:`Py_GetExecPrefix`: Get :data:`sys.exec_prefix` instead." msgstr ":c:func:`Py_GetExecPrefix`:請改用 :data:`sys.exec_prefix`。" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:15 -msgid ":c:func:`Py_GetPath`: get :data:`sys.path` instead." +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:17 +msgid ":c:func:`Py_GetPath`: Get :data:`sys.path` instead." msgstr ":c:func:`Py_GetPath`:請改用 :data:`sys.path`。" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:16 -msgid ":c:func:`Py_GetPrefix`: get :data:`sys.prefix` instead." +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:19 +msgid ":c:func:`Py_GetPrefix`: Get :data:`sys.prefix` instead." msgstr ":c:func:`Py_GetPrefix`:請改用 :data:`sys.prefix`。" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:17 -msgid ":c:func:`Py_GetProgramFullPath`: get :data:`sys.executable` instead." +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:21 +msgid ":c:func:`Py_GetProgramFullPath`: Get :data:`sys.executable` instead." msgstr ":c:func:`Py_GetProgramFullPath`:請改用 :data:`sys.executable`。" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:18 -msgid ":c:func:`Py_GetProgramName`: get :data:`sys.executable` instead." +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:23 +msgid ":c:func:`Py_GetProgramName`: Get :data:`sys.executable` instead." msgstr ":c:func:`Py_GetProgramName`:請改用 :data:`sys.executable`。" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:19 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:25 msgid "" -":c:func:`Py_GetPythonHome`: get :c:member:`PyConfig.home` or the :envvar:" +":c:func:`Py_GetPythonHome`: Get :c:member:`PyConfig.home` or the :envvar:" "`PYTHONHOME` environment variable instead." msgstr "" ":c:func:`Py_GetPythonHome`:請改用 :c:member:`PyConfig.home` 或 :envvar:" @@ -4942,84 +5016,85 @@ msgid "" msgstr "下列 API 已被棄用並將會被移除,不過目前尚未訂定移除日期。" #: ../../deprecations/c-api-pending-removal-in-future.rst:7 -msgid ":c:macro:`Py_TPFLAGS_HAVE_FINALIZE`: unneeded since Python 3.8." +msgid ":c:macro:`Py_TPFLAGS_HAVE_FINALIZE`: Unneeded since Python 3.8." msgstr ":c:macro:`Py_TPFLAGS_HAVE_FINALIZE`:自 Python 3.8 起不再需要" -#: ../../deprecations/c-api-pending-removal-in-future.rst:8 -msgid ":c:func:`PyErr_Fetch`: use :c:func:`PyErr_GetRaisedException` instead." +#: ../../deprecations/c-api-pending-removal-in-future.rst:9 +msgid ":c:func:`PyErr_Fetch`: Use :c:func:`PyErr_GetRaisedException` instead." msgstr ":c:func:`PyErr_Fetch`:請改用 :c:func:`PyErr_GetRaisedException`。" -#: ../../deprecations/c-api-pending-removal-in-future.rst:9 +#: ../../deprecations/c-api-pending-removal-in-future.rst:11 msgid "" -":c:func:`PyErr_NormalizeException`: use :c:func:`PyErr_GetRaisedException` " +":c:func:`PyErr_NormalizeException`: Use :c:func:`PyErr_GetRaisedException` " "instead." msgstr "" ":c:func:`PyErr_NormalizeException`:請改用 :c:func:" "`PyErr_GetRaisedException`。" -#: ../../deprecations/c-api-pending-removal-in-future.rst:10 +#: ../../deprecations/c-api-pending-removal-in-future.rst:13 msgid "" -":c:func:`PyErr_Restore`: use :c:func:`PyErr_SetRaisedException` instead." +":c:func:`PyErr_Restore`: Use :c:func:`PyErr_SetRaisedException` instead." msgstr ":c:func:`PyErr_Restore`:請改用 :c:func:`PyErr_SetRaisedException`。" -#: ../../deprecations/c-api-pending-removal-in-future.rst:11 +#: ../../deprecations/c-api-pending-removal-in-future.rst:15 msgid "" -":c:func:`PyModule_GetFilename`: use :c:func:`PyModule_GetFilenameObject` " +":c:func:`PyModule_GetFilename`: Use :c:func:`PyModule_GetFilenameObject` " "instead." msgstr "" ":c:func:`PyModule_GetFilename`:請改用 :c:func:`PyModule_GetFilenameObject`。" -#: ../../deprecations/c-api-pending-removal-in-future.rst:12 -msgid ":c:func:`PyOS_AfterFork`: use :c:func:`PyOS_AfterFork_Child` instead." +#: ../../deprecations/c-api-pending-removal-in-future.rst:17 +msgid ":c:func:`PyOS_AfterFork`: Use :c:func:`PyOS_AfterFork_Child` instead." msgstr ":c:func:`PyOS_AfterFork`:請改用 :c:func:`PyOS_AfterFork_Child`。" -#: ../../deprecations/c-api-pending-removal-in-future.rst:13 +#: ../../deprecations/c-api-pending-removal-in-future.rst:19 msgid "" -":c:func:`PySlice_GetIndicesEx`: use :c:func:`PySlice_Unpack` and :c:func:" +":c:func:`PySlice_GetIndicesEx`: Use :c:func:`PySlice_Unpack` and :c:func:" "`PySlice_AdjustIndices` instead." msgstr "" ":c:func:`PySlice_GetIndicesEx`:請改用 :c:func:`PySlice_Unpack` 和 :c:func:" "`PySlice_AdjustIndices`。" -#: ../../deprecations/c-api-pending-removal-in-future.rst:14 +#: ../../deprecations/c-api-pending-removal-in-future.rst:21 msgid "" -":c:func:`!PyUnicode_AsDecodedObject`: use :c:func:`PyCodec_Decode` instead." +":c:func:`!PyUnicode_AsDecodedObject`: Use :c:func:`PyCodec_Decode` instead." msgstr "" ":c:func:`!PyUnicode_AsDecodedObject`:請改用 :c:func:`PyCodec_Decode`。" -#: ../../deprecations/c-api-pending-removal-in-future.rst:15 +#: ../../deprecations/c-api-pending-removal-in-future.rst:23 msgid "" -":c:func:`!PyUnicode_AsDecodedUnicode`: use :c:func:`PyCodec_Decode` instead." +":c:func:`!PyUnicode_AsDecodedUnicode`: Use :c:func:`PyCodec_Decode` instead." msgstr "" ":c:func:`!PyUnicode_AsDecodedUnicode`:請改用 :c:func:`PyCodec_Decode`。" -#: ../../deprecations/c-api-pending-removal-in-future.rst:16 +#: ../../deprecations/c-api-pending-removal-in-future.rst:25 msgid "" -":c:func:`!PyUnicode_AsEncodedObject`: use :c:func:`PyCodec_Encode` instead." +":c:func:`!PyUnicode_AsEncodedObject`: Use :c:func:`PyCodec_Encode` instead." msgstr "" ":c:func:`!PyUnicode_AsEncodedObject`:請改用 :c:func:`PyCodec_Encode`。" -#: ../../deprecations/c-api-pending-removal-in-future.rst:17 +#: ../../deprecations/c-api-pending-removal-in-future.rst:27 msgid "" -":c:func:`!PyUnicode_AsEncodedUnicode`: use :c:func:`PyCodec_Encode` instead." +":c:func:`!PyUnicode_AsEncodedUnicode`: Use :c:func:`PyCodec_Encode` instead." msgstr "" ":c:func:`!PyUnicode_AsEncodedUnicode`:請改用 :c:func:`PyCodec_Encode`。" -#: ../../deprecations/c-api-pending-removal-in-future.rst:18 -msgid ":c:func:`PyUnicode_READY`: unneeded since Python 3.12" +#: ../../deprecations/c-api-pending-removal-in-future.rst:29 +msgid ":c:func:`PyUnicode_READY`: Unneeded since Python 3.12" msgstr ":c:func:`PyUnicode_READY`:自 Python 3.12 起不再需要" -#: ../../deprecations/c-api-pending-removal-in-future.rst:19 -msgid ":c:func:`!PyErr_Display`: use :c:func:`PyErr_DisplayException` instead." +#: ../../deprecations/c-api-pending-removal-in-future.rst:31 +msgid ":c:func:`!PyErr_Display`: Use :c:func:`PyErr_DisplayException` instead." msgstr ":c:func:`!PyErr_Display`:請改用 :c:func:`PyErr_DisplayException`。" -#: ../../deprecations/c-api-pending-removal-in-future.rst:20 +#: ../../deprecations/c-api-pending-removal-in-future.rst:33 msgid "" -":c:func:`!_PyErr_ChainExceptions`: use ``_PyErr_ChainExceptions1`` instead." +":c:func:`!_PyErr_ChainExceptions`: Use :c:func:`!_PyErr_ChainExceptions1` " +"instead." msgstr "" ":c:func:`!_PyErr_ChainExceptions`:請改用 ``_PyErr_ChainExceptions1``。" -#: ../../deprecations/c-api-pending-removal-in-future.rst:21 +#: ../../deprecations/c-api-pending-removal-in-future.rst:35 msgid "" ":c:member:`!PyBytesObject.ob_shash` member: call :c:func:`PyObject_Hash` " "instead." @@ -5027,42 +5102,42 @@ msgstr "" ":c:member:`!PyBytesObject.ob_shash` 成員:請改為呼叫 :c:func:" "`PyObject_Hash`。" -#: ../../deprecations/c-api-pending-removal-in-future.rst:23 +#: ../../deprecations/c-api-pending-removal-in-future.rst:37 msgid ":c:member:`!PyDictObject.ma_version_tag` member." msgstr ":c:member:`!PyDictObject.ma_version_tag` 成員。" -#: ../../deprecations/c-api-pending-removal-in-future.rst:24 +#: ../../deprecations/c-api-pending-removal-in-future.rst:38 msgid "Thread Local Storage (TLS) API:" msgstr "執行緒局部儲存 (Thread Local Storage, TLS) API:" -#: ../../deprecations/c-api-pending-removal-in-future.rst:26 +#: ../../deprecations/c-api-pending-removal-in-future.rst:40 msgid "" -":c:func:`PyThread_create_key`: use :c:func:`PyThread_tss_alloc` instead." +":c:func:`PyThread_create_key`: Use :c:func:`PyThread_tss_alloc` instead." msgstr ":c:func:`PyThread_create_key`:請改用 :c:func:`PyThread_tss_alloc`。" -#: ../../deprecations/c-api-pending-removal-in-future.rst:27 -msgid ":c:func:`PyThread_delete_key`: use :c:func:`PyThread_tss_free` instead." +#: ../../deprecations/c-api-pending-removal-in-future.rst:42 +msgid ":c:func:`PyThread_delete_key`: Use :c:func:`PyThread_tss_free` instead." msgstr ":c:func:`PyThread_delete_key`:請改用 :c:func:`PyThread_tss_free`。" -#: ../../deprecations/c-api-pending-removal-in-future.rst:28 +#: ../../deprecations/c-api-pending-removal-in-future.rst:44 msgid "" -":c:func:`PyThread_set_key_value`: use :c:func:`PyThread_tss_set` instead." +":c:func:`PyThread_set_key_value`: Use :c:func:`PyThread_tss_set` instead." msgstr ":c:func:`PyThread_set_key_value`:請改用 :c:func:`PyThread_tss_set`。" -#: ../../deprecations/c-api-pending-removal-in-future.rst:29 +#: ../../deprecations/c-api-pending-removal-in-future.rst:46 msgid "" -":c:func:`PyThread_get_key_value`: use :c:func:`PyThread_tss_get` instead." +":c:func:`PyThread_get_key_value`: Use :c:func:`PyThread_tss_get` instead." msgstr ":c:func:`PyThread_get_key_value`:請改用 :c:func:`PyThread_tss_get`。" -#: ../../deprecations/c-api-pending-removal-in-future.rst:30 +#: ../../deprecations/c-api-pending-removal-in-future.rst:48 msgid "" -":c:func:`PyThread_delete_key_value`: use :c:func:`PyThread_tss_delete` " +":c:func:`PyThread_delete_key_value`: Use :c:func:`PyThread_tss_delete` " "instead." msgstr "" ":c:func:`PyThread_delete_key_value`:請改用 :c:func:`PyThread_tss_delete`。" -#: ../../deprecations/c-api-pending-removal-in-future.rst:31 -msgid ":c:func:`PyThread_ReInitTLS`: unneeded since Python 3.7." +#: ../../deprecations/c-api-pending-removal-in-future.rst:50 +msgid ":c:func:`PyThread_ReInitTLS`: Unneeded since Python 3.7." msgstr ":c:func:`PyThread_ReInitTLS`:自 Python 3.7 起不再需要。" #: ../../whatsnew/3.12.rst:2224 @@ -5120,6 +5195,86 @@ msgstr "" "移除 ``PyUnicode_InternImmortal()`` 函式巨集。(由 Victor Stinner 於 :gh:" "`85858` 中貢獻。)" +#~ msgid "" +#~ ":mod:`platform`: :func:`~platform.java_ver` is deprecated and will be " +#~ "removed in 3.15. It was largely untested, had a confusing API, and was " +#~ "only useful for Jython support. (Contributed by Nikita Sobolev in :gh:" +#~ "`116349`.)" +#~ msgstr "" +#~ ":mod:`platform`::func:`~platform.java_ver` 已被棄用並將在 3.15 中移除。它" +#~ "幾乎沒有被測試過,API 令人困惑並且只對 Jython 支援有用。 (由 Nikita " +#~ "Sobolev 於 :gh:`116349` 貢獻。)" + +#~ msgid "" +#~ ":mod:`threading`: Passing any arguments to :func:`threading.RLock` is now " +#~ "deprecated. C version allows any numbers of args and kwargs, but they are " +#~ "just ignored. Python version does not allow any arguments. All arguments " +#~ "will be removed from :func:`threading.RLock` in Python 3.15. (Contributed " +#~ "by Nikita Sobolev in :gh:`102029`.)" +#~ msgstr "" +#~ ":mod:`threading`:對 :func:`threading.RLock` 傳遞任何引數現在已被棄用。C " +#~ "版本允許任意數量的引數和關鍵字引數,但它們會被忽略。Python 版本不允許任何" +#~ "引數。所有引數將在 Python 3.15 中從 :func:`threading.RLock` 中移除。 (由 " +#~ "Nikita Sobolev 於 :gh:`102029` 貢獻。)" + +#~ msgid ":class:`typing.NamedTuple`:" +#~ msgstr ":class:`typing.NamedTuple`:" + +#~ msgid "" +#~ "When using the functional syntax to create a :class:`!NamedTuple` class, " +#~ "failing to pass a value to the *fields* parameter (``NT = " +#~ "NamedTuple(\"NT\")``) is deprecated. Passing ``None`` to the *fields* " +#~ "parameter (``NT = NamedTuple(\"NT\", None)``) is also deprecated. Both " +#~ "will be disallowed in Python 3.15. To create a :class:`!NamedTuple` class " +#~ "with 0 fields, use ``class NT(NamedTuple): pass`` or ``NT = " +#~ "NamedTuple(\"NT\", [])``." +#~ msgstr "" +#~ "當使用函式語法來建立 :class:`!NamedTuple` 類別時,沒將值傳遞給 *fields* 參" +#~ "數的方式 (``NT = NamedTuple(\"NT\")``) 已被棄用,將 ``None`` 傳遞給 " +#~ "*fields* 參數(``NT = NamedTuple(\"NT\", None)``)也已被棄用。這兩者將在 " +#~ "Python 3.15 中會被禁止。要建立一個沒有欄位的 :class:`!NamedTuple` 類別,請" +#~ "使用 ``class NT(NamedTuple): pass`` 或 ``NT = NamedTuple(\"NT\", [])``。" + +#~ msgid "" +#~ ":class:`typing.TypedDict`: When using the functional syntax to create a :" +#~ "class:`!TypedDict` class, failing to pass a value to the *fields* " +#~ "parameter (``TD = TypedDict(\"TD\")``) is deprecated. Passing ``None`` to " +#~ "the *fields* parameter (``TD = TypedDict(\"TD\", None)``) is also " +#~ "deprecated. Both will be disallowed in Python 3.15. To create a :class:`!" +#~ "TypedDict` class with 0 fields, use ``class TD(TypedDict): pass`` or ``TD " +#~ "= TypedDict(\"TD\", {})``." +#~ msgstr "" +#~ ":class:`typing.TypedDict`:當使用函式語法來建立 :class:`!TypedDict` 類別" +#~ "時,沒將值傳遞給 *fields* 參數的方式(``TD = TypedDict(\"TD\")``)已被棄" +#~ "用,將 ``None`` 傳遞給 *fields* 參數(``TD = TypedDict(\"TD\", None)``)也" +#~ "已被棄用。這兩者將在 Python 3.15 中會被禁止。要建立一個沒有欄位的 :class:" +#~ "`!TypedDict` 類別,請使用 ``class TD(TypedDict): pass`` 或 ``TD = " +#~ "TypedDict(\"TD\", {})``。" + +#~ msgid "" +#~ ":mod:`array`: :class:`array.array` ``'u'`` type (:c:type:`wchar_t`): use " +#~ "the ``'w'`` type instead (``Py_UCS4``)." +#~ msgstr "" +#~ ":mod:`array`::class:`array.array` ``'u'`` 型別 (:c:type:`wchar_t`):請改" +#~ "用 ``'w'`` 型別 (``Py_UCS4``)。" + +#~ msgid ":mod:`builtins`: ``~bool``, bitwise inversion on bool." +#~ msgstr ":mod:`builtins`:``~bool``,對 bool 進行位元反轉。" + +#~ msgid "" +#~ ":mod:`symtable`: Deprecate :meth:`symtable.Class.get_methods` due to the " +#~ "lack of interest. (Contributed by Bénédikt Tran in :gh:`119698`.)" +#~ msgstr "" +#~ ":mod:`symtable`:由於並沒有太多關注,已棄用 :meth:`symtable.Class." +#~ "get_methods`。 (由 Bénédikt Tran 於 :gh:`119698` 貢獻。)" + +#~ msgid "" +#~ ":c:func:`PyWeakref_GetObject`: use :c:func:`PyWeakref_GetRef` instead." +#~ msgstr ":c:func:`PyWeakref_GetObject`:請改用 :c:func:`PyWeakref_GetRef`。" + +#~ msgid ":c:type:`!Py_UNICODE_WIDE` type: use :c:type:`wchar_t` instead." +#~ msgstr ":c:type:`!Py_UNICODE_WIDE` type:請改用 :c:type:`wchar_t`。" + #~ msgid "Notable changes in 3.12.4" #~ msgstr "3.12.4 中的顯著變更" diff --git a/whatsnew/3.13.po b/whatsnew/3.13.po index 380acd14d1..22c2f71389 100644 --- a/whatsnew/3.13.po +++ b/whatsnew/3.13.po @@ -1,17 +1,16 @@ -# SOME DESCRIPTIVE TITLE. # Copyright (C) 2001-2024, Python Software Foundation # This file is distributed under the same license as the Python package. # FIRST AUTHOR , YEAR. # -#, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-23 07:52+0800\n" +"POT-Creation-Date: 2024-09-24 15:56+0800\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" +"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" +"tw)\n" "Language: zh_TW\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -19,15 +18,15 @@ msgstr "" #: ../../whatsnew/3.13.rst:4 msgid "What's New In Python 3.13" -msgstr "" +msgstr "Python 3.13 有什麼新功能" #: ../../whatsnew/3.13.rst:0 -msgid "Editor" -msgstr "" +msgid "Editors" +msgstr "編輯者" #: ../../whatsnew/3.13.rst:6 -msgid "Thomas Wouters" -msgstr "" +msgid "Adam Turner and Thomas Wouters" +msgstr "Adam Turner 和 Thomas Wouters" #: ../../whatsnew/3.13.rst:48 msgid "" @@ -38,20 +37,13 @@ msgstr "" #: ../../whatsnew/3.13.rst:54 msgid ":pep:`719` -- Python 3.13 Release Schedule" -msgstr "" +msgstr ":pep:`719` -- Python 3.13 發佈時程" #: ../../whatsnew/3.13.rst:58 -msgid "" -"Prerelease users should be aware that this document is currently in draft " -"form. It will be updated substantially as Python 3.13 moves towards release, " -"so it's worth checking back even after reading earlier versions." -msgstr "" - -#: ../../whatsnew/3.13.rst:64 msgid "Summary -- Release Highlights" -msgstr "" +msgstr "發布重點摘要" -#: ../../whatsnew/3.13.rst:69 +#: ../../whatsnew/3.13.rst:63 msgid "" "Python 3.13 will be the latest stable release of the Python programming " "language, with a mix of changes to the language, the implementation and the " @@ -62,7 +54,7 @@ msgid "" "`744`)." msgstr "" -#: ../../whatsnew/3.13.rst:78 +#: ../../whatsnew/3.13.rst:72 msgid "" "Error messages continue to improve, with tracebacks now highlighted in color " "by default. The :func:`locals` builtin now has :ref:`defined semantics " @@ -70,7 +62,7 @@ msgid "" "parameters now support default values." msgstr "" -#: ../../whatsnew/3.13.rst:83 +#: ../../whatsnew/3.13.rst:77 msgid "" "The library changes contain removal of deprecated APIs and modules, as well " "as the usual improvements in user-friendliness and correctness. Several " @@ -78,7 +70,7 @@ msgid "" "pep594_>`_ following their deprecation in Python 3.11 (:pep:`594`)." msgstr "" -#: ../../whatsnew/3.13.rst:88 +#: ../../whatsnew/3.13.rst:82 msgid "" "This article doesn't attempt to provide a complete specification of all new " "features, but instead gives a convenient overview. For full details refer to " @@ -90,18 +82,18 @@ msgid "" "guidance on upgrading from earlier versions of Python." msgstr "" -#: ../../whatsnew/3.13.rst:104 +#: ../../whatsnew/3.13.rst:98 msgid "Interpreter improvements:" -msgstr "" +msgstr "直譯器改進:" -#: ../../whatsnew/3.13.rst:106 +#: ../../whatsnew/3.13.rst:100 msgid "" "A greatly improved :ref:`interactive interpreter ` and :ref:`improved error messages `." msgstr "" -#: ../../whatsnew/3.13.rst:109 +#: ../../whatsnew/3.13.rst:103 msgid "" ":pep:`667`: The :func:`locals` builtin now has :ref:`defined semantics " "` when mutating the returned mapping. Python " @@ -109,14 +101,14 @@ msgid "" "optimized scopes even during concurrent code execution." msgstr "" -#: ../../whatsnew/3.13.rst:114 +#: ../../whatsnew/3.13.rst:108 msgid "" ":pep:`703`: CPython 3.13 has experimental support for running with the :term:" "`global interpreter lock` disabled. See :ref:`Free-threaded CPython " "` for more details." msgstr "" -#: ../../whatsnew/3.13.rst:117 +#: ../../whatsnew/3.13.rst:111 msgid "" ":pep:`744`: A basic :ref:`JIT compiler ` was " "added. It is currently disabled by default (though we may turn it on later). " @@ -124,7 +116,7 @@ msgid "" "next few releases." msgstr "" -#: ../../whatsnew/3.13.rst:121 +#: ../../whatsnew/3.13.rst:115 msgid "" "Color support in the new :ref:`interactive interpreter `, as well as in :ref:`tracebacks `." msgstr "" -#: ../../whatsnew/3.13.rst:138 +#: ../../whatsnew/3.13.rst:132 msgid "" "The :mod:`argparse` module now supports deprecating command-line options, " "positional arguments, and subcommands." msgstr "" -#: ../../whatsnew/3.13.rst:140 +#: ../../whatsnew/3.13.rst:134 msgid "" "The new functions :func:`base64.z85encode` and :func:`base64.z85decode` " "support encoding and decoding `Z85 data`_." msgstr "" -#: ../../whatsnew/3.13.rst:142 +#: ../../whatsnew/3.13.rst:136 msgid "" "The :mod:`copy` module now has a :func:`copy.replace` function, with support " "for many builtin types and any class defining the :func:`~object." "__replace__` method." msgstr "" -#: ../../whatsnew/3.13.rst:145 -msgid "The :mod:`dbm.sqlite3` module is now the default :mod:`dbm` backend." +#: ../../whatsnew/3.13.rst:139 +msgid "" +"The new :mod:`dbm.sqlite3` module is now the default :mod:`dbm` backend." msgstr "" -#: ../../whatsnew/3.13.rst:146 +#: ../../whatsnew/3.13.rst:140 msgid "" "The :mod:`os` module has a :ref:`suite of new functions ` for " "working with Linux's timer notification file descriptors." msgstr "" -#: ../../whatsnew/3.13.rst:148 +#: ../../whatsnew/3.13.rst:142 msgid "" "The :mod:`random` module now has a :ref:`command-line interface `." msgstr "" -#: ../../whatsnew/3.13.rst:150 +#: ../../whatsnew/3.13.rst:144 msgid "Security improvements:" -msgstr "" +msgstr "安全性改進:" -#: ../../whatsnew/3.13.rst:152 +#: ../../whatsnew/3.13.rst:146 msgid "" ":func:`ssl.create_default_context` sets :data:`ssl." "VERIFY_X509_PARTIAL_CHAIN` and :data:`ssl.VERIFY_X509_STRICT` as default " "flags." msgstr "" -#: ../../whatsnew/3.13.rst:155 +#: ../../whatsnew/3.13.rst:149 msgid "C API improvements:" -msgstr "" +msgstr "C API 改進:" -#: ../../whatsnew/3.13.rst:157 +#: ../../whatsnew/3.13.rst:151 msgid "" "The :c:data:`Py_mod_gil` slot is now used to indicate that an extension " "module supports running with the :term:`GIL` disabled." msgstr "" -#: ../../whatsnew/3.13.rst:159 +#: ../../whatsnew/3.13.rst:153 msgid "" "The :doc:`PyTime C API ` has been added, providing access to " "system clocks." msgstr "" -#: ../../whatsnew/3.13.rst:161 +#: ../../whatsnew/3.13.rst:155 msgid "" ":c:type:`PyMutex` is a new lightweight mutex that occupies a single byte." msgstr "" -#: ../../whatsnew/3.13.rst:163 -msgid "New typing features:" +#: ../../whatsnew/3.13.rst:156 +msgid "" +"There is a new :ref:`suite of functions ` for generating :" +"pep:`669` monitoring events in the C API." msgstr "" -#: ../../whatsnew/3.13.rst:165 +#: ../../whatsnew/3.13.rst:159 +msgid "New typing features:" +msgstr "新增型別特性:" + +#: ../../whatsnew/3.13.rst:161 msgid "" ":pep:`696`: Type parameters (:data:`typing.TypeVar`, :data:`typing." "ParamSpec`, and :data:`typing.TypeVarTuple`) now support defaults." msgstr "" -#: ../../whatsnew/3.13.rst:167 +#: ../../whatsnew/3.13.rst:163 msgid "" ":pep:`702`: The new :func:`warnings.deprecated` decorator adds support for " -"marking deprecations in the type system." +"marking deprecations in the type system and at runtime." msgstr "" -#: ../../whatsnew/3.13.rst:169 +#: ../../whatsnew/3.13.rst:165 msgid "" ":pep:`705`: :data:`typing.ReadOnly` can be used to mark an item of a :class:" "`typing.TypedDict` as read-only for type checkers." msgstr "" -#: ../../whatsnew/3.13.rst:171 +#: ../../whatsnew/3.13.rst:167 msgid "" ":pep:`742`: :data:`typing.TypeIs` provides more intuitive type narrowing " "behavior, as an alternative to :data:`typing.TypeGuard`." msgstr "" -#: ../../whatsnew/3.13.rst:174 +#: ../../whatsnew/3.13.rst:170 msgid "Platform support:" msgstr "" -#: ../../whatsnew/3.13.rst:176 +#: ../../whatsnew/3.13.rst:172 msgid "" ":pep:`730`: Apple's iOS is now an :ref:`officially supported platform " -"`, at :pep:`tier 3 <11#tier-3>`. Official " -"Android support (:pep:`738`) is in the works as well." +"`, at :pep:`tier 3 <11#tier-3>`." msgstr "" -#: ../../whatsnew/3.13.rst:179 +#: ../../whatsnew/3.13.rst:174 +msgid "" +":pep:`738`: Android is now an :ref:`officially supported platform " +"`, at :pep:`tier 3 <11#tier-3>`." +msgstr "" + +#: ../../whatsnew/3.13.rst:176 msgid "" "``wasm32-wasi`` is now supported as a :pep:`tier 2 <11#tier-2>` platform." msgstr "" -#: ../../whatsnew/3.13.rst:180 +#: ../../whatsnew/3.13.rst:177 msgid "``wasm32-emscripten`` is no longer an officially supported platform." msgstr "" -#: ../../whatsnew/3.13.rst:182 +#: ../../whatsnew/3.13.rst:179 msgid "Important removals:" msgstr "" -#: ../../whatsnew/3.13.rst:184 +#: ../../whatsnew/3.13.rst:181 msgid "" ":ref:`PEP 594 `: The remaining 19 \"dead batteries\" " -"have been removed from the standard library: :mod:`!aifc`, :mod:`!audioop`, :" -"mod:`!cgi`, :mod:`!cgitb`, :mod:`!chunk`, :mod:`!crypt`, :mod:`!imghdr`, :" -"mod:`!mailcap`, :mod:`!msilib`, :mod:`!nis`, :mod:`!nntplib`, :mod:`!" -"ossaudiodev`, :mod:`!pipes`, :mod:`!sndhdr`, :mod:`!spwd`, :mod:`!sunau`, :" -"mod:`!telnetlib`, :mod:`!uu` and :mod:`!xdrlib`." +"(legacy stdlib modules) have been removed from the standard library: :mod:`!" +"aifc`, :mod:`!audioop`, :mod:`!cgi`, :mod:`!cgitb`, :mod:`!chunk`, :mod:`!" +"crypt`, :mod:`!imghdr`, :mod:`!mailcap`, :mod:`!msilib`, :mod:`!nis`, :mod:`!" +"nntplib`, :mod:`!ossaudiodev`, :mod:`!pipes`, :mod:`!sndhdr`, :mod:`!spwd`, :" +"mod:`!sunau`, :mod:`!telnetlib`, :mod:`!uu` and :mod:`!xdrlib`." msgstr "" -#: ../../whatsnew/3.13.rst:190 +#: ../../whatsnew/3.13.rst:187 msgid "" "Remove the :program:`2to3` tool and :mod:`!lib2to3` module (deprecated in " "Python 3.11)." msgstr "" -#: ../../whatsnew/3.13.rst:192 +#: ../../whatsnew/3.13.rst:189 msgid "Remove the :mod:`!tkinter.tix` module (deprecated in Python 3.6)." msgstr "" -#: ../../whatsnew/3.13.rst:193 -msgid "Remove :func:`!locale.resetlocale`." +#: ../../whatsnew/3.13.rst:190 +msgid "Remove the :func:`!locale.resetlocale` function." msgstr "" -#: ../../whatsnew/3.13.rst:194 -msgid "Remove :mod:`!typing.io` and :mod:`!typing.re`." +#: ../../whatsnew/3.13.rst:191 +msgid "Remove the :mod:`!typing.io` and :mod:`!typing.re` namespaces." msgstr "" -#: ../../whatsnew/3.13.rst:195 +#: ../../whatsnew/3.13.rst:192 msgid "Remove chained :class:`classmethod` descriptors." msgstr "" -#: ../../whatsnew/3.13.rst:197 +#: ../../whatsnew/3.13.rst:194 msgid "Release schedule changes:" msgstr "" -#: ../../whatsnew/3.13.rst:199 +#: ../../whatsnew/3.13.rst:196 msgid "" ":pep:`602` (\"Annual Release Cycle for Python\") has been updated to extend " "the full support ('bugfix') period for new releases to two years. This " "updated policy means that:" msgstr "" -#: ../../whatsnew/3.13.rst:203 +#: ../../whatsnew/3.13.rst:200 msgid "" "Python 3.9--3.12 have one and a half years of full support, followed by " "three and a half years of security fixes." msgstr "" -#: ../../whatsnew/3.13.rst:205 +#: ../../whatsnew/3.13.rst:202 msgid "" "Python 3.13 and later have two years of full support, followed by three " "years of security fixes." msgstr "" -#: ../../whatsnew/3.13.rst:210 ../../whatsnew/3.13.rst:1954 +#: ../../whatsnew/3.13.rst:207 ../../whatsnew/3.13.rst:2005 msgid "New Features" -msgstr "" +msgstr "新增特性" -#: ../../whatsnew/3.13.rst:216 +#: ../../whatsnew/3.13.rst:213 msgid "A better interactive interpreter" msgstr "" -#: ../../whatsnew/3.13.rst:218 +#: ../../whatsnew/3.13.rst:215 msgid "" "Python now uses a new :term:`interactive` shell by default, based on code " "from the `PyPy project`_. When the user starts the :term:`REPL` from an " "interactive terminal, the following new features are now supported:" msgstr "" -#: ../../whatsnew/3.13.rst:223 +#: ../../whatsnew/3.13.rst:220 msgid "Multiline editing with history preservation." msgstr "" -#: ../../whatsnew/3.13.rst:224 +#: ../../whatsnew/3.13.rst:221 msgid "" "Direct support for REPL-specific commands like :kbd:`help`, :kbd:`exit`, " "and :kbd:`quit`, without the need to call them as functions." msgstr "" -#: ../../whatsnew/3.13.rst:226 +#: ../../whatsnew/3.13.rst:223 msgid "" "Prompts and tracebacks with :ref:`color enabled by default `." msgstr "" -#: ../../whatsnew/3.13.rst:228 +#: ../../whatsnew/3.13.rst:225 msgid "" "Interactive help browsing using :kbd:`F1` with a separate command history." msgstr "" -#: ../../whatsnew/3.13.rst:230 +#: ../../whatsnew/3.13.rst:227 msgid "" "History browsing using :kbd:`F2` that skips output as well as the :term:" "`>>>` and :term:`...` prompts." msgstr "" -#: ../../whatsnew/3.13.rst:232 +#: ../../whatsnew/3.13.rst:229 msgid "" "\"Paste mode\" with :kbd:`F3` that makes pasting larger blocks of code " "easier (press :kbd:`F3` again to return to the regular prompt)." msgstr "" -#: ../../whatsnew/3.13.rst:235 +#: ../../whatsnew/3.13.rst:232 msgid "" "To disable the new interactive shell, set the :envvar:`PYTHON_BASIC_REPL` " "environment variable. For more on interactive mode, see :ref:`tut-interac`." msgstr "" -#: ../../whatsnew/3.13.rst:239 +#: ../../whatsnew/3.13.rst:236 msgid "" "(Contributed by Pablo Galindo Salgado, Łukasz Langa, and Lysandros Nikolaou " "in :gh:`111201` based on code from the PyPy project. Windows support " "contributed by Dino Viehland and Anthony Shaw.)" msgstr "" -#: ../../whatsnew/3.13.rst:249 +#: ../../whatsnew/3.13.rst:246 msgid "Improved error messages" msgstr "" -#: ../../whatsnew/3.13.rst:251 +#: ../../whatsnew/3.13.rst:248 msgid "" "The interpreter now uses color by default when displaying tracebacks in the " "terminal. This feature :ref:`can be controlled ` " @@ -406,14 +410,14 @@ msgid "" "by Pablo Galindo Salgado in :gh:`112730`.)" msgstr "" -#: ../../whatsnew/3.13.rst:266 +#: ../../whatsnew/3.13.rst:263 msgid "" "A common mistake is to write a script with the same name as a standard " "library module. When this results in errors, we now display a more helpful " "error message:" msgstr "" -#: ../../whatsnew/3.13.rst:270 +#: ../../whatsnew/3.13.rst:267 msgid "" "$ python random.py\n" "Traceback (most recent call last):\n" @@ -427,14 +431,14 @@ msgid "" "library module named 'random' and the import system gives it precedence)" msgstr "" -#: ../../whatsnew/3.13.rst:281 +#: ../../whatsnew/3.13.rst:278 msgid "" "Similarly, if a script has the same name as a third-party module that it " "attempts to import and this results in errors, we also display a more " "helpful error message:" msgstr "" -#: ../../whatsnew/3.13.rst:285 +#: ../../whatsnew/3.13.rst:282 msgid "" "$ python numpy.py\n" "Traceback (most recent call last):\n" @@ -448,17 +452,17 @@ msgid "" "intended to import)" msgstr "" -#: ../../whatsnew/3.13.rst:296 +#: ../../whatsnew/3.13.rst:293 msgid "(Contributed by Shantanu Jain in :gh:`95754`.)" msgstr "" -#: ../../whatsnew/3.13.rst:298 +#: ../../whatsnew/3.13.rst:295 msgid "" "The error message now tries to suggest the correct keyword argument when an " "incorrect keyword argument is passed to a function." msgstr "" -#: ../../whatsnew/3.13.rst:301 +#: ../../whatsnew/3.13.rst:298 msgid "" ">>> \"Better error messages!\".split(max_split=1)\n" "Traceback (most recent call last):\n" @@ -469,16 +473,16 @@ msgid "" "mean 'maxsplit'?" msgstr "" -#: ../../whatsnew/3.13.rst:310 +#: ../../whatsnew/3.13.rst:307 msgid "" "(Contributed by Pablo Galindo Salgado and Shantanu Jain in :gh:`107944`.)" msgstr "" -#: ../../whatsnew/3.13.rst:316 +#: ../../whatsnew/3.13.rst:313 msgid "Free-threaded CPython" msgstr "" -#: ../../whatsnew/3.13.rst:318 +#: ../../whatsnew/3.13.rst:315 msgid "" "CPython now has experimental support for running in a free-threaded mode, " "with the :term:`global interpreter lock` (GIL) disabled. This is an " @@ -491,7 +495,7 @@ msgid "" "gil` option." msgstr "" -#: ../../whatsnew/3.13.rst:331 +#: ../../whatsnew/3.13.rst:328 msgid "" "Free-threaded execution allows for full utilization of the available " "processing power by running threads in parallel on available CPU cores. " @@ -501,10 +505,10 @@ msgid "" "it: expect some bugs and a substantial single-threaded performance hit. Free-" "threaded builds of CPython support optionally running with the GIL enabled " "at runtime using the environment variable :envvar:`PYTHON_GIL` or the " -"command-line option :option:`-X gil`." +"command-line option :option:`-X gil=1`." msgstr "" -#: ../../whatsnew/3.13.rst:341 +#: ../../whatsnew/3.13.rst:338 msgid "" "To check if the current interpreter supports free-threading, :option:`python " "-VV <-V>` and :attr:`sys.version` contain \"experimental free-threading " @@ -512,7 +516,7 @@ msgid "" "whether the GIL is actually disabled in the running process." msgstr "" -#: ../../whatsnew/3.13.rst:346 +#: ../../whatsnew/3.13.rst:343 msgid "" "C-API extension modules need to be built specifically for the free-threaded " "build. Extensions that support running with the :term:`GIL` disabled should " @@ -525,24 +529,24 @@ msgid "" "extensions in the free-threaded build." msgstr "" -#: ../../whatsnew/3.13.rst:359 +#: ../../whatsnew/3.13.rst:356 msgid "" ":pep:`703` \"Making the Global Interpreter Lock Optional in CPython\" " "contains rationale and information surrounding this work." msgstr "" -#: ../../whatsnew/3.13.rst:362 +#: ../../whatsnew/3.13.rst:359 msgid "" "`Porting Extension Modules to Support Free-Threading `_: A community-maintained porting guide for " "extension authors." msgstr "" -#: ../../whatsnew/3.13.rst:370 +#: ../../whatsnew/3.13.rst:367 msgid "An experimental just-in-time (JIT) compiler" msgstr "" -#: ../../whatsnew/3.13.rst:372 +#: ../../whatsnew/3.13.rst:369 msgid "" "When CPython is configured and built using the :option:`!--enable-" "experimental-jit` option, a just-in-time (JIT) compiler is added which may " @@ -552,104 +556,104 @@ msgid "" "information `are contained at`__ :file:`Tools/jit/README.md`." msgstr "" -#: ../../whatsnew/3.13.rst:382 +#: ../../whatsnew/3.13.rst:379 msgid "" "The :option:`!--enable-experimental-jit` option takes these (optional) " "values, defaulting to ``yes`` if :option:`!--enable-experimental-jit` is " "present without the optional value." msgstr "" -#: ../../whatsnew/3.13.rst:386 +#: ../../whatsnew/3.13.rst:383 msgid "``no``: Disable the entire Tier 2 and JIT pipeline." msgstr "" -#: ../../whatsnew/3.13.rst:387 +#: ../../whatsnew/3.13.rst:384 msgid "" "``yes``: Enable the JIT. To disable the JIT at runtime, pass the environment " "variable ``PYTHON_JIT=0``." msgstr "" -#: ../../whatsnew/3.13.rst:389 +#: ../../whatsnew/3.13.rst:386 msgid "" "``yes-off``: Build the JIT but disable it by default. To enable the JIT at " "runtime, pass the environment variable ``PYTHON_JIT=1``." msgstr "" -#: ../../whatsnew/3.13.rst:391 +#: ../../whatsnew/3.13.rst:388 msgid "" "``interpreter``: Enable the Tier 2 interpreter but disable the JIT. The " "interpreter can be disabled by running with ``PYTHON_JIT=0``." msgstr "" -#: ../../whatsnew/3.13.rst:394 +#: ../../whatsnew/3.13.rst:391 msgid "The internal architecture is roughly as follows:" msgstr "" -#: ../../whatsnew/3.13.rst:396 +#: ../../whatsnew/3.13.rst:393 msgid "" "We start with specialized *Tier 1 bytecode*. See :ref:`What's new in 3.11 " "` for details." msgstr "" -#: ../../whatsnew/3.13.rst:398 +#: ../../whatsnew/3.13.rst:395 msgid "" "When the Tier 1 bytecode gets hot enough, it gets translated to a new purely " "internal intermediate representation (IR), called the *Tier 2 IR*, and " "sometimes referred to as micro-ops (\"uops\")." msgstr "" -#: ../../whatsnew/3.13.rst:401 +#: ../../whatsnew/3.13.rst:398 msgid "" "The Tier 2 IR uses the same stack-based virtual machine as Tier 1, but the " "instruction format is better suited to translation to machine code." msgstr "" -#: ../../whatsnew/3.13.rst:403 +#: ../../whatsnew/3.13.rst:400 msgid "" "We have several optimization passes for Tier 2 IR, which are applied before " "it is interpreted or translated to machine code." msgstr "" -#: ../../whatsnew/3.13.rst:405 +#: ../../whatsnew/3.13.rst:402 msgid "" "There is a Tier 2 interpreter, but it is mostly intended for debugging the " "earlier stages of the optimization pipeline. The Tier 2 interpreter can be " "enabled by configuring Python with ``--enable-experimental-jit=interpreter``." msgstr "" -#: ../../whatsnew/3.13.rst:409 +#: ../../whatsnew/3.13.rst:406 msgid "" "When the JIT is enabled, the optimized Tier 2 IR is translated to machine " "code, which is then executed." msgstr "" -#: ../../whatsnew/3.13.rst:411 +#: ../../whatsnew/3.13.rst:408 msgid "" "The machine code translation process uses a technique called *copy-and-" "patch*. It has no runtime dependencies, but there is a new build-time " "dependency on LLVM." msgstr "" -#: ../../whatsnew/3.13.rst:415 +#: ../../whatsnew/3.13.rst:412 msgid ":pep:`744`" -msgstr "" +msgstr ":pep:`744`" -#: ../../whatsnew/3.13.rst:417 +#: ../../whatsnew/3.13.rst:414 msgid "" "(JIT by Brandt Bucher, inspired by a paper by Haoran Xu and Fredrik " "Kjolstad. Tier 2 IR by Mark Shannon and Guido van Rossum. Tier 2 optimizer " "by Ken Jin.)" msgstr "" -#: ../../whatsnew/3.13.rst:425 +#: ../../whatsnew/3.13.rst:422 msgid "Defined mutation semantics for :py:func:`locals`" msgstr "" -#: ../../whatsnew/3.13.rst:427 +#: ../../whatsnew/3.13.rst:424 msgid "" "Historically, the expected result of mutating the return value of :func:" "`locals` has been left to individual Python implementations to define. " -"Starting from Python 3.13, :pep:`667` standardises the historical behaviour " +"Starting from Python 3.13, :pep:`667` standardises the historical behavior " "of CPython for most code execution scopes, but changes :term:`optimized " "scopes ` (functions, generators, coroutines, " "comprehensions, and generator expressions) to explicitly return independent " @@ -657,10 +661,10 @@ msgid "" "referenced nonlocal variables captured in closures." msgstr "" -#: ../../whatsnew/3.13.rst:436 +#: ../../whatsnew/3.13.rst:433 msgid "" "This change to the semantics of :func:`locals` in optimized scopes also " -"affects the default behaviour of code execution functions that implicitly " +"affects the default behavior of code execution functions that implicitly " "target :func:`!locals` if no explicit namespace is provided (such as :func:" "`exec` and :func:`eval`). In previous versions, whether or not changes could " "be accessed by calling :func:`!locals` after calling the code execution " @@ -678,7 +682,7 @@ msgid "" "disk)." msgstr "" -#: ../../whatsnew/3.13.rst:455 +#: ../../whatsnew/3.13.rst:452 msgid "" "To ensure debuggers and similar tools can reliably update local variables in " "scopes affected by this change, :attr:`FrameType.f_locals ` " @@ -688,7 +692,7 @@ msgid "" "semantics." msgstr "" -#: ../../whatsnew/3.13.rst:461 +#: ../../whatsnew/3.13.rst:458 msgid "" "See :pep:`667` for more details, including related C API changes and " "deprecations. Porting notes are also provided below for the affected :ref:" @@ -696,18 +700,18 @@ msgid "" "notes-c>`." msgstr "" -#: ../../whatsnew/3.13.rst:466 +#: ../../whatsnew/3.13.rst:463 msgid "" "(PEP and implementation contributed by Mark Shannon and Tian Gao in :gh:" "`74929`. Documentation updates provided by Guido van Rossum and Alyssa " "Coghlan.)" msgstr "" -#: ../../whatsnew/3.13.rst:474 +#: ../../whatsnew/3.13.rst:471 msgid "Support for mobile platforms" msgstr "" -#: ../../whatsnew/3.13.rst:476 +#: ../../whatsnew/3.13.rst:473 msgid "" ":pep:`730`: iOS is now a :pep:`11` supported platform, with the ``arm64-" "apple-ios`` and ``arm64-apple-ios-simulator`` targets at tier 3 (iPhone and " @@ -718,28 +722,30 @@ msgid "" "implementation contributed by Russell Keith-Magee in :gh:`114099`.)" msgstr "" -#: ../../whatsnew/3.13.rst:486 +#: ../../whatsnew/3.13.rst:483 msgid "" -":pep:`738`: Android support is being actively worked on, but the platform is " -"not yet officially supported. (PEP written and implementation contributed by " -"Malcolm Smith in :gh:`116622`.)" +":pep:`738`: Android is now a :pep:`11` supported platform, with the " +"``aarch64-linux-android`` and ``x86_64-linux-android`` targets at tier 3. " +"The 32-bit targets ``arm-linux-androideabi`` and ``i686-linux-android`` are " +"not tier 3 supported platforms, but will have best-effort support. (PEP " +"written and implementation contributed by Malcolm Smith in :gh:`116622`.)" msgstr "" -#: ../../whatsnew/3.13.rst:491 +#: ../../whatsnew/3.13.rst:490 msgid ":pep:`730`, :pep:`738`" -msgstr "" +msgstr ":pep:`730`、:pep:`738`" -#: ../../whatsnew/3.13.rst:497 +#: ../../whatsnew/3.13.rst:496 msgid "Incremental garbage collection" msgstr "" -#: ../../whatsnew/3.13.rst:499 +#: ../../whatsnew/3.13.rst:498 msgid "" "The cycle garbage collector is now incremental. This means that maximum " "pause times are reduced by an order of magnitude or more for larger heaps." msgstr "" -#: ../../whatsnew/3.13.rst:503 +#: ../../whatsnew/3.13.rst:502 msgid "" "There are now only two generations: young and old. When :func:`gc.collect` " "is not called directly, the GC is invoked a little less frequently. When " @@ -747,29 +753,29 @@ msgid "" "generation, instead of collecting one or more generations." msgstr "" -#: ../../whatsnew/3.13.rst:509 +#: ../../whatsnew/3.13.rst:508 msgid "The behavior of :func:`!gc.collect` changes slightly:" msgstr "" -#: ../../whatsnew/3.13.rst:511 +#: ../../whatsnew/3.13.rst:510 ../../whatsnew/3.13.rst:2617 msgid "" -"``gc.collect(1)``: Performs an increment of GC, rather than collecting " -"generation 1." +"``gc.collect(1)``: Performs an increment of garbage collection, rather than " +"collecting generation 1." msgstr "" -#: ../../whatsnew/3.13.rst:513 +#: ../../whatsnew/3.13.rst:512 ../../whatsnew/3.13.rst:2619 msgid "Other calls to :func:`!gc.collect` are unchanged." msgstr "" -#: ../../whatsnew/3.13.rst:515 +#: ../../whatsnew/3.13.rst:514 msgid "(Contributed by Mark Shannon in :gh:`108362`.)" msgstr "" -#: ../../whatsnew/3.13.rst:519 +#: ../../whatsnew/3.13.rst:518 msgid "Other Language Changes" -msgstr "" +msgstr "其他語言更動" -#: ../../whatsnew/3.13.rst:521 +#: ../../whatsnew/3.13.rst:520 msgid "" "The compiler now strips common leading whitespace from every line in a " "docstring. This reduces the size of the :term:`bytecode cache ` " @@ -778,7 +784,7 @@ msgid "" "affects tools that use docstrings, such as :mod:`doctest`." msgstr "" -#: ../../whatsnew/3.13.rst:528 +#: ../../whatsnew/3.13.rst:527 msgid "" ">>> def spam():\n" "... \"\"\"\n" @@ -793,28 +799,30 @@ msgid "" "multiple paragraphs!\\n'" msgstr "" -#: ../../whatsnew/3.13.rst:541 +#: ../../whatsnew/3.13.rst:540 msgid "(Contributed by Inada Naoki in :gh:`81283`.)" msgstr "" -#: ../../whatsnew/3.13.rst:543 +#: ../../whatsnew/3.13.rst:542 msgid "" ":ref:`Annotation scopes ` within class scopes can now " "contain lambdas and comprehensions. Comprehensions that are located within " "class scopes are not inlined into their parent scope." msgstr "" -#: ../../whatsnew/3.13.rst:548 +#: ../../whatsnew/3.13.rst:547 msgid "" "class C[T]:\n" " type Alias = lambda: T" msgstr "" +"class C[T]:\n" +" type Alias = lambda: T" -#: ../../whatsnew/3.13.rst:553 +#: ../../whatsnew/3.13.rst:552 msgid "(Contributed by Jelle Zijlstra in :gh:`109118` and :gh:`118160`.)" msgstr "" -#: ../../whatsnew/3.13.rst:555 +#: ../../whatsnew/3.13.rst:554 msgid "" ":ref:`Future statements ` are no longer triggered by relative " "imports of the :mod:`__future__` module, meaning that statements of the form " @@ -823,7 +831,7 @@ msgid "" "in :gh:`118216`.)" msgstr "" -#: ../../whatsnew/3.13.rst:561 +#: ../../whatsnew/3.13.rst:560 msgid "" ":keyword:`global` declarations are now permitted in :keyword:`except` blocks " "when that global is used in the :keyword:`else` block. Previously this " @@ -831,7 +839,7 @@ msgid "" "`111123`.)" msgstr "" -#: ../../whatsnew/3.13.rst:566 +#: ../../whatsnew/3.13.rst:565 msgid "" "Add :envvar:`PYTHON_FROZEN_MODULES`, a new environment variable that " "determines whether frozen modules are ignored by the import machinery, " @@ -839,7 +847,7 @@ msgid "" "(Contributed by Yilei Yang in :gh:`111374`.)" msgstr "" -#: ../../whatsnew/3.13.rst:571 +#: ../../whatsnew/3.13.rst:570 msgid "" "Add :ref:`support for the perf profiler ` working without " "`frame pointers `_ through the new " @@ -848,14 +856,14 @@ msgid "" "`118518`.)" msgstr "" -#: ../../whatsnew/3.13.rst:577 +#: ../../whatsnew/3.13.rst:576 msgid "" "The location of a :file:`.python_history` file can be changed via the new :" "envvar:`PYTHON_HISTORY` environment variable. (Contributed by Levi Sabah, " "Zackery Spytz and Hugo van Kemenade in :gh:`73965`.)" msgstr "" -#: ../../whatsnew/3.13.rst:582 +#: ../../whatsnew/3.13.rst:581 msgid "" "Classes have a new :attr:`~class.__static_attributes__` attribute. This is " "populated by the compiler with a tuple of the class's attribute names which " @@ -863,21 +871,21 @@ msgid "" "(Contributed by Irit Katriel in :gh:`115775`.)" msgstr "" -#: ../../whatsnew/3.13.rst:587 +#: ../../whatsnew/3.13.rst:586 msgid "" "The compiler now creates a :attr:`!__firstlineno__` attribute on classes " "with the line number of the first line of the class definition. (Contributed " "by Serhiy Storchaka in :gh:`118465`.)" msgstr "" -#: ../../whatsnew/3.13.rst:591 +#: ../../whatsnew/3.13.rst:590 msgid "" "The :func:`exec` and :func:`eval` builtins now accept the *globals* and " "*locals* arguments as keywords. (Contributed by Raphael Gaschignard in :gh:" "`105879`)" msgstr "" -#: ../../whatsnew/3.13.rst:595 +#: ../../whatsnew/3.13.rst:594 msgid "" "The :func:`compile` builtin now accepts a new flag, ``ast." "PyCF_OPTIMIZED_AST``, which is similar to ``ast.PyCF_ONLY_AST`` except that " @@ -885,7 +893,13 @@ msgid "" "argument. (Contributed by Irit Katriel in :gh:`108113`)." msgstr "" -#: ../../whatsnew/3.13.rst:601 +#: ../../whatsnew/3.13.rst:600 +msgid "" +"Add a :attr:`~property.__name__` attribute on :class:`property` objects. " +"(Contributed by Eugene Toder in :gh:`101860`.)" +msgstr "" + +#: ../../whatsnew/3.13.rst:603 msgid "" "Add :exc:`PythonFinalizationError`, a new exception derived from :exc:" "`RuntimeError` and used to signal when operations are blocked during :term:" @@ -893,71 +907,65 @@ msgid "" "exc:`!PythonFinalizationError`, instead of :exc:`RuntimeError`:" msgstr "" -#: ../../whatsnew/3.13.rst:607 +#: ../../whatsnew/3.13.rst:609 msgid ":func:`_thread.start_new_thread`" -msgstr "" +msgstr ":func:`_thread.start_new_thread`" -#: ../../whatsnew/3.13.rst:608 +#: ../../whatsnew/3.13.rst:610 msgid ":func:`os.fork`" -msgstr "" +msgstr ":func:`os.fork`" -#: ../../whatsnew/3.13.rst:609 +#: ../../whatsnew/3.13.rst:611 msgid ":func:`os.forkpty`" -msgstr "" +msgstr ":func:`os.forkpty`" -#: ../../whatsnew/3.13.rst:610 +#: ../../whatsnew/3.13.rst:612 msgid ":class:`subprocess.Popen`" -msgstr "" +msgstr ":class:`subprocess.Popen`" -#: ../../whatsnew/3.13.rst:612 +#: ../../whatsnew/3.13.rst:614 msgid "(Contributed by Victor Stinner in :gh:`114570`.)" msgstr "" -#: ../../whatsnew/3.13.rst:614 +#: ../../whatsnew/3.13.rst:616 msgid "" "Allow the *count* argument of :meth:`str.replace` to be a keyword. " "(Contributed by Hugo van Kemenade in :gh:`106487`.)" msgstr "" -#: ../../whatsnew/3.13.rst:617 +#: ../../whatsnew/3.13.rst:619 msgid "" "Many functions now emit a warning if a boolean value is passed as a file " "descriptor argument. This can help catch some errors earlier. (Contributed " "by Serhiy Storchaka in :gh:`82626`.)" msgstr "" -#: ../../whatsnew/3.13.rst:622 +#: ../../whatsnew/3.13.rst:624 msgid "" "Added :attr:`!name` and :attr:`!mode` attributes for compressed and archived " "file-like objects in the :mod:`bz2`, :mod:`lzma`, :mod:`tarfile`, and :mod:" "`zipfile` modules. (Contributed by Serhiy Storchaka in :gh:`115961`.)" msgstr "" -#: ../../whatsnew/3.13.rst:627 -msgid "" -"Add a :attr:`~property.__name__` attribute on :class:`property` objects. " -"(Contributed by Eugene Toder in :gh:`101860`.)" -msgstr "" - -#: ../../whatsnew/3.13.rst:632 +#: ../../whatsnew/3.13.rst:631 msgid "New Modules" -msgstr "" +msgstr "新增模組" -#: ../../whatsnew/3.13.rst:634 +#: ../../whatsnew/3.13.rst:633 msgid "" ":mod:`dbm.sqlite3`: An SQLite backend for :mod:`dbm`. (Contributed by " "Raymond Hettinger and Erlend E. Aasland in :gh:`100414`.)" msgstr "" -#: ../../whatsnew/3.13.rst:639 +#: ../../whatsnew/3.13.rst:638 msgid "Improved Modules" -msgstr "" +msgstr "改進的模組" -#: ../../whatsnew/3.13.rst:643 +#: ../../whatsnew/3.13.rst:642 msgid "argparse" -msgstr "" +msgstr "argparse" -#: ../../whatsnew/3.13.rst:645 +#: ../../whatsnew/3.13.rst:644 msgid "" "Add the *deprecated* parameter to the :meth:`~argparse.ArgumentParser." "add_argument` and :meth:`!add_parser` methods, to enable deprecating command-" @@ -965,36 +973,36 @@ msgid "" "Storchaka in :gh:`83648`.)" msgstr "" -#: ../../whatsnew/3.13.rst:653 +#: ../../whatsnew/3.13.rst:652 msgid "array" -msgstr "" +msgstr "array" -#: ../../whatsnew/3.13.rst:655 +#: ../../whatsnew/3.13.rst:654 msgid "" "Add the ``'w'`` type code (``Py_UCS4``) for Unicode characters. It should be " "used instead of the deprecated ``'u'`` type code. (Contributed by Inada " "Naoki in :gh:`80480`.)" msgstr "" -#: ../../whatsnew/3.13.rst:659 +#: ../../whatsnew/3.13.rst:658 msgid "" "Register :class:`array.array` as a :class:`~collections.abc.MutableSequence` " "by implementing the :meth:`~array.array.clear` method. (Contributed by Mike " "Zimin in :gh:`114894`.)" msgstr "" -#: ../../whatsnew/3.13.rst:665 +#: ../../whatsnew/3.13.rst:664 msgid "ast" -msgstr "" +msgstr "ast" -#: ../../whatsnew/3.13.rst:667 +#: ../../whatsnew/3.13.rst:666 msgid "" "The constructors of node types in the :mod:`ast` module are now stricter in " -"the arguments they accept, with more intuitive behaviour when arguments are " +"the arguments they accept, with more intuitive behavior when arguments are " "omitted." msgstr "" -#: ../../whatsnew/3.13.rst:671 +#: ../../whatsnew/3.13.rst:670 msgid "" "If an optional field on an AST node is not included as an argument when " "constructing an instance, the field will now be set to ``None``. Similarly, " @@ -1004,7 +1012,7 @@ msgid "" "the newly constructed AST node instance.)" msgstr "" -#: ../../whatsnew/3.13.rst:679 +#: ../../whatsnew/3.13.rst:678 msgid "" "In all other cases, where a required argument is omitted, the node " "constructor will emit a :exc:`DeprecationWarning`. This will raise an " @@ -1013,31 +1021,31 @@ msgid "" "and will raise an exception in Python 3.15." msgstr "" -#: ../../whatsnew/3.13.rst:686 +#: ../../whatsnew/3.13.rst:685 msgid "" "These changes do not apply to user-defined subclasses of :class:`ast.AST` " "unless the class opts in to the new behavior by defining the :attr:`.AST." "_field_types` mapping." msgstr "" -#: ../../whatsnew/3.13.rst:690 +#: ../../whatsnew/3.13.rst:689 msgid "" "(Contributed by Jelle Zijlstra in :gh:`105858`, :gh:`117486`, and :gh:" "`118851`.)" msgstr "" -#: ../../whatsnew/3.13.rst:692 +#: ../../whatsnew/3.13.rst:691 msgid "" ":func:`ast.parse` now accepts an optional argument *optimize* which is " "passed on to :func:`compile`. This makes it possible to obtain an optimized " "AST. (Contributed by Irit Katriel in :gh:`108113`.)" msgstr "" -#: ../../whatsnew/3.13.rst:699 +#: ../../whatsnew/3.13.rst:698 msgid "asyncio" -msgstr "" +msgstr "asyncio" -#: ../../whatsnew/3.13.rst:701 +#: ../../whatsnew/3.13.rst:700 msgid "" ":func:`asyncio.as_completed` now returns an object that is both an :term:" "`asynchronous iterator` and a plain :term:`iterator` of :term:`awaitables " @@ -1047,14 +1055,14 @@ msgid "" "Arthur in :gh:`77714`.)" msgstr "" -#: ../../whatsnew/3.13.rst:709 +#: ../../whatsnew/3.13.rst:708 msgid "" ":meth:`asyncio.loop.create_unix_server` will now automatically remove the " "Unix socket when the server is closed. (Contributed by Pierre Ossman in :gh:" "`111246`.)" msgstr "" -#: ../../whatsnew/3.13.rst:713 +#: ../../whatsnew/3.13.rst:712 msgid "" ":meth:`.DatagramTransport.sendto` will now send zero-length datagrams if " "called with an empty bytes object. The transport flow control also now " @@ -1062,28 +1070,28 @@ msgid "" "(Contributed by Jamie Phan in :gh:`115199`.)" msgstr "" -#: ../../whatsnew/3.13.rst:719 +#: ../../whatsnew/3.13.rst:718 msgid "" "Add :meth:`Queue.shutdown ` and :exc:`~asyncio." "QueueShutDown` to manage queue termination. (Contributed by Laurie Opperman " "and Yves Duprat in :gh:`104228`.)" msgstr "" -#: ../../whatsnew/3.13.rst:723 +#: ../../whatsnew/3.13.rst:722 msgid "" "Add the :meth:`.Server.close_clients` and :meth:`.Server.abort_clients` " "methods, which more forcefully close an asyncio server. (Contributed by " "Pierre Ossman in :gh:`113538`.)" msgstr "" -#: ../../whatsnew/3.13.rst:727 +#: ../../whatsnew/3.13.rst:726 msgid "" "Accept a tuple of separators in :meth:`.StreamReader.readuntil`, stopping " "when any one of them is encountered. (Contributed by Bruce Merry in :gh:" "`81322`.)" msgstr "" -#: ../../whatsnew/3.13.rst:731 +#: ../../whatsnew/3.13.rst:730 msgid "" "Improve the behavior of :class:`~asyncio.TaskGroup` when an external " "cancellation collides with an internal cancellation. For example, when two " @@ -1092,7 +1100,7 @@ msgid "" "because its internal cancellation was swallowed by the inner task group." msgstr "" -#: ../../whatsnew/3.13.rst:738 +#: ../../whatsnew/3.13.rst:737 msgid "" "In the case where a task group is cancelled externally and also must raise " "an :exc:`ExceptionGroup`, it will now call the parent task's :meth:`~asyncio." @@ -1100,24 +1108,24 @@ msgid "" "be raised at the next :keyword:`await`, so the cancellation is not lost." msgstr "" -#: ../../whatsnew/3.13.rst:744 +#: ../../whatsnew/3.13.rst:743 msgid "" "An added benefit of these changes is that task groups now preserve the " "cancellation count (:meth:`~asyncio.Task.cancelling`)." msgstr "" -#: ../../whatsnew/3.13.rst:747 +#: ../../whatsnew/3.13.rst:746 msgid "" "In order to handle some corner cases, :meth:`~asyncio.Task.uncancel` may now " "reset the undocumented ``_must_cancel`` flag when the cancellation count " "reaches zero." msgstr "" -#: ../../whatsnew/3.13.rst:751 +#: ../../whatsnew/3.13.rst:750 msgid "(Inspired by an issue reported by Arthur Tacca in :gh:`116720`.)" msgstr "" -#: ../../whatsnew/3.13.rst:753 +#: ../../whatsnew/3.13.rst:752 msgid "" "When :meth:`.TaskGroup.create_task` is called on an inactive :class:" "`~asyncio.TaskGroup`, the given coroutine will be closed (which prevents a :" @@ -1125,46 +1133,46 @@ msgid "" "(Contributed by Arthur Tacca and Jason Zhang in :gh:`115957`.)" msgstr "" -#: ../../whatsnew/3.13.rst:761 +#: ../../whatsnew/3.13.rst:760 msgid "base64" -msgstr "" +msgstr "base64" -#: ../../whatsnew/3.13.rst:763 +#: ../../whatsnew/3.13.rst:762 msgid "" "Add :func:`~base64.z85encode` and :func:`~base64.z85decode` functions for " "encoding :class:`bytes` as `Z85 data`_ and decoding Z85-encoded data to :" "class:`!bytes`. (Contributed by Matan Perelman in :gh:`75299`.)" msgstr "" -#: ../../whatsnew/3.13.rst:772 +#: ../../whatsnew/3.13.rst:771 msgid "compileall" -msgstr "" +msgstr "compileall" -#: ../../whatsnew/3.13.rst:774 ../../whatsnew/3.13.rst:790 -#: ../../whatsnew/3.13.rst:1050 +#: ../../whatsnew/3.13.rst:773 ../../whatsnew/3.13.rst:789 +#: ../../whatsnew/3.13.rst:1049 msgid "" "The default number of worker threads and processes is now selected using :" "func:`os.process_cpu_count` instead of :func:`os.cpu_count`. (Contributed by " "Victor Stinner in :gh:`109649`.)" msgstr "" -#: ../../whatsnew/3.13.rst:780 ../../whatsnew/3.13.rst:796 -#: ../../whatsnew/3.13.rst:1646 +#: ../../whatsnew/3.13.rst:779 ../../whatsnew/3.13.rst:795 +#: ../../whatsnew/3.13.rst:1649 msgid "configparser" -msgstr "" +msgstr "configparser" -#: ../../whatsnew/3.13.rst:782 +#: ../../whatsnew/3.13.rst:781 msgid "" "The :class:`configparser.ConfigParser` now accepts unnamed sections before " "named ones if configured to do so. (Contributed by Pedro Sousa Lacerda in :" "gh:`66449`.)" msgstr "" -#: ../../whatsnew/3.13.rst:788 +#: ../../whatsnew/3.13.rst:787 msgid "concurrent.futures" -msgstr "" +msgstr "concurrent.futures" -#: ../../whatsnew/3.13.rst:798 +#: ../../whatsnew/3.13.rst:797 msgid "" ":class:`~configparser.ConfigParser` now has support for unnamed sections, " "which allows for top-level key-value pairs. This can be enabled with the new " @@ -1172,11 +1180,11 @@ msgid "" "gh:`66449`.)" msgstr "" -#: ../../whatsnew/3.13.rst:805 +#: ../../whatsnew/3.13.rst:804 msgid "copy" -msgstr "" +msgstr "copy" -#: ../../whatsnew/3.13.rst:807 +#: ../../whatsnew/3.13.rst:806 msgid "" "The new :func:`~copy.replace` function and the :meth:`replace protocol " "` make creating modified copies of objects much simpler. " @@ -1185,61 +1193,62 @@ msgid "" "protocol:" msgstr "" -#: ../../whatsnew/3.13.rst:813 +#: ../../whatsnew/3.13.rst:812 msgid ":func:`collections.namedtuple`" -msgstr "" +msgstr ":func:`collections.namedtuple`" -#: ../../whatsnew/3.13.rst:814 +#: ../../whatsnew/3.13.rst:813 msgid ":class:`dataclasses.dataclass`" -msgstr "" +msgstr ":class:`dataclasses.dataclass`" -#: ../../whatsnew/3.13.rst:815 +#: ../../whatsnew/3.13.rst:814 msgid "" ":class:`datetime.datetime`, :class:`datetime.date`, :class:`datetime.time`" msgstr "" +":class:`datetime.datetime`、:class:`datetime.date`、:class:`datetime.time`" -#: ../../whatsnew/3.13.rst:816 +#: ../../whatsnew/3.13.rst:815 msgid ":class:`inspect.Signature`, :class:`inspect.Parameter`" -msgstr "" +msgstr ":class:`inspect.Signature`、:class:`inspect.Parameter`" -#: ../../whatsnew/3.13.rst:817 +#: ../../whatsnew/3.13.rst:816 msgid ":class:`types.SimpleNamespace`" -msgstr "" +msgstr ":class:`types.SimpleNamespace`" -#: ../../whatsnew/3.13.rst:818 +#: ../../whatsnew/3.13.rst:817 msgid ":ref:`code objects `" msgstr "" -#: ../../whatsnew/3.13.rst:820 +#: ../../whatsnew/3.13.rst:819 msgid "" "Any user-defined class can also support :func:`copy.replace` by defining " "the :meth:`~object.__replace__` method. (Contributed by Serhiy Storchaka in :" "gh:`108751`.)" msgstr "" -#: ../../whatsnew/3.13.rst:826 +#: ../../whatsnew/3.13.rst:825 msgid "dbm" -msgstr "" +msgstr "dbm" -#: ../../whatsnew/3.13.rst:828 +#: ../../whatsnew/3.13.rst:827 msgid "" "Add :mod:`dbm.sqlite3`, a new module which implements an SQLite backend, and " "make it the default :mod:`!dbm` backend. (Contributed by Raymond Hettinger " "and Erlend E. Aasland in :gh:`100414`.)" msgstr "" -#: ../../whatsnew/3.13.rst:832 +#: ../../whatsnew/3.13.rst:831 msgid "" "Allow removing all items from the database through the new :meth:`.gdbm." "clear` and :meth:`.ndbm.clear` methods. (Contributed by Donghee Na in :gh:" "`107122`.)" msgstr "" -#: ../../whatsnew/3.13.rst:838 +#: ../../whatsnew/3.13.rst:837 msgid "dis" -msgstr "" +msgstr "dis" -#: ../../whatsnew/3.13.rst:840 +#: ../../whatsnew/3.13.rst:839 msgid "" "Change the output of :mod:`dis` module functions to show logical labels for " "jump targets and exception handlers, rather than offsets. The offsets can be " @@ -1247,7 +1256,7 @@ msgid "" "the *show_offsets* argument. (Contributed by Irit Katriel in :gh:`112137`.)" msgstr "" -#: ../../whatsnew/3.13.rst:847 +#: ../../whatsnew/3.13.rst:846 msgid "" ":meth:`~dis.get_instructions` no longer represents cache entries as separate " "instructions. Instead, it returns them as part of the :class:`~dis." @@ -1256,11 +1265,11 @@ msgid "" "(Contributed by Irit Katriel in :gh:`112962`.)" msgstr "" -#: ../../whatsnew/3.13.rst:859 +#: ../../whatsnew/3.13.rst:858 msgid "doctest" -msgstr "" +msgstr "doctest" -#: ../../whatsnew/3.13.rst:861 +#: ../../whatsnew/3.13.rst:860 msgid "" ":mod:`doctest` output is now colored by default. This can be controlled via " "the new :envvar:`PYTHON_COLORS` environment variable as well as the " @@ -1269,18 +1278,18 @@ msgid "" "`117225`.)" msgstr "" -#: ../../whatsnew/3.13.rst:868 +#: ../../whatsnew/3.13.rst:867 msgid "" "The :meth:`.DocTestRunner.run` method now counts the number of skipped " "tests. Add the :attr:`.DocTestRunner.skips` and :attr:`.TestResults.skipped` " "attributes. (Contributed by Victor Stinner in :gh:`108794`.)" msgstr "" -#: ../../whatsnew/3.13.rst:874 +#: ../../whatsnew/3.13.rst:873 msgid "email" -msgstr "" +msgstr "email" -#: ../../whatsnew/3.13.rst:876 +#: ../../whatsnew/3.13.rst:875 msgid "" "Headers with embedded newlines are now quoted on output. The :mod:`~email." "generator` will now refuse to serialize (write) headers that are improperly " @@ -1290,23 +1299,23 @@ msgid "" "Bloemsaat and Petr Viktorin in :gh:`121650`.)" msgstr "" -#: ../../whatsnew/3.13.rst:884 +#: ../../whatsnew/3.13.rst:883 msgid "" ":func:`~email.utils.getaddresses` and :func:`~email.utils.parseaddr` now " "return ``('', '')`` pairs in more situations where invalid email addresses " "are encountered instead of potentially inaccurate values. The two functions " "have a new optional *strict* parameter (default ``True``). To get the old " -"behaviour (accepting malformed input), use ``strict=False``. ``getattr(email." +"behavior (accepting malformed input), use ``strict=False``. ``getattr(email." "utils, 'supports_strict_parsing', False)`` can be used to check if the " "*strict* parameter is available. (Contributed by Thomas Dwyer and Victor " "Stinner for :gh:`102988` to improve the :cve:`2023-27043` fix.)" msgstr "" -#: ../../whatsnew/3.13.rst:896 +#: ../../whatsnew/3.13.rst:895 msgid "fractions" -msgstr "" +msgstr "fractions" -#: ../../whatsnew/3.13.rst:898 +#: ../../whatsnew/3.13.rst:897 msgid "" ":class:`~fractions.Fraction` objects now support the standard :ref:`format " "specification mini-language ` rules for fill, alignment, sign " @@ -1314,18 +1323,18 @@ msgid "" "`111320`.)" msgstr "" -#: ../../whatsnew/3.13.rst:905 +#: ../../whatsnew/3.13.rst:904 msgid "gc" -msgstr "" +msgstr "gc" -#: ../../whatsnew/3.13.rst:907 +#: ../../whatsnew/3.13.rst:906 msgid "" "The cyclic garbage collector is now incremental, which changes the meaning " "of the results of :meth:`~gc.get_threshold` and :meth:`~gc.set_threshold` as " "well as :meth:`~gc.get_count` and :meth:`~gc.get_stats`." msgstr "" -#: ../../whatsnew/3.13.rst:912 +#: ../../whatsnew/3.13.rst:911 msgid "" "For backwards compatibility, :meth:`~gc.get_threshold` continues to return a " "three-item tuple. The first value is the threshold for young collections, as " @@ -1334,11 +1343,11 @@ msgid "" "is scanned more slowly). The third value is meaningless and is always zero." msgstr "" -#: ../../whatsnew/3.13.rst:920 +#: ../../whatsnew/3.13.rst:919 msgid ":meth:`~gc.set_threshold` ignores any items after the second." msgstr "" -#: ../../whatsnew/3.13.rst:922 +#: ../../whatsnew/3.13.rst:921 msgid "" ":meth:`~gc.get_count` and :meth:`~gc.get_stats` continue to return the same " "format of results. The only difference is that instead of the results " @@ -1346,29 +1355,29 @@ msgid "" "young generation and the aging and collecting spaces of the old generation." msgstr "" -#: ../../whatsnew/3.13.rst:929 +#: ../../whatsnew/3.13.rst:928 msgid "" "In summary, code that attempted to manipulate the behavior of the cycle GC " "may not work exactly as intended, but it is very unlikely to be harmful. All " "other code will work just fine." msgstr "" -#: ../../whatsnew/3.13.rst:935 +#: ../../whatsnew/3.13.rst:934 msgid "glob" -msgstr "" +msgstr "glob" -#: ../../whatsnew/3.13.rst:937 +#: ../../whatsnew/3.13.rst:936 msgid "" "Add :func:`~glob.translate`, a function to convert a path specification with " "shell-style wildcards to a regular expression. (Contributed by Barney Gale " "in :gh:`72904`.)" msgstr "" -#: ../../whatsnew/3.13.rst:943 +#: ../../whatsnew/3.13.rst:942 msgid "importlib" -msgstr "" +msgstr "importlib" -#: ../../whatsnew/3.13.rst:945 +#: ../../whatsnew/3.13.rst:944 msgid "" "The following functions in :mod:`importlib.resources` now allow accessing a " "directory (or tree) of resources, using multiple positional arguments (the " @@ -1376,37 +1385,37 @@ msgid "" "keyword-only):" msgstr "" -#: ../../whatsnew/3.13.rst:950 +#: ../../whatsnew/3.13.rst:949 msgid ":func:`~importlib.resources.is_resource`" -msgstr "" +msgstr ":func:`~importlib.resources.is_resource`" -#: ../../whatsnew/3.13.rst:951 +#: ../../whatsnew/3.13.rst:950 msgid ":func:`~importlib.resources.open_binary`" -msgstr "" +msgstr ":func:`~importlib.resources.open_binary`" -#: ../../whatsnew/3.13.rst:952 +#: ../../whatsnew/3.13.rst:951 msgid ":func:`~importlib.resources.open_text`" -msgstr "" +msgstr ":func:`~importlib.resources.open_text`" -#: ../../whatsnew/3.13.rst:953 +#: ../../whatsnew/3.13.rst:952 msgid ":func:`~importlib.resources.path`" -msgstr "" +msgstr ":func:`~importlib.resources.path`" -#: ../../whatsnew/3.13.rst:954 +#: ../../whatsnew/3.13.rst:953 msgid ":func:`~importlib.resources.read_binary`" -msgstr "" +msgstr ":func:`~importlib.resources.read_binary`" -#: ../../whatsnew/3.13.rst:955 +#: ../../whatsnew/3.13.rst:954 msgid ":func:`~importlib.resources.read_text`" -msgstr "" +msgstr ":func:`~importlib.resources.read_text`" -#: ../../whatsnew/3.13.rst:957 +#: ../../whatsnew/3.13.rst:956 msgid "" "These functions are no longer deprecated and are not scheduled for removal. " "(Contributed by Petr Viktorin in :gh:`106532`.)" msgstr "" -#: ../../whatsnew/3.13.rst:960 +#: ../../whatsnew/3.13.rst:959 msgid "" ":func:`~importlib.resources.contents` remains deprecated in favor of the " "fully-featured :class:`~importlib.resources.abc.Traversable` API. However, " @@ -1414,11 +1423,11 @@ msgid "" "`106532`.)" msgstr "" -#: ../../whatsnew/3.13.rst:967 +#: ../../whatsnew/3.13.rst:966 msgid "io" -msgstr "" +msgstr "io" -#: ../../whatsnew/3.13.rst:969 +#: ../../whatsnew/3.13.rst:968 msgid "" "The :class:`~io.IOBase` finalizer now logs any errors raised by the :meth:" "`~io.IOBase.close` method with :data:`sys.unraisablehook`. Previously, " @@ -1427,17 +1436,17 @@ msgid "" "build>`. (Contributed by Victor Stinner in :gh:`62948`.)" msgstr "" -#: ../../whatsnew/3.13.rst:978 +#: ../../whatsnew/3.13.rst:977 msgid "ipaddress" -msgstr "" +msgstr "ipaddress" -#: ../../whatsnew/3.13.rst:980 +#: ../../whatsnew/3.13.rst:979 msgid "" "Add the :attr:`.IPv4Address.ipv6_mapped` property, which returns the IPv4-" "mapped IPv6 address. (Contributed by Charles Machalow in :gh:`109466`.)" msgstr "" -#: ../../whatsnew/3.13.rst:984 +#: ../../whatsnew/3.13.rst:983 msgid "" "Fix ``is_global`` and ``is_private`` behavior in :class:`~ipaddress." "IPv4Address`, :class:`~ipaddress.IPv6Address`, :class:`~ipaddress." @@ -1445,22 +1454,22 @@ msgid "" "Stasiak in :gh:`113171`.)" msgstr "" -#: ../../whatsnew/3.13.rst:991 +#: ../../whatsnew/3.13.rst:990 msgid "itertools" -msgstr "" +msgstr "itertools" -#: ../../whatsnew/3.13.rst:993 +#: ../../whatsnew/3.13.rst:992 msgid "" ":func:`~itertools.batched` has a new *strict* parameter, which raises a :exc:" "`ValueError` if the final batch is shorter than the specified batch size. " "(Contributed by Raymond Hettinger in :gh:`113202`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1000 +#: ../../whatsnew/3.13.rst:999 msgid "marshal" -msgstr "" +msgstr "marshal" -#: ../../whatsnew/3.13.rst:1002 +#: ../../whatsnew/3.13.rst:1001 msgid "" "Add the *allow_code* parameter in module functions. Passing " "``allow_code=False`` prevents serialization and de-serialization of code " @@ -1468,11 +1477,11 @@ msgid "" "Serhiy Storchaka in :gh:`113626`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1009 +#: ../../whatsnew/3.13.rst:1008 msgid "math" -msgstr "" +msgstr "math" -#: ../../whatsnew/3.13.rst:1011 +#: ../../whatsnew/3.13.rst:1010 msgid "" "The new function :func:`~math.fma` performs fused multiply-add operations. " "This computes ``x * y + z`` with only a single round, and so avoids any " @@ -1482,11 +1491,11 @@ msgid "" "Stinner in :gh:`73468`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1021 +#: ../../whatsnew/3.13.rst:1020 msgid "mimetypes" -msgstr "" +msgstr "mimetypes" -#: ../../whatsnew/3.13.rst:1023 +#: ../../whatsnew/3.13.rst:1022 msgid "" "Add the :func:`~mimetypes.guess_file_type` function to guess a MIME type " "from a filesystem path. Using paths with :func:`~mimetypes.guess_type` is " @@ -1494,18 +1503,18 @@ msgid "" "`66543`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1030 +#: ../../whatsnew/3.13.rst:1029 msgid "mmap" -msgstr "" +msgstr "mmap" -#: ../../whatsnew/3.13.rst:1032 +#: ../../whatsnew/3.13.rst:1031 msgid "" ":class:`~mmap.mmap` is now protected from crashing on Windows when the " "mapped memory is inaccessible due to file system errors or access " "violations. (Contributed by Jannis Weigend in :gh:`118209`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1036 +#: ../../whatsnew/3.13.rst:1035 msgid "" ":class:`~mmap.mmap` has a new :meth:`~mmap.mmap.seekable` method that can be " "used when a seekable file-like object is required. The :meth:`~mmap.mmap." @@ -1513,7 +1522,7 @@ msgid "" "Na and Sylvie Liberman in :gh:`111835`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1041 +#: ../../whatsnew/3.13.rst:1040 msgid "" "The new UNIX-only *trackfd* parameter for :class:`~mmap.mmap` controls file " "descriptor duplication; if false, the file descriptor specified by *fileno* " @@ -1521,22 +1530,22 @@ msgid "" "gh:`78502`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1048 +#: ../../whatsnew/3.13.rst:1047 msgid "multiprocessing" -msgstr "" +msgstr "multiprocessing" -#: ../../whatsnew/3.13.rst:1056 +#: ../../whatsnew/3.13.rst:1055 msgid "os" -msgstr "" +msgstr "os" -#: ../../whatsnew/3.13.rst:1058 +#: ../../whatsnew/3.13.rst:1057 msgid "" "Add :func:`~os.process_cpu_count` function to get the number of logical CPU " "cores usable by the calling thread of the current process. (Contributed by " "Victor Stinner in :gh:`109649`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1062 +#: ../../whatsnew/3.13.rst:1061 msgid "" ":func:`~os.cpu_count` and :func:`~os.process_cpu_count` can be overridden " "through the new environment variable :envvar:`PYTHON_CPU_COUNT` or the new " @@ -1546,7 +1555,7 @@ msgid "" "Na in :gh:`109595`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1070 +#: ../../whatsnew/3.13.rst:1069 msgid "" "Add a :ref:`low level interface ` to Linux's :manpage:`timer " "file descriptors ` via :func:`~os.timerfd_create`, :func:" @@ -1557,7 +1566,7 @@ msgid "" "in :gh:`108277`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1079 +#: ../../whatsnew/3.13.rst:1078 msgid "" ":func:`~os.lchmod` and the *follow_symlinks* argument of :func:`~os.chmod` " "are both now available on Windows. Note that the default value of " @@ -1565,14 +1574,14 @@ msgid "" "by Serhiy Storchaka in :gh:`59616`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1085 +#: ../../whatsnew/3.13.rst:1084 msgid "" ":func:`~os.fchmod` and support for file descriptors in :func:`~os.chmod` are " "both now available on Windows. (Contributed by Serhiy Storchaka in :gh:" "`113191`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1089 +#: ../../whatsnew/3.13.rst:1088 msgid "" "On Windows, :func:`~os.mkdir` and :func:`~os.makedirs` now support passing a " "*mode* value of ``0o700`` to apply access control to the new directory. This " @@ -1581,14 +1590,14 @@ msgid "" "Steve Dower in :gh:`118486`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1096 +#: ../../whatsnew/3.13.rst:1095 msgid "" ":func:`~os.posix_spawn` now accepts ``None`` for the *env* argument, which " "makes the newly spawned process use the current process environment. " "(Contributed by Jakub Kulik in :gh:`113119`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1100 +#: ../../whatsnew/3.13.rst:1099 msgid "" ":func:`~os.posix_spawn` can now use the :attr:`~os.POSIX_SPAWN_CLOSEFROM` " "attribute in the *file_actions* parameter on platforms that support :c:func:" @@ -1596,76 +1605,76 @@ msgid "" "gh:`113117`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1107 +#: ../../whatsnew/3.13.rst:1106 msgid "os.path" -msgstr "" +msgstr "os.path" -#: ../../whatsnew/3.13.rst:1109 +#: ../../whatsnew/3.13.rst:1108 msgid "" "Add :func:`~os.path.isreserved` to check if a path is reserved on the " "current system. This function is only available on Windows. (Contributed by " "Barney Gale in :gh:`88569`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1114 +#: ../../whatsnew/3.13.rst:1113 msgid "" "On Windows, :func:`~os.path.isabs` no longer considers paths starting with " "exactly one slash (``\\`` or ``/``) to be absolute. (Contributed by Barney " "Gale and Jon Foster in :gh:`44626`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1118 +#: ../../whatsnew/3.13.rst:1117 msgid "" ":func:`~os.path.realpath` now resolves MS-DOS style file names even if the " "file is not accessible. (Contributed by Moonsik Park in :gh:`82367`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1124 ../../whatsnew/3.13.rst:1686 +#: ../../whatsnew/3.13.rst:1123 ../../whatsnew/3.13.rst:1689 msgid "pathlib" -msgstr "" +msgstr "pathlib" -#: ../../whatsnew/3.13.rst:1126 +#: ../../whatsnew/3.13.rst:1125 msgid "" "Add :exc:`~pathlib.UnsupportedOperation`, which is raised instead of :exc:" "`NotImplementedError` when a path operation isn't supported. (Contributed by " "Barney Gale in :gh:`89812`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1130 +#: ../../whatsnew/3.13.rst:1129 msgid "" "Add a new constructor for creating :class:`~pathlib.Path` objects from " "'file' URIs (``file:///``), :meth:`.Path.from_uri`. (Contributed by Barney " "Gale in :gh:`107465`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1134 +#: ../../whatsnew/3.13.rst:1133 msgid "" "Add :meth:`.PurePath.full_match` for matching paths with shell-style " "wildcards, including the recursive wildcard \"``**``\". (Contributed by " "Barney Gale in :gh:`73435`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1138 +#: ../../whatsnew/3.13.rst:1137 msgid "" "Add the :attr:`.PurePath.parser` class attribute to store the implementation " "of :mod:`os.path` used for low-level path parsing and joining. This will be " "either :mod:`!posixpath` or :mod:`!ntpath`." msgstr "" -#: ../../whatsnew/3.13.rst:1143 +#: ../../whatsnew/3.13.rst:1142 msgid "" "Add *recurse_symlinks* keyword-only argument to :meth:`.Path.glob` and :meth:" "`~pathlib.Path.rglob`. (Contributed by Barney Gale in :gh:`77609`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1147 +#: ../../whatsnew/3.13.rst:1146 msgid "" ":meth:`.Path.glob` and :meth:`~pathlib.Path.rglob` now return files and " "directories when given a pattern that ends with \"``**``\". Previously, only " "directories were returned. (Contributed by Barney Gale in :gh:`70303`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1152 +#: ../../whatsnew/3.13.rst:1151 msgid "" "Add the *follow_symlinks* keyword-only argument to :meth:`Path.is_file " "`, :meth:`Path.is_dir `, :meth:`." @@ -1673,11 +1682,11 @@ msgid "" "`105793` and Kamil Turek in :gh:`107962`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1160 +#: ../../whatsnew/3.13.rst:1159 msgid "pdb" -msgstr "" +msgstr "pdb" -#: ../../whatsnew/3.13.rst:1162 +#: ../../whatsnew/3.13.rst:1161 msgid "" ":func:`breakpoint` and :func:`~pdb.set_trace` now enter the debugger " "immediately rather than on the next line of code to be executed. This change " @@ -1686,20 +1695,20 @@ msgid "" "Gao in :gh:`118579`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1168 +#: ../../whatsnew/3.13.rst:1167 msgid "" "``sys.path[0]`` is no longer replaced by the directory of the script being " "debugged when :attr:`sys.flags.safe_path` is set. (Contributed by Tian Gao " "and Christian Walther in :gh:`111762`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1172 +#: ../../whatsnew/3.13.rst:1171 msgid "" ":mod:`zipapp` is now supported as a debugging target. (Contributed by Tian " "Gao in :gh:`118501`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1175 +#: ../../whatsnew/3.13.rst:1174 msgid "" "Add ability to move between chained exceptions during post-mortem debugging " "in :func:`~pdb.pm` using the new :pdbcmd:`exceptions [exc_number] " @@ -1707,101 +1716,101 @@ msgid "" "`106676`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1180 +#: ../../whatsnew/3.13.rst:1179 msgid "" "Expressions and statements whose prefix is a pdb command are now correctly " "identified and executed. (Contributed by Tian Gao in :gh:`108464`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1186 +#: ../../whatsnew/3.13.rst:1185 msgid "queue" -msgstr "" +msgstr "queue" -#: ../../whatsnew/3.13.rst:1188 +#: ../../whatsnew/3.13.rst:1187 msgid "" "Add :meth:`Queue.shutdown ` and :exc:`~queue.ShutDown` " "to manage queue termination. (Contributed by Laurie Opperman and Yves Duprat " "in :gh:`104750`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1194 +#: ../../whatsnew/3.13.rst:1193 msgid "random" -msgstr "" +msgstr "random" -#: ../../whatsnew/3.13.rst:1196 +#: ../../whatsnew/3.13.rst:1195 msgid "" "Add a :ref:`command-line interface `. (Contributed by Hugo van " "Kemenade in :gh:`118131`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1201 ../../whatsnew/3.13.rst:1694 +#: ../../whatsnew/3.13.rst:1200 ../../whatsnew/3.13.rst:1697 msgid "re" -msgstr "" +msgstr "re" -#: ../../whatsnew/3.13.rst:1203 +#: ../../whatsnew/3.13.rst:1202 msgid "" "Rename :exc:`!re.error` to :exc:`~re.PatternError` for improved clarity. :" "exc:`!re.error` is kept for backward compatibility." msgstr "" -#: ../../whatsnew/3.13.rst:1208 +#: ../../whatsnew/3.13.rst:1207 msgid "shutil" -msgstr "" +msgstr "shutil" -#: ../../whatsnew/3.13.rst:1210 +#: ../../whatsnew/3.13.rst:1209 msgid "" "Support the *dir_fd* and *follow_symlinks* keyword arguments in :func:" "`~shutil.chown`. (Contributed by Berker Peksag and Tahia K in :gh:`62308`)" msgstr "" -#: ../../whatsnew/3.13.rst:1216 +#: ../../whatsnew/3.13.rst:1215 msgid "site" -msgstr "" +msgstr "site" -#: ../../whatsnew/3.13.rst:1218 +#: ../../whatsnew/3.13.rst:1217 msgid "" ":file:`.pth` files are now decoded using UTF-8 first, and then with the :" "term:`locale encoding` if UTF-8 decoding fails. (Contributed by Inada Naoki " "in :gh:`117802`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1224 +#: ../../whatsnew/3.13.rst:1223 msgid "sqlite3" -msgstr "" +msgstr "sqlite3" -#: ../../whatsnew/3.13.rst:1226 +#: ../../whatsnew/3.13.rst:1225 msgid "" "A :exc:`ResourceWarning` is now emitted if a :class:`~sqlite3.Connection` " "object is not :meth:`closed ` explicitly. " "(Contributed by Erlend E. Aasland in :gh:`105539`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1230 +#: ../../whatsnew/3.13.rst:1229 msgid "" "Add the *filter* keyword-only parameter to :meth:`.Connection.iterdump` for " "filtering database objects to dump. (Contributed by Mariusz Felisiak in :gh:" "`91602`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1236 +#: ../../whatsnew/3.13.rst:1235 msgid "ssl" -msgstr "" +msgstr "ssl" -#: ../../whatsnew/3.13.rst:1238 +#: ../../whatsnew/3.13.rst:1237 msgid "" "The :func:`~ssl.create_default_context` API now includes :data:`~ssl." "VERIFY_X509_PARTIAL_CHAIN` and :data:`~ssl.VERIFY_X509_STRICT` in its " "default flags." msgstr "" -#: ../../whatsnew/3.13.rst:1244 +#: ../../whatsnew/3.13.rst:1243 msgid "" ":data:`~ssl.VERIFY_X509_STRICT` may reject pre-:rfc:`5280` or malformed " "certificates that the underlying OpenSSL implementation might otherwise " "accept. Whilst disabling this is not recommended, you can do so using:" msgstr "" -#: ../../whatsnew/3.13.rst:1249 +#: ../../whatsnew/3.13.rst:1248 msgid "" "import ssl\n" "\n" @@ -1809,15 +1818,15 @@ msgid "" "ctx.verify_flags &= ~ssl.VERIFY_X509_STRICT" msgstr "" -#: ../../whatsnew/3.13.rst:1256 +#: ../../whatsnew/3.13.rst:1255 msgid "(Contributed by William Woodruff in :gh:`112389`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1260 +#: ../../whatsnew/3.13.rst:1259 msgid "statistics" -msgstr "" +msgstr "statistics" -#: ../../whatsnew/3.13.rst:1262 +#: ../../whatsnew/3.13.rst:1261 msgid "" "Add :func:`~statistics.kde` for kernel density estimation. This makes it " "possible to estimate a continuous probability density function from a fixed " @@ -1825,24 +1834,24 @@ msgid "" "`115863`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1267 +#: ../../whatsnew/3.13.rst:1266 msgid "" "Add :func:`~statistics.kde_random` for sampling from an estimated " "probability density function created by :func:`~statistics.kde`. " "(Contributed by Raymond Hettinger in :gh:`115863`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1275 +#: ../../whatsnew/3.13.rst:1274 msgid "subprocess" -msgstr "" +msgstr "subprocess" -#: ../../whatsnew/3.13.rst:1277 +#: ../../whatsnew/3.13.rst:1276 msgid "" "The :mod:`subprocess` module now uses the :func:`~os.posix_spawn` function " "in more situations." msgstr "" -#: ../../whatsnew/3.13.rst:1280 +#: ../../whatsnew/3.13.rst:1279 msgid "" "Notably, when *close_fds* is ``True`` (the default), :func:`~os.posix_spawn` " "will be used when the C library provides :c:func:`!" @@ -1851,7 +1860,7 @@ msgid "" "existing Linux :c:func:`!vfork` based code." msgstr "" -#: ../../whatsnew/3.13.rst:1287 +#: ../../whatsnew/3.13.rst:1286 msgid "" "A private control knob :attr:`!subprocess._USE_POSIX_SPAWN` can be set to " "``False`` if you need to force :mod:`subprocess` to never use :func:`~os." @@ -1861,22 +1870,22 @@ msgid "" "`113117`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1297 +#: ../../whatsnew/3.13.rst:1296 msgid "sys" -msgstr "" +msgstr "sys" -#: ../../whatsnew/3.13.rst:1299 +#: ../../whatsnew/3.13.rst:1298 msgid "" "Add the :func:`~sys._is_interned` function to test if a string was interned. " "This function is not guaranteed to exist in all implementations of Python. " "(Contributed by Serhiy Storchaka in :gh:`78573`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1305 +#: ../../whatsnew/3.13.rst:1304 msgid "tempfile" -msgstr "" +msgstr "tempfile" -#: ../../whatsnew/3.13.rst:1307 +#: ../../whatsnew/3.13.rst:1306 msgid "" "On Windows, the default mode ``0o700`` used by :func:`tempfile.mkdtemp` now " "limits access to the new directory due to changes to :func:`os.mkdir`. This " @@ -1884,11 +1893,11 @@ msgid "" "`118486`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1314 +#: ../../whatsnew/3.13.rst:1313 msgid "time" -msgstr "" +msgstr "time" -#: ../../whatsnew/3.13.rst:1316 +#: ../../whatsnew/3.13.rst:1315 msgid "" "On Windows, :func:`~time.monotonic` now uses the " "``QueryPerformanceCounter()`` clock for a resolution of 1 microsecond, " @@ -1896,7 +1905,7 @@ msgid "" "milliseconds. (Contributed by Victor Stinner in :gh:`88494`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1322 +#: ../../whatsnew/3.13.rst:1321 msgid "" "On Windows, :func:`~time.time` now uses the " "``GetSystemTimePreciseAsFileTime()`` clock for a resolution of 1 " @@ -1905,11 +1914,11 @@ msgid "" "`63207`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1330 +#: ../../whatsnew/3.13.rst:1329 msgid "tkinter" -msgstr "" +msgstr "tkinter" -#: ../../whatsnew/3.13.rst:1332 +#: ../../whatsnew/3.13.rst:1331 msgid "" "Add :mod:`tkinter` widget methods: :meth:`!tk_busy_hold`, :meth:`!" "tk_busy_configure`, :meth:`!tk_busy_cget`, :meth:`!tk_busy_forget`, :meth:`!" @@ -1917,7 +1926,7 @@ msgid "" "klappnase and Serhiy Storchaka in :gh:`72684`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1338 +#: ../../whatsnew/3.13.rst:1337 msgid "" "The :mod:`tkinter` widget method :meth:`!wm_attributes` now accepts the " "attribute name without the minus prefix to get window attributes, for " @@ -1926,14 +1935,14 @@ msgid "" "wm_attributes(alpha=0.5)``. (Contributed by Serhiy Storchaka in :gh:`43457`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1345 +#: ../../whatsnew/3.13.rst:1344 msgid "" ":meth:`!wm_attributes` can now return attributes as a :class:`dict`, by " "using the new optional keyword-only parameter *return_python_dict*. " "(Contributed by Serhiy Storchaka in :gh:`43457`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1349 +#: ../../whatsnew/3.13.rst:1348 msgid "" ":meth:`!Text.count` can now return a simple :class:`int` when the new " "optional keyword-only parameter *return_ints* is used. Otherwise, the single " @@ -1941,27 +1950,27 @@ msgid "" "in :gh:`97928`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1354 +#: ../../whatsnew/3.13.rst:1353 msgid "" "Support the \"vsapi\" element type in the :meth:`~tkinter.ttk.Style." "element_create` method of :class:`tkinter.ttk.Style`. (Contributed by Serhiy " "Storchaka in :gh:`68166`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1359 +#: ../../whatsnew/3.13.rst:1358 msgid "" "Add the :meth:`!after_info` method for Tkinter widgets. (Contributed by " "Cheryl Sabella in :gh:`77020`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1362 +#: ../../whatsnew/3.13.rst:1361 msgid "" "Add a new :meth:`!copy_replace` method to :class:`!PhotoImage` to copy a " "region from one image to another, possibly with pixel zooming, subsampling, " "or both. (Contributed by Serhiy Storchaka in :gh:`118225`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1367 +#: ../../whatsnew/3.13.rst:1366 msgid "" "Add *from_coords* parameter to the :class:`!PhotoImage` methods :meth:`!" "copy`, :meth:`!zoom` and :meth:`!subsample`. Add *zoom* and *subsample* " @@ -1969,7 +1978,7 @@ msgid "" "Serhiy Storchaka in :gh:`118225`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1373 +#: ../../whatsnew/3.13.rst:1372 msgid "" "Add the :class:`!PhotoImage` methods :meth:`!read` to read an image from a " "file and :meth:`!data` to get the image data. Add *background* and " @@ -1977,11 +1986,11 @@ msgid "" "Storchaka in :gh:`118271`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1381 +#: ../../whatsnew/3.13.rst:1380 msgid "traceback" -msgstr "" +msgstr "traceback" -#: ../../whatsnew/3.13.rst:1383 +#: ../../whatsnew/3.13.rst:1382 msgid "" "Add the :attr:`~traceback.TracebackException.exc_type_str` attribute to :" "class:`~traceback.TracebackException`, which holds a string display of the " @@ -1991,7 +2000,7 @@ msgid "" "(Contributed by Irit Katriel in :gh:`112332`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1392 +#: ../../whatsnew/3.13.rst:1391 msgid "" "Add a new *show_group* keyword-only parameter to :meth:`.TracebackException." "format_exception_only` to (recursively) format the nested exceptions of a :" @@ -1999,11 +2008,11 @@ msgid "" "`105292`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1399 +#: ../../whatsnew/3.13.rst:1398 msgid "types" -msgstr "" +msgstr "types" -#: ../../whatsnew/3.13.rst:1401 +#: ../../whatsnew/3.13.rst:1400 msgid "" ":class:`~types.SimpleNamespace` can now take a single positional argument to " "initialise the namespace's arguments. This argument must either be a mapping " @@ -2011,63 +2020,63 @@ msgid "" "`108191`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1408 ../../whatsnew/3.13.rst:1719 +#: ../../whatsnew/3.13.rst:1407 ../../whatsnew/3.13.rst:1722 msgid "typing" -msgstr "" +msgstr "typing" -#: ../../whatsnew/3.13.rst:1410 +#: ../../whatsnew/3.13.rst:1409 msgid "" ":pep:`705`: Add :data:`~typing.ReadOnly`, a special typing construct to mark " "a :class:`~typing.TypedDict` item as read-only for type checkers." msgstr "" -#: ../../whatsnew/3.13.rst:1413 +#: ../../whatsnew/3.13.rst:1412 msgid "" ":pep:`742`: Add :data:`~typing.TypeIs`, a typing construct that can be used " "to instruct a type checker how to narrow a type." msgstr "" -#: ../../whatsnew/3.13.rst:1416 +#: ../../whatsnew/3.13.rst:1415 msgid "" "Add :data:`~typing.NoDefault`, a sentinel object used to represent the " "defaults of some parameters in the :mod:`typing` module. (Contributed by " "Jelle Zijlstra in :gh:`116126`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1420 +#: ../../whatsnew/3.13.rst:1419 msgid "" "Add :func:`~typing.get_protocol_members` to return the set of members " "defining a :class:`typing.Protocol`. (Contributed by Jelle Zijlstra in :gh:" "`104873`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1424 +#: ../../whatsnew/3.13.rst:1423 msgid "" "Add :func:`~typing.is_protocol` to check whether a class is a :class:" "`~typing.Protocol`. (Contributed by Jelle Zijlstra in :gh:`104873`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1428 +#: ../../whatsnew/3.13.rst:1427 msgid "" ":data:`~typing.ClassVar` can now be nested in :data:`~typing.Final`, and " "vice versa. (Contributed by Mehdi Drissi in :gh:`89547`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1434 +#: ../../whatsnew/3.13.rst:1433 msgid "unicodedata" -msgstr "" +msgstr "unicodedata" -#: ../../whatsnew/3.13.rst:1436 +#: ../../whatsnew/3.13.rst:1435 msgid "" "Update the Unicode database to `version 15.1.0`__. (Contributed by James " "Gerity in :gh:`109559`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1443 +#: ../../whatsnew/3.13.rst:1442 msgid "venv" -msgstr "" +msgstr "venv" -#: ../../whatsnew/3.13.rst:1445 +#: ../../whatsnew/3.13.rst:1444 msgid "" "Add support for creating source control management (SCM) ignore files in a " "virtual environment's directory. By default, Git is supported. This is " @@ -2077,11 +2086,11 @@ msgid "" "Cannon in :gh:`108125`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1456 +#: ../../whatsnew/3.13.rst:1455 msgid "warnings" -msgstr "" +msgstr "warnings" -#: ../../whatsnew/3.13.rst:1458 +#: ../../whatsnew/3.13.rst:1457 msgid "" ":pep:`702`: The new :func:`warnings.deprecated` decorator provides a way to " "communicate deprecations to a :term:`static type checker` and to warn on " @@ -2090,69 +2099,69 @@ msgid "" "(Contributed by Jelle Zijlstra in :gh:`104003`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1467 +#: ../../whatsnew/3.13.rst:1466 msgid "xml" -msgstr "" +msgstr "xml" -#: ../../whatsnew/3.13.rst:1469 +#: ../../whatsnew/3.13.rst:1468 msgid "" "Allow controlling Expat >=2.6.0 reparse deferral (:cve:`2023-52425`) by " "adding five new methods:" msgstr "" -#: ../../whatsnew/3.13.rst:1472 +#: ../../whatsnew/3.13.rst:1471 msgid ":meth:`xml.etree.ElementTree.XMLParser.flush`" -msgstr "" +msgstr ":meth:`xml.etree.ElementTree.XMLParser.flush`" -#: ../../whatsnew/3.13.rst:1473 +#: ../../whatsnew/3.13.rst:1472 msgid ":meth:`xml.etree.ElementTree.XMLPullParser.flush`" -msgstr "" +msgstr ":meth:`xml.etree.ElementTree.XMLPullParser.flush`" -#: ../../whatsnew/3.13.rst:1474 +#: ../../whatsnew/3.13.rst:1473 msgid ":meth:`xml.parsers.expat.xmlparser.GetReparseDeferralEnabled`" -msgstr "" +msgstr ":meth:`xml.parsers.expat.xmlparser.GetReparseDeferralEnabled`" -#: ../../whatsnew/3.13.rst:1475 +#: ../../whatsnew/3.13.rst:1474 msgid ":meth:`xml.parsers.expat.xmlparser.SetReparseDeferralEnabled`" -msgstr "" +msgstr ":meth:`xml.parsers.expat.xmlparser.SetReparseDeferralEnabled`" -#: ../../whatsnew/3.13.rst:1476 +#: ../../whatsnew/3.13.rst:1475 msgid ":meth:`!xml.sax.expatreader.ExpatParser.flush`" -msgstr "" +msgstr ":meth:`!xml.sax.expatreader.ExpatParser.flush`" -#: ../../whatsnew/3.13.rst:1478 +#: ../../whatsnew/3.13.rst:1477 msgid "(Contributed by Sebastian Pipping in :gh:`115623`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1480 +#: ../../whatsnew/3.13.rst:1479 msgid "" "Add the :meth:`!close` method for the iterator returned by :func:`~xml.etree." "ElementTree.iterparse` for explicit cleanup. (Contributed by Serhiy " "Storchaka in :gh:`69893`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1486 +#: ../../whatsnew/3.13.rst:1485 msgid "zipimport" -msgstr "" +msgstr "zipimport" -#: ../../whatsnew/3.13.rst:1488 +#: ../../whatsnew/3.13.rst:1487 msgid "" "Add support for ZIP64_ format files. Everybody loves huge data, right? " "(Contributed by Tim Hatch in :gh:`94146`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1496 +#: ../../whatsnew/3.13.rst:1495 msgid "Optimizations" -msgstr "" +msgstr "最佳化" -#: ../../whatsnew/3.13.rst:1498 +#: ../../whatsnew/3.13.rst:1497 msgid "" "The new :ref:`incremental garbage collector ` " "means that maximum pause times are reduced by an order of magnitude or more " "for larger heaps. (Contributed by Mark Shannon in :gh:`108362`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1503 +#: ../../whatsnew/3.13.rst:1502 msgid "" "Several standard library modules have had their import times significantly " "improved. For example, the import time of the :mod:`typing` module has been " @@ -2163,13 +2172,13 @@ msgid "" "Turner, Daniel Hollas, and others in :gh:`109653`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1514 +#: ../../whatsnew/3.13.rst:1513 msgid "" ":func:`textwrap.indent` is now around 30% faster than before for large " "input. (Contributed by Inada Naoki in :gh:`107369`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1517 +#: ../../whatsnew/3.13.rst:1516 msgid "" "The :mod:`subprocess` module now uses the :func:`~os.posix_spawn` function " "in more situations, including when *close_fds* is ``True`` (the default) on " @@ -2179,15 +2188,15 @@ msgid "" "Kulik in :gh:`113117`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1527 +#: ../../whatsnew/3.13.rst:1526 msgid "Removed Modules And APIs" msgstr "" -#: ../../whatsnew/3.13.rst:1533 +#: ../../whatsnew/3.13.rst:1532 msgid "PEP 594: Remove \"dead batteries\" from the standard library" msgstr "" -#: ../../whatsnew/3.13.rst:1535 +#: ../../whatsnew/3.13.rst:1534 msgid "" ":pep:`594` proposed removing 19 modules from the standard library, " "colloquially referred to as 'dead batteries' due to their historic, " @@ -2195,23 +2204,23 @@ msgid "" "in Python 3.11, and are now removed:" msgstr "" -#: ../../whatsnew/3.13.rst:1541 +#: ../../whatsnew/3.13.rst:1540 msgid ":mod:`!aifc`" -msgstr "" +msgstr ":mod:`!aifc`" -#: ../../whatsnew/3.13.rst:1542 +#: ../../whatsnew/3.13.rst:1541 msgid ":mod:`!audioop`" -msgstr "" +msgstr ":mod:`!audioop`" -#: ../../whatsnew/3.13.rst:1543 +#: ../../whatsnew/3.13.rst:1542 msgid ":mod:`!chunk`" -msgstr "" +msgstr ":mod:`!chunk`" -#: ../../whatsnew/3.13.rst:1544 +#: ../../whatsnew/3.13.rst:1543 msgid ":mod:`!cgi` and :mod:`!cgitb`" -msgstr "" +msgstr ":mod:`!cgi` 和 :mod:`!cgitb`" -#: ../../whatsnew/3.13.rst:1546 +#: ../../whatsnew/3.13.rst:1545 msgid "" ":class:`!cgi.FieldStorage` can typically be replaced with :func:`urllib." "parse.parse_qsl` for ``GET`` and ``HEAD`` requests, and the :mod:`email." @@ -2219,7 +2228,7 @@ msgid "" "requests." msgstr "" -#: ../../whatsnew/3.13.rst:1551 +#: ../../whatsnew/3.13.rst:1550 msgid "" ":func:`!cgi.parse` can be replaced by calling :func:`urllib.parse.parse_qs` " "directly on the desired query string, unless the input is ``multipart/form-" @@ -2227,14 +2236,14 @@ msgid "" "parse_multipart`." msgstr "" -#: ../../whatsnew/3.13.rst:1556 +#: ../../whatsnew/3.13.rst:1555 msgid "" ":func:`!cgi.parse_header` can be replaced with the functionality in the :mod:" "`email` package, which implements the same MIME RFCs. For example, with :" "class:`email.message.EmailMessage`:" msgstr "" -#: ../../whatsnew/3.13.rst:1560 +#: ../../whatsnew/3.13.rst:1559 msgid "" "from email.message import EmailMessage\n" "\n" @@ -2243,7 +2252,7 @@ msgid "" "main, params = msg.get_content_type(), msg['content-type'].params" msgstr "" -#: ../../whatsnew/3.13.rst:1568 +#: ../../whatsnew/3.13.rst:1567 msgid "" ":func:`!cgi.parse_multipart` can be replaced with the functionality in the :" "mod:`email` package, which implements the same MIME RFCs, or with the :pypi:" @@ -2251,41 +2260,41 @@ msgid "" "and :class:`email.message.Message` classes." msgstr "" -#: ../../whatsnew/3.13.rst:1574 +#: ../../whatsnew/3.13.rst:1573 msgid "" ":mod:`!crypt` and the private :mod:`!_crypt` extension. The :mod:`hashlib` " "module may be an appropriate replacement when simply hashing a value is " "required. Otherwise, various third-party libraries on PyPI are available:" msgstr "" -#: ../../whatsnew/3.13.rst:1579 +#: ../../whatsnew/3.13.rst:1578 msgid "" ":pypi:`bcrypt`: Modern password hashing for your software and your servers." msgstr "" -#: ../../whatsnew/3.13.rst:1581 +#: ../../whatsnew/3.13.rst:1580 msgid "" ":pypi:`passlib`: Comprehensive password hashing framework supporting over 30 " "schemes." msgstr "" -#: ../../whatsnew/3.13.rst:1583 +#: ../../whatsnew/3.13.rst:1582 msgid ":pypi:`argon2-cffi`: The secure Argon2 password hashing algorithm." msgstr "" -#: ../../whatsnew/3.13.rst:1585 +#: ../../whatsnew/3.13.rst:1584 msgid "" ":pypi:`legacycrypt`: :mod:`ctypes` wrapper to the POSIX crypt library call " "and associated functionality." msgstr "" -#: ../../whatsnew/3.13.rst:1588 +#: ../../whatsnew/3.13.rst:1587 msgid "" ":pypi:`crypt_r`: Fork of the :mod:`!crypt` module, wrapper to the :manpage:" "`crypt_r(3)` library call and associated functionality." msgstr "" -#: ../../whatsnew/3.13.rst:1593 +#: ../../whatsnew/3.13.rst:1592 msgid "" ":mod:`!imghdr`: The :pypi:`filetype`, :pypi:`puremagic`, or :pypi:`python-" "magic` libraries should be used as replacements. For example, the :func:`!" @@ -2293,83 +2302,83 @@ msgid "" "function for all file formats that were supported by :mod:`!imghdr`." msgstr "" -#: ../../whatsnew/3.13.rst:1599 +#: ../../whatsnew/3.13.rst:1598 msgid ":mod:`!mailcap`: Use the :mod:`mimetypes` module instead." msgstr "" -#: ../../whatsnew/3.13.rst:1601 +#: ../../whatsnew/3.13.rst:1600 msgid ":mod:`!msilib`" -msgstr "" +msgstr ":mod:`!msilib`" -#: ../../whatsnew/3.13.rst:1602 +#: ../../whatsnew/3.13.rst:1601 msgid ":mod:`!nis`" -msgstr "" +msgstr ":mod:`!nis`" -#: ../../whatsnew/3.13.rst:1603 +#: ../../whatsnew/3.13.rst:1602 msgid ":mod:`!nntplib`: Use the :pypi:`nntplib` library from PyPI instead." msgstr "" -#: ../../whatsnew/3.13.rst:1605 +#: ../../whatsnew/3.13.rst:1604 msgid "" ":mod:`!ossaudiodev`: For audio playback, use the :pypi:`pygame` library from " "PyPI instead." msgstr "" -#: ../../whatsnew/3.13.rst:1607 +#: ../../whatsnew/3.13.rst:1606 msgid ":mod:`!pipes`: Use the :mod:`subprocess` module instead." msgstr "" -#: ../../whatsnew/3.13.rst:1609 +#: ../../whatsnew/3.13.rst:1608 msgid "" ":mod:`!sndhdr`: The :pypi:`filetype`, :pypi:`puremagic`, or :pypi:`python-" "magic` libraries should be used as replacements." msgstr "" -#: ../../whatsnew/3.13.rst:1612 +#: ../../whatsnew/3.13.rst:1611 msgid ":mod:`!spwd`: Use the :pypi:`python-pam` library from PyPI instead." msgstr "" -#: ../../whatsnew/3.13.rst:1614 +#: ../../whatsnew/3.13.rst:1613 msgid ":mod:`!sunau`" -msgstr "" +msgstr ":mod:`!sunau`" -#: ../../whatsnew/3.13.rst:1615 +#: ../../whatsnew/3.13.rst:1614 msgid "" ":mod:`!telnetlib`, Use the :pypi:`telnetlib3` or :pypi:`Exscript` libraries " "from PyPI instead." msgstr "" -#: ../../whatsnew/3.13.rst:1617 +#: ../../whatsnew/3.13.rst:1616 msgid "" ":mod:`!uu`: Use the :mod:`base64` module instead, as a modern alternative." msgstr "" -#: ../../whatsnew/3.13.rst:1619 +#: ../../whatsnew/3.13.rst:1618 msgid ":mod:`!xdrlib`" -msgstr "" +msgstr ":mod:`!xdrlib`" -#: ../../whatsnew/3.13.rst:1621 +#: ../../whatsnew/3.13.rst:1620 msgid "" "(Contributed by Victor Stinner and Zachary Ware in :gh:`104773` and :gh:" "`104780`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1625 +#: ../../whatsnew/3.13.rst:1624 msgid "2to3" -msgstr "" +msgstr "2to3" -#: ../../whatsnew/3.13.rst:1627 +#: ../../whatsnew/3.13.rst:1626 msgid "" "Remove the :program:`2to3` program and the :mod:`!lib2to3` module, " "previously deprecated in Python 3.11. (Contributed by Victor Stinner in :gh:" "`104780`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1633 +#: ../../whatsnew/3.13.rst:1632 msgid "builtins" -msgstr "" +msgstr "builtins" -#: ../../whatsnew/3.13.rst:1635 +#: ../../whatsnew/3.13.rst:1634 msgid "" "Remove support for chained :class:`classmethod` descriptors (introduced in :" "gh:`63272`). These can no longer be used to wrap other descriptors, such as :" @@ -2379,40 +2388,47 @@ msgid "" "(Contributed by Raymond Hettinger in :gh:`89519`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1648 +#: ../../whatsnew/3.13.rst:1643 +msgid "" +"Raise a :exc:`RuntimeError` when calling :meth:`frame.clear` on a suspended " +"frame (as has always been the case for an executing frame). (Contributed by " +"Irit Katriel in :gh:`79932`.)" +msgstr "" + +#: ../../whatsnew/3.13.rst:1651 msgid "" "Remove the undocumented :class:`!LegacyInterpolation` class, deprecated in " "the docstring since Python 3.2, and at runtime since Python 3.11. " "(Contributed by Hugo van Kemenade in :gh:`104886`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1655 +#: ../../whatsnew/3.13.rst:1658 msgid "importlib.metadata" -msgstr "" +msgstr "importlib.metadata" -#: ../../whatsnew/3.13.rst:1657 +#: ../../whatsnew/3.13.rst:1660 msgid "" "Remove deprecated subscript (:meth:`~object.__getitem__`) access for :ref:" "`EntryPoint ` objects. (Contributed by Jason R. Coombs in :gh:" "`113175`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1663 +#: ../../whatsnew/3.13.rst:1666 msgid "locale" -msgstr "" +msgstr "locale" -#: ../../whatsnew/3.13.rst:1665 +#: ../../whatsnew/3.13.rst:1668 msgid "" "Remove the :func:`!locale.resetlocale` function, deprecated in Python 3.11. " "Use ``locale.setlocale(locale.LC_ALL, \"\")`` instead. (Contributed by " "Victor Stinner in :gh:`104783`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1671 +#: ../../whatsnew/3.13.rst:1674 msgid "opcode" -msgstr "" +msgstr "opcode" -#: ../../whatsnew/3.13.rst:1673 +#: ../../whatsnew/3.13.rst:1676 msgid "" "Move :attr:`!opcode.ENABLE_SPECIALIZATION` to :attr:`!_opcode." "ENABLE_SPECIALIZATION`. This field was added in 3.12, it was never " @@ -2420,7 +2436,7 @@ msgid "" "Katriel in :gh:`105481`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1678 +#: ../../whatsnew/3.13.rst:1681 msgid "" "Remove :func:`!opcode.is_pseudo`, :attr:`!opcode.MIN_PSEUDO_OPCODE`, and :" "attr:`!opcode.MAX_PSEUDO_OPCODE`, which were added in Python 3.12, but were " @@ -2428,43 +2444,43 @@ msgid "" "be used externally. (Contributed by Irit Katriel in :gh:`105481`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1688 +#: ../../whatsnew/3.13.rst:1691 msgid "" "Remove the ability to use :class:`~pathlib.Path` objects as context " "managers. This functionality was deprecated and has had no effect since " "Python 3.9. (Contributed by Barney Gale in :gh:`83863`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1696 +#: ../../whatsnew/3.13.rst:1699 msgid "" "Remove the undocumented, deprecated, and broken :func:`!re.template` " "function and :attr:`!re.TEMPLATE` / :attr:`!re.T` flag. (Contributed by " "Serhiy Storchaka and Nikita Sobolev in :gh:`105687`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1702 +#: ../../whatsnew/3.13.rst:1705 msgid "tkinter.tix" -msgstr "" +msgstr "tkinter.tix" -#: ../../whatsnew/3.13.rst:1704 +#: ../../whatsnew/3.13.rst:1707 msgid "" "Remove the :mod:`!tkinter.tix` module, deprecated in Python 3.6. The third-" "party Tix library which the module wrapped is unmaintained. (Contributed by " "Zachary Ware in :gh:`75552`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1710 +#: ../../whatsnew/3.13.rst:1713 msgid "turtle" -msgstr "" +msgstr "turtle" -#: ../../whatsnew/3.13.rst:1712 +#: ../../whatsnew/3.13.rst:1715 msgid "" "Remove the :meth:`!RawTurtle.settiltangle` method, deprecated in the " "documentation since Python 3.1 and at runtime since Python 3.11. " "(Contributed by Hugo van Kemenade in :gh:`104876`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1721 +#: ../../whatsnew/3.13.rst:1724 msgid "" "Remove the :mod:`!typing.io` and :mod:`!typing.re` namespaces, deprecated " "since Python 3.8. The items in those namespaces can be imported directly " @@ -2472,66 +2488,66 @@ msgid "" "`92871`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1727 +#: ../../whatsnew/3.13.rst:1730 msgid "" "Remove the keyword-argument method of creating :class:`~typing.TypedDict` " "types, deprecated in Python 3.11. (Contributed by Tomas Roun in :gh:" "`104786`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1733 +#: ../../whatsnew/3.13.rst:1736 msgid "unittest" -msgstr "" +msgstr "unittest" -#: ../../whatsnew/3.13.rst:1735 +#: ../../whatsnew/3.13.rst:1738 msgid "" "Remove the following :mod:`unittest` functions, deprecated in Python 3.11:" msgstr "" -#: ../../whatsnew/3.13.rst:1737 +#: ../../whatsnew/3.13.rst:1740 msgid ":func:`!unittest.findTestCases`" -msgstr "" +msgstr ":func:`!unittest.findTestCases`" -#: ../../whatsnew/3.13.rst:1738 +#: ../../whatsnew/3.13.rst:1741 msgid ":func:`!unittest.makeSuite`" -msgstr "" +msgstr ":func:`!unittest.makeSuite`" -#: ../../whatsnew/3.13.rst:1739 +#: ../../whatsnew/3.13.rst:1742 msgid ":func:`!unittest.getTestCaseNames`" -msgstr "" +msgstr ":func:`!unittest.getTestCaseNames`" -#: ../../whatsnew/3.13.rst:1741 +#: ../../whatsnew/3.13.rst:1744 msgid "Use :class:`~unittest.TestLoader` methods instead:" msgstr "" -#: ../../whatsnew/3.13.rst:1743 +#: ../../whatsnew/3.13.rst:1746 msgid ":meth:`~unittest.TestLoader.loadTestsFromModule`" -msgstr "" +msgstr ":meth:`~unittest.TestLoader.loadTestsFromModule`" -#: ../../whatsnew/3.13.rst:1744 +#: ../../whatsnew/3.13.rst:1747 msgid ":meth:`~unittest.TestLoader.loadTestsFromTestCase`" -msgstr "" +msgstr ":meth:`~unittest.TestLoader.loadTestsFromTestCase`" -#: ../../whatsnew/3.13.rst:1745 +#: ../../whatsnew/3.13.rst:1748 msgid ":meth:`~unittest.TestLoader.getTestCaseNames`" -msgstr "" +msgstr ":meth:`~unittest.TestLoader.getTestCaseNames`" -#: ../../whatsnew/3.13.rst:1747 +#: ../../whatsnew/3.13.rst:1750 msgid "(Contributed by Hugo van Kemenade in :gh:`104835`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1749 +#: ../../whatsnew/3.13.rst:1752 msgid "" "Remove the untested and undocumented :meth:`!TestProgram.usageExit` method, " "deprecated in Python 3.11. (Contributed by Hugo van Kemenade in :gh:" "`104992`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1755 +#: ../../whatsnew/3.13.rst:1758 msgid "urllib" -msgstr "" +msgstr "urllib" -#: ../../whatsnew/3.13.rst:1757 +#: ../../whatsnew/3.13.rst:1760 msgid "" "Remove the *cafile*, *capath*, and *cadefault* parameters of the :func:" "`urllib.request.urlopen` function, deprecated in Python 3.6. Use the " @@ -2542,267 +2558,333 @@ msgid "" "Victor Stinner in :gh:`105382`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1768 +#: ../../whatsnew/3.13.rst:1771 msgid "webbrowser" -msgstr "" +msgstr "webbrowser" -#: ../../whatsnew/3.13.rst:1770 +#: ../../whatsnew/3.13.rst:1773 msgid "" "Remove the untested and undocumented :class:`!MacOSX` class, deprecated in " "Python 3.11. Use the :class:`!MacOSXOSAScript` class (introduced in Python " "3.2) instead. (Contributed by Hugo van Kemenade in :gh:`104804`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1775 +#: ../../whatsnew/3.13.rst:1778 msgid "" "Remove the deprecated :attr:`!MacOSXOSAScript._name` attribute. Use the :" "attr:`MacOSXOSAScript.name ` attribute instead. " "(Contributed by Nikita Sobolev in :gh:`105546`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1782 +#: ../../whatsnew/3.13.rst:1785 msgid "New Deprecations" msgstr "" -#: ../../whatsnew/3.13.rst:1784 -msgid "" -":mod:`array`: :mod:`array`'s ``'u'`` format code, deprecated in docs since " -"Python 3.3, emits :exc:`DeprecationWarning` since 3.13 and will be removed " -"in Python 3.16. Use the ``'w'`` format code instead. (Contributed by Hugo " -"van Kemenade in :gh:`80480`.)" +#: ../../whatsnew/3.13.rst:1787 +msgid ":ref:`User-defined functions `:" msgstr "" -#: ../../whatsnew/3.13.rst:1790 +#: ../../whatsnew/3.13.rst:1789 msgid "" -":mod:`ctypes`: Deprecate undocumented :func:`!ctypes.SetPointerType` " -"function. :term:`Soft-deprecate ` the :func:`ctypes.ARRAY` " -"function in favor of multiplication. (Contributed by Victor Stinner in :gh:" -"`105733`.)" +"Deprecate assignment to a function's :attr:`~function.__code__` attribute, " +"where the new code object's type does not match the function's type. The " +"different types are: plain function, generator, async generator, and " +"coroutine. (Contributed by Irit Katriel in :gh:`81137`.)" msgstr "" #: ../../whatsnew/3.13.rst:1795 -msgid "" -":mod:`decimal`: Deprecate non-standard format specifier \"N\" for :class:" -"`decimal.Decimal`. It was not documented and only supported in the C " -"implementation. (Contributed by Serhiy Storchaka in :gh:`89902`.)" -msgstr "" +#: ../../deprecations/pending-removal-in-3.16.rst:13 +msgid ":mod:`array`:" +msgstr ":mod:`array`:" -#: ../../whatsnew/3.13.rst:1800 +#: ../../whatsnew/3.13.rst:1797 msgid "" -":mod:`dis`: The ``dis.HAVE_ARGUMENT`` separator is deprecated. Check " -"membership in :data:`~dis.hasarg` instead. (Contributed by Irit Katriel in :" -"gh:`109319`.)" +"Deprecate the ``'u'`` format code (:c:type:`wchar_t`) at runtime. This " +"format code has been deprecated in documentation since Python 3.3, and will " +"be removed in Python 3.16. Use the ``'w'`` format code (:c:type:`Py_UCS4`) " +"for Unicode characters instead. (Contributed by Hugo van Kemenade in :gh:" +"`80480`.)" msgstr "" #: ../../whatsnew/3.13.rst:1804 +#: ../../deprecations/pending-removal-in-3.15.rst:4 +msgid ":mod:`ctypes`:" +msgstr ":mod:`ctypes`:" + +#: ../../whatsnew/3.13.rst:1806 msgid "" -":ref:`frame-objects`: Calling :meth:`frame.clear` on a suspended frame " -"raises :exc:`RuntimeError` (as has always been the case for an executing " -"frame). (Contributed by Irit Katriel in :gh:`79932`.)" +"Deprecate the undocumented :func:`!SetPointerType` function, to be removed " +"in Python 3.15. (Contributed by Victor Stinner in :gh:`105733`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1809 +#: ../../whatsnew/3.13.rst:1810 msgid "" -":mod:`getopt` and :mod:`optparse` modules: They are now :term:`soft " -"deprecated`: the :mod:`argparse` module should be used for new projects. " -"Previously, the :mod:`optparse` module was already deprecated, its removal " -"was not scheduled, and no warnings was emitted: so there is no change in " -"practice. (Contributed by Victor Stinner in :gh:`106535`.)" +":term:`Soft-deprecate ` the :func:`~ctypes.ARRAY` function " +"in favour of ``type * length`` multiplication. (Contributed by Victor " +"Stinner in :gh:`105733`.)" msgstr "" +#: ../../whatsnew/3.13.rst:1814 +msgid ":mod:`decimal`:" +msgstr ":mod:`decimal`:" + #: ../../whatsnew/3.13.rst:1816 msgid "" -":mod:`gettext`: Emit deprecation warning for non-integer numbers in :mod:" -"`gettext` functions and methods that consider plural forms even if the " -"translation was not found. (Contributed by Serhiy Storchaka in :gh:`88434`.)" +"Deprecate the non-standard and undocumented :class:`~decimal.Decimal` format " +"specifier ``'N'``, which is only supported in the :mod:`!decimal` module's C " +"implementation. (Contributed by Serhiy Storchaka in :gh:`89902`.)" msgstr "" #: ../../whatsnew/3.13.rst:1821 +msgid ":mod:`dis`:" +msgstr ":mod:`dis`:" + +#: ../../whatsnew/3.13.rst:1823 msgid "" -":mod:`glob`: The undocumented :func:`!glob.glob0` and :func:`!glob.glob1` " -"functions are deprecated. Use :func:`glob.glob` and pass a directory to its " -"*root_dir* argument instead. (Contributed by Barney Gale in :gh:`117337`.)" +"Deprecate the :attr:`!HAVE_ARGUMENT` separator. Check membership in :data:" +"`~dis.hasarg` instead. (Contributed by Irit Katriel in :gh:`109319`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1826 +#: ../../whatsnew/3.13.rst:1827 +msgid ":mod:`getopt` and :mod:`optparse`:" +msgstr ":mod:`getopt` 和 :mod:`optparse`:" + +#: ../../whatsnew/3.13.rst:1829 msgid "" -":mod:`http.server`: :class:`http.server.CGIHTTPRequestHandler` now emits a :" -"exc:`DeprecationWarning` as it will be removed in 3.15. Process-based CGI " -"HTTP servers have been out of favor for a very long time. This code was " -"outdated, unmaintained, and rarely used. It has a high potential for both " -"security and functionality bugs. This includes removal of the ``--cgi`` " -"flag to the ``python -m http.server`` command line in 3.15." +"Both modules are now :term:`soft deprecated`, with :mod:`argparse` preferred " +"for new projects. This is a new soft-deprecation for the :mod:`!getopt` " +"module, whereas the :mod:`!optparse` module was already *de facto* soft " +"deprecated. (Contributed by Victor Stinner in :gh:`106535`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1833 -msgid "" -":mod:`mimetypes`: Passing file path instead of URL in :func:`~mimetypes." -"guess_type` is :term:`soft deprecated`. Use :func:`~mimetypes." -"guess_file_type` instead. (Contributed by Serhiy Storchaka in :gh:`66543`.)" -msgstr "" +#: ../../whatsnew/3.13.rst:1835 +msgid ":mod:`gettext`:" +msgstr ":mod:`gettext`:" #: ../../whatsnew/3.13.rst:1837 msgid "" -":mod:`re`: Passing optional arguments *maxsplit*, *count* and *flags* in " -"module-level functions :func:`re.split`, :func:`re.sub` and :func:`re.subn` " -"as positional arguments is now deprecated. In future Python versions these " -"parameters will be :ref:`keyword-only `. " -"(Contributed by Serhiy Storchaka in :gh:`56166`.)" +"Deprecate non-integer numbers as arguments to functions and methods that " +"consider plural forms in the :mod:`!gettext` module, even if no translation " +"was found. (Contributed by Serhiy Storchaka in :gh:`88434`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1843 -#: ../../deprecations/pending-removal-in-3.15.rst:16 +#: ../../whatsnew/3.13.rst:1842 +msgid ":mod:`glob`:" +msgstr ":mod:`glob`:" + +#: ../../whatsnew/3.13.rst:1844 msgid "" -":mod:`pathlib`: :meth:`pathlib.PurePath.is_reserved` is deprecated and " -"scheduled for removal in Python 3.15. Use :func:`os.path.isreserved` to " -"detect reserved paths on Windows." +"Deprecate the undocumented :func:`!glob0` and :func:`!glob1` functions. Use :" +"func:`~glob.glob` and pass a :term:`path-like object` specifying the root " +"directory to the *root_dir* parameter instead. (Contributed by Barney Gale " +"in :gh:`117337`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1848 -#: ../../deprecations/pending-removal-in-3.15.rst:21 +#: ../../whatsnew/3.13.rst:1849 +#: ../../deprecations/pending-removal-in-3.15.rst:9 +msgid ":mod:`http.server`:" +msgstr ":mod:`http.server`:" + +#: ../../whatsnew/3.13.rst:1851 msgid "" -":mod:`platform`: :func:`~platform.java_ver` is deprecated and will be " -"removed in 3.15. It was largely untested, had a confusing API, and was only " -"useful for Jython support. (Contributed by Nikita Sobolev in :gh:`116349`.)" +"Deprecate :class:`~http.server.CGIHTTPRequestHandler`, to be removed in " +"Python 3.15. Process-based CGI HTTP servers have been out of favor for a " +"very long time. This code was outdated, unmaintained, and rarely used. It " +"has a high potential for both security and functionality bugs. (Contributed " +"by Gregory P. Smith in :gh:`109096`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1854 +#: ../../whatsnew/3.13.rst:1858 msgid "" -":mod:`pydoc`: Deprecate undocumented :func:`!pydoc.ispackage` function. " -"(Contributed by Zackery Spytz in :gh:`64020`.)" +"Deprecate the :option:`!--cgi` flag to the :program:`python -m http.server` " +"command-line interface, to be removed in Python 3.15. (Contributed by " +"Gregory P. Smith in :gh:`109096`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1857 +#: ../../whatsnew/3.13.rst:1863 +msgid ":mod:`mimetypes`:" +msgstr ":mod:`mimetypes`:" + +#: ../../whatsnew/3.13.rst:1865 msgid "" -":mod:`sqlite3`: Passing more than one positional argument to :func:`sqlite3." -"connect` and the :class:`sqlite3.Connection` constructor is deprecated. The " -"remaining parameters will become keyword-only in Python 3.15." +":term:`Soft-deprecate ` file path arguments to :func:" +"`~mimetypes.guess_type`, use :func:`~mimetypes.guess_file_type` instead. " +"(Contributed by Serhiy Storchaka in :gh:`66543`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1861 +#: ../../whatsnew/3.13.rst:1870 +#, fuzzy +msgid ":mod:`re`:" +msgstr ":mod:`re`。" + +#: ../../whatsnew/3.13.rst:1872 msgid "" -"Deprecate passing name, number of arguments, and the callable as keyword " -"arguments for the following :class:`sqlite3.Connection` APIs:" +"Deprecate passing the optional *maxsplit*, *count*, or *flags* arguments as " +"positional arguments to the module-level :func:`~re.split`, :func:`~re.sub`, " +"and :func:`~re.subn` functions. These parameters will become :ref:`keyword-" +"only ` in a future version of Python. (Contributed " +"by Serhiy Storchaka in :gh:`56166`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1864 -msgid ":meth:`~sqlite3.Connection.create_function`" -msgstr "" +#: ../../whatsnew/3.13.rst:1879 +#: ../../deprecations/pending-removal-in-3.15.rst:30 +msgid ":mod:`pathlib`:" +msgstr ":mod:`pathlib`:" -#: ../../whatsnew/3.13.rst:1865 -msgid ":meth:`~sqlite3.Connection.create_aggregate`" +#: ../../whatsnew/3.13.rst:1881 +msgid "" +"Deprecate :meth:`.PurePath.is_reserved`, to be removed in Python 3.15. Use :" +"func:`os.path.isreserved` to detect reserved paths on Windows. (Contributed " +"by Barney Gale in :gh:`88569`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1867 +#: ../../whatsnew/3.13.rst:1886 +#: ../../deprecations/pending-removal-in-3.15.rst:36 +msgid ":mod:`platform`:" +msgstr ":mod:`platform`:" + +#: ../../whatsnew/3.13.rst:1888 msgid "" -"Deprecate passing the callback callable by keyword for the following :class:" -"`sqlite3.Connection` APIs:" +"Deprecate :func:`~platform.java_ver`, to be removed in Python 3.15. This " +"function is only useful for Jython support, has a confusing API, and is " +"largely untested. (Contributed by Nikita Sobolev in :gh:`116349`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1870 -msgid ":meth:`~sqlite3.Connection.set_authorizer`" -msgstr "" +#: ../../whatsnew/3.13.rst:1894 +msgid ":mod:`pydoc`:" +msgstr ":mod:`pydoc`:" -#: ../../whatsnew/3.13.rst:1871 -msgid ":meth:`~sqlite3.Connection.set_progress_handler`" +#: ../../whatsnew/3.13.rst:1896 +msgid "" +"Deprecate the undocumented :func:`!ispackage` function. (Contributed by " +"Zackery Spytz in :gh:`64020`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1872 -msgid ":meth:`~sqlite3.Connection.set_trace_callback`" +#: ../../whatsnew/3.13.rst:1899 +#: ../../deprecations/pending-removal-in-3.14.rst:94 +msgid ":mod:`sqlite3`:" +msgstr ":mod:`sqlite3`:" + +#: ../../whatsnew/3.13.rst:1901 +msgid "" +"Deprecate passing more than one positional argument to the :func:`~sqlite3." +"connect` function and the :class:`~sqlite3.Connection` constructor. The " +"remaining parameters will become keyword-only in Python 3.15. (Contributed " +"by Erlend E. Aasland in :gh:`107948`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1874 -msgid "The affected parameters will become positional-only in Python 3.15." +#: ../../whatsnew/3.13.rst:1907 +msgid "" +"Deprecate passing name, number of arguments, and the callable as keyword " +"arguments for :meth:`.Connection.create_function` and :meth:`.Connection." +"create_aggregate` These parameters will become positional-only in Python " +"3.15. (Contributed by Erlend E. Aasland in :gh:`108278`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1876 -msgid "(Contributed by Erlend E. Aasland in :gh:`107948` and :gh:`108278`.)" +#: ../../whatsnew/3.13.rst:1913 +msgid "" +"Deprecate passing the callback callable by keyword for the :meth:`~sqlite3." +"Connection.set_authorizer`, :meth:`~sqlite3.Connection." +"set_progress_handler`, and :meth:`~sqlite3.Connection.set_trace_callback` :" +"class:`~sqlite3.Connection` methods. The callback callables will become " +"positional-only in Python 3.15. (Contributed by Erlend E. Aasland in :gh:" +"`108278`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1878 +#: ../../whatsnew/3.13.rst:1921 +#: ../../deprecations/pending-removal-in-3.16.rst:33 +msgid ":mod:`sys`:" +msgstr ":mod:`sys`:" + +#: ../../whatsnew/3.13.rst:1923 msgid "" -":mod:`sys`: The :func:`sys._enablelegacywindowsfsencoding` function is " -"deprecated. Replace it with the :envvar:`PYTHONLEGACYWINDOWSFSENCODING` " -"environment variable. (Contributed by Inada Naoki in :gh:`73427`.)" +"Deprecate the :func:`~sys._enablelegacywindowsfsencoding` function, to be " +"removed in Python 3.16. Use the :envvar:`PYTHONLEGACYWINDOWSFSENCODING` " +"environment variable instead. (Contributed by Inada Naoki in :gh:`73427`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1882 +#: ../../whatsnew/3.13.rst:1928 +#: ../../deprecations/pending-removal-in-3.16.rst:39 +msgid ":mod:`tarfile`:" +msgstr ":mod:`tarfile`:" + +#: ../../whatsnew/3.13.rst:1930 msgid "" -":mod:`tarfile`: The undocumented and unused ``tarfile`` attribute of :class:" -"`tarfile.TarFile` is deprecated and scheduled for removal in Python 3.16." +"Deprecate the undocumented and unused :attr:`!TarFile.tarfile` attribute, to " +"be removed in Python 3.16. (Contributed in :gh:`115256`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1886 +#: ../../whatsnew/3.13.rst:1934 +#, fuzzy +msgid ":mod:`traceback`:" +msgstr ":mod:`traceback`。" + +#: ../../whatsnew/3.13.rst:1936 msgid "" -":mod:`traceback`: The field *exc_type* of :class:`traceback." -"TracebackException` is deprecated. Use *exc_type_str* instead." +"Deprecate the :attr:`.TracebackException.exc_type` attribute. Use :attr:`." +"TracebackException.exc_type_str` instead. (Contributed by Irit Katriel in :" +"gh:`112332`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1889 +#: ../../whatsnew/3.13.rst:1940 +#: ../../deprecations/pending-removal-in-3.15.rst:50 msgid ":mod:`typing`:" -msgstr "" +msgstr ":mod:`typing`:" -#: ../../whatsnew/3.13.rst:1891 +#: ../../whatsnew/3.13.rst:1942 msgid "" -"Creating a :class:`typing.NamedTuple` class using keyword arguments to " -"denote the fields (``NT = NamedTuple(\"NT\", x=int, y=int)``) is deprecated, " -"and will be disallowed in Python 3.15. Use the class-based syntax or the " +"Deprecate the undocumented keyword argument syntax for creating :class:" +"`~typing.NamedTuple` classes (e.g. ``Point = NamedTuple(\"Point\", x=int, " +"y=int)``), to be removed in Python 3.15. Use the class-based syntax or the " "functional syntax instead. (Contributed by Alex Waygood in :gh:`105566`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1896 +#: ../../whatsnew/3.13.rst:1949 msgid "" -"When using the functional syntax to create a :class:`typing.NamedTuple` " -"class or a :class:`typing.TypedDict` class, failing to pass a value to the " -"'fields' parameter (``NT = NamedTuple(\"NT\")`` or ``TD = " -"TypedDict(\"TD\")``) is deprecated. Passing ``None`` to the 'fields' " -"parameter (``NT = NamedTuple(\"NT\", None)`` or ``TD = TypedDict(\"TD\", " -"None)``) is also deprecated. Both will be disallowed in Python 3.15. To " -"create a NamedTuple class with zero fields, use ``class NT(NamedTuple): " -"pass`` or ``NT = NamedTuple(\"NT\", [])``. To create a TypedDict class with " -"zero fields, use ``class TD(TypedDict): pass`` or ``TD = TypedDict(\"TD\", " -"{})``. (Contributed by Alex Waygood in :gh:`105566` and :gh:`105570`.)" +"Deprecate omitting the *fields* parameter when creating a :class:`~typing." +"NamedTuple` or :class:`typing.TypedDict` class, and deprecate passing " +"``None`` to the *fields* parameter of both types. Python 3.15 will require a " +"valid sequence for the *fields* parameter. To create a NamedTuple class with " +"zero fields, use ``class NT(NamedTuple): pass`` or ``NT = NamedTuple(\"NT\", " +"())``. To create a TypedDict class with zero fields, use ``class " +"TD(TypedDict): pass`` or ``TD = TypedDict(\"TD\", {})``. (Contributed by " +"Alex Waygood in :gh:`105566` and :gh:`105570`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1907 +#: ../../whatsnew/3.13.rst:1959 msgid "" -":func:`typing.no_type_check_decorator` is deprecated, and scheduled for " -"removal in Python 3.15. After eight years in the :mod:`typing` module, it " -"has yet to be supported by any major type checkers. (Contributed by Alex " +"Deprecate the :func:`typing.no_type_check_decorator` decorator function, to " +"be removed in in Python 3.15. After eight years in the :mod:`typing` module, " +"it has yet to be supported by any major type checker. (Contributed by Alex " "Waygood in :gh:`106309`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1912 +#: ../../whatsnew/3.13.rst:1965 msgid "" -":data:`typing.AnyStr` is deprecated. In Python 3.16, it will be removed from " -"``typing.__all__``, and a :exc:`DeprecationWarning` will be emitted when it " -"is imported or accessed. It will be removed entirely in Python 3.18. Use the " -"new :ref:`type parameter syntax ` instead. (Contributed by " -"Michael The in :gh:`107116`.)" +"Deprecate :data:`typing.AnyStr`. In Python 3.16, it will be removed from " +"``typing.__all__``, and a :exc:`DeprecationWarning` will be emitted at " +"runtime when it is imported or accessed. It will be removed entirely in " +"Python 3.18. Use the new :ref:`type parameter syntax ` instead. " +"(Contributed by Michael The in :gh:`107116`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1918 -msgid "" -":ref:`user-defined-funcs`: Assignment to a function's :attr:`~function." -"__code__` attribute where the new code object's type does not match the " -"function's type is deprecated. The different types are: plain function, " -"generator, async generator and coroutine. (Contributed by Irit Katriel in :" -"gh:`81137`.)" -msgstr "" +#: ../../whatsnew/3.13.rst:1973 +#: ../../deprecations/pending-removal-in-3.15.rst:63 +msgid ":mod:`wave`:" +msgstr ":mod:`wave`:" -#: ../../whatsnew/3.13.rst:1925 -#: ../../deprecations/pending-removal-in-3.15.rst:54 +#: ../../whatsnew/3.13.rst:1975 msgid "" -":mod:`wave`: Deprecate the ``getmark()``, ``setmark()`` and ``getmarkers()`` " -"methods of the :class:`wave.Wave_read` and :class:`wave.Wave_write` classes. " -"They will be removed in Python 3.15. (Contributed by Victor Stinner in :gh:" -"`105096`.)" +"Deprecate the :meth:`~wave.Wave_read.getmark`, :meth:`!setmark`, and :meth:" +"`~wave.Wave_read.getmarkers` methods of the :class:`~wave.Wave_read` and :" +"class:`~wave.Wave_write` classes, to be removed in Python 3.15. (Contributed " +"by Victor Stinner in :gh:`105096`.)" msgstr "" #: ../../deprecations/c-api-pending-removal-in-3.14.rst:2 #: ../../deprecations/pending-removal-in-3.14.rst:2 msgid "Pending Removal in Python 3.14" -msgstr "" +msgstr "Python 3.14 中待移除的項目" #: ../../deprecations/pending-removal-in-3.14.rst:4 msgid "" @@ -2810,6 +2892,9 @@ msgid "" "argparse.BooleanOptionalAction` are deprecated and will be removed in 3.14. " "(Contributed by Nikita Sobolev in :gh:`92248`.)" msgstr "" +":mod:`argparse`::class:`!argparse.BooleanOptionalAction` 的 *type*、" +"*choices* 和 *metavar* 參數已被棄用,將在 3.14 中移除。 (由 Nikita Sobolev " +"於 :gh:`92248` 貢獻。)" #: ../../deprecations/pending-removal-in-3.14.rst:9 msgid "" @@ -2817,36 +2902,39 @@ msgid "" "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 "" +":mod:`ast`:自 Python 3.8 起,下列功能已在文件中被棄用,現在在存取或使用時會" +"於 runtime 發出 :exc:`DeprecationWarning`,並將在 Python 3.14 中移除:" #: ../../deprecations/pending-removal-in-3.14.rst:13 msgid ":class:`!ast.Num`" -msgstr "" +msgstr ":class:`!ast.Num`" #: ../../deprecations/pending-removal-in-3.14.rst:14 msgid ":class:`!ast.Str`" -msgstr "" +msgstr ":class:`!ast.Str`" #: ../../deprecations/pending-removal-in-3.14.rst:15 msgid ":class:`!ast.Bytes`" -msgstr "" +msgstr ":class:`!ast.Bytes`" #: ../../deprecations/pending-removal-in-3.14.rst:16 msgid ":class:`!ast.NameConstant`" -msgstr "" +msgstr ":class:`!ast.NameConstant`" #: ../../deprecations/pending-removal-in-3.14.rst:17 msgid ":class:`!ast.Ellipsis`" -msgstr "" +msgstr ":class:`!ast.Ellipsis`" #: ../../deprecations/pending-removal-in-3.14.rst:19 msgid "" "Use :class:`ast.Constant` instead. (Contributed by Serhiy Storchaka in :gh:" "`90953`.)" msgstr "" +"請改用 :class:`ast.Constant`。(由 Serhiy Storchaka 於 :gh:`90953` 貢獻。)" #: ../../deprecations/pending-removal-in-3.14.rst:22 msgid ":mod:`asyncio`:" -msgstr "" +msgstr ":mod:`asyncio`:" #: ../../deprecations/pending-removal-in-3.14.rst:24 msgid "" @@ -2855,6 +2943,10 @@ msgid "" "class:`~asyncio.SafeChildWatcher` are deprecated and will be removed in " "Python 3.14. (Contributed by Kumar Aditya in :gh:`94597`.)" msgstr "" +"已棄用並將在 Python 3.14 中移除的 child watcher 類別::class:`~asyncio." +"MultiLoopChildWatcher`、:class:`~asyncio.FastChildWatcher`、:class:`~asyncio." +"AbstractChildWatcher` 和 :class:`~asyncio.SafeChildWatcher`。 (由 Kumar " +"Aditya 於 :gh:`94597` 貢獻。)" #: ../../deprecations/pending-removal-in-3.14.rst:30 msgid "" @@ -2863,6 +2955,10 @@ msgid "" "AbstractEventLoopPolicy.get_child_watcher` are deprecated and will be " "removed in Python 3.14. (Contributed by Kumar Aditya in :gh:`94597`.)" msgstr "" +":func:`asyncio.set_child_watcher`、:func:`asyncio.get_child_watcher`、:meth:" +"`asyncio.AbstractEventLoopPolicy.set_child_watcher` 和 :meth:`asyncio." +"AbstractEventLoopPolicy.get_child_watcher` 已被棄用並將在 Python 3.14 中移" +"除。(由 Kumar Aditya 於 :gh:`94597` 貢獻。)" #: ../../deprecations/pending-removal-in-3.14.rst:36 msgid "" @@ -2871,6 +2967,9 @@ msgid "" "and it decides to create one. (Contributed by Serhiy Storchaka and Guido van " "Rossum in :gh:`100160`.)" msgstr "" +"預設事件迴圈策略的 :meth:`~asyncio.get_event_loop` 方法現在會在沒有設定目前事" +"件迴圈且決定建立一個時發出 :exc:`DeprecationWarning`。 (由 Serhiy Storchaka " +"和 Guido van Rossum 於 :gh:`100160` 貢獻。)" #: ../../deprecations/pending-removal-in-3.14.rst:41 msgid "" @@ -2879,50 +2978,58 @@ msgid "" "typing, prefer a union, like ``bytes | bytearray``, or :class:`collections." "abc.Buffer`. (Contributed by Shantanu Jain in :gh:`91896`.)" msgstr "" +":mod:`collections.abc`:已棄用 :class:`~collections.abc.ByteString`。請改用 :" +"class:`!Sequence` 或 :class:`~collections.abc.Buffer`。在 typing 中使用時,請" +"改用聯集,如 ``bytes | bytearray``,或 :class:`collections.abc.Buffer`。(由 " +"Shantanu Jain 於 :gh:`91896` 貢獻。)" #: ../../deprecations/pending-removal-in-3.14.rst:47 msgid "" ":mod:`email`: Deprecated the *isdst* parameter in :func:`email.utils." "localtime`. (Contributed by Alan Williams in :gh:`72346`.)" msgstr "" +":mod:`email`:已棄用 :func:`email.utils.localtime` 中的 *isdst* 參數。(由 " +"Alan Williams 於 :gh:`72346` 貢獻。)" #: ../../deprecations/pending-removal-in-3.14.rst:50 msgid "" ":mod:`importlib`: ``__package__`` and ``__cached__`` will cease to be set or " "taken into consideration by the import system (:gh:`97879`)." msgstr "" +":mod:`importlib`:``__package__`` 和 ``__cached__`` 將不再被設定或被 import " +"系統考慮。 (:gh:`97879`)" #: ../../deprecations/pending-removal-in-3.14.rst:53 msgid ":mod:`importlib.abc` deprecated classes:" -msgstr "" +msgstr ":mod:`importlib.abc` 的已棄用類別:" #: ../../deprecations/pending-removal-in-3.14.rst:55 msgid ":class:`!importlib.abc.ResourceReader`" -msgstr "" +msgstr ":class:`!importlib.abc.ResourceReader`" #: ../../deprecations/pending-removal-in-3.14.rst:56 msgid ":class:`!importlib.abc.Traversable`" -msgstr "" +msgstr ":class:`!importlib.abc.Traversable`" #: ../../deprecations/pending-removal-in-3.14.rst:57 msgid ":class:`!importlib.abc.TraversableResources`" -msgstr "" +msgstr ":class:`!importlib.abc.TraversableResources`" #: ../../deprecations/pending-removal-in-3.14.rst:59 msgid "Use :mod:`importlib.resources.abc` classes instead:" -msgstr "" +msgstr "請改用 :mod:`importlib.resources.abc` 類別:" #: ../../deprecations/pending-removal-in-3.14.rst:61 msgid ":class:`importlib.resources.abc.Traversable`" -msgstr "" +msgstr ":class:`importlib.resources.abc.Traversable`" #: ../../deprecations/pending-removal-in-3.14.rst:62 msgid ":class:`importlib.resources.abc.TraversableResources`" -msgstr "" +msgstr ":class:`importlib.resources.abc.TraversableResources`" #: ../../deprecations/pending-removal-in-3.14.rst:64 msgid "(Contributed by Jason R. Coombs and Hugo van Kemenade in :gh:`93963`.)" -msgstr "" +msgstr "(由 Jason R. Coombs 和 Hugo van Kemenade 貢獻於 :gh:`93963`。)" #: ../../deprecations/pending-removal-in-3.14.rst:66 msgid "" @@ -2931,6 +3038,9 @@ msgid "" "removed in 3.14 for a significant reduction in code volume and maintenance " "burden. (Contributed by Raymond Hettinger in :gh:`101588`.)" msgstr "" +":mod:`itertools` 有不以文件記錄、效率低下、過去常有 bug 且不一致的 copy、" +"deepcopy 和 pickle 操作支援。將在 3.14 中移除以大幅減少程式碼量和維護負擔。 " +"(由 Raymond Hettinger 於 :gh:`101588` 貢獻。)" #: ../../deprecations/pending-removal-in-3.14.rst:72 msgid "" @@ -2942,12 +3052,20 @@ msgid "" "set_start_method` APIs to explicitly specify when your code *requires* " "``'fork'``. See :ref:`multiprocessing-start-methods`." msgstr "" +":mod:`multiprocessing`:預設的啟動方法將在 Linux、BSD 和其他非 macOS POSIX 平" +"台上更改為更安全的 方法,目前 ``'fork'`` 是預設值 (:gh:`84559`)。對此增加一" +"個 runtime 警告被認為太過擾人,因為 大多數程式碼不會在意。請使用 :func:" +"`~multiprocessing.get_context` 或 :func:`~multiprocessing.set_start_method` " +"API 來明確指定你的程式碼何時\\ *需要* ``'fork'``。請參閱 :ref:" +"`multiprocessing-start-methods`。" #: ../../deprecations/pending-removal-in-3.14.rst:80 msgid "" ":mod:`pathlib`: :meth:`~pathlib.PurePath.is_relative_to` and :meth:`~pathlib." "PurePath.relative_to`: passing additional arguments is deprecated." msgstr "" +":mod:`pathlib`:已棄用 :meth:`~pathlib.PurePath.is_relative_to` 和 :meth:" +"`~pathlib.PurePath.relative_to`:額外引數的傳遞已被棄用。" #: ../../deprecations/pending-removal-in-3.14.rst:84 msgid "" @@ -2955,26 +3073,25 @@ msgid "" "now raise :exc:`DeprecationWarning`; use :func:`importlib.util.find_spec` " "instead. (Contributed by Nikita Sobolev in :gh:`97850`.)" msgstr "" +":mod:`pkgutil`::func:`~pkgutil.find_loader` 和 :func:`~pkgutil.get_loader` " +"現在會引發 :exc:`DeprecationWarning`;請改用 :func:`importlib.util." +"find_spec`。 (由 Nikita Sobolev 於 :gh:`97850` 貢獻。)" #: ../../deprecations/pending-removal-in-3.14.rst:89 msgid ":mod:`pty`:" -msgstr "" +msgstr ":mod:`pty`:" #: ../../deprecations/pending-removal-in-3.14.rst:91 msgid "``master_open()``: use :func:`pty.openpty`." -msgstr "" +msgstr "``master_open()``:請用 :func:`pty.openpty`。" #: ../../deprecations/pending-removal-in-3.14.rst:92 msgid "``slave_open()``: use :func:`pty.openpty`." -msgstr "" - -#: ../../deprecations/pending-removal-in-3.14.rst:94 -msgid ":mod:`sqlite3`:" -msgstr "" +msgstr "``slave_open()``:請用 :func:`pty.openpty`。" #: ../../deprecations/pending-removal-in-3.14.rst:96 msgid ":data:`~sqlite3.version` and :data:`~sqlite3.version_info`." -msgstr "" +msgstr ":data:`~sqlite3.version` 和 :data:`~sqlite3.version_info`。" #: ../../deprecations/pending-removal-in-3.14.rst:98 msgid "" @@ -2982,12 +3099,17 @@ msgid "" "ref:`named placeholders ` are used and *parameters* is " "a sequence instead of a :class:`dict`." msgstr "" +":meth:`~sqlite3.Cursor.execute` 和 :meth:`~sqlite3.Cursor.executemany`,如果" +"使用 :ref:`named placeholders ` 且 *parameters* 是序列" +"而不是 :class:`dict`。" #: ../../deprecations/pending-removal-in-3.14.rst:102 msgid "" "date and datetime adapter, date and timestamp converter: see the :mod:" "`sqlite3` documentation for suggested replacement recipes." msgstr "" +"date 和 datetime 的適配器 (adapter)、date 和 timestamp 轉換器 (converter):請" +"參閱 :mod:`sqlite3` 文件以獲得建議的替代方案。" #: ../../deprecations/pending-removal-in-3.14.rst:105 msgid "" @@ -2996,12 +3118,18 @@ msgid "" "but it only got a proper :exc:`DeprecationWarning` in 3.12. May be removed " "in 3.14. (Contributed by Nikita Sobolev in :gh:`101866`.)" msgstr "" +":class:`types.CodeType`:自 3.10 起,存取 :attr:`~codeobject.co_lnotab` 已" +"在 :pep:`626` 中被棄用,並計劃在 3.12 中移除,但只在 3.12 中於適當時發出 :" +"exc:`DeprecationWarning`。可能在 3.14 中移除。(由 Nikita Sobolev 於 :gh:" +"`101866` 貢獻。)" #: ../../deprecations/pending-removal-in-3.14.rst:112 msgid "" ":mod:`typing`: :class:`~typing.ByteString`, deprecated since Python 3.9, now " "causes a :exc:`DeprecationWarning` to be emitted when it is used." msgstr "" +":mod:`typing`:自 Python 3.9 起已被棄用的 :class:`~typing.ByteString` 現在在" +"使用時會發出 :exc:`DeprecationWarning`。" #: ../../deprecations/pending-removal-in-3.14.rst:115 msgid "" @@ -3009,119 +3137,217 @@ msgid "" "intended to be a public API. (Contributed by Gregory P. Smith in :gh:" "`88168`.)" msgstr "" +":mod:`urllib`::class:`!urllib.parse.Quoter` 已被棄用:它並非預期的公開 API。" +"(由 Gregory P. Smith 於 :gh:`88168` 貢獻。)" #: ../../deprecations/c-api-pending-removal-in-3.15.rst:2 #: ../../deprecations/pending-removal-in-3.15.rst:2 msgid "Pending Removal in Python 3.15" +msgstr "Python 3.15 中待移除的項目" + +#: ../../deprecations/pending-removal-in-3.15.rst:6 +msgid "" +"The undocumented :func:`!ctypes.SetPointerType` function has been deprecated " +"since Python 3.13." msgstr "" +"自 Python 3.13 起,未記錄的 :func:`!ctypes.SetPointerType` 函式已被棄用。" -#: ../../deprecations/pending-removal-in-3.15.rst:4 +#: ../../deprecations/pending-removal-in-3.15.rst:11 msgid "" -":class:`http.server.CGIHTTPRequestHandler` will be removed along with its " -"related ``--cgi`` flag to ``python -m http.server``. It was obsolete and " -"rarely used. No direct replacement exists. *Anything* is better than CGI " -"to interface a web server with a request handler." +"The obsolete and rarely used :class:`~http.server.CGIHTTPRequestHandler` has " +"been deprecated since Python 3.13. No direct replacement exists. *Anything* " +"is better than CGI to interface a web server with a request handler." msgstr "" +"過時且很少使用的 :class:`~http.server.CGIHTTPRequestHandler` 自 Python 3.13 " +"起已被棄用。不存在直接的替代。*任何東西*\\ 都比 CGI 更好地將 Web 伺服器與請求" +"處理程序介接起來。" -#: ../../deprecations/pending-removal-in-3.15.rst:9 +#: ../../deprecations/pending-removal-in-3.15.rst:17 msgid "" -":class:`locale`: :func:`locale.getdefaultlocale` was deprecated in Python " -"3.11 and originally planned for removal in Python 3.13 (:gh:`90817`), but " -"removal has been postponed to Python 3.15. Use :func:`locale.setlocale`, :" -"func:`locale.getencoding` and :func:`locale.getlocale` instead. (Contributed " -"by Hugo van Kemenade in :gh:`111187`.)" +"The :option:`!--cgi` flag to the :program:`python -m http.server` command-" +"line interface has been deprecated since Python 3.13." msgstr "" +"自 Python 3.13 起,:program:`python -m http.server` 命令列介面的 :option:`!--" +"cgi` 旗標已被棄用。" -#: ../../deprecations/pending-removal-in-3.15.rst:27 +#: ../../deprecations/pending-removal-in-3.15.rst:20 +msgid ":class:`locale`:" +msgstr ":class:`locale`:" + +#: ../../deprecations/pending-removal-in-3.15.rst:22 msgid "" -":mod:`threading`: Passing any arguments to :func:`threading.RLock` is now " -"deprecated. C version allows any numbers of args and kwargs, but they are " -"just ignored. Python version does not allow any arguments. All arguments " -"will be removed from :func:`threading.RLock` in Python 3.15. (Contributed by " -"Nikita Sobolev in :gh:`102029`.)" +"The :func:`~locale.getdefaultlocale` function has been deprecated since " +"Python 3.11. Its removal was originally planned for Python 3.13 (:gh:" +"`90817`), but has been postponed to Python 3.15. Use :func:`~locale." +"getlocale`, :func:`~locale.setlocale`, and :func:`~locale.getencoding` " +"instead. (Contributed by Hugo van Kemenade in :gh:`111187`.)" msgstr "" +":func:`~locale.getdefaultlocale` 已在 Python 3.11 中被棄用,原本計劃在 " +"Python 3.13 中移除 (:gh:`90817`),但被延後至 Python 3.15。請改用 :func:" +"`~locale.getlocale`、:func:`~locale.setlocale` 和 :func:`~locale." +"getencoding`。 (由 Hugo van Kemenade 於 :gh:`111187` 貢獻。)" -#: ../../deprecations/pending-removal-in-3.15.rst:34 -msgid ":class:`typing.NamedTuple`:" +#: ../../deprecations/pending-removal-in-3.15.rst:32 +msgid "" +":meth:`.PurePath.is_reserved` has been deprecated since Python 3.13. Use :" +"func:`os.path.isreserved` to detect reserved paths on Windows." msgstr "" +":meth:`.PurePath.is_reserved` 已自 Python 3.13 被棄用。請用 :func:`os.path." +"isreserved` 來偵測 Windows 上的保留路徑。" -#: ../../deprecations/pending-removal-in-3.15.rst:36 +#: ../../deprecations/pending-removal-in-3.15.rst:38 msgid "" -"The undocumented keyword argument syntax for creating :class:`!NamedTuple` " -"classes (``NT = NamedTuple(\"NT\", x=int)``) is deprecated, and will be " -"disallowed in 3.15. Use the class-based syntax or the functional syntax " -"instead." +":func:`~platform.java_ver` has been deprecated since Python 3.13. This " +"function is only useful for Jython support, has a confusing API, and is " +"largely untested." msgstr "" +"自 Python 3.13 起,:func:`~platform.java_ver` 已被棄用。此函式僅對 Jython 支" +"援有用,具有令人困惑的 API,基本上未經測試。" -#: ../../deprecations/pending-removal-in-3.15.rst:40 +#: ../../deprecations/pending-removal-in-3.15.rst:42 +msgid ":mod:`threading`:" +msgstr ":mod:`threading`:" + +#: ../../deprecations/pending-removal-in-3.15.rst:44 +msgid "" +":func:`~threading.RLock` will take no arguments in Python 3.15. Passing any " +"arguments has been deprecated since Python 3.14, as the Python version does " +"not permit any arguments, but the C version allows any number of positional " +"or keyword arguments, ignoring every argument." +msgstr "" +":func:`~threading.RLock` 在 Python 3.15 中將不接受任何引數。自 Python 3.14 " +"起,傳遞任何引數的用法已被棄用,因為 Python 版本不允許任何引數,但 C 版本允許" +"任意數量的位置或關鍵字引數,並忽略每個引數。" + +#: ../../deprecations/pending-removal-in-3.15.rst:52 msgid "" -"When using the functional syntax to create a :class:`!NamedTuple` class, " -"failing to pass a value to the *fields* parameter (``NT = " -"NamedTuple(\"NT\")``) is deprecated. Passing ``None`` to the *fields* " -"parameter (``NT = NamedTuple(\"NT\", None)``) is also deprecated. Both will " -"be disallowed in Python 3.15. To create a :class:`!NamedTuple` class with 0 " -"fields, use ``class NT(NamedTuple): pass`` or ``NT = NamedTuple(\"NT\", " -"[])``." +"The undocumented keyword argument syntax for creating :class:`~typing." +"NamedTuple` classes (e.g. ``Point = NamedTuple(\"Point\", x=int, y=int)``) " +"has been deprecated since Python 3.13. Use the class-based syntax or the " +"functional syntax instead." msgstr "" +"用於建立 :class:`~typing.NamedTuple` 類別的未以文件記錄之關鍵字引數語法 " +"(``Point = NamedTuple(\"Point\", x=int, y=int)``) 已自 Python 3.13 棄用。請改" +"用基於類別的語法或函式語法 (functional syntax)。" -#: ../../deprecations/pending-removal-in-3.15.rst:47 +#: ../../deprecations/pending-removal-in-3.15.rst:58 msgid "" -":class:`typing.TypedDict`: When using the functional syntax to create a :" -"class:`!TypedDict` class, failing to pass a value to the *fields* parameter " -"(``TD = TypedDict(\"TD\")``) is deprecated. Passing ``None`` to the *fields* " -"parameter (``TD = TypedDict(\"TD\", None)``) is also deprecated. Both will " -"be disallowed in Python 3.15. To create a :class:`!TypedDict` class with 0 " -"fields, use ``class TD(TypedDict): pass`` or ``TD = TypedDict(\"TD\", {})``." +"The :func:`typing.no_type_check_decorator` decorator function has been " +"deprecated since Python 3.13. After eight years in the :mod:`typing` module, " +"it has yet to be supported by any major type checker." msgstr "" +"自 Python 3.13 起,:func:`typing.no_type_check_decorator` 裝飾器函式已被棄" +"用。在 :mod:`typing` 模組中使用了八年之後,它尚未得到任何主要型別檢查器的支" +"援。" + +#: ../../deprecations/pending-removal-in-3.15.rst:65 +msgid "" +"The :meth:`~wave.Wave_read.getmark`, :meth:`!setmark`, and :meth:`~wave." +"Wave_read.getmarkers` methods of the :class:`~wave.Wave_read` and :class:" +"`~wave.Wave_write` classes have been deprecated since Python 3.13." +msgstr "" +"已棄用 :class:`~wave.Wave_read` 和 :class:`~wave.Wave_write` 類別的 :meth:" +"`~wave.Wave_read.getmark`、:meth:`!setmark` 和 :meth:`~wave.Wave_read." +"getmarkers` 方法自 Python 3.13 被棄用。" #: ../../deprecations/pending-removal-in-3.16.rst:2 msgid "Pending Removal in Python 3.16" -msgstr "" +msgstr "Python 3.16 中待移除的項目" #: ../../deprecations/pending-removal-in-3.16.rst:4 +#: ../../deprecations/pending-removal-in-future.rst:12 +msgid ":mod:`builtins`:" +msgstr ":mod:`builtins`:" + +#: ../../deprecations/pending-removal-in-3.16.rst:6 +msgid "" +"Bitwise inversion on boolean types, ``~True`` or ``~False`` has been " +"deprecated since Python 3.12, as it produces surprising and unintuitive " +"results (``-2`` and ``-1``). Use ``not x`` instead for the logical negation " +"of a Boolean. In the rare case that you need the bitwise inversion of the " +"underlying integer, convert to ``int`` explicitly (``~int(x)``)." +msgstr "" +"自 Python 3.12 起,布林型別的位元反轉 ``~True`` 或 ``~False`` 已被棄用,因為" +"它會產生不預期且不直觀的結果(``-2`` 和 ``-1``)。使用 ``not x`` 代替布林值的" +"邏輯否定。在極少數情況下,你需要對底層的整數進行位元反轉,請明確轉換為 " +"``~int(x)`` (``~int(x)``)。" + +#: ../../deprecations/pending-removal-in-3.16.rst:15 +msgid "" +"The ``'u'`` format code (:c:type:`wchar_t`) has been deprecated in " +"documentation since Python 3.3 and at runtime since Python 3.13. Use the " +"``'w'`` format code (:c:type:`Py_UCS4`) for Unicode characters instead." +msgstr "" +"自 Python 3.3 起,``'u'`` 格式碼 (:c:type:`wchar_t`) 在文件中已被棄用,自 " +"Python 3.13 起在 runtime 已被棄用。請使用 ``'w'`` 格式碼 (:c:type:`Py_UCS4`) " +"來取代 Unicode 字元。" + +#: ../../deprecations/pending-removal-in-3.16.rst:21 +msgid ":mod:`shutil`:" +msgstr ":mod:`shutil`:" + +#: ../../deprecations/pending-removal-in-3.16.rst:23 +msgid "" +"The :class:`!ExecError` exception has been deprecated since Python 3.14. It " +"has not been used by any function in :mod:`!shutil` since Python 3.4, and is " +"now an alias of :exc:`RuntimeError`." +msgstr "" +"自 Python 3.14 起,:class:`!ExecError` 例外已被棄用。自 Python 3.4 以來,它尚" +"未被 :mod:`!shutil` 中的任何函式使用,現在是 :exc:`RuntimeError` 的別名。" + +#: ../../deprecations/pending-removal-in-3.16.rst:28 +msgid ":mod:`symtable`:" +msgstr ":mod:`symtable`:" + +#: ../../deprecations/pending-removal-in-3.16.rst:30 msgid "" -":mod:`array`: :class:`array.array` ``'u'`` type (:c:type:`wchar_t`): use the " -"``'w'`` type instead (``Py_UCS4``)." +"The :meth:`Class.get_methods ` method has been " +"deprecated since Python 3.14." msgstr "" +"自 Python 3.14 起,:meth:`Class.get_methods ` 方" +"法已被棄用。" -#: ../../deprecations/pending-removal-in-3.16.rst:8 -msgid ":mod:`builtins`: ``~bool``, bitwise inversion on bool." +#: ../../deprecations/pending-removal-in-3.16.rst:35 +msgid "" +"The :func:`~sys._enablelegacywindowsfsencoding` function has been deprecated " +"since Python 3.13. Use the :envvar:`PYTHONLEGACYWINDOWSFSENCODING` " +"environment variable instead." msgstr "" +"自 Python 3.13 起,:func:`~sys._enablelegacywindowsfsencoding` 函式已被棄用。" +"請改用 :envvar:`PYTHONLEGACYWINDOWSFSENCODING` 環境變數。" -#: ../../deprecations/pending-removal-in-3.16.rst:11 +#: ../../deprecations/pending-removal-in-3.16.rst:41 msgid "" -":mod:`symtable`: Deprecate :meth:`symtable.Class.get_methods` due to the " -"lack of interest. (Contributed by Bénédikt Tran in :gh:`119698`.)" +"The undocumented and unused :attr:`!TarFile.tarfile` attribute has been " +"deprecated since Python 3.13." msgstr "" +"自 Python 3.13 起,未以文件記錄和未被使用的 :attr:`!TarFile.tarfile` 屬性已被" +"棄用。" #: ../../deprecations/c-api-pending-removal-in-future.rst:2 #: ../../deprecations/pending-removal-in-future.rst:2 msgid "Pending Removal in Future Versions" -msgstr "" +msgstr "未來版本中的待移除項目" #: ../../deprecations/pending-removal-in-future.rst:4 msgid "" "The following APIs will be removed in the future, although there is " "currently no date scheduled for their removal." -msgstr "" +msgstr "以下 API 將在未來被移除,雖然目前尚未安排移除日期。" #: ../../deprecations/pending-removal-in-future.rst:7 msgid "" ":mod:`argparse`: Nesting argument groups and nesting mutually exclusive " "groups are deprecated." -msgstr "" +msgstr ":mod:`argparse`:已棄用巢狀引數群組和巢狀互斥群組。" #: ../../deprecations/pending-removal-in-future.rst:10 msgid ":mod:`array`'s ``'u'`` format code (:gh:`57281`)" -msgstr "" - -#: ../../deprecations/pending-removal-in-future.rst:12 -msgid ":mod:`builtins`:" -msgstr "" +msgstr ":mod:`array` 的 ``'u'`` 格式碼 (:gh:`57281`)" #: ../../deprecations/pending-removal-in-future.rst:14 msgid "``bool(NotImplemented)``." -msgstr "" +msgstr "``bool(NotImplemented)``。" #: ../../deprecations/pending-removal-in-future.rst:15 msgid "" @@ -3129,6 +3355,8 @@ msgid "" "is deprecated: use ``throw(exc)`` and ``athrow(exc)`` instead, the single " "argument signature." msgstr "" +"產生器:``throw(type, exc, tb)`` 和 ``athrow(type, exc, tb)`` 簽名已被棄用:" +"請改用 ``throw(exc)`` 和 ``athrow(exc)``,為單引數簽名。" #: ../../deprecations/pending-removal-in-future.rst:18 msgid "" @@ -3141,6 +3369,12 @@ msgid "" "keyword:`is` and :keyword:`or`. In a future release it will be changed to a " "syntax error. (:gh:`87999`)" msgstr "" +"目前 Python 接受數值字面值後面立即接關鍵字,例如 ``0in x``、``1or x``、``0if " +"1else 2``。它讓表達式模糊且容易混淆,如 ``[0x1for x in y]``\\ (可以解釋為 " +"``[0x1 for x in y]`` 或 ``[0x1f or x in y]``)。如果數值字面值後立即接 :" +"keyword:`and`、:keyword:`else`、:keyword:`for`、:keyword:`if`、:keyword:" +"`in`、:keyword:`is` 和 :keyword:`or` 之一的關鍵字,則會引發語法警告。在未來版" +"本中,它將被更改為語法錯誤。(:gh:`87999`)" #: ../../deprecations/pending-removal-in-future.rst:26 msgid "" @@ -3148,6 +3382,8 @@ msgid "" "these methods will be required to return an instance of a strict subclass " "of :class:`int`." msgstr "" +"``__index__()`` 和 ``__int__()`` 方法回傳非 int 型別的支援:這些方法將需要回" +"傳 :class:`int` 的嚴格子類別實例。" #: ../../deprecations/pending-removal-in-future.rst:29 msgid "" @@ -3155,6 +3391,8 @@ msgid "" "`float`: these methods will be required to return an instance of :class:" "`float`." msgstr "" +"回傳 :class:`float` 嚴格子類別 ``__float__()`` 方法的支援:這些方法將需要回" +"傳 :class:`float` 的實例。" #: ../../deprecations/pending-removal-in-future.rst:32 msgid "" @@ -3162,10 +3400,12 @@ msgid "" "`complex`: these methods will be required to return an instance of :class:" "`complex`." msgstr "" +"回傳 :class:`complex` 嚴格子類別 ``__complex__()`` 方法的支援:這些方法將需要" +"回傳 :class:`complex` 的實例。" #: ../../deprecations/pending-removal-in-future.rst:35 msgid "Delegation of ``int()`` to ``__trunc__()`` method." -msgstr "" +msgstr "將 ``int()`` 委派給 ``__trunc__()`` 方法。" #: ../../deprecations/pending-removal-in-future.rst:36 msgid "" @@ -3174,6 +3414,8 @@ msgid "" "single positional argument. (Contributed by Serhiy Storchaka in :gh:" "`109218`.)" msgstr "" +"在 :func:`complex` 建構子中將複數作為 *real* 或 *imag* 引數傳遞現在已被棄用;" +"它應該只作為單個位置引數傳遞。 (由 Serhiy Storchaka 於 :gh:`109218` 貢獻。)" #: ../../deprecations/pending-removal-in-future.rst:41 msgid "" @@ -3181,58 +3423,68 @@ msgid "" "are deprecated and replaced by :data:`calendar.JANUARY` and :data:`calendar." "FEBRUARY`. (Contributed by Prince Roshan in :gh:`103636`.)" msgstr "" +":mod:`calendar`:``calendar.January`` 和 ``calendar.February`` 常數已被棄用並" +"被 :data:`calendar.JANUARY` 和 :data:`calendar.FEBRUARY` 取代。 (由 Prince " +"Roshan 於 :gh:`103636` 貢獻。)" #: ../../deprecations/pending-removal-in-future.rst:46 msgid "" ":attr:`codeobject.co_lnotab`: use the :meth:`codeobject.co_lines` method " "instead." msgstr "" +":attr:`codeobject.co_lnotab`:請改用 :meth:`codeobject.co_lines` 方法。" #: ../../deprecations/pending-removal-in-future.rst:49 msgid ":mod:`datetime`:" -msgstr "" +msgstr ":mod:`datetime`:" #: ../../deprecations/pending-removal-in-future.rst:51 msgid "" ":meth:`~datetime.datetime.utcnow`: use ``datetime.datetime.now(tz=datetime." "UTC)``." msgstr "" +":meth:`~datetime.datetime.utcnow`:請改用 ``datetime.datetime." +"now(tz=datetime.UTC)``。" #: ../../deprecations/pending-removal-in-future.rst:53 msgid "" ":meth:`~datetime.datetime.utcfromtimestamp`: use ``datetime.datetime." "fromtimestamp(timestamp, tz=datetime.UTC)``." msgstr "" +":meth:`~datetime.datetime.utcfromtimestamp`:請改用 ``datetime.datetime." +"fromtimestamp(timestamp, tz=datetime.UTC)``。" #: ../../deprecations/pending-removal-in-future.rst:56 msgid ":mod:`gettext`: Plural value must be an integer." -msgstr "" +msgstr ":mod:`gettext`:複數值必須是整數。" #: ../../deprecations/pending-removal-in-future.rst:58 msgid ":mod:`importlib`:" -msgstr "" +msgstr ":mod:`importlib`:" #: ../../deprecations/pending-removal-in-future.rst:60 msgid "``load_module()`` method: use ``exec_module()`` instead." -msgstr "" +msgstr "``load_module()`` method:請改用 ``exec_module()``。" #: ../../deprecations/pending-removal-in-future.rst:61 msgid "" ":func:`~importlib.util.cache_from_source` *debug_override* parameter is " "deprecated: use the *optimization* parameter instead." msgstr "" +":func:`~importlib.util.cache_from_source` *debug_override* 參數已被棄用:請改" +"用 *optimization* 參數。" #: ../../deprecations/pending-removal-in-future.rst:64 msgid ":mod:`importlib.metadata`:" -msgstr "" +msgstr ":mod:`importlib.metadata`:" #: ../../deprecations/pending-removal-in-future.rst:66 msgid "``EntryPoints`` tuple interface." -msgstr "" +msgstr "``EntryPoints`` 元組介面。" #: ../../deprecations/pending-removal-in-future.rst:67 msgid "Implicit ``None`` on return values." -msgstr "" +msgstr "回傳值上的隱式 ``None``。" #: ../../deprecations/pending-removal-in-future.rst:69 msgid "" @@ -3245,17 +3497,20 @@ msgid "" ":mod:`mailbox`: Use of StringIO input and text mode is deprecated, use " "BytesIO and binary mode instead." msgstr "" +":mod:`mailbox`:已棄用 StringIO 輸入和文本模式,請改用 BytesIO 和二進位模式。" #: ../../deprecations/pending-removal-in-future.rst:75 msgid "" ":mod:`os`: Calling :func:`os.register_at_fork` in multi-threaded process." -msgstr "" +msgstr ":mod:`os`:在多執行緒行程中呼叫 :func:`os.register_at_fork`。" #: ../../deprecations/pending-removal-in-future.rst:77 msgid "" ":class:`!pydoc.ErrorDuringImport`: A tuple value for *exc_info* parameter is " "deprecated, use an exception instance." msgstr "" +":class:`!pydoc.ErrorDuringImport`:*exc_info* 參數的元組值已被棄用,請用例外" +"實例。" #: ../../deprecations/pending-removal-in-future.rst:80 msgid "" @@ -3265,171 +3520,189 @@ msgid "" "replacement strings can now only contain ASCII letters and digits and " "underscore. (Contributed by Serhiy Storchaka in :gh:`91760`.)" msgstr "" +":mod:`re`:現在對正規表示式中的數值群組參照和群組名稱用了更嚴格的規則。現在只" +"有 ASCII 數碼序列被接受作為數值參照。位元組模式和替換字串中的群組名稱現在只能" +"包含 ASCII 字母、數碼和底線。(由 Serhiy Storchaka 於 :gh:`91760` 貢獻。)" #: ../../deprecations/pending-removal-in-future.rst:87 msgid "" ":mod:`!sre_compile`, :mod:`!sre_constants` and :mod:`!sre_parse` modules." -msgstr "" +msgstr ":mod:`!sre_compile`、:mod:`!sre_constants` 和 :mod:`!sre_parse` 模組。" #: ../../deprecations/pending-removal-in-future.rst:89 msgid "" ":mod:`shutil`: :func:`~shutil.rmtree`'s *onerror* parameter is deprecated in " "Python 3.12; use the *onexc* parameter instead." msgstr "" +":mod:`shutil`::func:`~shutil.rmtree` 的 *onerror* 參數在 Python 3.12 中已被" +"棄用;請改用 *onexc* 參數。" #: ../../deprecations/pending-removal-in-future.rst:92 msgid ":mod:`ssl` options and protocols:" -msgstr "" +msgstr ":mod:`ssl` 選項和協定:" #: ../../deprecations/pending-removal-in-future.rst:94 msgid ":class:`ssl.SSLContext` without protocol argument is deprecated." -msgstr "" +msgstr "不帶協定引數的 :class:`ssl.SSLContext` 已被棄用。" #: ../../deprecations/pending-removal-in-future.rst:95 msgid "" ":class:`ssl.SSLContext`: :meth:`~ssl.SSLContext.set_npn_protocols` and :meth:" "`!selected_npn_protocol` are deprecated: use ALPN instead." msgstr "" +":class:`ssl.SSLContext`::meth:`~ssl.SSLContext.set_npn_protocols` 和 :meth:" +"`!selected_npn_protocol` 已被棄用:請改用 ALPN。" #: ../../deprecations/pending-removal-in-future.rst:98 msgid "``ssl.OP_NO_SSL*`` options" -msgstr "" +msgstr "``ssl.OP_NO_SSL*`` 選項" #: ../../deprecations/pending-removal-in-future.rst:99 msgid "``ssl.OP_NO_TLS*`` options" -msgstr "" +msgstr "``ssl.OP_NO_TLS*`` 選項" #: ../../deprecations/pending-removal-in-future.rst:100 msgid "``ssl.PROTOCOL_SSLv3``" -msgstr "" +msgstr "``ssl.PROTOCOL_SSLv3``" #: ../../deprecations/pending-removal-in-future.rst:101 msgid "``ssl.PROTOCOL_TLS``" -msgstr "" +msgstr "``ssl.PROTOCOL_TLS``" #: ../../deprecations/pending-removal-in-future.rst:102 msgid "``ssl.PROTOCOL_TLSv1``" -msgstr "" +msgstr "``ssl.PROTOCOL_TLSv1``" #: ../../deprecations/pending-removal-in-future.rst:103 msgid "``ssl.PROTOCOL_TLSv1_1``" -msgstr "" +msgstr "``ssl.PROTOCOL_TLSv1_1``" #: ../../deprecations/pending-removal-in-future.rst:104 msgid "``ssl.PROTOCOL_TLSv1_2``" -msgstr "" +msgstr "``ssl.PROTOCOL_TLSv1_2``" #: ../../deprecations/pending-removal-in-future.rst:105 msgid "``ssl.TLSVersion.SSLv3``" -msgstr "" +msgstr "``ssl.TLSVersion.SSLv3``" #: ../../deprecations/pending-removal-in-future.rst:106 msgid "``ssl.TLSVersion.TLSv1``" -msgstr "" +msgstr "``ssl.TLSVersion.TLSv1``" #: ../../deprecations/pending-removal-in-future.rst:107 msgid "``ssl.TLSVersion.TLSv1_1``" -msgstr "" +msgstr "``ssl.TLSVersion.TLSv1_1``" #: ../../deprecations/pending-removal-in-future.rst:109 msgid "" ":func:`sysconfig.is_python_build` *check_home* parameter is deprecated and " "ignored." msgstr "" +":func:`sysconfig.is_python_build` 的 *check_home* 參數已被棄用並被忽略。" #: ../../deprecations/pending-removal-in-future.rst:112 msgid ":mod:`threading` methods:" -msgstr "" +msgstr ":mod:`threading` 方法:" #: ../../deprecations/pending-removal-in-future.rst:114 msgid "" ":meth:`!threading.Condition.notifyAll`: use :meth:`~threading.Condition." "notify_all`." msgstr "" +":meth:`!threading.Condition.notifyAll`:請用 :meth:`~threading.Condition." +"notify_all`。" #: ../../deprecations/pending-removal-in-future.rst:115 msgid ":meth:`!threading.Event.isSet`: use :meth:`~threading.Event.is_set`." -msgstr "" +msgstr ":meth:`!threading.Event.isSet`:請用 :meth:`~threading.Event.is_set`。" #: ../../deprecations/pending-removal-in-future.rst:116 msgid "" ":meth:`!threading.Thread.isDaemon`, :meth:`threading.Thread.setDaemon`: use :" "attr:`threading.Thread.daemon` attribute." msgstr "" +":meth:`!threading.Thread.isDaemon`、:meth:`threading.Thread.setDaemon`:請" +"用 :attr:`threading.Thread.daemon` 屬性。" #: ../../deprecations/pending-removal-in-future.rst:118 msgid "" ":meth:`!threading.Thread.getName`, :meth:`threading.Thread.setName`: use :" "attr:`threading.Thread.name` attribute." msgstr "" +":meth:`!threading.Thread.getName`、:meth:`threading.Thread.setName`:請用 :" +"attr:`threading.Thread.name` 屬性。" #: ../../deprecations/pending-removal-in-future.rst:120 msgid ":meth:`!threading.currentThread`: use :meth:`threading.current_thread`." msgstr "" +":meth:`!threading.currentThread`:請用 :meth:`threading.current_thread`。" #: ../../deprecations/pending-removal-in-future.rst:121 msgid ":meth:`!threading.activeCount`: use :meth:`threading.active_count`." -msgstr "" +msgstr ":meth:`!threading.activeCount`:請用 :meth:`threading.active_count`。" #: ../../deprecations/pending-removal-in-future.rst:123 msgid ":class:`typing.Text` (:gh:`92332`)." -msgstr "" +msgstr ":class:`typing.Text` (:gh:`92332`)。" #: ../../deprecations/pending-removal-in-future.rst:125 msgid "" ":class:`unittest.IsolatedAsyncioTestCase`: it is deprecated to return a " "value that is not ``None`` from a test case." msgstr "" +":class:`unittest.IsolatedAsyncioTestCase`:從測試案例中回傳非 ``None`` 的值已" +"被棄用。" #: ../../deprecations/pending-removal-in-future.rst:128 msgid "" ":mod:`urllib.parse` deprecated functions: :func:`~urllib.parse.urlparse` " "instead" msgstr "" +":mod:`urllib.parse` 已棄用函式:請改用 :func:`~urllib.parse.urlparse`。" #: ../../deprecations/pending-removal-in-future.rst:130 msgid "``splitattr()``" -msgstr "" +msgstr "``splitattr()``" #: ../../deprecations/pending-removal-in-future.rst:131 msgid "``splithost()``" -msgstr "" +msgstr "``splithost()``" #: ../../deprecations/pending-removal-in-future.rst:132 msgid "``splitnport()``" -msgstr "" +msgstr "``splitnport()``" #: ../../deprecations/pending-removal-in-future.rst:133 msgid "``splitpasswd()``" -msgstr "" +msgstr "``splitpasswd()``" #: ../../deprecations/pending-removal-in-future.rst:134 msgid "``splitport()``" -msgstr "" +msgstr "``splitport()``" #: ../../deprecations/pending-removal-in-future.rst:135 msgid "``splitquery()``" -msgstr "" +msgstr "``splitquery()``" #: ../../deprecations/pending-removal-in-future.rst:136 msgid "``splittag()``" -msgstr "" +msgstr "``splittag()``" #: ../../deprecations/pending-removal-in-future.rst:137 msgid "``splittype()``" -msgstr "" +msgstr "``splittype()``" #: ../../deprecations/pending-removal-in-future.rst:138 msgid "``splituser()``" -msgstr "" +msgstr "``splituser()``" #: ../../deprecations/pending-removal-in-future.rst:139 msgid "``splitvalue()``" -msgstr "" +msgstr "``splitvalue()``" #: ../../deprecations/pending-removal-in-future.rst:140 msgid "``to_bytes()``" -msgstr "" +msgstr "``to_bytes()``" #: ../../deprecations/pending-removal-in-future.rst:142 msgid "" @@ -3437,12 +3710,15 @@ msgid "" "`~urllib.request.FancyURLopener` style of invoking requests is deprecated. " "Use newer :func:`~urllib.request.urlopen` functions and methods." msgstr "" +":mod:`urllib.request`:呼叫請求的 :class:`~urllib.request.URLopener` 和 :" +"class:`~urllib.request.FancyURLopener` 風格已被棄用。請改用更新的 :func:" +"`~urllib.request.urlopen` 函式和方法。" #: ../../deprecations/pending-removal-in-future.rst:146 msgid "" ":mod:`wsgiref`: ``SimpleHandler.stdout.write()`` should not do partial " "writes." -msgstr "" +msgstr ":mod:`wsgiref`:``SimpleHandler.stdout.write()`` 不應該進行部分寫入。" #: ../../deprecations/pending-removal-in-future.rst:149 msgid "" @@ -3451,1333 +3727,1580 @@ msgid "" "return ``True``. Prefer explicit ``len(elem)`` or ``elem is not None`` tests " "instead." msgstr "" +":mod:`xml.etree.ElementTree`:已棄用對 :class:`~xml.etree.ElementTree." +"Element` 的真值測試。在未來版本中,它將始終回傳 ``True``。請改用明確的 " +"``len(elem)`` 或 ``elem is not None`` 測試。" #: ../../deprecations/pending-removal-in-future.rst:154 msgid "" ":meth:`zipimport.zipimporter.load_module` is deprecated: use :meth:" "`~zipimport.zipimporter.exec_module` instead." msgstr "" +":meth:`zipimport.zipimporter.load_module` 已被棄用:請改用 :meth:`~zipimport." +"zipimporter.exec_module`。" -#: ../../whatsnew/3.13.rst:1941 +#: ../../whatsnew/3.13.rst:1992 msgid "CPython Bytecode Changes" msgstr "" -#: ../../whatsnew/3.13.rst:1943 +#: ../../whatsnew/3.13.rst:1994 msgid "" -"The oparg of ``YIELD_VALUE`` is now ``1`` if the yield is part of a yield-" -"from or await, and ``0`` otherwise. The oparg of ``RESUME`` was changed to " -"add a bit indicating whether the except-depth is 1, which is needed to " +"The oparg of :opcode:`YIELD_VALUE` is now ``1`` if the yield is part of a " +"yield-from or await, and ``0`` otherwise. The oparg of :opcode:`RESUME` was " +"changed to add a bit indicating if the except-depth is 1, which is needed to " "optimize closing of generators. (Contributed by Irit Katriel in :gh:" "`111354`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1951 +#: ../../whatsnew/3.13.rst:2002 msgid "C API Changes" -msgstr "" +msgstr "C API 變更" -#: ../../whatsnew/3.13.rst:1956 +#: ../../whatsnew/3.13.rst:2007 msgid "" -"You no longer have to define the ``PY_SSIZE_T_CLEAN`` macro before " -"including :file:`Python.h` when using ``#`` formats in :ref:`format codes " -"`. APIs accepting the format codes always " -"use ``Py_ssize_t`` for ``#`` formats. (Contributed by Inada Naoki in :gh:" -"`104922`.)" +"Add the :ref:`PyMonitoring C API ` for generating :pep:" +"`669` monitoring events:" msgstr "" -#: ../../whatsnew/3.13.rst:1962 -msgid "" -"The *keywords* parameter of :c:func:`PyArg_ParseTupleAndKeywords` and :c:" -"func:`PyArg_VaParseTupleAndKeywords` now has type :c:expr:`char * const *` " -"in C and :c:expr:`const char * const *` in C++, instead of :c:expr:`char " -"**`. It makes these functions compatible with arguments of type :c:expr:" -"`const char * const *`, :c:expr:`const char **` or :c:expr:`char * const *` " -"in C++ and :c:expr:`char * const *` in C without an explicit type cast. This " -"can be overridden with the :c:macro:`PY_CXX_CONST` macro. (Contributed by " -"Serhiy Storchaka in :gh:`65210`.)" -msgstr "" +#: ../../whatsnew/3.13.rst:2010 +msgid ":c:type:`PyMonitoringState`" +msgstr ":c:type:`PyMonitoringState`" -#: ../../whatsnew/3.13.rst:1972 -msgid "" -"Add :c:func:`PyImport_AddModuleRef`: similar to :c:func:" -"`PyImport_AddModule`, but return a :term:`strong reference` instead of a :" -"term:`borrowed reference`. (Contributed by Victor Stinner in :gh:`105922`.)" +#: ../../whatsnew/3.13.rst:2011 +msgid ":c:func:`PyMonitoring_FirePyStartEvent`" +msgstr ":c:func:`PyMonitoring_FirePyStartEvent`" + +#: ../../whatsnew/3.13.rst:2012 +msgid ":c:func:`PyMonitoring_FirePyResumeEvent`" +msgstr ":c:func:`PyMonitoring_FirePyResumeEvent`" + +#: ../../whatsnew/3.13.rst:2013 +msgid ":c:func:`PyMonitoring_FirePyReturnEvent`" +msgstr ":c:func:`PyMonitoring_FirePyReturnEvent`" + +#: ../../whatsnew/3.13.rst:2014 +msgid ":c:func:`PyMonitoring_FirePyYieldEvent`" +msgstr ":c:func:`PyMonitoring_FirePyYieldEvent`" + +#: ../../whatsnew/3.13.rst:2015 +msgid ":c:func:`PyMonitoring_FireCallEvent`" +msgstr ":c:func:`PyMonitoring_FireCallEvent`" + +#: ../../whatsnew/3.13.rst:2016 +msgid ":c:func:`PyMonitoring_FireLineEvent`" +msgstr ":c:func:`PyMonitoring_FireLineEvent`" + +#: ../../whatsnew/3.13.rst:2017 +msgid ":c:func:`PyMonitoring_FireJumpEvent`" +msgstr ":c:func:`PyMonitoring_FireJumpEvent`" + +#: ../../whatsnew/3.13.rst:2018 +msgid ":c:func:`PyMonitoring_FireBranchEvent`" +msgstr ":c:func:`PyMonitoring_FireBranchEvent`" + +#: ../../whatsnew/3.13.rst:2019 +msgid ":c:func:`PyMonitoring_FireCReturnEvent`" +msgstr ":c:func:`PyMonitoring_FireCReturnEvent`" + +#: ../../whatsnew/3.13.rst:2020 +msgid ":c:func:`PyMonitoring_FirePyThrowEvent`" +msgstr ":c:func:`PyMonitoring_FirePyThrowEvent`" + +#: ../../whatsnew/3.13.rst:2021 +msgid ":c:func:`PyMonitoring_FireRaiseEvent`" +msgstr ":c:func:`PyMonitoring_FireRaiseEvent`" + +#: ../../whatsnew/3.13.rst:2022 +msgid ":c:func:`PyMonitoring_FireCRaiseEvent`" +msgstr ":c:func:`PyMonitoring_FireCRaiseEvent`" + +#: ../../whatsnew/3.13.rst:2023 +msgid ":c:func:`PyMonitoring_FireReraiseEvent`" +msgstr ":c:func:`PyMonitoring_FireReraiseEvent`" + +#: ../../whatsnew/3.13.rst:2024 +msgid ":c:func:`PyMonitoring_FireExceptionHandledEvent`" +msgstr ":c:func:`PyMonitoring_FireExceptionHandledEvent`" + +#: ../../whatsnew/3.13.rst:2025 +msgid ":c:func:`PyMonitoring_FirePyUnwindEvent`" +msgstr ":c:func:`PyMonitoring_FirePyUnwindEvent`" + +#: ../../whatsnew/3.13.rst:2026 +msgid ":c:func:`PyMonitoring_FireStopIterationEvent`" +msgstr ":c:func:`PyMonitoring_FireStopIterationEvent`" + +#: ../../whatsnew/3.13.rst:2027 +msgid ":c:func:`PyMonitoring_EnterScope`" +msgstr ":c:func:`PyMonitoring_EnterScope`" + +#: ../../whatsnew/3.13.rst:2028 +msgid ":c:func:`PyMonitoring_ExitScope`" +msgstr ":c:func:`PyMonitoring_ExitScope`" + +#: ../../whatsnew/3.13.rst:2030 +msgid "(Contributed by Irit Katriel in :gh:`111997`)." msgstr "" -#: ../../whatsnew/3.13.rst:1977 +#: ../../whatsnew/3.13.rst:2032 msgid "" -"Add :c:func:`PyWeakref_GetRef` function: similar to :c:func:" -"`PyWeakref_GetObject` but returns a :term:`strong reference`, or ``NULL`` if " -"the referent is no longer live. (Contributed by Victor Stinner in :gh:" -"`105927`.)" +"Add :c:type:`PyMutex`, a lightweight mutex that occupies a single byte, and " +"the new :c:func:`PyMutex_Lock` and :c:func:`PyMutex_Unlock` functions. :c:" +"func:`!PyMutex_Lock` will release the :term:`GIL` (if currently held) if the " +"operation needs to block. (Contributed by Sam Gross in :gh:`108724`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1982 +#: ../../whatsnew/3.13.rst:2038 msgid "" -"Add :c:func:`PyObject_GetOptionalAttr` and :c:func:" -"`PyObject_GetOptionalAttrString`, variants of :c:func:`PyObject_GetAttr` " -"and :c:func:`PyObject_GetAttrString` which don't raise :exc:`AttributeError` " -"if the attribute is not found. These variants are more convenient and faster " -"if the missing attribute should not be treated as a failure. (Contributed by " -"Serhiy Storchaka in :gh:`106521`.)" +"Add the :ref:`PyTime C API ` to provide access to system clocks:" msgstr "" -#: ../../whatsnew/3.13.rst:1990 -msgid "" -"Add :c:func:`PyMapping_GetOptionalItem` and :c:func:" -"`PyMapping_GetOptionalItemString`: variants of :c:func:`PyObject_GetItem` " -"and :c:func:`PyMapping_GetItemString` which don't raise :exc:`KeyError` if " -"the key is not found. These variants are more convenient and faster if the " -"missing key should not be treated as a failure. (Contributed by Serhiy " -"Storchaka in :gh:`106307`.)" +#: ../../whatsnew/3.13.rst:2040 +msgid ":c:type:`PyTime_t`." +msgstr ":c:type:`PyTime_t`。" + +#: ../../whatsnew/3.13.rst:2041 +msgid ":c:var:`PyTime_MIN` and :c:var:`PyTime_MAX`." msgstr "" -#: ../../whatsnew/3.13.rst:1998 -msgid "Add fixed variants of functions which silently ignore errors:" +#: ../../whatsnew/3.13.rst:2042 +msgid ":c:func:`PyTime_AsSecondsDouble`." +msgstr ":c:func:`PyTime_AsSecondsDouble`。" + +#: ../../whatsnew/3.13.rst:2043 +msgid ":c:func:`PyTime_Monotonic`." +msgstr ":c:func:`PyTime_Monotonic`。" + +#: ../../whatsnew/3.13.rst:2044 +msgid ":c:func:`PyTime_MonotonicRaw`." +msgstr ":c:func:`PyTime_MonotonicRaw`。" + +#: ../../whatsnew/3.13.rst:2045 +msgid ":c:func:`PyTime_PerfCounter`." +msgstr ":c:func:`PyTime_PerfCounter`。" + +#: ../../whatsnew/3.13.rst:2046 +msgid ":c:func:`PyTime_PerfCounterRaw`." +msgstr ":c:func:`PyTime_PerfCounterRaw`。" + +#: ../../whatsnew/3.13.rst:2047 +msgid ":c:func:`PyTime_Time`." +msgstr ":c:func:`PyTime_Time`。" + +#: ../../whatsnew/3.13.rst:2048 +msgid ":c:func:`PyTime_TimeRaw`." +msgstr ":c:func:`PyTime_TimeRaw`。" + +#: ../../whatsnew/3.13.rst:2050 +msgid "(Contributed by Victor Stinner and Petr Viktorin in :gh:`110850`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2000 +#: ../../whatsnew/3.13.rst:2052 msgid "" -":c:func:`PyObject_HasAttrWithError` replaces :c:func:`PyObject_HasAttr`." +"Add the :c:func:`PyDict_ContainsString` function with the same behavior as :" +"c:func:`PyDict_Contains`, but *key* is specified as a :c:expr:`const char*` " +"UTF-8 encoded bytes string, rather than a :c:expr:`PyObject*`. (Contributed " +"by Victor Stinner in :gh:`108314`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2001 +#: ../../whatsnew/3.13.rst:2058 msgid "" -":c:func:`PyObject_HasAttrStringWithError` replaces :c:func:" -"`PyObject_HasAttrString`." +"Add the :c:func:`PyDict_GetItemRef` and :c:func:`PyDict_GetItemStringRef` " +"functions, which behave similarly to :c:func:`PyDict_GetItemWithError`, but " +"return a :term:`strong reference` instead of a :term:`borrowed reference`. " +"Moreover, these functions return ``-1`` on error, removing the need to " +"check :c:func:`!PyErr_Occurred`. (Contributed by Victor Stinner in :gh:" +"`106004`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2002 +#: ../../whatsnew/3.13.rst:2066 msgid "" -":c:func:`PyMapping_HasKeyWithError` replaces :c:func:`PyMapping_HasKey`." +"Add the :c:func:`PyDict_SetDefaultRef` function, which behaves similarly to :" +"c:func:`PyDict_SetDefault`, but returns a :term:`strong reference` instead " +"of a :term:`borrowed reference`. This function returns ``-1`` on error, " +"``0`` on insertion, and ``1`` if the key was already present in the " +"dictionary. (Contributed by Sam Gross in :gh:`112066`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2003 +#: ../../whatsnew/3.13.rst:2074 msgid "" -":c:func:`PyMapping_HasKeyStringWithError` replaces :c:func:" -"`PyMapping_HasKeyString`." +"Add the :c:func:`PyDict_Pop` and :c:func:`PyDict_PopString` functions to " +"remove a key from a dictionary and optionally return the removed value. This " +"is similar to :meth:`dict.pop`, though there is no default value, and :exc:" +"`KeyError` is not raised for missing keys. (Contributed by Stefan Behnel and " +"Victor Stinner in :gh:`111262`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2005 +#: ../../whatsnew/3.13.rst:2081 msgid "" -"New functions return not only ``1`` for true and ``0`` for false, but also " -"``-1`` for error." +"Add the :c:func:`PyMapping_GetOptionalItem` and :c:func:" +"`PyMapping_GetOptionalItemString` functions as alternatives to :c:func:" +"`PyObject_GetItem` and :c:func:`PyMapping_GetItemString` respectively. The " +"new functions do not raise :exc:`KeyError` if the requested key is missing " +"from the mapping. These variants are more convenient and faster if a missing " +"key should not be treated as a failure. (Contributed by Serhiy Storchaka in :" +"gh:`106307`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2008 -msgid "(Contributed by Serhiy Storchaka in :gh:`108511`.)" +#: ../../whatsnew/3.13.rst:2091 +msgid "" +"Add the :c:func:`PyObject_GetOptionalAttr` and :c:func:" +"`PyObject_GetOptionalAttrString` functions as alternatives to :c:func:" +"`PyObject_GetAttr` and :c:func:`PyObject_GetAttrString` respectively. The " +"new functions do not raise :exc:`AttributeError` if the requested attribute " +"is not found on the object. These variants are more convenient and faster if " +"the missing attribute should not be treated as a failure. (Contributed by " +"Serhiy Storchaka in :gh:`106521`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2010 +#: ../../whatsnew/3.13.rst:2101 msgid "" -"If Python is built in :ref:`debug mode ` or :option:`with " -"assertions <--with-assertions>`, :c:func:`PyTuple_SET_ITEM` and :c:func:" -"`PyList_SET_ITEM` now check the index argument with an assertion. " -"(Contributed by Victor Stinner in :gh:`106168`.)" +"Add the :c:func:`PyErr_FormatUnraisable` function as an extension to :c:func:" +"`PyErr_WriteUnraisable` that allows customizing the warning message. " +"(Contributed by Serhiy Storchaka in :gh:`108082`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2015 +#: ../../whatsnew/3.13.rst:2106 msgid "" -"Add :c:func:`PyModule_Add` function: similar to :c:func:" -"`PyModule_AddObjectRef` and :c:func:`PyModule_AddObject` but always steals a " -"reference to the value. (Contributed by Serhiy Storchaka in :gh:`86493`.)" +"Add new functions that return a :term:`strong reference` instead of a :term:" +"`borrowed reference` for frame locals, globals, and builtins, as part of :" +"ref:`PEP 667 `:" msgstr "" -#: ../../whatsnew/3.13.rst:2020 -msgid "" -"Add :c:func:`PyDict_GetItemRef` and :c:func:`PyDict_GetItemStringRef` " -"functions: similar to :c:func:`PyDict_GetItemWithError` but returning a :" -"term:`strong reference` instead of a :term:`borrowed reference`. Moreover, " -"these functions return -1 on error and so checking ``PyErr_Occurred()`` is " -"not needed. (Contributed by Victor Stinner in :gh:`106004`.)" +#: ../../whatsnew/3.13.rst:2110 +msgid ":c:func:`PyEval_GetFrameBuiltins` replaces :c:func:`PyEval_GetBuiltins`" msgstr "" -#: ../../whatsnew/3.13.rst:2027 -msgid "" -"Added :c:func:`PyDict_SetDefaultRef`, which is similar to :c:func:" -"`PyDict_SetDefault` but returns a :term:`strong reference` instead of a :" -"term:`borrowed reference`. This function returns ``-1`` on error, ``0`` on " -"insertion, and ``1`` if the key was already present in the dictionary. " -"(Contributed by Sam Gross in :gh:`112066`.)" +#: ../../whatsnew/3.13.rst:2111 +msgid ":c:func:`PyEval_GetFrameGlobals` replaces :c:func:`PyEval_GetGlobals`" msgstr "" -#: ../../whatsnew/3.13.rst:2033 -msgid "" -"Add :c:func:`PyDict_ContainsString` function: same as :c:func:" -"`PyDict_Contains`, but *key* is specified as a :c:expr:`const char*` UTF-8 " -"encoded bytes string, rather than a :c:expr:`PyObject*`. (Contributed by " -"Victor Stinner in :gh:`108314`.)" +#: ../../whatsnew/3.13.rst:2112 +msgid ":c:func:`PyEval_GetFrameLocals` replaces :c:func:`PyEval_GetLocals`" msgstr "" -#: ../../whatsnew/3.13.rst:2038 -msgid "" -"Added :c:func:`PyList_GetItemRef` function: similar to :c:func:" -"`PyList_GetItem` but returns a :term:`strong reference` instead of a :term:" -"`borrowed reference`." +#: ../../whatsnew/3.13.rst:2114 +msgid "(Contributed by Mark Shannon and Tian Gao in :gh:`74929`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2042 +#: ../../whatsnew/3.13.rst:2116 msgid "" -"Add :c:func:`Py_IsFinalizing` function: check if the main Python interpreter " -"is :term:`shutting down `. (Contributed by Victor " -"Stinner in :gh:`108014`.)" +"Add the :c:func:`Py_GetConstant` and :c:func:`Py_GetConstantBorrowed` " +"functions to get :term:`strong ` or :term:`borrowed " +"` references to constants. For example, " +"``Py_GetConstant(Py_CONSTANT_ZERO)`` returns a strong reference to the " +"constant zero. (Contributed by Victor Stinner in :gh:`115754`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2046 +#: ../../whatsnew/3.13.rst:2123 msgid "" -"Add :c:func:`PyLong_AsInt` function: similar to :c:func:`PyLong_AsLong`, but " -"store the result in a C :c:expr:`int` instead of a C :c:expr:`long`. " -"Previously, it was known as the private function :c:func:`!_PyLong_AsInt` " -"(with an underscore prefix). (Contributed by Victor Stinner in :gh:`108014`.)" +"Add the :c:func:`PyImport_AddModuleRef` function as a replacement for :c:" +"func:`PyImport_AddModule` that returns a :term:`strong reference` instead of " +"a :term:`borrowed reference`. (Contributed by Victor Stinner in :gh:" +"`105922`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2052 +#: ../../whatsnew/3.13.rst:2128 msgid "" -"Python built with :file:`configure` :option:`--with-trace-refs` (tracing " -"references) now supports the :ref:`Limited API `. " -"(Contributed by Victor Stinner in :gh:`108634`.)" +"Add the :c:func:`Py_IsFinalizing` function to check whether the main Python " +"interpreter is :term:`shutting down `. (Contributed by " +"Victor Stinner in :gh:`108014`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2056 +#: ../../whatsnew/3.13.rst:2133 msgid "" -"Add :c:func:`PyObject_VisitManagedDict` and :c:func:" -"`PyObject_ClearManagedDict` functions which must be called by the traverse " -"and clear functions of a type using :c:macro:`Py_TPFLAGS_MANAGED_DICT` " -"flag. The `pythoncapi-compat project `__ can be used to get these functions on Python 3.11 and 3.12. " -"(Contributed by Victor Stinner in :gh:`107073`.)" +"Add the :c:func:`PyList_GetItemRef` function as a replacement for :c:func:" +"`PyList_GetItem` that returns a :term:`strong reference` instead of a :term:" +"`borrowed reference`. (Contributed by Sam Gross in :gh:`114329`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2064 +#: ../../whatsnew/3.13.rst:2138 msgid "" -"Add :c:func:`PyUnicode_EqualToUTF8AndSize` and :c:func:" -"`PyUnicode_EqualToUTF8` functions: compare Unicode object with a :c:expr:" -"`const char*` UTF-8 encoded string and return true (``1``) if they are " -"equal, or false (``0``) otherwise. These functions do not raise exceptions. " -"(Contributed by Serhiy Storchaka in :gh:`110289`.)" +"Add the :c:func:`PyList_Extend` and :c:func:`PyList_Clear` functions, " +"mirroring the Python :meth:`!list.extend` and :meth:`!list.clear` methods. " +"(Contributed by Victor Stinner in :gh:`111138`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2070 +#: ../../whatsnew/3.13.rst:2142 msgid "" -"Add :c:func:`PyThreadState_GetUnchecked()` function: similar to :c:func:" -"`PyThreadState_Get()`, but don't kill the process with a fatal error if it " -"is NULL. The caller is responsible to check if the result is NULL. " -"Previously, the function was private and known as " -"``_PyThreadState_UncheckedGet()``. (Contributed by Victor Stinner in :gh:" -"`108867`.)" +"Add the :c:func:`PyLong_AsInt` function. It behaves similarly to :c:func:" +"`PyLong_AsLong`, but stores the result in a C :c:expr:`int` instead of a C :" +"c:expr:`long`. (Contributed by Victor Stinner in :gh:`108014`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2077 +#: ../../whatsnew/3.13.rst:2147 msgid "" -"Add :c:func:`PySys_AuditTuple` function: similar to :c:func:`PySys_Audit`, " -"but pass event arguments as a Python :class:`tuple` object. (Contributed by " -"Victor Stinner in :gh:`85283`.)" +"Add the :c:func:`PyLong_AsNativeBytes`, :c:func:`PyLong_FromNativeBytes`, " +"and :c:func:`PyLong_FromUnsignedNativeBytes` functions to simplify " +"converting between native integer types and Python :class:`int` objects. " +"(Contributed by Steve Dower in :gh:`111140`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2081 +#: ../../whatsnew/3.13.rst:2153 msgid "" -":c:func:`PyArg_ParseTupleAndKeywords` now supports non-ASCII keyword " -"parameter names. (Contributed by Serhiy Storchaka in :gh:`110815`.)" +"Add :c:func:`PyModule_Add` function, which is similar to :c:func:" +"`PyModule_AddObjectRef` and :c:func:`PyModule_AddObject`, but always steals " +"a reference to the value. (Contributed by Serhiy Storchaka in :gh:`86493`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2085 +#: ../../whatsnew/3.13.rst:2158 msgid "" -"Add :c:func:`PyMem_RawMalloc`, :c:func:`PyMem_RawCalloc`, :c:func:" -"`PyMem_RawRealloc` and :c:func:`PyMem_RawFree` to the limited C API (version " -"3.13). (Contributed by Victor Stinner in :gh:`85283`.)" +"Add the :c:func:`PyObject_GenericHash` function that implements the default " +"hashing function of a Python object. (Contributed by Serhiy Storchaka in :gh:" +"`113024`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2090 +#: ../../whatsnew/3.13.rst:2162 msgid "" -"Add :c:func:`PySys_Audit` and :c:func:`PySys_AuditTuple` functions to the " -"limited C API. (Contributed by Victor Stinner in :gh:`85283`.)" +"Add the :c:func:`Py_HashPointer` function to hash a raw pointer. " +"(Contributed by Victor Stinner in :gh:`111545`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2094 +#: ../../whatsnew/3.13.rst:2165 msgid "" -"Add :c:func:`PyErr_FormatUnraisable` function: similar to :c:func:" -"`PyErr_WriteUnraisable`, but allow customizing the warning message. " -"(Contributed by Serhiy Storchaka in :gh:`108082`.)" +"Add the :c:func:`PyObject_VisitManagedDict` and :c:func:" +"`PyObject_ClearManagedDict` functions. which must be called by the traverse " +"and clear functions of a type using the :c:macro:`Py_TPFLAGS_MANAGED_DICT` " +"flag. The `pythoncapi-compat project`_ can be used to use these functions " +"with Python 3.11 and 3.12. (Contributed by Victor Stinner in :gh:`107073`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2098 +#: ../../whatsnew/3.13.rst:2173 msgid "" -"Add :c:func:`PyList_Extend` and :c:func:`PyList_Clear` functions: similar to " -"Python ``list.extend()`` and ``list.clear()`` methods. (Contributed by " -"Victor Stinner in :gh:`111138`.)" +"Add the :c:func:`PyRefTracer_SetTracer` and :c:func:`PyRefTracer_GetTracer` " +"functions, which enable tracking object creation and destruction in the same " +"way that the :mod:`tracemalloc` module does. (Contributed by Pablo Galindo " +"in :gh:`93502`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2102 +#: ../../whatsnew/3.13.rst:2179 msgid "" -"Add :c:func:`PyDict_Pop` and :c:func:`PyDict_PopString` functions: remove a " -"key from a dictionary and optionally return the removed value. This is " -"similar to :meth:`dict.pop`, but without the default value and not raising :" -"exc:`KeyError` if the key is missing. (Contributed by Stefan Behnel and " -"Victor Stinner in :gh:`111262`.)" +"Add the :c:func:`PySys_AuditTuple` function as an alternative to :c:func:" +"`PySys_Audit` that takes event arguments as a Python :class:`tuple` object. " +"(Contributed by Victor Stinner in :gh:`85283`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2108 +#: ../../whatsnew/3.13.rst:2184 msgid "" -"Add :c:func:`Py_HashPointer` function to hash a pointer. (Contributed by " -"Victor Stinner in :gh:`111545`.)" +"Add the :c:func:`PyThreadState_GetUnchecked()` function as an alternative " +"to :c:func:`PyThreadState_Get()` that doesn't kill the process with a fatal " +"error if it is ``NULL``. The caller is responsible for checking if the " +"result is ``NULL``. (Contributed by Victor Stinner in :gh:`108867`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2111 +#: ../../whatsnew/3.13.rst:2190 msgid "" -"Add :c:func:`PyObject_GenericHash` function that implements the default " -"hashing function of a Python object. (Contributed by Serhiy Storchaka in :gh:" -"`113024`.)" +"Add the :c:func:`PyType_GetFullyQualifiedName` function to get the type's " +"fully qualified name. The module name is prepended if ``type.__module__`` is " +"a string and is not equal to either ``'builtins'`` or ``'__main__'``. " +"(Contributed by Victor Stinner in :gh:`111696`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2115 -msgid "Add PyTime C API:" +#: ../../whatsnew/3.13.rst:2196 +msgid "" +"Add the :c:func:`PyType_GetModuleName` function to get the type's module " +"name. This is equivalent to getting the ``type.__module__`` attribute. " +"(Contributed by Eric Snow and Victor Stinner in :gh:`111696`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2117 -msgid ":c:type:`PyTime_t` type." +#: ../../whatsnew/3.13.rst:2201 +msgid "" +"Add the :c:func:`PyUnicode_EqualToUTF8AndSize` and :c:func:" +"`PyUnicode_EqualToUTF8` functions to compare a Unicode object with a :c:expr:" +"`const char*` UTF-8 encoded string and ``1`` if they are equal or ``0`` " +"otherwise. These functions do not raise exceptions. (Contributed by Serhiy " +"Storchaka in :gh:`110289`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2118 -msgid ":c:var:`PyTime_MIN` and :c:var:`PyTime_MAX` constants." +#: ../../whatsnew/3.13.rst:2208 +msgid "" +"Add the :c:func:`PyWeakref_GetRef` function as an alternative to :c:func:" +"`PyWeakref_GetObject` that returns a :term:`strong reference` or ``NULL`` if " +"the referent is no longer live. (Contributed by Victor Stinner in :gh:" +"`105927`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2119 -msgid "Add functions:" +#: ../../whatsnew/3.13.rst:2214 +msgid "Add fixed variants of functions which silently ignore errors:" msgstr "" -#: ../../whatsnew/3.13.rst:2121 -msgid ":c:func:`PyTime_AsSecondsDouble`." -msgstr "" - -#: ../../whatsnew/3.13.rst:2122 -msgid ":c:func:`PyTime_Monotonic`." -msgstr "" - -#: ../../whatsnew/3.13.rst:2123 -msgid ":c:func:`PyTime_MonotonicRaw`." -msgstr "" - -#: ../../whatsnew/3.13.rst:2124 -msgid ":c:func:`PyTime_PerfCounter`." -msgstr "" - -#: ../../whatsnew/3.13.rst:2125 -msgid ":c:func:`PyTime_PerfCounterRaw`." -msgstr "" - -#: ../../whatsnew/3.13.rst:2126 -msgid ":c:func:`PyTime_Time`." +#: ../../whatsnew/3.13.rst:2216 +msgid "" +":c:func:`PyObject_HasAttrWithError` replaces :c:func:`PyObject_HasAttr`." msgstr "" -#: ../../whatsnew/3.13.rst:2127 -msgid ":c:func:`PyTime_TimeRaw`." +#: ../../whatsnew/3.13.rst:2217 +msgid "" +":c:func:`PyObject_HasAttrStringWithError` replaces :c:func:" +"`PyObject_HasAttrString`." msgstr "" -#: ../../whatsnew/3.13.rst:2129 -msgid "(Contributed by Victor Stinner and Petr Viktorin in :gh:`110850`.)" +#: ../../whatsnew/3.13.rst:2219 +msgid "" +":c:func:`PyMapping_HasKeyWithError` replaces :c:func:`PyMapping_HasKey`." msgstr "" -#: ../../whatsnew/3.13.rst:2131 +#: ../../whatsnew/3.13.rst:2220 msgid "" -"Add :c:func:`PyLong_AsNativeBytes`, :c:func:`PyLong_FromNativeBytes` and :c:" -"func:`PyLong_FromUnsignedNativeBytes` functions to simplify converting " -"between native integer types and Python :class:`int` objects. (Contributed " -"by Steve Dower in :gh:`111140`.)" +":c:func:`PyMapping_HasKeyStringWithError` replaces :c:func:" +"`PyMapping_HasKeyString`." msgstr "" -#: ../../whatsnew/3.13.rst:2136 +#: ../../whatsnew/3.13.rst:2223 msgid "" -"Add :c:func:`PyType_GetFullyQualifiedName` function to get the type's fully " -"qualified name. Equivalent to ``f\"{type.__module__}.{type." -"__qualname__}\"``, or ``type.__qualname__`` if ``type.__module__`` is not a " -"string or is equal to ``\"builtins\"``. (Contributed by Victor Stinner in :" -"gh:`111696`.)" +"The new functions return ``-1`` for errors and the standard ``1`` for true " +"and ``0`` for false." msgstr "" -#: ../../whatsnew/3.13.rst:2142 -msgid "" -"Add :c:func:`PyType_GetModuleName` function to get the type's module name. " -"Equivalent to getting the ``type.__module__`` attribute. (Contributed by " -"Eric Snow and Victor Stinner in :gh:`111696`.)" +#: ../../whatsnew/3.13.rst:2226 +msgid "(Contributed by Serhiy Storchaka in :gh:`108511`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2146 -msgid "" -"Add support for ``%T``, ``%#T``, ``%N`` and ``%#N`` formats to :c:func:" -"`PyUnicode_FromFormat`: format the fully qualified name of an object type " -"and of a type: call :c:func:`PyType_GetModuleName`. See :pep:`737` for more " -"information. (Contributed by Victor Stinner in :gh:`111696`.)" +#: ../../whatsnew/3.13.rst:2230 +msgid "Changed C APIs" msgstr "" -#: ../../whatsnew/3.13.rst:2152 +#: ../../whatsnew/3.13.rst:2232 msgid "" -"Add :c:func:`Py_GetConstant` and :c:func:`Py_GetConstantBorrowed` functions " -"to get constants. For example, ``Py_GetConstant(Py_CONSTANT_ZERO)`` returns " -"a :term:`strong reference` to the constant zero. (Contributed by Victor " -"Stinner in :gh:`115754`.)" +"The *keywords* parameter of :c:func:`PyArg_ParseTupleAndKeywords` and :c:" +"func:`PyArg_VaParseTupleAndKeywords` now has type :c:expr:`char * const *` " +"in C and :c:expr:`const char * const *` in C++, instead of :c:expr:`char " +"**`. In C++, this makes these functions compatible with arguments of type :c:" +"expr:`const char * const *`, :c:expr:`const char **`, or :c:expr:`char * " +"const *` without an explicit type cast. In C, the functions only support " +"arguments of type :c:expr:`char * const *`. This can be overridden with the :" +"c:macro:`PY_CXX_CONST` macro. (Contributed by Serhiy Storchaka in :gh:" +"`65210`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2157 +#: ../../whatsnew/3.13.rst:2244 msgid "" -"Add :c:func:`PyType_GetModuleByDef` to the limited C API (Contributed by " -"Victor Stinner in :gh:`116936`.)" +":c:func:`PyArg_ParseTupleAndKeywords` now supports non-ASCII keyword " +"parameter names. (Contributed by Serhiy Storchaka in :gh:`110815`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2160 +#: ../../whatsnew/3.13.rst:2248 msgid "" -"Add two new functions to the C-API, :c:func:`PyRefTracer_SetTracer` and :c:" -"func:`PyRefTracer_GetTracer`, that allow to track object creation and " -"destruction the same way the :mod:`tracemalloc` module does. (Contributed by " -"Pablo Galindo in :gh:`93502`.)" +"The :c:func:`!PyCode_GetFirstFree` function is now unstable API and is now " +"named :c:func:`PyUnstable_Code_GetFirstFree`. (Contributed by Bogdan " +"Romanyuk in :gh:`115781`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2165 +#: ../../whatsnew/3.13.rst:2252 msgid "" -"Add :c:func:`PyEval_GetFrameBuiltins`, :c:func:`PyEval_GetFrameGlobals`, " -"and :c:func:`PyEval_GetFrameLocals` to the C API. These replacements for :c:" -"func:`PyEval_GetBuiltins`, :c:func:`PyEval_GetGlobals`, and :c:func:" -"`PyEval_GetLocals` return :term:`strong references ` " -"rather than borrowed references. (Added as part of :pep:`667`.)" +"The :c:func:`PyDict_GetItem`, :c:func:`PyDict_GetItemString`, :c:func:" +"`PyMapping_HasKey`, :c:func:`PyMapping_HasKeyString`, :c:func:" +"`PyObject_HasAttr`, :c:func:`PyObject_HasAttrString`, and :c:func:" +"`PySys_GetObject` functions, each of which clears all errors which occurred " +"when calling them now reports these errors using :func:`sys.unraisablehook`. " +"You may replace them with other functions as recommended in the " +"documentation. (Contributed by Serhiy Storchaka in :gh:`106672`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2171 +#: ../../whatsnew/3.13.rst:2261 msgid "" -"Add :c:type:`PyMutex` API, a lightweight mutex that occupies a single byte. " -"The :c:func:`PyMutex_Lock` function will release the GIL (if currently held) " -"if the operation needs to block. (Contributed by Sam Gross in :gh:`108724`.)" +"Add support for the ``%T``, ``%#T``, ``%N`` and ``%#N`` formats to :c:func:" +"`PyUnicode_FromFormat`:" msgstr "" -#: ../../whatsnew/3.13.rst:2177 -msgid "Build Changes" +#: ../../whatsnew/3.13.rst:2264 +msgid "``%T``: Get the fully qualified name of an object type" msgstr "" -#: ../../whatsnew/3.13.rst:2179 -msgid "" -"The :file:`configure` option :option:`--with-system-libmpdec` now defaults " -"to ``yes``. The bundled copy of ``libmpdecimal`` will be removed in Python " -"3.15." +#: ../../whatsnew/3.13.rst:2265 +msgid "``%#T``: As above, but use a colon as the separator" msgstr "" -#: ../../whatsnew/3.13.rst:2183 -msgid "" -"Autoconf 2.71 and aclocal 1.16.4 are now required to regenerate the :file:" -"`configure` script. (Contributed by Christian Heimes in :gh:`89886`.)" +#: ../../whatsnew/3.13.rst:2266 +msgid "``%N``: Get the fully qualified name of a type" msgstr "" -#: ../../whatsnew/3.13.rst:2187 -msgid "" -"SQLite 3.15.2 or newer is required to build the :mod:`sqlite3` extension " -"module. (Contributed by Erlend Aasland in :gh:`105875`.)" +#: ../../whatsnew/3.13.rst:2267 +msgid "``%#N``: As above, but use a colon as the separator" msgstr "" -#: ../../whatsnew/3.13.rst:2190 +#: ../../whatsnew/3.13.rst:2269 msgid "" -"Python built with :file:`configure` :option:`--with-trace-refs` (tracing " -"references) is now ABI compatible with the Python release build and :ref:" -"`debug build `. (Contributed by Victor Stinner in :gh:`108634`.)" +"See :pep:`737` for more information. (Contributed by Victor Stinner in :gh:" +"`111696`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2195 +#: ../../whatsnew/3.13.rst:2272 msgid "" -"Building CPython now requires a compiler with support for the C11 atomic " -"library, GCC built-in atomic functions, or MSVC interlocked intrinsics." +"You no longer have to define the ``PY_SSIZE_T_CLEAN`` macro before " +"including :file:`Python.h` when using ``#`` formats in :ref:`format codes " +"`. APIs accepting the format codes always " +"use ``Py_ssize_t`` for ``#`` formats. (Contributed by Inada Naoki in :gh:" +"`104922`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2198 +#: ../../whatsnew/3.13.rst:2278 msgid "" -"The ``errno``, ``fcntl``, ``grp``, ``md5``, ``pwd``, ``resource``, " -"``termios``, ``winsound``, ``_ctypes_test``, ``_multiprocessing." -"posixshmem``, ``_scproxy``, ``_stat``, ``_statistics``, ``_testconsole``, " -"``_testimportmultiple`` and ``_uuid`` C extensions are now built with the :" -"ref:`limited C API `. (Contributed by Victor Stinner in :gh:" -"`85283`.)" +"If Python is built in :ref:`debug mode ` or :option:`with " +"assertions <--with-assertions>`, :c:func:`PyTuple_SET_ITEM` and :c:func:" +"`PyList_SET_ITEM` now check the index argument with an assertion. " +"(Contributed by Victor Stinner in :gh:`106168`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2205 -msgid "" -"``wasm32-wasi`` is now a :pep:`11` tier 2 platform. (Contributed by Brett " -"Cannon in :gh:`115192`.)" +#: ../../whatsnew/3.13.rst:2286 +msgid "Limited C API Changes" msgstr "" -#: ../../whatsnew/3.13.rst:2208 -msgid "" -"``wasm32-emscripten`` is no longer a :pep:`11` supported platform. " -"(Contributed by Brett Cannon in :gh:`115192`.)" +#: ../../whatsnew/3.13.rst:2288 +msgid "The following functions are now included in the Limited C API:" msgstr "" -#: ../../whatsnew/3.13.rst:2211 -msgid "" -"Python now bundles the `mimalloc library `__. It is licensed under the MIT license; see :ref:`mimalloc " -"license `. The bundled mimalloc has custom changes, see :" -"gh:`113141` for details. (Contributed by Dino Viehland in :gh:`109914`.)" -msgstr "" +#: ../../whatsnew/3.13.rst:2290 +msgid ":c:func:`PyMem_RawMalloc`" +msgstr ":c:func:`PyMem_RawMalloc`" -#: ../../whatsnew/3.13.rst:2216 -msgid "" -"On POSIX systems, the pkg-config (``.pc``) filenames now include the ABI " -"flags. For example, the free-threaded build generates ``python-3.13t.pc`` " -"and the debug build generates ``python-3.13d.pc``." -msgstr "" +#: ../../whatsnew/3.13.rst:2291 +msgid ":c:func:`PyMem_RawCalloc`" +msgstr ":c:func:`PyMem_RawCalloc`" -#: ../../whatsnew/3.13.rst:2222 -msgid "Porting to Python 3.13" -msgstr "" +#: ../../whatsnew/3.13.rst:2292 +msgid ":c:func:`PyMem_RawRealloc`" +msgstr ":c:func:`PyMem_RawRealloc`" -#: ../../whatsnew/3.13.rst:2224 -msgid "" -"This section lists previously described changes and other bugfixes that may " -"require changes to your code." -msgstr "" +#: ../../whatsnew/3.13.rst:2293 +msgid ":c:func:`PyMem_RawFree`" +msgstr ":c:func:`PyMem_RawFree`" -#: ../../whatsnew/3.13.rst:2228 -msgid "Changes in the Python API" -msgstr "" +#: ../../whatsnew/3.13.rst:2294 +msgid ":c:func:`PySys_Audit`" +msgstr ":c:func:`PySys_Audit`" -#: ../../whatsnew/3.13.rst:2230 +#: ../../whatsnew/3.13.rst:2295 +msgid ":c:func:`PySys_AuditTuple`" +msgstr ":c:func:`PySys_AuditTuple`" + +#: ../../whatsnew/3.13.rst:2296 +msgid ":c:func:`PyType_GetModuleByDef`" +msgstr ":c:func:`PyType_GetModuleByDef`" + +#: ../../whatsnew/3.13.rst:2298 msgid "" -"An :exc:`OSError` is now raised by :func:`getpass.getuser` for any failure " -"to retrieve a username, instead of :exc:`ImportError` on non-Unix platforms " -"or :exc:`KeyError` on Unix platforms where the password database is empty." +"(Contributed by Victor Stinner in :gh:`85283`, :gh:`85283`, and :gh:" +"`116936`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2234 +#: ../../whatsnew/3.13.rst:2300 msgid "" -"The :mod:`threading` module now expects the :mod:`!_thread` module to have " -"an ``_is_main_interpreter`` attribute. It is a function with no arguments " -"that returns ``True`` if the current interpreter is the main interpreter." +"Python built with :option:`--with-trace-refs` (tracing references) now " +"supports the :ref:`Limited API `. (Contributed by Victor " +"Stinner in :gh:`108634`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2239 -msgid "" -"Any library or application that provides a custom ``_thread`` module must " -"provide ``_is_main_interpreter()``, just like the module's other \"private\" " -"attributes. (See :gh:`112826`.)" +#: ../../whatsnew/3.13.rst:2306 +msgid "Removed C APIs" msgstr "" -#: ../../whatsnew/3.13.rst:2244 +#: ../../whatsnew/3.13.rst:2308 msgid "" -":class:`mailbox.Maildir` now ignores files with a leading dot. (Contributed " -"by Zackery Spytz in :gh:`65559`.)" +"Remove several functions, macros, variables, etc with names prefixed by " +"``_Py`` or ``_PY`` (which are considered private). If your project is " +"affected by one of these removals and you believe that the removed API " +"should remain available, please :ref:`open a new issue ` " +"to request a public C API and add ``cc: @vstinner`` to the issue to notify " +"Victor Stinner. (Contributed by Victor Stinner in :gh:`106320`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2247 +#: ../../whatsnew/3.13.rst:2316 msgid "" -":meth:`pathlib.Path.glob` and :meth:`~pathlib.Path.rglob` now return both " -"files and directories if a pattern that ends with \"``**``\" is given, " -"rather than directories only. Users may add a trailing slash to match only " -"directories." +"Remove old buffer protocols deprecated in Python 3.0. Use :ref:" +"`bufferobjects` instead." msgstr "" -#: ../../whatsnew/3.13.rst:2252 +#: ../../whatsnew/3.13.rst:2319 msgid "" -"The value of the :attr:`!mode` attribute of :class:`gzip.GzipFile` was " -"changed from integer (``1`` or ``2``) to string (``'rb'`` or ``'wb'``). The " -"value of the :attr:`!mode` attribute of the readable file-like object " -"returned by :meth:`zipfile.ZipFile.open` was changed from ``'r'`` to " -"``'rb'``. (Contributed by Serhiy Storchaka in :gh:`115961`.)" +":c:func:`!PyObject_CheckReadBuffer`: Use :c:func:`PyObject_CheckBuffer` to " +"test whether the object supports the buffer protocol. Note that :c:func:" +"`PyObject_CheckBuffer` doesn't guarantee that :c:func:`PyObject_GetBuffer` " +"will succeed. To test if the object is actually readable, see the next " +"example of :c:func:`PyObject_GetBuffer`." msgstr "" -#: ../../whatsnew/3.13.rst:2258 +#: ../../whatsnew/3.13.rst:2327 msgid "" -":class:`functools.partial` now emits a :exc:`FutureWarning` when it is used " -"as a method. Its behavior will be changed in future Python versions. Wrap it " -"in :func:`staticmethod` if you want to preserve the old behavior. " -"(Contributed by Serhiy Storchaka in :gh:`121027`.)" +":c:func:`!PyObject_AsCharBuffer`, :c:func:`!PyObject_AsReadBuffer`: Use :c:" +"func:`PyObject_GetBuffer` and :c:func:`PyBuffer_Release` instead:" msgstr "" -#: ../../whatsnew/3.13.rst:2266 +#: ../../whatsnew/3.13.rst:2330 msgid "" -"Calling :func:`locals` in an :term:`optimized scope` now produces an " -"independent snapshot on each call, and hence no longer implicitly updates " -"previously returned references. Obtaining the legacy CPython behaviour now " -"requires explicit calls to update the initially returned dictionary with the " -"results of subsequent calls to :func:`!locals`. Code execution functions " -"that implicitly target :func:`!locals` (such as ``exec`` and ``eval``) must " -"be passed an explicit namespace to access their results in an optimized " -"scope. (Changed as part of :pep:`667`.)" +"Py_buffer view;\n" +"if (PyObject_GetBuffer(obj, &view, PyBUF_SIMPLE) < 0) {\n" +" return NULL;\n" +"}\n" +"// Use `view.buf` and `view.len` to read from the buffer.\n" +"// You may need to cast buf as `(const char*)view.buf`.\n" +"PyBuffer_Release(&view);" msgstr "" -#: ../../whatsnew/3.13.rst:2275 +#: ../../whatsnew/3.13.rst:2340 msgid "" -"Calling :func:`locals` from a comprehension at module or class scope " -"(including via ``exec`` or ``eval``) once more behaves as if the " -"comprehension were running as an independent nested function (i.e. the local " -"variables from the containing scope are not included). In Python 3.12, this " -"had changed to include the local variables from the containing scope when " -"implementing :pep:`709`. (Changed as part of :pep:`667`.)" +":c:func:`!PyObject_AsWriteBuffer`: Use :c:func:`PyObject_GetBuffer` and :c:" +"func:`PyBuffer_Release` instead:" msgstr "" -#: ../../whatsnew/3.13.rst:2282 +#: ../../whatsnew/3.13.rst:2343 msgid "" -"Accessing :attr:`FrameType.f_locals ` in an :term:`optimized " -"scope` now returns a write-through proxy rather than a snapshot that gets " -"updated at ill-specified times. If a snapshot is desired, it must be created " -"explicitly with ``dict`` or the proxy's ``.copy()`` method. (Changed as part " -"of :pep:`667`.)" +"Py_buffer view;\n" +"if (PyObject_GetBuffer(obj, &view, PyBUF_WRITABLE) < 0) {\n" +" return NULL;\n" +"}\n" +"// Use `view.buf` and `view.len` to write to the buffer.\n" +"PyBuffer_Release(&view);" msgstr "" -#: ../../whatsnew/3.13.rst:2289 -msgid "Changes in the C API" +#: ../../whatsnew/3.13.rst:2352 +msgid "(Contributed by Inada Naoki in :gh:`85275`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2291 -msgid "" -"``Python.h`` no longer includes the ```` standard header. It was " -"included for the ``finite()`` function which is now provided by the ```` header. It should now be included explicitly if needed. Remove also the " -"``HAVE_IEEEFP_H`` macro. (Contributed by Victor Stinner in :gh:`108765`.)" +#: ../../whatsnew/3.13.rst:2354 +msgid "Remove various functions deprecated in Python 3.9:" msgstr "" -#: ../../whatsnew/3.13.rst:2297 +#: ../../whatsnew/3.13.rst:2356 msgid "" -"``Python.h`` no longer includes these standard header files: ````, " -"```` and ````. If needed, they should now be " -"included explicitly. For example, ```` provides the ``clock()`` and " -"``gmtime()`` functions, ```` provides the ``select()`` " -"function, and ```` provides the ``futimes()``, " -"``gettimeofday()`` and ``setitimer()`` functions. (Contributed by Victor " -"Stinner in :gh:`108765`.)" +":c:func:`!PyEval_CallObject`, :c:func:`!PyEval_CallObjectWithKeywords`: Use :" +"c:func:`PyObject_CallNoArgs` or :c:func:`PyObject_Call` instead." msgstr "" -#: ../../whatsnew/3.13.rst:2305 +#: ../../whatsnew/3.13.rst:2361 msgid "" -"On Windows, ``Python.h`` no longer includes the ```` standard " -"header file. If needed, it should now be included explicitly. For example, " -"it provides ``offsetof()`` function, and ``size_t`` and ``ptrdiff_t`` types. " -"Including ```` explicitly was already needed by all other " -"platforms, the ``HAVE_STDDEF_H`` macro is only defined on Windows. " -"(Contributed by Victor Stinner in :gh:`108765`.)" +"In :c:func:`PyObject_Call`, positional arguments must be a :class:`tuple` " +"and must not be ``NULL``, and keyword arguments must be a :class:`dict` or " +"``NULL``, whereas the removed functions checked argument types and accepted " +"``NULL`` positional and keyword arguments. To replace " +"``PyEval_CallObjectWithKeywords(func, NULL, kwargs)`` with :c:func:" +"`PyObject_Call`, pass an empty tuple as positional arguments using :c:func:" +"`PyTuple_New(0) `." msgstr "" -#: ../../whatsnew/3.13.rst:2312 +#: ../../whatsnew/3.13.rst:2371 msgid "" -"If the :c:macro:`Py_LIMITED_API` macro is defined, :c:macro:`!" -"Py_BUILD_CORE`, :c:macro:`!Py_BUILD_CORE_BUILTIN` and :c:macro:`!" -"Py_BUILD_CORE_MODULE` macros are now undefined by ````. " -"(Contributed by Victor Stinner in :gh:`85283`.)" +":c:func:`!PyEval_CallFunction`: Use :c:func:`PyObject_CallFunction` instead." msgstr "" -#: ../../whatsnew/3.13.rst:2317 +#: ../../whatsnew/3.13.rst:2373 msgid "" -"The old trashcan macros ``Py_TRASHCAN_SAFE_BEGIN`` and " -"``Py_TRASHCAN_SAFE_END`` were removed. They should be replaced by the new " -"macros ``Py_TRASHCAN_BEGIN`` and ``Py_TRASHCAN_END``." +":c:func:`!PyEval_CallMethod`: Use :c:func:`PyObject_CallMethod` instead." msgstr "" -#: ../../whatsnew/3.13.rst:2321 -msgid "A ``tp_dealloc`` function that has the old macros, such as::" +#: ../../whatsnew/3.13.rst:2375 +msgid ":c:func:`!PyCFunction_Call`: Use :c:func:`PyObject_Call` instead." msgstr "" -#: ../../whatsnew/3.13.rst:2323 -msgid "" -"static void\n" -"mytype_dealloc(mytype *p)\n" -"{\n" -" PyObject_GC_UnTrack(p);\n" -" Py_TRASHCAN_SAFE_BEGIN(p);\n" -" ...\n" -" Py_TRASHCAN_SAFE_END\n" -"}" -msgstr "" - -#: ../../whatsnew/3.13.rst:2332 -msgid "should migrate to the new macros as follows::" -msgstr "" - -#: ../../whatsnew/3.13.rst:2334 -msgid "" -"static void\n" -"mytype_dealloc(mytype *p)\n" -"{\n" -" PyObject_GC_UnTrack(p);\n" -" Py_TRASHCAN_BEGIN(p, mytype_dealloc)\n" -" ...\n" -" Py_TRASHCAN_END\n" -"}" +#: ../../whatsnew/3.13.rst:2378 +msgid "(Contributed by Victor Stinner in :gh:`105107`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2343 +#: ../../whatsnew/3.13.rst:2380 msgid "" -"Note that ``Py_TRASHCAN_BEGIN`` has a second argument which should be the " -"deallocation function it is in. The new macros were added in Python 3.8 and " -"the old macros were deprecated in Python 3.11. (Contributed by Irit Katriel " -"in :gh:`105111`.)" +"Remove the following old functions to configure the Python initialization, " +"deprecated in Python 3.11:" msgstr "" -#: ../../whatsnew/3.13.rst:2348 +#: ../../whatsnew/3.13.rst:2383 msgid "" -"Functions :c:func:`PyDict_GetItem`, :c:func:`PyDict_GetItemString`, :c:func:" -"`PyMapping_HasKey`, :c:func:`PyMapping_HasKeyString`, :c:func:" -"`PyObject_HasAttr`, :c:func:`PyObject_HasAttrString`, and :c:func:" -"`PySys_GetObject`, which clear all errors which occurred when calling them, " -"now report them using :func:`sys.unraisablehook`. You may replace them with " -"other functions as recommended in the documentation. (Contributed by Serhiy " -"Storchaka in :gh:`106672`.)" +":c:func:`!PySys_AddWarnOptionUnicode`: Use :c:member:`PyConfig.warnoptions` " +"instead." msgstr "" -#: ../../whatsnew/3.13.rst:2357 +#: ../../whatsnew/3.13.rst:2385 msgid "" -":c:func:`!PyCode_GetFirstFree` is an unstable API now and has been renamed " -"to :c:func:`PyUnstable_Code_GetFirstFree`. (Contributed by Bogdan Romanyuk " -"in :gh:`115781`.)" +":c:func:`!PySys_AddWarnOption`: Use :c:member:`PyConfig.warnoptions` instead." msgstr "" -#: ../../whatsnew/3.13.rst:2363 -msgid "" -"The effects of mutating the dictionary returned from :c:func:" -"`PyEval_GetLocals` in an :term:`optimized scope` have changed. New dict " -"entries added this way will now *only* be visible to subsequent :c:func:" -"`PyEval_GetLocals` calls in that frame, as :c:func:`PyFrame_GetLocals`, :" -"func:`locals`, and :attr:`FrameType.f_locals ` no longer " -"access the same underlying cached dictionary. Changes made to entries for " -"actual variable names and names added via the write-through proxy interfaces " -"will be overwritten on subsequent calls to :c:func:`PyEval_GetLocals` in " -"that frame. The recommended code update depends on how the function was " -"being used, so refer to the deprecation notice on the function for details. " -"(Changed as part of :pep:`667`.)" +#: ../../whatsnew/3.13.rst:2387 +msgid ":c:func:`!PySys_AddXOption`: Use :c:member:`PyConfig.xoptions` instead." msgstr "" -#: ../../whatsnew/3.13.rst:2374 +#: ../../whatsnew/3.13.rst:2389 msgid "" -"Calling :c:func:`PyFrame_GetLocals` in an :term:`optimized scope` now " -"returns a write-through proxy rather than a snapshot that gets updated at " -"ill-specified times. If a snapshot is desired, it must be created explicitly " -"(e.g. with :c:func:`PyDict_Copy`) or by calling the new :c:func:" -"`PyEval_GetFrameLocals` API. (Changed as part of :pep:`667`.)" +":c:func:`!PySys_HasWarnOptions`: Use :c:member:`PyConfig.xoptions` instead." msgstr "" -#: ../../whatsnew/3.13.rst:2379 +#: ../../whatsnew/3.13.rst:2391 msgid "" -":c:func:`!PyFrame_FastToLocals` and :c:func:`!PyFrame_FastToLocalsWithError` " -"no longer have any effect. Calling these functions has been redundant since " -"Python 3.11, when :c:func:`PyFrame_GetLocals` was first introduced. (Changed " -"as part of :pep:`667`.)" +":c:func:`!PySys_SetPath`: Set :c:member:`PyConfig.module_search_paths` " +"instead." msgstr "" -#: ../../whatsnew/3.13.rst:2384 +#: ../../whatsnew/3.13.rst:2393 msgid "" -":c:func:`!PyFrame_LocalsToFast` no longer has any effect. Calling this " -"function is redundant now that :c:func:`PyFrame_GetLocals` returns a write-" -"through proxy for :term:`optimized scopes `. (Changed as " -"part of :pep:`667`.)" +":c:func:`!Py_SetPath`: Set :c:member:`PyConfig.module_search_paths` instead." msgstr "" -#: ../../whatsnew/3.13.rst:2389 -msgid "Removed C APIs" -msgstr "" - -#: ../../whatsnew/3.13.rst:2391 +#: ../../whatsnew/3.13.rst:2395 msgid "" -"Remove many APIs (functions, macros, variables) with names prefixed by " -"``_Py`` or ``_PY`` (considered as private API). If your project is affected " -"by one of these removals and you consider that the removed API should remain " -"available, please open a new issue to request a public C API and add ``cc " -"@vstinner`` to the issue to notify Victor Stinner. (Contributed by Victor " -"Stinner in :gh:`106320`.)" +":c:func:`!Py_SetStandardStreamEncoding`: Set :c:member:`PyConfig." +"stdio_encoding` instead, and set also maybe :c:member:`PyConfig." +"legacy_windows_stdio` (on Windows)." msgstr "" #: ../../whatsnew/3.13.rst:2398 -msgid "Remove functions deprecated in Python 3.9:" +msgid "" +":c:func:`!_Py_SetProgramFullPath`: Set :c:member:`PyConfig.executable` " +"instead." msgstr "" -#: ../../whatsnew/3.13.rst:2400 +#: ../../whatsnew/3.13.rst:2401 msgid "" -"``PyEval_CallObject()``, ``PyEval_CallObjectWithKeywords()``: use :c:func:" -"`PyObject_CallNoArgs` or :c:func:`PyObject_Call` instead. Warning: :c:func:" -"`PyObject_Call` positional arguments must be a :class:`tuple` and must not " -"be ``NULL``, keyword arguments must be a :class:`dict` or ``NULL``, whereas " -"removed functions checked arguments type and accepted ``NULL`` positional " -"and keyword arguments. To replace ``PyEval_CallObjectWithKeywords(func, " -"NULL, kwargs)`` with :c:func:`PyObject_Call`, pass an empty tuple as " -"positional arguments using :c:func:`PyTuple_New(0) `." +"Use the new :c:type:`PyConfig` API of the :ref:`Python Initialization " +"Configuration ` instead (:pep:`587`), added to Python 3.8. " +"(Contributed by Victor Stinner in :gh:`105145`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2409 -msgid "``PyEval_CallFunction()``: use :c:func:`PyObject_CallFunction` instead." +#: ../../whatsnew/3.13.rst:2405 +msgid "" +"Remove :c:func:`!PyEval_AcquireLock` and :c:func:`!PyEval_ReleaseLock` " +"functions, deprecated in Python 3.2. They didn't update the current thread " +"state. They can be replaced with:" msgstr "" #: ../../whatsnew/3.13.rst:2410 -msgid "``PyEval_CallMethod()``: use :c:func:`PyObject_CallMethod` instead." -msgstr "" +msgid ":c:func:`PyEval_SaveThread` and :c:func:`PyEval_RestoreThread`;" +msgstr ":c:func:`PyEval_SaveThread` 和 :c:func:`PyEval_RestoreThread`;" #: ../../whatsnew/3.13.rst:2411 -msgid "``PyCFunction_Call()``: use :c:func:`PyObject_Call` instead." +msgid "" +"low-level :c:func:`PyEval_AcquireThread` and :c:func:`PyEval_RestoreThread`;" msgstr "" -#: ../../whatsnew/3.13.rst:2413 -msgid "(Contributed by Victor Stinner in :gh:`105107`.)" +#: ../../whatsnew/3.13.rst:2412 +msgid "or :c:func:`PyGILState_Ensure` and :c:func:`PyGILState_Release`." msgstr "" -#: ../../whatsnew/3.13.rst:2415 +#: ../../whatsnew/3.13.rst:2414 +msgid "(Contributed by Victor Stinner in :gh:`105182`.)" +msgstr "" + +#: ../../whatsnew/3.13.rst:2416 msgid "" -"Remove old buffer protocols deprecated in Python 3.0. Use :ref:" -"`bufferobjects` instead." +"Remove the :c:func:`!PyEval_ThreadsInitialized` function, deprecated in " +"Python 3.9. Since Python 3.7, :c:func:`!Py_Initialize` always creates the " +"GIL: calling :c:func:`!PyEval_InitThreads` does nothing and :c:func:`!" +"PyEval_ThreadsInitialized` always returns non-zero. (Contributed by Victor " +"Stinner in :gh:`105182`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2417 +#: ../../whatsnew/3.13.rst:2423 msgid "" -":c:func:`!PyObject_CheckReadBuffer`: Use :c:func:`PyObject_CheckBuffer` to " -"test if the object supports the buffer protocol. Note that :c:func:" -"`PyObject_CheckBuffer` doesn't guarantee that :c:func:`PyObject_GetBuffer` " -"will succeed. To test if the object is actually readable, see the next " -"example of :c:func:`PyObject_GetBuffer`." +"Remove the :c:func:`!_PyInterpreterState_Get` alias to :c:func:" +"`PyInterpreterState_Get()` which was kept for backward compatibility with " +"Python 3.8. The `pythoncapi-compat project`_ can be used to get :c:func:" +"`PyInterpreterState_Get()` on Python 3.8 and older. (Contributed by Victor " +"Stinner in :gh:`106320`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2424 +#: ../../whatsnew/3.13.rst:2430 msgid "" -":c:func:`!PyObject_AsCharBuffer`, :c:func:`!PyObject_AsReadBuffer`: :c:func:" -"`PyObject_GetBuffer` and :c:func:`PyBuffer_Release` instead:" +"Remove the private :c:func:`!_PyObject_FastCall` function: use :c:func:`!" +"PyObject_Vectorcall` which is available since Python 3.8 (:pep:`590`). " +"(Contributed by Victor Stinner in :gh:`106023`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2427 +#: ../../whatsnew/3.13.rst:2435 msgid "" -"Py_buffer view;\n" -"if (PyObject_GetBuffer(obj, &view, PyBUF_SIMPLE) < 0) {\n" -" return NULL;\n" -"}\n" -"// Use `view.buf` and `view.len` to read from the buffer.\n" -"// You may need to cast buf as `(const char*)view.buf`.\n" -"PyBuffer_Release(&view);" +"Remove the ``cpython/pytime.h`` header file, which only contained private " +"functions. (Contributed by Victor Stinner in :gh:`106316`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2437 +#: ../../whatsnew/3.13.rst:2439 msgid "" -":c:func:`!PyObject_AsWriteBuffer`: Use :c:func:`PyObject_GetBuffer` and :c:" -"func:`PyBuffer_Release` instead:" +"Remove the undocumented ``PY_TIMEOUT_MAX`` constant from the limited C API. " +"(Contributed by Victor Stinner in :gh:`110014`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2440 +#: ../../whatsnew/3.13.rst:2442 msgid "" -"Py_buffer view;\n" -"if (PyObject_GetBuffer(obj, &view, PyBUF_WRITABLE) < 0) {\n" -" return NULL;\n" -"}\n" -"// Use `view.buf` and `view.len` to write to the buffer.\n" -"PyBuffer_Release(&view);" +"Remove the old trashcan macros ``Py_TRASHCAN_SAFE_BEGIN`` and " +"``Py_TRASHCAN_SAFE_END``. Replace both with the new macros " +"``Py_TRASHCAN_BEGIN`` and ``Py_TRASHCAN_END``. (Contributed by Irit Katriel " +"in :gh:`105111`.)" msgstr "" #: ../../whatsnew/3.13.rst:2449 -msgid "(Contributed by Inada Naoki in :gh:`85275`.)" -msgstr "" +msgid "Deprecated C APIs" +msgstr "器用的 C API" #: ../../whatsnew/3.13.rst:2451 -msgid "" -"Remove the following old functions to configure the Python initialization, " -"deprecated in Python 3.11:" +msgid "Deprecate old Python initialization functions:" msgstr "" -#: ../../whatsnew/3.13.rst:2454 +#: ../../whatsnew/3.13.rst:2453 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:13 msgid "" -"``PySys_AddWarnOptionUnicode()``: use :c:member:`PyConfig.warnoptions` " -"instead." +":c:func:`PySys_ResetWarnOptions`: Clear :data:`sys.warnoptions` and :data:`!" +"warnings.filters` instead." msgstr "" +":c:func:`PySys_ResetWarnOptions`:請改為清除 :data:`sys.warnoptions` 和 :" +"data:`!warnings.filters`。" #: ../../whatsnew/3.13.rst:2455 -msgid "" -"``PySys_AddWarnOption()``: use :c:member:`PyConfig.warnoptions` instead." -msgstr "" - -#: ../../whatsnew/3.13.rst:2456 -msgid "``PySys_AddXOption()``: use :c:member:`PyConfig.xoptions` instead." -msgstr "" +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:15 +msgid ":c:func:`Py_GetExecPrefix`: Get :data:`sys.exec_prefix` instead." +msgstr ":c:func:`Py_GetExecPrefix`:請改用 :data:`sys.exec_prefix`。" #: ../../whatsnew/3.13.rst:2457 -msgid "``PySys_HasWarnOptions()``: use :c:member:`PyConfig.xoptions` instead." -msgstr "" - -#: ../../whatsnew/3.13.rst:2458 -msgid "" -"``PySys_SetPath()``: set :c:member:`PyConfig.module_search_paths` instead." -msgstr "" +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:17 +msgid ":c:func:`Py_GetPath`: Get :data:`sys.path` instead." +msgstr ":c:func:`Py_GetPath`:請改用 :data:`sys.path`。" #: ../../whatsnew/3.13.rst:2459 -msgid "``Py_SetPath()``: set :c:member:`PyConfig.module_search_paths` instead." -msgstr "" +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:19 +msgid ":c:func:`Py_GetPrefix`: Get :data:`sys.prefix` instead." +msgstr ":c:func:`Py_GetPrefix`:請改用 :data:`sys.prefix`。" -#: ../../whatsnew/3.13.rst:2460 -msgid "" -"``Py_SetStandardStreamEncoding()``: set :c:member:`PyConfig.stdio_encoding` " -"instead, and set also maybe :c:member:`PyConfig.legacy_windows_stdio` (on " -"Windows)." -msgstr "" +#: ../../whatsnew/3.13.rst:2461 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:21 +msgid ":c:func:`Py_GetProgramFullPath`: Get :data:`sys.executable` instead." +msgstr ":c:func:`Py_GetProgramFullPath`:請改用 :data:`sys.executable`。" #: ../../whatsnew/3.13.rst:2463 -msgid "" -"``_Py_SetProgramFullPath()``: set :c:member:`PyConfig.executable` instead." -msgstr "" +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:23 +msgid ":c:func:`Py_GetProgramName`: Get :data:`sys.executable` instead." +msgstr ":c:func:`Py_GetProgramName`:請改用 :data:`sys.executable`。" #: ../../whatsnew/3.13.rst:2465 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:25 msgid "" -"Use the new :c:type:`PyConfig` API of the :ref:`Python Initialization " -"Configuration ` instead (:pep:`587`), added to Python 3.8. " -"(Contributed by Victor Stinner in :gh:`105145`.)" +":c:func:`Py_GetPythonHome`: Get :c:member:`PyConfig.home` or the :envvar:" +"`PYTHONHOME` environment variable instead." msgstr "" +":c:func:`Py_GetPythonHome`:請改用 :c:member:`PyConfig.home` 或 :envvar:" +"`PYTHONHOME` 環境變數。" #: ../../whatsnew/3.13.rst:2469 -msgid "" -"Remove ``PyEval_ThreadsInitialized()`` function, deprecated in Python 3.9. " -"Since Python 3.7, ``Py_Initialize()`` always creates the GIL: calling " -"``PyEval_InitThreads()`` does nothing and ``PyEval_ThreadsInitialized()`` " -"always returned non-zero. (Contributed by Victor Stinner in :gh:`105182`.)" +msgid "(Contributed by Victor Stinner in :gh:`105145`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2475 +#: ../../whatsnew/3.13.rst:2471 msgid "" -"Remove ``PyEval_AcquireLock()`` and ``PyEval_ReleaseLock()`` functions, " -"deprecated in Python 3.2. They didn't update the current thread state. They " -"can be replaced with:" -msgstr "" - -#: ../../whatsnew/3.13.rst:2479 -msgid ":c:func:`PyEval_SaveThread` and :c:func:`PyEval_RestoreThread`;" +":term:`Soft deprecate ` the :c:func:`PyEval_GetBuiltins`, :" +"c:func:`PyEval_GetGlobals`, and :c:func:`PyEval_GetLocals` functions, which " +"return a :term:`borrowed reference`. (Soft deprecated as part of :pep:`667`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2480 +#: ../../whatsnew/3.13.rst:2477 msgid "" -"low-level :c:func:`PyEval_AcquireThread` and :c:func:`PyEval_RestoreThread`;" +"Deprecate the :c:func:`PyImport_ImportModuleNoBlock` function, which is just " +"an alias to :c:func:`PyImport_ImportModule` since Python 3.3. (Contributed " +"by Victor Stinner in :gh:`105396`.)" msgstr "" #: ../../whatsnew/3.13.rst:2481 -msgid "or :c:func:`PyGILState_Ensure` and :c:func:`PyGILState_Release`." +msgid "" +":term:`Soft deprecate ` the :c:func:`PyModule_AddObject` " +"function. It should be replaced with :c:func:`PyModule_Add` or :c:func:" +"`PyModule_AddObjectRef`. (Contributed by Serhiy Storchaka in :gh:`86493`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2483 -msgid "(Contributed by Victor Stinner in :gh:`105182`.)" +#: ../../whatsnew/3.13.rst:2487 +msgid "" +"Deprecate the old ``Py_UNICODE`` and ``PY_UNICODE_TYPE`` types and the :c:" +"macro:`!Py_UNICODE_WIDE` define. Use the :c:type:`wchar_t` type directly " +"instead. Since Python 3.3, ``Py_UNICODE`` and ``PY_UNICODE_TYPE`` are just " +"aliases to :c:type:`!wchar_t`. (Contributed by Victor Stinner in :gh:" +"`105156`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2485 +#: ../../whatsnew/3.13.rst:2494 msgid "" -"Remove private ``_PyObject_FastCall()`` function: use " -"``PyObject_Vectorcall()`` which is available since Python 3.8 (:pep:`590`). " -"(Contributed by Victor Stinner in :gh:`106023`.)" +"Deprecate the :c:func:`PyWeakref_GetObject` and :c:func:" +"`PyWeakref_GET_OBJECT` functions, which return a :term:`borrowed reference`. " +"Replace them with the new :c:func:`PyWeakref_GetRef` function, which returns " +"a :term:`strong reference`. The `pythoncapi-compat project`_ can be used to " +"get :c:func:`PyWeakref_GetRef` on Python 3.12 and older. (Contributed by " +"Victor Stinner in :gh:`105927`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2490 +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:4 msgid "" -"Remove ``cpython/pytime.h`` header file: it only contained private " -"functions. (Contributed by Victor Stinner in :gh:`106316`.)" +"The ``ma_version_tag`` field in :c:type:`PyDictObject` for extension modules " +"(:pep:`699`; :gh:`101193`)." msgstr "" +":c:type:`PyDictObject` 中的 ``ma_version_tag`` 欄位,用於擴充模組 (:pep:" +"`699`;:gh:`101193`)。" -#: ../../whatsnew/3.13.rst:2493 +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:7 msgid "" -"Remove ``_PyInterpreterState_Get()`` alias to :c:func:" -"`PyInterpreterState_Get()` which was kept for backward compatibility with " -"Python 3.8. The `pythoncapi-compat project `__ can be used to get :c:func:`PyInterpreterState_Get()` " -"on Python 3.8 and older. (Contributed by Victor Stinner in :gh:`106320`.)" +"Creating :c:data:`immutable types ` with mutable " +"bases (:gh:`95388`)." msgstr "" +"使用可變基底建立\\ :c:data:`不可變型別 ` (:gh:" +"`95388`)。" + +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:10 +msgid "" +"Functions to configure Python's initialization, deprecated in Python 3.11:" +msgstr "設定 Python 初始化的函式,Python 3.11 中已被棄用:" -#: ../../whatsnew/3.13.rst:2500 +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:12 +msgid ":c:func:`!PySys_SetArgvEx()`: Set :c:member:`PyConfig.argv` instead." +msgstr ":c:func:`!PySys_SetArgvEx()`:請改以 :c:member:`PyConfig.argv` 設定。" + +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:14 +msgid ":c:func:`!PySys_SetArgv()`: Set :c:member:`PyConfig.argv` instead." +msgstr ":c:func:`!PySys_SetArgv()`:請改以 :c:member:`PyConfig.argv` 設定。" + +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:16 msgid "" -"The :c:func:`PyModule_AddObject` function is now :term:`soft deprecated`: :c:" -"func:`PyModule_Add` or :c:func:`PyModule_AddObjectRef` functions should be " -"used instead. (Contributed by Serhiy Storchaka in :gh:`86493`.)" +":c:func:`!Py_SetProgramName()`: Set :c:member:`PyConfig.program_name` " +"instead." msgstr "" +":c:func:`!Py_SetProgramName()``:請改以 :c:member:`PyConfig.program_name` 設" +"定。" + +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:18 +msgid ":c:func:`!Py_SetPythonHome()`: Set :c:member:`PyConfig.home` instead." +msgstr ":c:func:`!Py_SetPythonHome()`:請改以 :c:member:`PyConfig.home` 設定。" -#: ../../whatsnew/3.13.rst:2505 +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:21 +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:71 msgid "" -"Remove undocumented ``PY_TIMEOUT_MAX`` constant from the limited C API. " -"(Contributed by Victor Stinner in :gh:`110014`.)" +"The :c:func:`Py_InitializeFromConfig` API should be used with :c:type:" +"`PyConfig` instead." msgstr "" +":c:func:`Py_InitializeFromConfig` API 應該與 :c:type:`PyConfig` 一起使用。" -#: ../../whatsnew/3.13.rst:2509 -msgid "Deprecated C APIs" +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:24 +msgid "Global configuration variables:" +msgstr "全域設定變數:" + +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:26 +msgid ":c:var:`Py_DebugFlag`: Use :c:member:`PyConfig.parser_debug` instead." +msgstr ":c:var:`Py_DebugFlag`:請改用 :c:member:`PyConfig.parser_debug`。" + +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:28 +msgid ":c:var:`Py_VerboseFlag`: Use :c:member:`PyConfig.verbose` instead." +msgstr ":c:var:`Py_VerboseFlag`:請改用 :c:member:`PyConfig.verbose`。" + +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:30 +msgid ":c:var:`Py_QuietFlag`: Use :c:member:`PyConfig.quiet` instead." +msgstr ":c:var:`Py_QuietFlag`:請改用 :c:member:`PyConfig.quiet`。" + +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:32 +msgid "" +":c:var:`Py_InteractiveFlag`: Use :c:member:`PyConfig.interactive` instead." +msgstr ":c:var:`Py_InteractiveFlag`:請改用 :c:member:`PyConfig.interactive`。" + +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:34 +msgid ":c:var:`Py_InspectFlag`: Use :c:member:`PyConfig.inspect` instead." +msgstr ":c:var:`Py_InspectFlag`:請改用 :c:member:`PyConfig.inspect`。" + +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:36 +msgid "" +":c:var:`Py_OptimizeFlag`: Use :c:member:`PyConfig.optimization_level` " +"instead." msgstr "" +":c:var:`Py_OptimizeFlag`:請改用 :c:member:`PyConfig.optimization_level`。" + +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:38 +msgid ":c:var:`Py_NoSiteFlag`: Use :c:member:`PyConfig.site_import` instead." +msgstr ":c:var:`Py_NoSiteFlag`:請改用 :c:member:`PyConfig.site_import`。" -#: ../../whatsnew/3.13.rst:2511 +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:40 msgid "" -"Deprecate the old ``Py_UNICODE`` and ``PY_UNICODE_TYPE`` types: use directly " -"the :c:type:`wchar_t` type instead. Since Python 3.3, ``Py_UNICODE`` and " -"``PY_UNICODE_TYPE`` are just aliases to :c:type:`wchar_t`. (Contributed by " -"Victor Stinner in :gh:`105156`.)" +":c:var:`Py_BytesWarningFlag`: Use :c:member:`PyConfig.bytes_warning` instead." msgstr "" +":c:var:`Py_BytesWarningFlag`:請改用 :c:member:`PyConfig.bytes_warning`。" -#: ../../whatsnew/3.13.rst:2516 -msgid "Deprecate old Python initialization functions:" +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:42 +msgid "" +":c:var:`Py_FrozenFlag`: Use :c:member:`PyConfig.pathconfig_warnings` instead." msgstr "" +":c:var:`Py_FrozenFlag`:請改用 :c:member:`PyConfig.pathconfig_warnings`。" -#: ../../whatsnew/3.13.rst:2518 -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:12 +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:44 msgid "" -":c:func:`PySys_ResetWarnOptions`: clear :data:`sys.warnoptions` and :data:`!" -"warnings.filters` instead." +":c:var:`Py_IgnoreEnvironmentFlag`: Use :c:member:`PyConfig.use_environment` " +"instead." msgstr "" +":c:var:`Py_IgnoreEnvironmentFlag`:請改用 :c:member:`PyConfig." +"use_environment`。" -#: ../../whatsnew/3.13.rst:2520 -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:14 -msgid ":c:func:`Py_GetExecPrefix`: get :data:`sys.exec_prefix` instead." +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:46 +msgid "" +":c:var:`Py_DontWriteBytecodeFlag`: Use :c:member:`PyConfig.write_bytecode` " +"instead." msgstr "" +":c:var:`Py_DontWriteBytecodeFlag`:請改用 :c:member:`PyConfig." +"write_bytecode`。" -#: ../../whatsnew/3.13.rst:2521 -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:15 -msgid ":c:func:`Py_GetPath`: get :data:`sys.path` instead." +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:48 +msgid "" +":c:var:`Py_NoUserSiteDirectory`: Use :c:member:`PyConfig." +"user_site_directory` instead." msgstr "" +":c:var:`Py_NoUserSiteDirectory`:請改用 :c:member:`PyConfig." +"user_site_directory`。" -#: ../../whatsnew/3.13.rst:2522 -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:16 -msgid ":c:func:`Py_GetPrefix`: get :data:`sys.prefix` instead." +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:50 +msgid "" +":c:var:`Py_UnbufferedStdioFlag`: Use :c:member:`PyConfig.buffered_stdio` " +"instead." msgstr "" +":c:var:`Py_UnbufferedStdioFlag`:請改用 :c:member:`PyConfig.buffered_stdio`。" -#: ../../whatsnew/3.13.rst:2523 -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:17 -msgid ":c:func:`Py_GetProgramFullPath`: get :data:`sys.executable` instead." +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:52 +msgid "" +":c:var:`Py_HashRandomizationFlag`: Use :c:member:`PyConfig.use_hash_seed` " +"and :c:member:`PyConfig.hash_seed` instead." msgstr "" +":c:var:`Py_HashRandomizationFlag`:請改用 :c:member:`PyConfig.use_hash_seed` " +"和 :c:member:`PyConfig.hash_seed`。" + +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:55 +msgid ":c:var:`Py_IsolatedFlag`: Use :c:member:`PyConfig.isolated` instead." +msgstr ":c:var:`Py_IsolatedFlag`:請改用 :c:member:`PyConfig.isolated`。" -#: ../../whatsnew/3.13.rst:2524 -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:18 -msgid ":c:func:`Py_GetProgramName`: get :data:`sys.executable` instead." +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:57 +msgid "" +":c:var:`Py_LegacyWindowsFSEncodingFlag`: Use :c:member:`PyPreConfig." +"legacy_windows_fs_encoding` instead." msgstr "" +":c:var:`Py_LegacyWindowsFSEncodingFlag`:請改用 :c:member:`PyPreConfig." +"legacy_windows_fs_encoding`。" -#: ../../whatsnew/3.13.rst:2525 +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:59 msgid "" -":c:func:`Py_GetPythonHome`: get :c:member:`PyConfig.home` or :envvar:" -"`PYTHONHOME` environment variable instead." +":c:var:`Py_LegacyWindowsStdioFlag`: Use :c:member:`PyConfig." +"legacy_windows_stdio` instead." msgstr "" +":c:var:`Py_LegacyWindowsStdioFlag`:請改用 :c:member:`PyConfig." +"legacy_windows_stdio`。" -#: ../../whatsnew/3.13.rst:2528 +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:61 msgid "" -"Functions scheduled for removal in Python 3.15. (Contributed by Victor " -"Stinner in :gh:`105145`.)" +":c:var:`!Py_FileSystemDefaultEncoding`: Use :c:member:`PyConfig." +"filesystem_encoding` instead." msgstr "" +":c:var:`!Py_FileSystemDefaultEncoding`:請改用 :c:member:`PyConfig." +"filesystem_encoding`。" -#: ../../whatsnew/3.13.rst:2531 +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:63 msgid "" -"Deprecate the :c:func:`PyImport_ImportModuleNoBlock` function which is just " -"an alias to :c:func:`PyImport_ImportModule` since Python 3.3. Scheduled for " -"removal in Python 3.15. (Contributed by Victor Stinner in :gh:`105396`.)" +":c:var:`!Py_HasFileSystemDefaultEncoding`: Use :c:member:`PyConfig." +"filesystem_encoding` instead." msgstr "" +":c:var:`!Py_HasFileSystemDefaultEncoding`:請改用 :c:member:`PyConfig." +"filesystem_encoding`。" -#: ../../whatsnew/3.13.rst:2536 +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:65 msgid "" -"Deprecate the :c:func:`PyWeakref_GetObject` and :c:func:" -"`PyWeakref_GET_OBJECT` functions, which return a :term:`borrowed reference`: " -"use the new :c:func:`PyWeakref_GetRef` function instead, it returns a :term:" -"`strong reference`. The `pythoncapi-compat project `__ can be used to get :c:func:`PyWeakref_GetRef` " -"on Python 3.12 and older. (Contributed by Victor Stinner in :gh:`105927`.)" +":c:var:`!Py_FileSystemDefaultEncodeErrors`: Use :c:member:`PyConfig." +"filesystem_errors` instead." msgstr "" +":c:var:`!Py_FileSystemDefaultEncodeErrors`:請改用 :c:member:`PyConfig." +"filesystem_errors`。" -#: ../../whatsnew/3.13.rst:2544 +#: ../../deprecations/c-api-pending-removal-in-3.14.rst:67 msgid "" -"Deprecate the :c:func:`PyEval_GetBuiltins`, :c:func:`PyEval_GetGlobals`, " -"and :c:func:`PyEval_GetLocals` functions, which return a :term:`borrowed " -"reference`. Refer to the deprecation notices on each function for their " -"recommended replacements. (Soft deprecated as part of :pep:`667`.)" +":c:var:`!Py_UTF8Mode`: Use :c:member:`PyPreConfig.utf8_mode` instead. (see :" +"c:func:`Py_PreInitialize`)" msgstr "" +":c:var:`!Py_UTF8Mode`:請改用 :c:member:`PyPreConfig.utf8_mode`。(請見 :c:" +"func:`Py_PreInitialize`)" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:4 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:4 +msgid "The bundled copy of ``libmpdecimal``." +msgstr "``libmpdecimal`` 的打包副本 (bundled copy)。" + +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:5 msgid "" -"The ``ma_version_tag`` field in :c:type:`PyDictObject` for extension modules " -"(:pep:`699`; :gh:`101193`)." +"The :c:func:`PyImport_ImportModuleNoBlock`: Use :c:func:" +"`PyImport_ImportModule` instead." msgstr "" +":c:func:`PyImport_ImportModuleNoBlock`:請改用 :c:func:" +"`PyImport_ImportModule`。" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:7 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:7 msgid "" -"Creating :c:data:`immutable types ` with mutable " -"bases (:gh:`95388`)." +":c:func:`PyWeakref_GetObject` and :c:func:`PyWeakref_GET_OBJECT`: Use :c:" +"func:`PyWeakref_GetRef` instead." msgstr "" +":c:func:`PyWeakref_GetObject` 和 :c:func:`PyWeakref_GET_OBJECT`:請改用 :c:" +"func:`PyWeakref_GetRef`。" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:10 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:9 msgid "" -"Functions to configure Python's initialization, deprecated in Python 3.11:" +":c:type:`Py_UNICODE` type and the :c:macro:`!Py_UNICODE_WIDE` macro: Use :c:" +"type:`wchar_t` instead." msgstr "" +":c:type:`Py_UNICODE` 型別與 :c:macro:`!Py_UNICODE_WIDE` 巨集:請改用 :c:type:" +"`wchar_t`。" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:12 -msgid "``PySys_SetArgvEx()``: set :c:member:`PyConfig.argv` instead." -msgstr "" +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:11 +msgid "Python initialization functions:" +msgstr "Python 初始化函式:" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:13 -msgid "``PySys_SetArgv()``: set :c:member:`PyConfig.argv` instead." -msgstr "" +#: ../../deprecations/c-api-pending-removal-in-future.rst:4 +msgid "" +"The following APIs are deprecated and will be removed, although there is " +"currently no date scheduled for their removal." +msgstr "下列 API 已被棄用並將會被移除,不過目前尚未訂定移除日期。" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:14 -msgid "``Py_SetProgramName()``: set :c:member:`PyConfig.program_name` instead." -msgstr "" +#: ../../deprecations/c-api-pending-removal-in-future.rst:7 +msgid ":c:macro:`Py_TPFLAGS_HAVE_FINALIZE`: Unneeded since Python 3.8." +msgstr ":c:macro:`Py_TPFLAGS_HAVE_FINALIZE`:自 Python 3.8 起不再需要" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:15 -msgid "``Py_SetPythonHome()``: set :c:member:`PyConfig.home` instead." -msgstr "" +#: ../../deprecations/c-api-pending-removal-in-future.rst:9 +msgid ":c:func:`PyErr_Fetch`: Use :c:func:`PyErr_GetRaisedException` instead." +msgstr ":c:func:`PyErr_Fetch`:請改用 :c:func:`PyErr_GetRaisedException`。" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:17 -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:45 +#: ../../deprecations/c-api-pending-removal-in-future.rst:11 msgid "" -"The :c:func:`Py_InitializeFromConfig` API should be used with :c:type:" -"`PyConfig` instead." +":c:func:`PyErr_NormalizeException`: Use :c:func:`PyErr_GetRaisedException` " +"instead." msgstr "" +":c:func:`PyErr_NormalizeException`:請改用 :c:func:" +"`PyErr_GetRaisedException`。" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:20 -msgid "Global configuration variables:" +#: ../../deprecations/c-api-pending-removal-in-future.rst:13 +msgid "" +":c:func:`PyErr_Restore`: Use :c:func:`PyErr_SetRaisedException` instead." +msgstr ":c:func:`PyErr_Restore`:請改用 :c:func:`PyErr_SetRaisedException`。" + +#: ../../deprecations/c-api-pending-removal-in-future.rst:15 +msgid "" +":c:func:`PyModule_GetFilename`: Use :c:func:`PyModule_GetFilenameObject` " +"instead." msgstr "" +":c:func:`PyModule_GetFilename`:請改用 :c:func:`PyModule_GetFilenameObject`。" + +#: ../../deprecations/c-api-pending-removal-in-future.rst:17 +msgid ":c:func:`PyOS_AfterFork`: Use :c:func:`PyOS_AfterFork_Child` instead." +msgstr ":c:func:`PyOS_AfterFork`:請改用 :c:func:`PyOS_AfterFork_Child`。" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:22 -msgid ":c:var:`Py_DebugFlag`: use :c:member:`PyConfig.parser_debug` instead." +#: ../../deprecations/c-api-pending-removal-in-future.rst:19 +msgid "" +":c:func:`PySlice_GetIndicesEx`: Use :c:func:`PySlice_Unpack` and :c:func:" +"`PySlice_AdjustIndices` instead." msgstr "" +":c:func:`PySlice_GetIndicesEx`:請改用 :c:func:`PySlice_Unpack` 和 :c:func:" +"`PySlice_AdjustIndices`。" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:23 -msgid ":c:var:`Py_VerboseFlag`: use :c:member:`PyConfig.verbose` instead." +#: ../../deprecations/c-api-pending-removal-in-future.rst:21 +msgid "" +":c:func:`!PyUnicode_AsDecodedObject`: Use :c:func:`PyCodec_Decode` instead." msgstr "" +":c:func:`!PyUnicode_AsDecodedObject`:請改用 :c:func:`PyCodec_Decode`。" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:24 -msgid ":c:var:`Py_QuietFlag`: use :c:member:`PyConfig.quiet` instead." +#: ../../deprecations/c-api-pending-removal-in-future.rst:23 +msgid "" +":c:func:`!PyUnicode_AsDecodedUnicode`: Use :c:func:`PyCodec_Decode` instead." msgstr "" +":c:func:`!PyUnicode_AsDecodedUnicode`:請改用 :c:func:`PyCodec_Decode`。" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:25 +#: ../../deprecations/c-api-pending-removal-in-future.rst:25 msgid "" -":c:var:`Py_InteractiveFlag`: use :c:member:`PyConfig.interactive` instead." +":c:func:`!PyUnicode_AsEncodedObject`: Use :c:func:`PyCodec_Encode` instead." msgstr "" +":c:func:`!PyUnicode_AsEncodedObject`:請改用 :c:func:`PyCodec_Encode`。" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:26 -msgid ":c:var:`Py_InspectFlag`: use :c:member:`PyConfig.inspect` instead." +#: ../../deprecations/c-api-pending-removal-in-future.rst:27 +msgid "" +":c:func:`!PyUnicode_AsEncodedUnicode`: Use :c:func:`PyCodec_Encode` instead." msgstr "" +":c:func:`!PyUnicode_AsEncodedUnicode`:請改用 :c:func:`PyCodec_Encode`。" + +#: ../../deprecations/c-api-pending-removal-in-future.rst:29 +msgid ":c:func:`PyUnicode_READY`: Unneeded since Python 3.12" +msgstr ":c:func:`PyUnicode_READY`:自 Python 3.12 起不再需要" + +#: ../../deprecations/c-api-pending-removal-in-future.rst:31 +msgid ":c:func:`!PyErr_Display`: Use :c:func:`PyErr_DisplayException` instead." +msgstr ":c:func:`!PyErr_Display`:請改用 :c:func:`PyErr_DisplayException`。" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:27 +#: ../../deprecations/c-api-pending-removal-in-future.rst:33 msgid "" -":c:var:`Py_OptimizeFlag`: use :c:member:`PyConfig.optimization_level` " +":c:func:`!_PyErr_ChainExceptions`: Use :c:func:`!_PyErr_ChainExceptions1` " "instead." msgstr "" +":c:func:`!_PyErr_ChainExceptions`:請改用 ``_PyErr_ChainExceptions1``。" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:28 -msgid ":c:var:`Py_NoSiteFlag`: use :c:member:`PyConfig.site_import` instead." +#: ../../deprecations/c-api-pending-removal-in-future.rst:35 +msgid "" +":c:member:`!PyBytesObject.ob_shash` member: call :c:func:`PyObject_Hash` " +"instead." msgstr "" +":c:member:`!PyBytesObject.ob_shash` 成員:請改為呼叫 :c:func:" +"`PyObject_Hash`。" + +#: ../../deprecations/c-api-pending-removal-in-future.rst:37 +msgid ":c:member:`!PyDictObject.ma_version_tag` member." +msgstr ":c:member:`!PyDictObject.ma_version_tag` 成員。" + +#: ../../deprecations/c-api-pending-removal-in-future.rst:38 +msgid "Thread Local Storage (TLS) API:" +msgstr "執行緒局部儲存 (Thread Local Storage, TLS) API:" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:29 +#: ../../deprecations/c-api-pending-removal-in-future.rst:40 msgid "" -":c:var:`Py_BytesWarningFlag`: use :c:member:`PyConfig.bytes_warning` instead." -msgstr "" +":c:func:`PyThread_create_key`: Use :c:func:`PyThread_tss_alloc` instead." +msgstr ":c:func:`PyThread_create_key`:請改用 :c:func:`PyThread_tss_alloc`。" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:30 +#: ../../deprecations/c-api-pending-removal-in-future.rst:42 +msgid ":c:func:`PyThread_delete_key`: Use :c:func:`PyThread_tss_free` instead." +msgstr ":c:func:`PyThread_delete_key`:請改用 :c:func:`PyThread_tss_free`。" + +#: ../../deprecations/c-api-pending-removal-in-future.rst:44 msgid "" -":c:var:`Py_FrozenFlag`: use :c:member:`PyConfig.pathconfig_warnings` instead." -msgstr "" +":c:func:`PyThread_set_key_value`: Use :c:func:`PyThread_tss_set` instead." +msgstr ":c:func:`PyThread_set_key_value`:請改用 :c:func:`PyThread_tss_set`。" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:31 +#: ../../deprecations/c-api-pending-removal-in-future.rst:46 msgid "" -":c:var:`Py_IgnoreEnvironmentFlag`: use :c:member:`PyConfig.use_environment` " -"instead." -msgstr "" +":c:func:`PyThread_get_key_value`: Use :c:func:`PyThread_tss_get` instead." +msgstr ":c:func:`PyThread_get_key_value`:請改用 :c:func:`PyThread_tss_get`。" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:32 +#: ../../deprecations/c-api-pending-removal-in-future.rst:48 msgid "" -":c:var:`Py_DontWriteBytecodeFlag`: use :c:member:`PyConfig.write_bytecode` " +":c:func:`PyThread_delete_key_value`: Use :c:func:`PyThread_tss_delete` " "instead." msgstr "" +":c:func:`PyThread_delete_key_value`:請改用 :c:func:`PyThread_tss_delete`。" + +#: ../../deprecations/c-api-pending-removal-in-future.rst:50 +msgid ":c:func:`PyThread_ReInitTLS`: Unneeded since Python 3.7." +msgstr ":c:func:`PyThread_ReInitTLS`:自 Python 3.7 起不再需要。" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:33 +#: ../../whatsnew/3.13.rst:2514 +msgid "Build Changes" +msgstr "建置變更" + +#: ../../whatsnew/3.13.rst:2516 msgid "" -":c:var:`Py_NoUserSiteDirectory`: use :c:member:`PyConfig." -"user_site_directory` instead." +"``arm64-apple-ios`` and ``arm64-apple-ios-simulator`` are both now :pep:`11` " +"tier 3 platforms. (:ref:`PEP 730 ` written and " +"implementation contributed by Russell Keith-Magee in :gh:`114099`.)" msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:34 +#: ../../whatsnew/3.13.rst:2521 msgid "" -":c:var:`Py_UnbufferedStdioFlag`: use :c:member:`PyConfig.buffered_stdio` " -"instead." +"``aarch64-linux-android`` and ``x86_64-linux-android`` are both now :pep:" +"`11` tier 3 platforms. (:ref:`PEP 738 ` " +"written and implementation contributed by Malcolm Smith in :gh:`116622`.)" msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:35 +#: ../../whatsnew/3.13.rst:2526 msgid "" -":c:var:`Py_HashRandomizationFlag`: use :c:member:`PyConfig.use_hash_seed` " -"and :c:member:`PyConfig.hash_seed` instead." +"``wasm32-wasi`` is now a :pep:`11` tier 2 platform. (Contributed by Brett " +"Cannon in :gh:`115192`.)" msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:37 -msgid ":c:var:`Py_IsolatedFlag`: use :c:member:`PyConfig.isolated` instead." +#: ../../whatsnew/3.13.rst:2529 +msgid "" +"``wasm32-emscripten`` is no longer a :pep:`11` supported platform. " +"(Contributed by Brett Cannon in :gh:`115192`.)" msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:38 +#: ../../whatsnew/3.13.rst:2532 msgid "" -":c:var:`Py_LegacyWindowsFSEncodingFlag`: use :c:member:`PyPreConfig." -"legacy_windows_fs_encoding` instead." +"Building CPython now requires a compiler with support for the C11 atomic " +"library, GCC built-in atomic functions, or MSVC interlocked intrinsics." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:39 +#: ../../whatsnew/3.13.rst:2535 msgid "" -":c:var:`Py_LegacyWindowsStdioFlag`: use :c:member:`PyConfig." -"legacy_windows_stdio` instead." +"Autoconf 2.71 and aclocal 1.16.4 are now required to regenerate the :file:" +"`configure` script. (Contributed by Christian Heimes in :gh:`89886`.)" msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:40 +#: ../../whatsnew/3.13.rst:2539 msgid "" -":c:var:`!Py_FileSystemDefaultEncoding`: use :c:member:`PyConfig." -"filesystem_encoding` instead." +"SQLite 3.15.2 or newer is required to build the :mod:`sqlite3` extension " +"module. (Contributed by Erlend Aasland in :gh:`105875`.)" msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:41 +#: ../../whatsnew/3.13.rst:2543 msgid "" -":c:var:`!Py_HasFileSystemDefaultEncoding`: use :c:member:`PyConfig." -"filesystem_encoding` instead." +"CPython now bundles the `mimalloc library`_ by default. It is licensed under " +"the MIT license; see :ref:`mimalloc license `. The bundled " +"mimalloc has custom changes, see :gh:`113141` for details. (Contributed by " +"Dino Viehland in :gh:`109914`.)" msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:42 +#: ../../whatsnew/3.13.rst:2551 msgid "" -":c:var:`!Py_FileSystemDefaultEncodeErrors`: use :c:member:`PyConfig." -"filesystem_errors` instead." +"The :file:`configure` option :option:`--with-system-libmpdec` now defaults " +"to ``yes``. The bundled copy of ``libmpdecimal`` will be removed in Python " +"3.15." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.14.rst:43 +#: ../../whatsnew/3.13.rst:2555 msgid "" -":c:var:`!Py_UTF8Mode`: use :c:member:`PyPreConfig.utf8_mode` instead. (see :" -"c:func:`Py_PreInitialize`)" +"Python built with :file:`configure` :option:`--with-trace-refs` (tracing " +"references) is now ABI compatible with the Python release build and :ref:" +"`debug build `. (Contributed by Victor Stinner in :gh:`108634`.)" msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:4 -msgid "The bundled copy of ``libmpdecimal``." +#: ../../whatsnew/3.13.rst:2560 +msgid "" +"On POSIX systems, the pkg-config (``.pc``) filenames now include the ABI " +"flags. For example, the free-threaded build generates ``python-3.13t.pc`` " +"and the debug build generates ``python-3.13d.pc``." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:5 +#: ../../whatsnew/3.13.rst:2564 msgid "" -":c:func:`PyImport_ImportModuleNoBlock`: use :c:func:`PyImport_ImportModule` " -"instead." +"The ``errno``, ``fcntl``, ``grp``, ``md5``, ``pwd``, ``resource``, " +"``termios``, ``winsound``, ``_ctypes_test``, ``_multiprocessing." +"posixshmem``, ``_scproxy``, ``_stat``, ``_statistics``, ``_testconsole``, " +"``_testimportmultiple`` and ``_uuid`` C extensions are now built with the :" +"ref:`limited C API `. (Contributed by Victor Stinner in :gh:" +"`85283`.)" msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:6 -msgid ":c:func:`PyWeakref_GET_OBJECT`: use :c:func:`PyWeakref_GetRef` instead." +#: ../../whatsnew/3.13.rst:2573 +msgid "Porting to Python 3.13" msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:7 -msgid ":c:func:`PyWeakref_GetObject`: use :c:func:`PyWeakref_GetRef` instead." +#: ../../whatsnew/3.13.rst:2575 +msgid "" +"This section lists previously described changes and other bugfixes that may " +"require changes to your code." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:8 -msgid ":c:type:`!Py_UNICODE_WIDE` type: use :c:type:`wchar_t` instead." -msgstr "" +#: ../../whatsnew/3.13.rst:2579 +msgid "Changes in the Python API" +msgstr "Python API 的變更" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:9 -msgid ":c:type:`Py_UNICODE` type: use :c:type:`wchar_t` instead." +#: ../../whatsnew/3.13.rst:2583 +msgid "" +":ref:`PEP 667 ` introduces several changes to " +"the semantics of :func:`locals` and :attr:`f_locals `:" msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:10 -msgid "Python initialization functions:" +#: ../../whatsnew/3.13.rst:2586 +msgid "" +"Calling :func:`locals` in an :term:`optimized scope` now produces an " +"independent snapshot on each call, and hence no longer implicitly updates " +"previously returned references. Obtaining the legacy CPython behavior now " +"requires explicit calls to update the initially returned dictionary with the " +"results of subsequent calls to :func:`!locals`. Code execution functions " +"that implicitly target :func:`!locals` (such as ``exec`` and ``eval``) must " +"be passed an explicit namespace to access their results in an optimized " +"scope. (Changed as part of :pep:`667`.)" msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:19 +#: ../../whatsnew/3.13.rst:2595 msgid "" -":c:func:`Py_GetPythonHome`: get :c:member:`PyConfig.home` or the :envvar:" -"`PYTHONHOME` environment variable instead." +"Calling :func:`locals` from a comprehension at module or class scope " +"(including via ``exec`` or ``eval``) once more behaves as if the " +"comprehension were running as an independent nested function (i.e. the local " +"variables from the containing scope are not included). In Python 3.12, this " +"had changed to include the local variables from the containing scope when " +"implementing :pep:`709`. (Changed as part of :pep:`667`.)" msgstr "" -#: ../../deprecations/c-api-pending-removal-in-future.rst:4 +#: ../../whatsnew/3.13.rst:2602 msgid "" -"The following APIs are deprecated and will be removed, although there is " -"currently no date scheduled for their removal." +"Accessing :attr:`FrameType.f_locals ` in an :term:`optimized " +"scope` now returns a write-through proxy rather than a snapshot that gets " +"updated at ill-specified times. If a snapshot is desired, it must be created " +"explicitly with ``dict`` or the proxy's ``.copy()`` method. (Changed as part " +"of :pep:`667`.)" msgstr "" -#: ../../deprecations/c-api-pending-removal-in-future.rst:7 -msgid ":c:macro:`Py_TPFLAGS_HAVE_FINALIZE`: unneeded since Python 3.8." +#: ../../whatsnew/3.13.rst:2608 +msgid "" +":class:`functools.partial` now emits a :exc:`FutureWarning` when used as a " +"method. The behavior will change in future Python versions. Wrap it in :func:" +"`staticmethod` if you want to preserve the old behavior. (Contributed by " +"Serhiy Storchaka in :gh:`121027`.)" msgstr "" -#: ../../deprecations/c-api-pending-removal-in-future.rst:8 -msgid ":c:func:`PyErr_Fetch`: use :c:func:`PyErr_GetRaisedException` instead." +#: ../../whatsnew/3.13.rst:2614 +msgid "" +"The :ref:`garbage collector is now incremental `, which means that the behavior of :func:`gc.collect` changes slightly:" msgstr "" -#: ../../deprecations/c-api-pending-removal-in-future.rst:9 +#: ../../whatsnew/3.13.rst:2621 msgid "" -":c:func:`PyErr_NormalizeException`: use :c:func:`PyErr_GetRaisedException` " -"instead." +"An :exc:`OSError` is now raised by :func:`getpass.getuser` for any failure " +"to retrieve a username, instead of :exc:`ImportError` on non-Unix platforms " +"or :exc:`KeyError` on Unix platforms where the password database is empty." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-future.rst:10 +#: ../../whatsnew/3.13.rst:2626 msgid "" -":c:func:`PyErr_Restore`: use :c:func:`PyErr_SetRaisedException` instead." +"The value of the :attr:`!mode` attribute of :class:`gzip.GzipFile` is now a " +"string (``'rb'`` or ``'wb'``) instead of an integer (``1`` or ``2``). The " +"value of the :attr:`!mode` attribute of the readable file-like object " +"returned by :meth:`zipfile.ZipFile.open` is now ``'rb'`` instead of ``'r'``. " +"(Contributed by Serhiy Storchaka in :gh:`115961`.)" msgstr "" -#: ../../deprecations/c-api-pending-removal-in-future.rst:11 +#: ../../whatsnew/3.13.rst:2632 msgid "" -":c:func:`PyModule_GetFilename`: use :c:func:`PyModule_GetFilenameObject` " -"instead." +":class:`mailbox.Maildir` now ignores files with a leading dot (``.``). " +"(Contributed by Zackery Spytz in :gh:`65559`.)" msgstr "" -#: ../../deprecations/c-api-pending-removal-in-future.rst:12 -msgid ":c:func:`PyOS_AfterFork`: use :c:func:`PyOS_AfterFork_Child` instead." +#: ../../whatsnew/3.13.rst:2635 +msgid "" +":meth:`pathlib.Path.glob` and :meth:`~pathlib.Path.rglob` now return both " +"files and directories if a pattern that ends with \"``**``\" is given, " +"rather than directories only. Add a trailing slash to keep the previous " +"behavior and only match directories." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-future.rst:13 +#: ../../whatsnew/3.13.rst:2640 msgid "" -":c:func:`PySlice_GetIndicesEx`: use :c:func:`PySlice_Unpack` and :c:func:" -"`PySlice_AdjustIndices` instead." +"The :mod:`threading` module now expects the :mod:`!_thread` module to have " +"an :func:`!_is_main_interpreter` function. This function takes no arguments " +"and returns ``True`` if the current interpreter is the main interpreter." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-future.rst:14 +#: ../../whatsnew/3.13.rst:2645 msgid "" -":c:func:`!PyUnicode_AsDecodedObject`: use :c:func:`PyCodec_Decode` instead." +"Any library or application that provides a custom :mod:`!_thread` module " +"must provide :func:`!_is_main_interpreter`, just like the module's other " +"\"private\" attributes. (:gh:`112826`.)" msgstr "" -#: ../../deprecations/c-api-pending-removal-in-future.rst:15 -msgid "" -":c:func:`!PyUnicode_AsDecodedUnicode`: use :c:func:`PyCodec_Decode` instead." +#: ../../whatsnew/3.13.rst:2652 +msgid "Changes in the C API" msgstr "" -#: ../../deprecations/c-api-pending-removal-in-future.rst:16 +#: ../../whatsnew/3.13.rst:2654 msgid "" -":c:func:`!PyUnicode_AsEncodedObject`: use :c:func:`PyCodec_Encode` instead." +"``Python.h`` no longer includes the ```` standard header. It was " +"included for the :c:func:`!finite` function which is now provided by the " +"```` header. It should now be included explicitly if needed. Remove " +"also the ``HAVE_IEEEFP_H`` macro. (Contributed by Victor Stinner in :gh:" +"`108765`.)" msgstr "" -#: ../../deprecations/c-api-pending-removal-in-future.rst:17 +#: ../../whatsnew/3.13.rst:2660 msgid "" -":c:func:`!PyUnicode_AsEncodedUnicode`: use :c:func:`PyCodec_Encode` instead." +"``Python.h`` no longer includes these standard header files: ````, " +"```` and ````. If needed, they should now be " +"included explicitly. For example, ```` provides the :c:func:`!clock` " +"and :c:func:`!gmtime` functions, ```` provides the :c:func:`!" +"select` function, and ```` provides the :c:func:`!futimes`, :c:" +"func:`!gettimeofday` and :c:func:`!setitimer` functions. (Contributed by " +"Victor Stinner in :gh:`108765`.)" msgstr "" -#: ../../deprecations/c-api-pending-removal-in-future.rst:18 -msgid ":c:func:`PyUnicode_READY`: unneeded since Python 3.12" +#: ../../whatsnew/3.13.rst:2668 +msgid "" +"On Windows, ``Python.h`` no longer includes the ```` standard " +"header file. If needed, it should now be included explicitly. For example, " +"it provides :c:func:`!offsetof` function, and ``size_t`` and ``ptrdiff_t`` " +"types. Including ```` explicitly was already needed by all other " +"platforms, the ``HAVE_STDDEF_H`` macro is only defined on Windows. " +"(Contributed by Victor Stinner in :gh:`108765`.)" msgstr "" -#: ../../deprecations/c-api-pending-removal-in-future.rst:19 -msgid ":c:func:`!PyErr_Display`: use :c:func:`PyErr_DisplayException` instead." +#: ../../whatsnew/3.13.rst:2675 +msgid "" +"If the :c:macro:`Py_LIMITED_API` macro is defined, :c:macro:`!" +"Py_BUILD_CORE`, :c:macro:`!Py_BUILD_CORE_BUILTIN` and :c:macro:`!" +"Py_BUILD_CORE_MODULE` macros are now undefined by ````. " +"(Contributed by Victor Stinner in :gh:`85283`.)" msgstr "" -#: ../../deprecations/c-api-pending-removal-in-future.rst:20 +#: ../../whatsnew/3.13.rst:2680 msgid "" -":c:func:`!_PyErr_ChainExceptions`: use ``_PyErr_ChainExceptions1`` instead." +"The old trashcan macros ``Py_TRASHCAN_SAFE_BEGIN`` and " +"``Py_TRASHCAN_SAFE_END`` were removed. They should be replaced by the new " +"macros ``Py_TRASHCAN_BEGIN`` and ``Py_TRASHCAN_END``." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-future.rst:21 +#: ../../whatsnew/3.13.rst:2684 +msgid "A ``tp_dealloc`` function that has the old macros, such as::" +msgstr "" + +#: ../../whatsnew/3.13.rst:2686 msgid "" -":c:member:`!PyBytesObject.ob_shash` member: call :c:func:`PyObject_Hash` " -"instead." +"static void\n" +"mytype_dealloc(mytype *p)\n" +"{\n" +" PyObject_GC_UnTrack(p);\n" +" Py_TRASHCAN_SAFE_BEGIN(p);\n" +" ...\n" +" Py_TRASHCAN_SAFE_END\n" +"}" msgstr "" -#: ../../deprecations/c-api-pending-removal-in-future.rst:23 -msgid ":c:member:`!PyDictObject.ma_version_tag` member." +#: ../../whatsnew/3.13.rst:2695 +msgid "should migrate to the new macros as follows::" msgstr "" -#: ../../deprecations/c-api-pending-removal-in-future.rst:24 -msgid "Thread Local Storage (TLS) API:" +#: ../../whatsnew/3.13.rst:2697 +msgid "" +"static void\n" +"mytype_dealloc(mytype *p)\n" +"{\n" +" PyObject_GC_UnTrack(p);\n" +" Py_TRASHCAN_BEGIN(p, mytype_dealloc)\n" +" ...\n" +" Py_TRASHCAN_END\n" +"}" msgstr "" -#: ../../deprecations/c-api-pending-removal-in-future.rst:26 +#: ../../whatsnew/3.13.rst:2706 msgid "" -":c:func:`PyThread_create_key`: use :c:func:`PyThread_tss_alloc` instead." +"Note that ``Py_TRASHCAN_BEGIN`` has a second argument which should be the " +"deallocation function it is in. The new macros were added in Python 3.8 and " +"the old macros were deprecated in Python 3.11. (Contributed by Irit Katriel " +"in :gh:`105111`.)" msgstr "" -#: ../../deprecations/c-api-pending-removal-in-future.rst:27 -msgid ":c:func:`PyThread_delete_key`: use :c:func:`PyThread_tss_free` instead." +#: ../../whatsnew/3.13.rst:2713 +msgid "" +":ref:`PEP 667 ` introduces several changes to " +"frame-related functions:" msgstr "" -#: ../../deprecations/c-api-pending-removal-in-future.rst:28 +#: ../../whatsnew/3.13.rst:2716 msgid "" -":c:func:`PyThread_set_key_value`: use :c:func:`PyThread_tss_set` instead." +"The effects of mutating the dictionary returned from :c:func:" +"`PyEval_GetLocals` in an :term:`optimized scope` have changed. New dict " +"entries added this way will now *only* be visible to subsequent :c:func:" +"`PyEval_GetLocals` calls in that frame, as :c:func:`PyFrame_GetLocals`, :" +"func:`locals`, and :attr:`FrameType.f_locals ` no longer " +"access the same underlying cached dictionary. Changes made to entries for " +"actual variable names and names added via the write-through proxy interfaces " +"will be overwritten on subsequent calls to :c:func:`PyEval_GetLocals` in " +"that frame. The recommended code update depends on how the function was " +"being used, so refer to the deprecation notice on the function for details." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-future.rst:29 +#: ../../whatsnew/3.13.rst:2729 msgid "" -":c:func:`PyThread_get_key_value`: use :c:func:`PyThread_tss_get` instead." +"Calling :c:func:`PyFrame_GetLocals` in an :term:`optimized scope` now " +"returns a write-through proxy rather than a snapshot that gets updated at " +"ill-specified times. If a snapshot is desired, it must be created explicitly " +"(e.g. with :c:func:`PyDict_Copy`), or by calling the new :c:func:" +"`PyEval_GetFrameLocals` API." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-future.rst:30 +#: ../../whatsnew/3.13.rst:2736 msgid "" -":c:func:`PyThread_delete_key_value`: use :c:func:`PyThread_tss_delete` " -"instead." +":c:func:`!PyFrame_FastToLocals` and :c:func:`!PyFrame_FastToLocalsWithError` " +"no longer have any effect. Calling these functions has been redundant since " +"Python 3.11, when :c:func:`PyFrame_GetLocals` was first introduced." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-future.rst:31 -msgid ":c:func:`PyThread_ReInitTLS`: unneeded since Python 3.7." +#: ../../whatsnew/3.13.rst:2741 +msgid "" +":c:func:`!PyFrame_LocalsToFast` no longer has any effect. Calling this " +"function is redundant now that :c:func:`PyFrame_GetLocals` returns a write-" +"through proxy for :term:`optimized scopes `." msgstr "" -#: ../../whatsnew/3.13.rst:2558 +#: ../../whatsnew/3.13.rst:2746 msgid "Regression Test Changes" msgstr "" -#: ../../whatsnew/3.13.rst:2560 +#: ../../whatsnew/3.13.rst:2748 msgid "" "Python built with :file:`configure` :option:`--with-pydebug` now supports a :" "option:`-X presite=package.module <-X>` command-line option. If used, it " diff --git a/whatsnew/3.2.po b/whatsnew/3.2.po index f27239f8a4..5f49805ffb 100644 --- a/whatsnew/3.2.po +++ b/whatsnew/3.2.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-23 07:52+0800\n" +"POT-Creation-Date: 2024-09-24 07:20+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-" @@ -2537,8 +2537,8 @@ msgid "" "The :func:`ssl.wrap_socket() ` constructor " "function now takes a *ciphers* argument. The *ciphers* string lists the " "allowed encryption algorithms using the format described in the `OpenSSL " -"documentation `__." +"documentation `__." msgstr "" #: ../../whatsnew/3.2.rst:1655 diff --git a/whatsnew/3.4.po b/whatsnew/3.4.po index 35f2b010c0..49ff4555d8 100644 --- a/whatsnew/3.4.po +++ b/whatsnew/3.4.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-23 07:52+0800\n" +"POT-Creation-Date: 2024-09-24 07:20+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-" @@ -339,13 +339,14 @@ msgstr "" #: ../../whatsnew/3.4.rst:218 msgid "" -"As `discussed in the PEP`__, platform packagers may choose not to install " -"these commands by default, as long as, when invoked, they provide clear and " -"simple directions on how to install them on that platform (usually using the " -"system package manager)." +"As :pep:`discussed in the PEP <0453#recommendations-for-downstream-" +"distributors>` platform packagers may choose not to install these commands " +"by default, as long as, when invoked, they provide clear and simple " +"directions on how to install them on that platform (usually using the system " +"package manager)." msgstr "" -#: ../../whatsnew/3.4.rst:227 +#: ../../whatsnew/3.4.rst:226 msgid "" "To avoid conflicts between parallel Python 2 and Python 3 installations, " "only the versioned ``pip3`` and ``pip3.4`` commands are bootstrapped by " @@ -357,11 +358,11 @@ msgid "" "multiple Python installations." msgstr "" -#: ../../whatsnew/3.4.rst:238 +#: ../../whatsnew/3.4.rst:237 msgid "Documentation Changes" msgstr "" -#: ../../whatsnew/3.4.rst:240 +#: ../../whatsnew/3.4.rst:239 msgid "" "As part of this change, the :ref:`installing-index` and :ref:`distributing-" "index` sections of the documentation have been completely redesigned as " @@ -371,28 +372,28 @@ msgid "" "of the individual projects." msgstr "" -#: ../../whatsnew/3.4.rst:248 +#: ../../whatsnew/3.4.rst:247 msgid "" "However, as this migration is currently still incomplete, the legacy " "versions of those guides remaining available as :ref:`install-index` and :" "ref:`setuptools-index`." msgstr "" -#: ../../whatsnew/3.4.rst:254 +#: ../../whatsnew/3.4.rst:253 msgid ":pep:`453` -- Explicit bootstrapping of pip in Python installations" msgstr "" -#: ../../whatsnew/3.4.rst:255 +#: ../../whatsnew/3.4.rst:254 msgid "" "PEP written by Donald Stufft and Nick Coghlan, implemented by Donald Stufft, " "Nick Coghlan, Martin von Löwis and Ned Deily." msgstr "" -#: ../../whatsnew/3.4.rst:262 +#: ../../whatsnew/3.4.rst:261 msgid "PEP 446: Newly Created File Descriptors Are Non-Inheritable" msgstr "" -#: ../../whatsnew/3.4.rst:264 +#: ../../whatsnew/3.4.rst:263 msgid "" ":pep:`446` makes newly created file descriptors :ref:`non-inheritable " "`. In general, this is the behavior an application will " @@ -401,39 +402,39 @@ msgid "" "to security issues." msgstr "" -#: ../../whatsnew/3.4.rst:270 +#: ../../whatsnew/3.4.rst:269 msgid "" "However, there are occasions when inheritance is desired. To support these " "cases, the following new functions and methods are available:" msgstr "" -#: ../../whatsnew/3.4.rst:273 +#: ../../whatsnew/3.4.rst:272 msgid ":func:`os.get_inheritable`, :func:`os.set_inheritable`" msgstr ":func:`os.get_inheritable`, :func:`os.set_inheritable`" -#: ../../whatsnew/3.4.rst:274 +#: ../../whatsnew/3.4.rst:273 msgid ":func:`os.get_handle_inheritable`, :func:`os.set_handle_inheritable`" msgstr ":func:`os.get_handle_inheritable`, :func:`os.set_handle_inheritable`" -#: ../../whatsnew/3.4.rst:275 +#: ../../whatsnew/3.4.rst:274 msgid "" ":meth:`socket.socket.get_inheritable`, :meth:`socket.socket.set_inheritable`" msgstr "" ":meth:`socket.socket.get_inheritable`, :meth:`socket.socket.set_inheritable`" -#: ../../whatsnew/3.4.rst:279 +#: ../../whatsnew/3.4.rst:278 msgid ":pep:`446` -- Make newly created file descriptors non-inheritable" msgstr "" -#: ../../whatsnew/3.4.rst:280 ../../whatsnew/3.4.rst:1812 +#: ../../whatsnew/3.4.rst:279 ../../whatsnew/3.4.rst:1811 msgid "PEP written and implemented by Victor Stinner." msgstr "由 Victor Stinner 撰寫 PEP 與實作。" -#: ../../whatsnew/3.4.rst:286 +#: ../../whatsnew/3.4.rst:285 msgid "Improvements to Codec Handling" msgstr "" -#: ../../whatsnew/3.4.rst:288 +#: ../../whatsnew/3.4.rst:287 msgid "" "Since it was first introduced, the :mod:`codecs` module has always been " "intended to operate as a type-neutral dynamic encoding and decoding system. " @@ -442,7 +443,7 @@ msgid "" "and :class:`bytearray` types, has historically obscured that fact." msgstr "" -#: ../../whatsnew/3.4.rst:295 +#: ../../whatsnew/3.4.rst:294 msgid "" "As a key step in clarifying the situation, the :meth:`codecs.encode` and :" "meth:`codecs.decode` convenience functions are now properly documented in " @@ -451,7 +452,7 @@ msgid "" "2.4, but were previously only discoverable through runtime introspection." msgstr "" -#: ../../whatsnew/3.4.rst:301 +#: ../../whatsnew/3.4.rst:300 msgid "" "Unlike the convenience methods on :class:`str`, :class:`bytes` and :class:" "`bytearray`, the :mod:`codecs` convenience functions support arbitrary " @@ -460,14 +461,14 @@ msgid "" "conversions (in Python 2)." msgstr "" -#: ../../whatsnew/3.4.rst:307 +#: ../../whatsnew/3.4.rst:306 msgid "" "In Python 3.4, the interpreter is able to identify the known non-text " "encodings provided in the standard library and direct users towards these " "general purpose convenience functions when appropriate::" msgstr "" -#: ../../whatsnew/3.4.rst:311 +#: ../../whatsnew/3.4.rst:310 msgid "" ">>> b\"abcdef\".decode(\"hex\")\n" "Traceback (most recent call last):\n" @@ -505,7 +506,7 @@ msgstr "" "LookupError: 'hex' is not a text encoding; use codecs.open() to handle " "arbitrary codecs" -#: ../../whatsnew/3.4.rst:326 +#: ../../whatsnew/3.4.rst:325 msgid "" "In a related change, whenever it is feasible without breaking backwards " "compatibility, exceptions raised during encoding and decoding operations are " @@ -513,7 +514,7 @@ msgid "" "the codec responsible for producing the error::" msgstr "" -#: ../../whatsnew/3.4.rst:331 +#: ../../whatsnew/3.4.rst:330 msgid "" ">>> import codecs\n" "\n" @@ -548,7 +549,7 @@ msgid "" "support the buffer interface)" msgstr "" -#: ../../whatsnew/3.4.rst:359 +#: ../../whatsnew/3.4.rst:358 msgid "" "Finally, as the examples above show, these improvements have permitted the " "restoration of the convenience aliases for the non-Unicode codecs that were " @@ -556,7 +557,7 @@ msgid "" "and from its hexadecimal representation (for example) can now be written as::" msgstr "" -#: ../../whatsnew/3.4.rst:365 +#: ../../whatsnew/3.4.rst:364 msgid "" ">>> from codecs import encode, decode\n" ">>> encode(b\"hello\", \"hex\")\n" @@ -565,13 +566,13 @@ msgid "" "b'hello'" msgstr "" -#: ../../whatsnew/3.4.rst:371 +#: ../../whatsnew/3.4.rst:370 msgid "" "The binary and text transforms provided in the standard library are detailed " "in :ref:`binary-transforms` and :ref:`text-transforms`." msgstr "" -#: ../../whatsnew/3.4.rst:374 +#: ../../whatsnew/3.4.rst:373 msgid "" "(Contributed by Nick Coghlan in :issue:`7475`, :issue:`17827`, :issue:" "`17828` and :issue:`19619`.)" @@ -579,11 +580,11 @@ msgstr "" "(由 Nick Coghlan 在 :issue:`7475`、:issue:`17827`、:issue:`17828` 和 :issue:" "`19619` 中貢獻。)" -#: ../../whatsnew/3.4.rst:381 +#: ../../whatsnew/3.4.rst:380 msgid "PEP 451: A ModuleSpec Type for the Import System" msgstr "" -#: ../../whatsnew/3.4.rst:383 +#: ../../whatsnew/3.4.rst:382 msgid "" ":pep:`451` provides an encapsulation of the information about a module that " "the import machinery will use to load it (that is, a module specification). " @@ -592,7 +593,7 @@ msgid "" "related improvements`__." msgstr "" -#: ../../whatsnew/3.4.rst:391 +#: ../../whatsnew/3.4.rst:390 msgid "" "The public-facing changes from the PEP are entirely backward-compatible. " "Furthermore, they should be transparent to everyone but importer authors. " @@ -603,19 +604,19 @@ msgid "" "and their replacements." msgstr "" -#: ../../whatsnew/3.4.rst:401 +#: ../../whatsnew/3.4.rst:400 msgid "Other Language Changes" msgstr "其他語言更動" -#: ../../whatsnew/3.4.rst:403 +#: ../../whatsnew/3.4.rst:402 msgid "Some smaller changes made to the core Python language are:" msgstr "" -#: ../../whatsnew/3.4.rst:405 +#: ../../whatsnew/3.4.rst:404 msgid "Unicode database updated to UCD version 6.3." msgstr "" -#: ../../whatsnew/3.4.rst:407 +#: ../../whatsnew/3.4.rst:406 msgid "" ":func:`min` and :func:`max` now accept a *default* keyword-only argument " "that can be used to specify the value they return if the iterable they are " @@ -623,11 +624,11 @@ msgid "" "`18111`.)" msgstr "" -#: ../../whatsnew/3.4.rst:412 +#: ../../whatsnew/3.4.rst:411 msgid "Module objects are now :ref:`weakly referenceable `." msgstr "" -#: ../../whatsnew/3.4.rst:414 +#: ../../whatsnew/3.4.rst:413 msgid "" "Module ``__file__`` attributes (and related values) should now always " "contain absolute paths by default, with the sole exception of ``__main__." @@ -635,7 +636,7 @@ msgid "" "(Contributed by Brett Cannon in :issue:`18416`.)" msgstr "" -#: ../../whatsnew/3.4.rst:419 +#: ../../whatsnew/3.4.rst:418 msgid "" "All the UTF-\\* codecs (except UTF-7) now reject surrogates during both " "encoding and decoding unless the ``surrogatepass`` error handler is used, " @@ -645,69 +646,69 @@ msgid "" "Storchaka in :issue:`12892`.)" msgstr "" -#: ../../whatsnew/3.4.rst:426 +#: ../../whatsnew/3.4.rst:425 msgid "" "New German EBCDIC :ref:`codec ` ``cp273``. (Contributed " "by Michael Bierenfeld and Andrew Kuchling in :issue:`1097797`.)" msgstr "" -#: ../../whatsnew/3.4.rst:429 +#: ../../whatsnew/3.4.rst:428 msgid "" "New Ukrainian :ref:`codec ` ``cp1125``. (Contributed by " "Serhiy Storchaka in :issue:`19668`.)" msgstr "" -#: ../../whatsnew/3.4.rst:432 +#: ../../whatsnew/3.4.rst:431 msgid "" ":class:`bytes`.join() and :class:`bytearray`.join() now accept arbitrary " "buffer objects as arguments. (Contributed by Antoine Pitrou in :issue:" "`15958`.)" msgstr "" -#: ../../whatsnew/3.4.rst:436 +#: ../../whatsnew/3.4.rst:435 msgid "" "The :class:`int` constructor now accepts any object that has an " "``__index__`` method for its *base* argument. (Contributed by Mark " "Dickinson in :issue:`16772`.)" msgstr "" -#: ../../whatsnew/3.4.rst:440 +#: ../../whatsnew/3.4.rst:439 msgid "" "Frame objects now have a :func:`~frame.clear` method that clears all " "references to local variables from the frame. (Contributed by Antoine " "Pitrou in :issue:`17934`.)" msgstr "" -#: ../../whatsnew/3.4.rst:444 +#: ../../whatsnew/3.4.rst:443 msgid "" ":class:`memoryview` is now registered as a :class:`Sequence `, and supports the :func:`reversed` builtin. (Contributed by Nick " "Coghlan and Claudiu Popa in :issue:`18690` and :issue:`19078`.)" msgstr "" -#: ../../whatsnew/3.4.rst:448 +#: ../../whatsnew/3.4.rst:447 msgid "" "Signatures reported by :func:`help` have been modified and improved in " "several cases as a result of the introduction of Argument Clinic and other " "changes to the :mod:`inspect` and :mod:`pydoc` modules." msgstr "" -#: ../../whatsnew/3.4.rst:452 +#: ../../whatsnew/3.4.rst:451 msgid "" ":meth:`~object.__length_hint__` is now part of the formal language " "specification (see :pep:`424`). (Contributed by Armin Ronacher in :issue:" "`16148`.)" msgstr "" -#: ../../whatsnew/3.4.rst:458 +#: ../../whatsnew/3.4.rst:457 msgid "New Modules" msgstr "新模組" -#: ../../whatsnew/3.4.rst:464 +#: ../../whatsnew/3.4.rst:463 msgid "asyncio" msgstr "asyncio" -#: ../../whatsnew/3.4.rst:466 +#: ../../whatsnew/3.4.rst:465 msgid "" "The new :mod:`asyncio` module (defined in :pep:`3156`) provides a standard " "pluggable event loop model for Python, providing solid asynchronous IO " @@ -715,23 +716,23 @@ msgid "" "implementations to interoperate with the standard library and each other." msgstr "" -#: ../../whatsnew/3.4.rst:471 ../../whatsnew/3.4.rst:534 +#: ../../whatsnew/3.4.rst:470 ../../whatsnew/3.4.rst:533 msgid "For Python 3.4, this module is considered a :term:`provisional API`." msgstr "" -#: ../../whatsnew/3.4.rst:475 +#: ../../whatsnew/3.4.rst:474 msgid ":pep:`3156` -- Asynchronous IO Support Rebooted: the \"asyncio\" Module" msgstr "" -#: ../../whatsnew/3.4.rst:476 +#: ../../whatsnew/3.4.rst:475 msgid "PEP written and implementation led by Guido van Rossum." msgstr "由 Guido van Rossum 撰寫 PEP 與帶領實作。" -#: ../../whatsnew/3.4.rst:482 +#: ../../whatsnew/3.4.rst:481 msgid "ensurepip" msgstr "ensurepip" -#: ../../whatsnew/3.4.rst:484 +#: ../../whatsnew/3.4.rst:483 msgid "" "The new :mod:`ensurepip` module is the primary infrastructure for the :pep:" "`453` implementation. In the normal course of events end users will not " @@ -740,7 +741,7 @@ msgid "" "environment was declined." msgstr "" -#: ../../whatsnew/3.4.rst:490 +#: ../../whatsnew/3.4.rst:489 msgid "" ":mod:`ensurepip` includes a bundled copy of ``pip``, up-to-date as of the " "first release candidate of the release of CPython with which it ships (this " @@ -752,7 +753,7 @@ msgid "" "package and will not be removed if Python is uninstalled.)" msgstr "" -#: ../../whatsnew/3.4.rst:499 +#: ../../whatsnew/3.4.rst:498 msgid "" "The module is named *ensure*\\ pip because if called when ``pip`` is already " "installed, it does nothing. It also has an ``--upgrade`` option that will " @@ -760,11 +761,11 @@ msgid "" "version of ``pip`` is older than the bundled copy." msgstr "" -#: ../../whatsnew/3.4.rst:508 +#: ../../whatsnew/3.4.rst:507 msgid "enum" msgstr "enum" -#: ../../whatsnew/3.4.rst:510 +#: ../../whatsnew/3.4.rst:509 msgid "" "The new :mod:`enum` module (defined in :pep:`435`) provides a standard " "implementation of enumeration types, allowing other modules (such as :mod:" @@ -773,21 +774,21 @@ msgid "" "enumeration values." msgstr "" -#: ../../whatsnew/3.4.rst:518 +#: ../../whatsnew/3.4.rst:517 msgid ":pep:`435` -- Adding an Enum type to the Python standard library" msgstr "" -#: ../../whatsnew/3.4.rst:519 +#: ../../whatsnew/3.4.rst:518 msgid "" "PEP written by Barry Warsaw, Eli Bendersky and Ethan Furman, implemented by " "Ethan Furman." msgstr "" -#: ../../whatsnew/3.4.rst:526 +#: ../../whatsnew/3.4.rst:525 msgid "pathlib" msgstr "pathlib" -#: ../../whatsnew/3.4.rst:528 +#: ../../whatsnew/3.4.rst:527 msgid "" "The new :mod:`pathlib` module offers classes representing filesystem paths " "with semantics appropriate for different operating systems. Path classes " @@ -796,30 +797,30 @@ msgid "" "but also provide I/O operations." msgstr "" -#: ../../whatsnew/3.4.rst:538 +#: ../../whatsnew/3.4.rst:537 msgid ":pep:`428` -- The pathlib module -- object-oriented filesystem paths" msgstr "" -#: ../../whatsnew/3.4.rst:539 ../../whatsnew/3.4.rst:1835 +#: ../../whatsnew/3.4.rst:538 ../../whatsnew/3.4.rst:1834 msgid "PEP written and implemented by Antoine Pitrou." msgstr "由 Antoine Pitrou 撰寫 PEP 與實作。" -#: ../../whatsnew/3.4.rst:545 +#: ../../whatsnew/3.4.rst:544 msgid "selectors" msgstr "selectors" -#: ../../whatsnew/3.4.rst:547 +#: ../../whatsnew/3.4.rst:546 msgid "" "The new :mod:`selectors` module (created as part of implementing :pep:" "`3156`) allows high-level and efficient I/O multiplexing, built upon the :" "mod:`select` module primitives." msgstr "" -#: ../../whatsnew/3.4.rst:555 +#: ../../whatsnew/3.4.rst:554 msgid "statistics" msgstr "statistics" -#: ../../whatsnew/3.4.rst:557 +#: ../../whatsnew/3.4.rst:556 msgid "" "The new :mod:`statistics` module (defined in :pep:`450`) offers some core " "statistics functionality directly in the standard library. This module " @@ -827,64 +828,64 @@ msgid "" "deviation of a data series." msgstr "" -#: ../../whatsnew/3.4.rst:564 +#: ../../whatsnew/3.4.rst:563 msgid ":pep:`450` -- Adding A Statistics Module To The Standard Library" msgstr "" -#: ../../whatsnew/3.4.rst:565 +#: ../../whatsnew/3.4.rst:564 msgid "PEP written and implemented by Steven D'Aprano" msgstr "由 Steven D'Aprano 撰寫 PEP 與實作" -#: ../../whatsnew/3.4.rst:571 +#: ../../whatsnew/3.4.rst:570 msgid "tracemalloc" msgstr "tracemalloc" -#: ../../whatsnew/3.4.rst:573 +#: ../../whatsnew/3.4.rst:572 msgid "" "The new :mod:`tracemalloc` module (defined in :pep:`454`) is a debug tool to " "trace memory blocks allocated by Python. It provides the following " "information:" msgstr "" -#: ../../whatsnew/3.4.rst:576 +#: ../../whatsnew/3.4.rst:575 msgid "Trace where an object was allocated" msgstr "" -#: ../../whatsnew/3.4.rst:577 +#: ../../whatsnew/3.4.rst:576 msgid "" "Statistics on allocated memory blocks per filename and per line number: " "total size, number and average size of allocated memory blocks" msgstr "" -#: ../../whatsnew/3.4.rst:579 +#: ../../whatsnew/3.4.rst:578 msgid "Compute the differences between two snapshots to detect memory leaks" msgstr "" -#: ../../whatsnew/3.4.rst:583 +#: ../../whatsnew/3.4.rst:582 msgid "" ":pep:`454` -- Add a new tracemalloc module to trace Python memory allocations" msgstr "" -#: ../../whatsnew/3.4.rst:584 +#: ../../whatsnew/3.4.rst:583 msgid "PEP written and implemented by Victor Stinner" msgstr "由 Victor Stinner 撰寫 PEP 與實作" -#: ../../whatsnew/3.4.rst:589 +#: ../../whatsnew/3.4.rst:588 msgid "Improved Modules" msgstr "改進的模組" -#: ../../whatsnew/3.4.rst:593 +#: ../../whatsnew/3.4.rst:592 msgid "abc" msgstr "abc" -#: ../../whatsnew/3.4.rst:595 +#: ../../whatsnew/3.4.rst:594 msgid "" "New function :func:`abc.get_cache_token` can be used to know when to " "invalidate caches that are affected by changes in the object graph. " "(Contributed by Łukasz Langa in :issue:`16832`.)" msgstr "" -#: ../../whatsnew/3.4.rst:599 +#: ../../whatsnew/3.4.rst:598 msgid "" "New class :class:`~abc.ABC` has :class:`~abc.ABCMeta` as its meta class. " "Using ``ABC`` as a base class has essentially the same effect as specifying " @@ -892,17 +893,17 @@ msgid "" "(Contributed by Bruno Dupuis in :issue:`16049`.)" msgstr "" -#: ../../whatsnew/3.4.rst:606 +#: ../../whatsnew/3.4.rst:605 msgid "aifc" msgstr "aifc" -#: ../../whatsnew/3.4.rst:608 +#: ../../whatsnew/3.4.rst:607 msgid "" "The :meth:`!getparams` method now returns a namedtuple rather than a plain " "tuple. (Contributed by Claudiu Popa in :issue:`17818`.)" msgstr "" -#: ../../whatsnew/3.4.rst:611 +#: ../../whatsnew/3.4.rst:610 msgid "" ":func:`!aifc.open` now supports the context management protocol: when used " "in a :keyword:`with` block, the :meth:`!close` method of the returned object " @@ -910,52 +911,52 @@ msgid "" "Serhiy Storchacha in :issue:`16486`.)" msgstr "" -#: ../../whatsnew/3.4.rst:616 ../../whatsnew/3.4.rst:1543 +#: ../../whatsnew/3.4.rst:615 ../../whatsnew/3.4.rst:1542 msgid "" "The :meth:`!writeframesraw` and :meth:`!writeframes` methods now accept any :" "term:`bytes-like object`. (Contributed by Serhiy Storchaka in :issue:" "`8311`.)" msgstr "" -#: ../../whatsnew/3.4.rst:622 +#: ../../whatsnew/3.4.rst:621 msgid "argparse" msgstr "argparse" -#: ../../whatsnew/3.4.rst:624 +#: ../../whatsnew/3.4.rst:623 msgid "" "The :class:`~argparse.FileType` class now accepts *encoding* and *errors* " "arguments, which are passed through to :func:`open`. (Contributed by Lucas " "Maystre in :issue:`11175`.)" msgstr "" -#: ../../whatsnew/3.4.rst:630 +#: ../../whatsnew/3.4.rst:629 msgid "audioop" msgstr "audioop" -#: ../../whatsnew/3.4.rst:632 +#: ../../whatsnew/3.4.rst:631 msgid "" ":mod:`!audioop` now supports 24-bit samples. (Contributed by Serhiy " "Storchaka in :issue:`12866`.)" msgstr "" -#: ../../whatsnew/3.4.rst:635 +#: ../../whatsnew/3.4.rst:634 msgid "" "New :func:`!byteswap` function converts big-endian samples to little-endian " "and vice versa. (Contributed by Serhiy Storchaka in :issue:`19641`.)" msgstr "" -#: ../../whatsnew/3.4.rst:639 +#: ../../whatsnew/3.4.rst:638 msgid "" "All :mod:`!audioop` functions now accept any :term:`bytes-like object`. " "Strings are not accepted: they didn't work before, now they raise an error " "right away. (Contributed by Serhiy Storchaka in :issue:`16685`.)" msgstr "" -#: ../../whatsnew/3.4.rst:645 +#: ../../whatsnew/3.4.rst:644 msgid "base64" msgstr "base64" -#: ../../whatsnew/3.4.rst:647 +#: ../../whatsnew/3.4.rst:646 msgid "" "The encoding and decoding functions in :mod:`base64` now accept any :term:" "`bytes-like object` in cases where it previously required a :class:`bytes` " @@ -963,7 +964,7 @@ msgid "" "`17839`.)" msgstr "" -#: ../../whatsnew/3.4.rst:652 +#: ../../whatsnew/3.4.rst:651 msgid "" "New functions :func:`~base64.a85encode`, :func:`~base64.a85decode`, :func:" "`~base64.b85encode`, and :func:`~base64.b85decode` provide the ability to " @@ -974,11 +975,11 @@ msgid "" "Mercurial project, Serhiy Storchaka, and Antoine Pitrou in :issue:`17618`.)" msgstr "" -#: ../../whatsnew/3.4.rst:662 +#: ../../whatsnew/3.4.rst:661 msgid "collections" msgstr "collections" -#: ../../whatsnew/3.4.rst:664 +#: ../../whatsnew/3.4.rst:663 msgid "" "The :meth:`.ChainMap.new_child` method now accepts an *m* argument " "specifying the child map to add to the chain. This allows an existing " @@ -986,11 +987,11 @@ msgid "" "by Vinay Sajip in :issue:`16613`.)" msgstr "" -#: ../../whatsnew/3.4.rst:671 +#: ../../whatsnew/3.4.rst:670 msgid "colorsys" msgstr "colorsys" -#: ../../whatsnew/3.4.rst:673 +#: ../../whatsnew/3.4.rst:672 msgid "" "The number of digits in the coefficients for the RGB --- YIQ conversions " "have been expanded so that they match the FCC NTSC versions. The change in " @@ -998,11 +999,11 @@ msgid "" "(Contributed by Brian Landers and Serhiy Storchaka in :issue:`14323`.)" msgstr "" -#: ../../whatsnew/3.4.rst:680 +#: ../../whatsnew/3.4.rst:679 msgid "contextlib" msgstr "contextlib" -#: ../../whatsnew/3.4.rst:682 +#: ../../whatsnew/3.4.rst:681 msgid "" "The new :class:`contextlib.suppress` context manager helps to clarify the " "intent of code that deliberately suppresses exceptions from a single " @@ -1010,7 +1011,7 @@ msgid "" "Piraeus in :issue:`19266`.)" msgstr "" -#: ../../whatsnew/3.4.rst:687 +#: ../../whatsnew/3.4.rst:686 msgid "" "The new :func:`contextlib.redirect_stdout` context manager makes it easier " "for utility scripts to handle inflexible APIs that write their output to :" @@ -1023,18 +1024,18 @@ msgid "" "data:`sys.stdout`. (Contributed by Raymond Hettinger in :issue:`15805`.)" msgstr "" -#: ../../whatsnew/3.4.rst:698 +#: ../../whatsnew/3.4.rst:697 msgid "" "The :mod:`contextlib` documentation has also been updated to include a :ref:" "`discussion ` of the differences " "between single use, reusable and reentrant context managers." msgstr "" -#: ../../whatsnew/3.4.rst:704 +#: ../../whatsnew/3.4.rst:703 msgid "dbm" msgstr "dbm" -#: ../../whatsnew/3.4.rst:706 +#: ../../whatsnew/3.4.rst:705 msgid "" ":func:`dbm.open` objects now support the context management protocol. When " "used in a :keyword:`with` statement, the ``close`` method of the database " @@ -1042,25 +1043,25 @@ msgid "" "by Claudiu Popa and Nick Coghlan in :issue:`19282`.)" msgstr "" -#: ../../whatsnew/3.4.rst:713 +#: ../../whatsnew/3.4.rst:712 msgid "dis" msgstr "dis" -#: ../../whatsnew/3.4.rst:715 +#: ../../whatsnew/3.4.rst:714 msgid "" "Functions :func:`~dis.show_code`, :func:`~dis.dis`, :func:`~dis.distb`, and :" "func:`~dis.disassemble` now accept a keyword-only *file* argument that " "controls where they write their output." msgstr "" -#: ../../whatsnew/3.4.rst:719 +#: ../../whatsnew/3.4.rst:718 msgid "" "The :mod:`dis` module is now built around an :class:`~dis.Instruction` class " "that provides object oriented access to the details of each individual " "bytecode operation." msgstr "" -#: ../../whatsnew/3.4.rst:723 +#: ../../whatsnew/3.4.rst:722 msgid "" "A new method, :func:`~dis.get_instructions`, provides an iterator that emits " "the Instruction stream for a given piece of Python code. Thus it is now " @@ -1069,7 +1070,7 @@ msgid "" "example::" msgstr "" -#: ../../whatsnew/3.4.rst:729 +#: ../../whatsnew/3.4.rst:728 msgid "" ">>> import dis\n" ">>> for instr in dis.get_instructions(lambda x: x + 1):\n" @@ -1087,13 +1088,13 @@ msgstr "" "BINARY_ADD\n" "RETURN_VALUE" -#: ../../whatsnew/3.4.rst:737 +#: ../../whatsnew/3.4.rst:736 msgid "" "The various display tools in the :mod:`dis` module have been rewritten to " "use these new components." msgstr "" -#: ../../whatsnew/3.4.rst:740 +#: ../../whatsnew/3.4.rst:739 msgid "" "In addition, a new application-friendly class :class:`~dis.Bytecode` " "provides an object-oriented API for inspecting bytecode in both in human-" @@ -1105,7 +1106,7 @@ msgid "" "dis` on the constructor argument, but returned as a multi-line string::" msgstr "" -#: ../../whatsnew/3.4.rst:749 +#: ../../whatsnew/3.4.rst:748 msgid "" ">>> bytecode = dis.Bytecode(lambda x: x + 1, current_offset=3)\n" ">>> for instr in bytecode:\n" @@ -1121,7 +1122,7 @@ msgid "" " ' 7 RETURN_VALUE']" msgstr "" -#: ../../whatsnew/3.4.rst:762 +#: ../../whatsnew/3.4.rst:761 msgid "" ":class:`~dis.Bytecode` also has a class method, :meth:`~dis.Bytecode." "from_traceback`, that provides the ability to manipulate a traceback (that " @@ -1129,7 +1130,7 @@ msgid "" "``distb(tb)``)." msgstr "" -#: ../../whatsnew/3.4.rst:767 +#: ../../whatsnew/3.4.rst:766 msgid "" "(Contributed by Nick Coghlan, Ryan Kelly and Thomas Kluyver in :issue:" "`11816` and Claudiu Popa in :issue:`17916`.)" @@ -1137,25 +1138,25 @@ msgstr "" "(由 Nick Coghlan、Ryan Kelly 和 Thomas Kluyver 在 :issue:`11816` 中以及 " "Claudiu Popa 在 :issue:`17916` 中貢獻。)" -#: ../../whatsnew/3.4.rst:770 +#: ../../whatsnew/3.4.rst:769 msgid "" "New function :func:`~dis.stack_effect` computes the effect on the Python " "stack of a given opcode and argument, information that is not otherwise " "available. (Contributed by Larry Hastings in :issue:`19722`.)" msgstr "" -#: ../../whatsnew/3.4.rst:776 +#: ../../whatsnew/3.4.rst:775 msgid "doctest" msgstr "doctest" -#: ../../whatsnew/3.4.rst:778 +#: ../../whatsnew/3.4.rst:777 msgid "" "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 "" -#: ../../whatsnew/3.4.rst:782 +#: ../../whatsnew/3.4.rst:781 msgid "" "The :mod:`doctest` command line interface now uses :mod:`argparse`, and has " "two new options, ``-o`` and ``-f``. ``-o`` allows :ref:`doctest options " @@ -1165,17 +1166,17 @@ msgid "" "`11390`.)" msgstr "" -#: ../../whatsnew/3.4.rst:788 +#: ../../whatsnew/3.4.rst:787 msgid "" ":mod:`doctest` will now find doctests in extension module ``__doc__`` " "strings. (Contributed by Zachary Ware in :issue:`3158`.)" msgstr "" -#: ../../whatsnew/3.4.rst:793 +#: ../../whatsnew/3.4.rst:792 msgid "email" msgstr "email" -#: ../../whatsnew/3.4.rst:795 +#: ../../whatsnew/3.4.rst:794 msgid "" ":meth:`~email.message.Message.as_string` now accepts a *policy* argument to " "override the default policy of the message when generating a string " @@ -1185,7 +1186,7 @@ msgid "" "(Contributed by R. David Murray in :issue:`18600`.)" msgstr "" -#: ../../whatsnew/3.4.rst:802 +#: ../../whatsnew/3.4.rst:801 msgid "" "New method :meth:`~email.message.Message.as_bytes` added to produce a bytes " "representation of the message in a fashion similar to how ``as_string`` " @@ -1197,7 +1198,7 @@ msgid "" "(Contributed by R. David Murray in :issue:`18600`.)" msgstr "" -#: ../../whatsnew/3.4.rst:811 +#: ../../whatsnew/3.4.rst:810 msgid "" "The :meth:`.Message.set_param` message now accepts a *replace* keyword " "argument. When specified, the associated header will be updated without " @@ -1206,7 +1207,7 @@ msgid "" "`18891`.)" msgstr "" -#: ../../whatsnew/3.4.rst:819 +#: ../../whatsnew/3.4.rst:818 msgid "" "A pair of new subclasses of :class:`~email.message.Message` have been added " "(:class:`.EmailMessage` and :class:`.MIMEPart`), along with a new sub-" @@ -1223,11 +1224,11 @@ msgid "" "handling). (Contributed by R. David Murray in :issue:`18891`.)" msgstr "" -#: ../../whatsnew/3.4.rst:835 +#: ../../whatsnew/3.4.rst:834 msgid "filecmp" msgstr "filecmp" -#: ../../whatsnew/3.4.rst:837 +#: ../../whatsnew/3.4.rst:836 msgid "" "A new :func:`~filecmp.clear_cache` function provides the ability to clear " "the :mod:`filecmp` comparison cache, which uses :func:`os.stat` information " @@ -1237,7 +1238,7 @@ msgid "" "time field. (Contributed by Mark Levitt in :issue:`18149`.)" msgstr "" -#: ../../whatsnew/3.4.rst:844 +#: ../../whatsnew/3.4.rst:843 msgid "" "New module attribute :const:`~filecmp.DEFAULT_IGNORES` provides the list of " "directories that are used as the default value for the *ignore* parameter of " @@ -1245,11 +1246,11 @@ msgid "" "issue:`15442`.)" msgstr "" -#: ../../whatsnew/3.4.rst:851 +#: ../../whatsnew/3.4.rst:850 msgid "functools" msgstr "functools" -#: ../../whatsnew/3.4.rst:853 +#: ../../whatsnew/3.4.rst:852 msgid "" "The new :func:`~functools.partialmethod` descriptor brings partial argument " "application to descriptors, just as :func:`~functools.partial` provides for " @@ -1259,7 +1260,7 @@ msgid "" "Alon Horev and Nick Coghlan in :issue:`4331`.)" msgstr "" -#: ../../whatsnew/3.4.rst:862 +#: ../../whatsnew/3.4.rst:861 msgid "" "The new :func:`~functools.singledispatch` decorator brings support for " "single-dispatch generic functions to the Python standard library. Where " @@ -1269,22 +1270,22 @@ msgid "" "*different* kinds of data." msgstr "" -#: ../../whatsnew/3.4.rst:871 +#: ../../whatsnew/3.4.rst:870 msgid ":pep:`443` -- Single-dispatch generic functions" msgstr "" -#: ../../whatsnew/3.4.rst:872 +#: ../../whatsnew/3.4.rst:871 msgid "PEP written and implemented by Łukasz Langa." msgstr "由 Łukasz Langa 撰寫 PEP 與實作。" -#: ../../whatsnew/3.4.rst:874 +#: ../../whatsnew/3.4.rst:873 msgid "" ":func:`~functools.total_ordering` now supports a return value of :data:" "`NotImplemented` from the underlying comparison function. (Contributed by " "Katie Miller in :issue:`10042`.)" msgstr "" -#: ../../whatsnew/3.4.rst:878 +#: ../../whatsnew/3.4.rst:877 msgid "" "A pure-python version of the :func:`~functools.partial` function is now in " "the stdlib; in CPython it is overridden by the C accelerated version, but it " @@ -1292,22 +1293,22 @@ msgid "" "in :issue:`12428`.)" msgstr "" -#: ../../whatsnew/3.4.rst:885 +#: ../../whatsnew/3.4.rst:884 msgid "gc" msgstr "gc" -#: ../../whatsnew/3.4.rst:887 +#: ../../whatsnew/3.4.rst:886 msgid "" "New function :func:`~gc.get_stats` returns a list of three per-generation " "dictionaries containing the collections statistics since interpreter " "startup. (Contributed by Antoine Pitrou in :issue:`16351`.)" msgstr "" -#: ../../whatsnew/3.4.rst:893 +#: ../../whatsnew/3.4.rst:892 msgid "glob" msgstr "glob" -#: ../../whatsnew/3.4.rst:895 +#: ../../whatsnew/3.4.rst:894 msgid "" "A new function :func:`~glob.escape` provides a way to escape special " "characters in a filename so that they do not become part of the globbing " @@ -1315,18 +1316,18 @@ msgid "" "Storchaka in :issue:`8402`.)" msgstr "" -#: ../../whatsnew/3.4.rst:901 +#: ../../whatsnew/3.4.rst:900 msgid "hashlib" msgstr "hashlib" -#: ../../whatsnew/3.4.rst:903 +#: ../../whatsnew/3.4.rst:902 msgid "" "A new :func:`hashlib.pbkdf2_hmac` function provides the `PKCS#5 password-" "based key derivation function 2 `_. " "(Contributed by Christian Heimes in :issue:`18582`.)" msgstr "" -#: ../../whatsnew/3.4.rst:908 +#: ../../whatsnew/3.4.rst:907 msgid "" "The :attr:`~hashlib.hash.name` attribute of :mod:`hashlib` hash objects is " "now a formally supported interface. It has always existed in CPython's :mod:" @@ -1336,11 +1337,11 @@ msgid "" "Coombs in :issue:`18532`.)" msgstr "" -#: ../../whatsnew/3.4.rst:917 +#: ../../whatsnew/3.4.rst:916 msgid "hmac" msgstr "hmac" -#: ../../whatsnew/3.4.rst:919 +#: ../../whatsnew/3.4.rst:918 msgid "" ":mod:`hmac` now accepts ``bytearray`` as well as ``bytes`` for the *key* " "argument to the :func:`~hmac.new` function, and the *msg* parameter to both " @@ -1349,7 +1350,7 @@ msgid "" "Jonas Borgström in :issue:`18240`.)" msgstr "" -#: ../../whatsnew/3.4.rst:925 +#: ../../whatsnew/3.4.rst:924 msgid "" "The *digestmod* argument to the :func:`hmac.new` function may now be any " "hash digest name recognized by :mod:`hashlib`. In addition, the current " @@ -1358,7 +1359,7 @@ msgid "" "(Contributed by Christian Heimes in :issue:`17276`.)" msgstr "" -#: ../../whatsnew/3.4.rst:931 +#: ../../whatsnew/3.4.rst:930 msgid "" "With the addition of :attr:`~hmac.HMAC.block_size` and :attr:`~hmac.HMAC." "name` attributes (and the formal documentation of the :attr:`~hmac.HMAC." @@ -1366,18 +1367,18 @@ msgid "" "pep:`247` API. (Contributed by Christian Heimes in :issue:`18775`.)" msgstr "" -#: ../../whatsnew/3.4.rst:938 +#: ../../whatsnew/3.4.rst:937 msgid "html" msgstr "html" -#: ../../whatsnew/3.4.rst:940 +#: ../../whatsnew/3.4.rst:939 msgid "" "New function :func:`~html.unescape` function converts HTML5 character " "references to the corresponding Unicode characters. (Contributed by Ezio " "Melotti in :issue:`2927`.)" msgstr "" -#: ../../whatsnew/3.4.rst:944 +#: ../../whatsnew/3.4.rst:943 msgid "" ":class:`~html.parser.HTMLParser` accepts a new keyword argument " "*convert_charrefs* that, when ``True``, automatically converts all character " @@ -1387,17 +1388,17 @@ msgid "" "(Contributed by Ezio Melotti in :issue:`13633`.)" msgstr "" -#: ../../whatsnew/3.4.rst:951 +#: ../../whatsnew/3.4.rst:950 msgid "" "The *strict* argument of :class:`~html.parser.HTMLParser` is now deprecated. " "(Contributed by Ezio Melotti in :issue:`15114`.)" msgstr "" -#: ../../whatsnew/3.4.rst:956 +#: ../../whatsnew/3.4.rst:955 msgid "http" msgstr "http" -#: ../../whatsnew/3.4.rst:958 +#: ../../whatsnew/3.4.rst:957 msgid "" ":meth:`~http.server.BaseHTTPRequestHandler.send_error` now accepts an " "optional additional *explain* parameter which can be used to provide an " @@ -1407,18 +1408,18 @@ msgid "" "the error response. (Contributed by Karl Cow in :issue:`12921`.)" msgstr "" -#: ../../whatsnew/3.4.rst:965 +#: ../../whatsnew/3.4.rst:964 msgid "" "The :mod:`http.server` :ref:`command line interface ` now " "has a ``-b/--bind`` option that causes the server to listen on a specific " "address. (Contributed by Malte Swart in :issue:`17764`.)" msgstr "" -#: ../../whatsnew/3.4.rst:971 +#: ../../whatsnew/3.4.rst:970 msgid "idlelib and IDLE" msgstr "idlelib 與 IDLE" -#: ../../whatsnew/3.4.rst:973 +#: ../../whatsnew/3.4.rst:972 msgid "" "Since idlelib implements the IDLE shell and editor and is not intended for " "import by other programs, it gets improvements with every release. See :file:" @@ -1427,11 +1428,11 @@ msgid "" "the IDLE :menuselection:`Help --> About IDLE` dialog." msgstr "" -#: ../../whatsnew/3.4.rst:981 +#: ../../whatsnew/3.4.rst:980 msgid "importlib" msgstr "importlib" -#: ../../whatsnew/3.4.rst:983 +#: ../../whatsnew/3.4.rst:982 msgid "" "The :class:`~importlib.abc.InspectLoader` ABC defines a new method, :meth:" "`~importlib.abc.InspectLoader.source_to_code` that accepts source data and a " @@ -1440,7 +1441,7 @@ msgid "" "Snow and Brett Cannon in :issue:`15627`.)" msgstr "" -#: ../../whatsnew/3.4.rst:989 +#: ../../whatsnew/3.4.rst:988 msgid "" ":class:`~importlib.abc.InspectLoader` also now has a default implementation " "for the :meth:`~importlib.abc.InspectLoader.get_code` method. However, it " @@ -1448,14 +1449,14 @@ msgid "" "performance reasons. (Contributed by Brett Cannon in :issue:`18072`.)" msgstr "" -#: ../../whatsnew/3.4.rst:994 +#: ../../whatsnew/3.4.rst:993 msgid "" "The :func:`~importlib.reload` function has been moved from :mod:`!imp` to :" "mod:`importlib` as part of the :mod:`!imp` module deprecation. (Contributed " "by Berker Peksag in :issue:`18193`.)" msgstr "" -#: ../../whatsnew/3.4.rst:998 +#: ../../whatsnew/3.4.rst:997 msgid "" ":mod:`importlib.util` now has a :data:`~importlib.util.MAGIC_NUMBER` " "attribute providing access to the bytecode version number. This replaces " @@ -1463,7 +1464,7 @@ msgid "" "(Contributed by Brett Cannon in :issue:`18192`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1003 +#: ../../whatsnew/3.4.rst:1002 msgid "" "New :mod:`importlib.util` functions :func:`~importlib.util." "cache_from_source` and :func:`~importlib.util.source_from_cache` replace the " @@ -1471,7 +1472,7 @@ msgid "" "Brett Cannon in :issue:`18194`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1008 +#: ../../whatsnew/3.4.rst:1007 msgid "" "The :mod:`importlib` bootstrap :class:`.NamespaceLoader` now conforms to " "the :class:`.InspectLoader` ABC, which means that ``runpy`` and ``python -" @@ -1479,7 +1480,7 @@ msgid "" "in :issue:`18058`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1013 +#: ../../whatsnew/3.4.rst:1012 msgid "" ":mod:`importlib.util` has a new function :func:`~importlib.util." "decode_source` that decodes source from bytes using universal newline " @@ -1487,7 +1488,7 @@ msgid "" "get_source` methods." msgstr "" -#: ../../whatsnew/3.4.rst:1017 +#: ../../whatsnew/3.4.rst:1016 msgid "" ":class:`importlib.machinery.ExtensionFileLoader` now has a :meth:`~importlib." "machinery.ExtensionFileLoader.get_filename` method. This was inadvertently " @@ -1495,11 +1496,11 @@ msgid "" "`19152`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1024 +#: ../../whatsnew/3.4.rst:1023 msgid "inspect" msgstr "inspect" -#: ../../whatsnew/3.4.rst:1026 +#: ../../whatsnew/3.4.rst:1025 msgid "" "The :mod:`inspect` module now offers a basic :ref:`command line interface " "` to quickly display source code and other information " @@ -1507,7 +1508,7 @@ msgid "" "Coghlan in :issue:`18626`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1031 +#: ../../whatsnew/3.4.rst:1030 msgid "" ":func:`~inspect.unwrap` makes it easy to unravel wrapper function chains " "created by :func:`functools.wraps` (and any other API that sets the " @@ -1515,7 +1516,7 @@ msgid "" "Urban, Aaron Iles and Nick Coghlan in :issue:`13266`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1036 +#: ../../whatsnew/3.4.rst:1035 msgid "" "As part of the implementation of the new :mod:`enum` module, the :mod:" "`inspect` module now has substantially better support for custom ``__dir__`` " @@ -1523,7 +1524,7 @@ msgid "" "(Contributed by Ethan Furman in :issue:`18929` and :issue:`19030`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1042 +#: ../../whatsnew/3.4.rst:1041 msgid "" ":func:`~inspect.getfullargspec` and :func:`~inspect.getargspec` now use the :" "func:`~inspect.signature` API. This allows them to support a much broader " @@ -1536,18 +1537,18 @@ msgid "" "(Contributed by Yury Selivanov in :issue:`17481`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1053 +#: ../../whatsnew/3.4.rst:1052 msgid "" ":func:`~inspect.signature` now supports duck types of CPython functions, " "which adds support for functions compiled with Cython. (Contributed by " "Stefan Behnel and Yury Selivanov in :issue:`17159`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1059 +#: ../../whatsnew/3.4.rst:1058 msgid "ipaddress" msgstr "ipaddress" -#: ../../whatsnew/3.4.rst:1061 +#: ../../whatsnew/3.4.rst:1060 msgid "" ":mod:`ipaddress` was added to the standard library in Python 3.3 as a :term:" "`provisional API`. With the release of Python 3.4, this qualification has " @@ -1555,32 +1556,32 @@ msgid "" "the normal standard library requirements to maintain backwards compatibility." msgstr "" -#: ../../whatsnew/3.4.rst:1067 +#: ../../whatsnew/3.4.rst:1066 msgid "" "A new :attr:`~ipaddress.IPv4Address.is_global` property is ``True`` if an " "address is globally routeable. (Contributed by Peter Moody in :issue:" "`17400`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1073 +#: ../../whatsnew/3.4.rst:1072 msgid "logging" msgstr "logging" -#: ../../whatsnew/3.4.rst:1075 +#: ../../whatsnew/3.4.rst:1074 msgid "" "The :class:`~logging.handlers.TimedRotatingFileHandler` has a new *atTime* " "parameter that can be used to specify the time of day when rollover should " "happen. (Contributed by Ronald Oussoren in :issue:`9556`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1079 +#: ../../whatsnew/3.4.rst:1078 msgid "" ":class:`~logging.handlers.SocketHandler` and :class:`~logging.handlers." "DatagramHandler` now support Unix domain sockets (by setting *port* to " "``None``). (Contributed by Vinay Sajip in commit ce46195b56a9.)" msgstr "" -#: ../../whatsnew/3.4.rst:1084 +#: ../../whatsnew/3.4.rst:1083 msgid "" ":func:`~logging.config.fileConfig` now accepts a :class:`configparser." "RawConfigParser` subclass instance for the *fname* parameter. This " @@ -1590,7 +1591,7 @@ msgid "" "fileConfig`. (Contributed by Vinay Sajip in :issue:`16110`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1092 +#: ../../whatsnew/3.4.rst:1091 msgid "" "Logging configuration data received from a socket via the :func:`logging." "config.listen` function can now be validated before being processed by " @@ -1598,11 +1599,11 @@ msgid "" "keyword argument. (Contributed by Vinay Sajip in :issue:`15452`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1101 +#: ../../whatsnew/3.4.rst:1100 msgid "marshal" msgstr "marshal" -#: ../../whatsnew/3.4.rst:1103 +#: ../../whatsnew/3.4.rst:1102 msgid "" "The default :mod:`marshal` version has been bumped to 3. The code " "implementing the new version restores the Python2 behavior of recording only " @@ -1615,21 +1616,21 @@ msgid "" "issue:`19219`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1114 +#: ../../whatsnew/3.4.rst:1113 msgid "mmap" msgstr "mmap" -#: ../../whatsnew/3.4.rst:1116 +#: ../../whatsnew/3.4.rst:1115 msgid "" "mmap objects are now :ref:`weakly referenceable `. (Contributed " "by Valerie Lambert in :issue:`4885`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1121 +#: ../../whatsnew/3.4.rst:1120 msgid "multiprocessing" msgstr "multiprocessing" -#: ../../whatsnew/3.4.rst:1125 +#: ../../whatsnew/3.4.rst:1124 msgid "" "On Unix two new :ref:`start methods `, " "``spawn`` and ``forkserver``, have been added for starting processes using :" @@ -1642,7 +1643,7 @@ msgid "" "(Contributed by Richard Oudkerk in :issue:`8713`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1135 +#: ../../whatsnew/3.4.rst:1134 msgid "" ":mod:`multiprocessing` also now has the concept of a ``context``, which " "determines how child processes are created. New function :func:" @@ -1655,14 +1656,14 @@ msgid "" "Richard Oudkerk in :issue:`18999`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1145 +#: ../../whatsnew/3.4.rst:1144 msgid "" "Except when using the old *fork* start method, child processes no longer " "inherit unneeded handles/file descriptors from their parents (part of :issue:" "`8713`)." msgstr "" -#: ../../whatsnew/3.4.rst:1149 +#: ../../whatsnew/3.4.rst:1148 msgid "" ":mod:`multiprocessing` now relies on :mod:`runpy` (which implements the ``-" "m`` switch) to initialise ``__main__`` appropriately in child processes when " @@ -1672,11 +1673,11 @@ msgid "" "(Contributed by Nick Coghlan in :issue:`19946`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1158 +#: ../../whatsnew/3.4.rst:1157 msgid "operator" msgstr "operator" -#: ../../whatsnew/3.4.rst:1160 +#: ../../whatsnew/3.4.rst:1159 msgid "" "New function :func:`~operator.length_hint` provides an implementation of the " "specification for how the :meth:`~object.__length_hint__` special method " @@ -1684,18 +1685,18 @@ msgid "" "language feature. (Contributed by Armin Ronacher in :issue:`16148`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1165 +#: ../../whatsnew/3.4.rst:1164 msgid "" "There is now a pure-python version of the :mod:`operator` module available " "for reference and for use by alternate implementations of Python. " "(Contributed by Zachary Ware in :issue:`16694`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1171 +#: ../../whatsnew/3.4.rst:1170 msgid "os" msgstr "os" -#: ../../whatsnew/3.4.rst:1173 +#: ../../whatsnew/3.4.rst:1172 msgid "" "There are new functions to get and set the :ref:`inheritable flag " "` of a file descriptor (:func:`os.get_inheritable`, :func:" @@ -1703,7 +1704,7 @@ msgid "" "get_handle_inheritable`, :func:`os.set_handle_inheritable`)." msgstr "" -#: ../../whatsnew/3.4.rst:1178 +#: ../../whatsnew/3.4.rst:1177 msgid "" "New function :func:`~os.cpu_count` reports the number of CPUs available on " "the platform on which Python is running (or ``None`` if the count can't be " @@ -1713,20 +1714,20 @@ msgid "" "`17914`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1184 +#: ../../whatsnew/3.4.rst:1183 msgid "" ":func:`os.path.samestat` is now available on the Windows platform (and the :" "func:`os.path.samefile` implementation is now shared between Unix and " "Windows). (Contributed by Brian Curtin in :issue:`11939`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1188 +#: ../../whatsnew/3.4.rst:1187 msgid "" ":func:`os.path.ismount` now recognizes volumes mounted below a drive root on " "Windows. (Contributed by Tim Golden in :issue:`9035`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1191 +#: ../../whatsnew/3.4.rst:1190 msgid "" ":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` " @@ -1736,11 +1737,11 @@ msgid "" "respectively.)" msgstr "" -#: ../../whatsnew/3.4.rst:1199 +#: ../../whatsnew/3.4.rst:1198 msgid "pdb" msgstr "pdb" -#: ../../whatsnew/3.4.rst:1201 +#: ../../whatsnew/3.4.rst:1200 msgid "" ":mod:`pdb` has been enhanced to handle generators, :keyword:`yield`, and " "``yield from`` in a more useful fashion. This is especially helpful when " @@ -1748,7 +1749,7 @@ msgid "" "Xavier de Gaye in :issue:`16596`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1206 +#: ../../whatsnew/3.4.rst:1205 msgid "" "The ``print`` command has been removed from :mod:`pdb`, restoring access to " "the Python :func:`print` function from the pdb command line. Python2's " @@ -1761,11 +1762,11 @@ msgid "" "(Contributed by Connor Osborn in :issue:`18764`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1220 +#: ../../whatsnew/3.4.rst:1219 msgid "pickle" msgstr "pickle" -#: ../../whatsnew/3.4.rst:1222 +#: ../../whatsnew/3.4.rst:1221 msgid "" ":mod:`pickle` now supports (but does not use by default) a new pickle " "protocol, protocol 4. This new protocol addresses a number of issues that " @@ -1775,19 +1776,19 @@ msgid "" "efficiency improvements." msgstr "" -#: ../../whatsnew/3.4.rst:1230 +#: ../../whatsnew/3.4.rst:1229 msgid ":pep:`3154` -- Pickle protocol 4" msgstr "" -#: ../../whatsnew/3.4.rst:1231 +#: ../../whatsnew/3.4.rst:1230 msgid "PEP written by Antoine Pitrou and implemented by Alexandre Vassalotti." msgstr "由 Antoine Pitrou 撰寫 PEP、Alexandre Vassalotti 實作。" -#: ../../whatsnew/3.4.rst:1235 +#: ../../whatsnew/3.4.rst:1234 msgid "plistlib" msgstr "plistlib" -#: ../../whatsnew/3.4.rst:1237 +#: ../../whatsnew/3.4.rst:1236 msgid "" ":mod:`plistlib` now has an API that is similar to the standard pattern for " "stdlib serialization protocols, with new :func:`~plistlib.load`, :func:" @@ -1798,11 +1799,11 @@ msgid "" "(Contributed by Ronald Oussoren and others in :issue:`14455`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1247 +#: ../../whatsnew/3.4.rst:1246 msgid "poplib" msgstr "poplib" -#: ../../whatsnew/3.4.rst:1249 +#: ../../whatsnew/3.4.rst:1248 msgid "" "Two new methods have been added to :mod:`poplib`: :meth:`~poplib.POP3.capa`, " "which returns the list of capabilities advertised by the POP server, and :" @@ -1811,11 +1812,11 @@ msgid "" "Lorenzo Catucci in :issue:`4473`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1257 +#: ../../whatsnew/3.4.rst:1256 msgid "pprint" msgstr "pprint" -#: ../../whatsnew/3.4.rst:1259 +#: ../../whatsnew/3.4.rst:1258 msgid "" "The :mod:`pprint` module's :class:`~pprint.PrettyPrinter` class and its :" "func:`~pprint.pformat`, and :func:`~pprint.pprint` functions have a new " @@ -1825,27 +1826,27 @@ msgid "" "(Contributed by Serhiy Storchaka in :issue:`19132`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1266 +#: ../../whatsnew/3.4.rst:1265 msgid "" "Long strings are now wrapped using Python's normal line continuation " "syntax. (Contributed by Antoine Pitrou in :issue:`17150`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1271 +#: ../../whatsnew/3.4.rst:1270 msgid "pty" msgstr "pty" -#: ../../whatsnew/3.4.rst:1273 +#: ../../whatsnew/3.4.rst:1272 msgid "" ":func:`pty.spawn` now returns the status value from :func:`os.waitpid` on " "the child process, instead of ``None``. (Contributed by Gregory P. Smith.)" msgstr "" -#: ../../whatsnew/3.4.rst:1278 +#: ../../whatsnew/3.4.rst:1277 msgid "pydoc" msgstr "pydoc" -#: ../../whatsnew/3.4.rst:1280 +#: ../../whatsnew/3.4.rst:1279 msgid "" "The :mod:`pydoc` module is now based directly on the :func:`inspect." "signature` introspection API, allowing it to provide signature information " @@ -1854,7 +1855,7 @@ msgid "" "information. (Contributed by Larry Hastings in :issue:`19674`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1286 +#: ../../whatsnew/3.4.rst:1285 msgid "" "The :mod:`pydoc` module no longer displays the ``self`` parameter for " "already bound methods. Instead, it aims to always display the exact current " @@ -1862,7 +1863,7 @@ msgid "" "issue:`20710`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1291 +#: ../../whatsnew/3.4.rst:1290 msgid "" "In addition to the changes that have been made to :mod:`pydoc` directly, its " "handling of custom ``__dir__`` methods and various descriptor behaviours has " @@ -1870,17 +1871,17 @@ msgid "" "`inspect` module." msgstr "" -#: ../../whatsnew/3.4.rst:1296 +#: ../../whatsnew/3.4.rst:1295 msgid "" "As the :func:`help` builtin is based on :mod:`pydoc`, the above changes also " "affect the behaviour of :func:`help`." msgstr "" -#: ../../whatsnew/3.4.rst:1301 +#: ../../whatsnew/3.4.rst:1300 msgid "re" msgstr "re" -#: ../../whatsnew/3.4.rst:1303 +#: ../../whatsnew/3.4.rst:1302 msgid "" "New :func:`~re.fullmatch` function and :meth:`.regex.fullmatch` method " "anchor the pattern at both ends of the string to match. This provides a way " @@ -1890,7 +1891,7 @@ msgid "" "Barnett in :issue:`16203`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1310 +#: ../../whatsnew/3.4.rst:1309 msgid "" "The repr of :ref:`regex objects ` now includes the pattern and " "the flags; the repr of :ref:`match objects ` now includes the " @@ -1898,11 +1899,11 @@ msgid "" "Lopes Tavares and Serhiy Storchaka in :issue:`13592` and :issue:`17087`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1318 +#: ../../whatsnew/3.4.rst:1317 msgid "resource" msgstr "resource" -#: ../../whatsnew/3.4.rst:1320 +#: ../../whatsnew/3.4.rst:1319 msgid "" "New :func:`~resource.prlimit` function, available on Linux platforms with a " "kernel version of 2.6.36 or later and glibc of 2.13 or later, provides the " @@ -1910,7 +1911,7 @@ msgid "" "making the call. (Contributed by Christian Heimes in :issue:`16595`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1325 +#: ../../whatsnew/3.4.rst:1324 msgid "" "On Linux kernel version 2.6.36 or later, there are also some new Linux " "specific constants: :const:`~resource.RLIMIT_MSGQUEUE`, :const:`~resource." @@ -1919,18 +1920,18 @@ msgid "" "Christian Heimes in :issue:`19324`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1331 +#: ../../whatsnew/3.4.rst:1330 msgid "" "On FreeBSD version 9 and later, there some new FreeBSD specific constants: :" "const:`~resource.RLIMIT_SBSIZE`, :const:`~resource.RLIMIT_SWAP`, and :const:" "`~resource.RLIMIT_NPTS`. (Contributed by Claudiu Popa in :issue:`19343`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1338 +#: ../../whatsnew/3.4.rst:1337 msgid "select" msgstr "select" -#: ../../whatsnew/3.4.rst:1340 +#: ../../whatsnew/3.4.rst:1339 msgid "" ":class:`~select.epoll` objects now support the context management protocol. " "When used in a :keyword:`with` statement, the :meth:`~select.epoll.close` " @@ -1938,29 +1939,29 @@ msgid "" "by Serhiy Storchaka in :issue:`16488`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1345 +#: ../../whatsnew/3.4.rst:1344 msgid "" ":class:`~select.devpoll` objects now have :meth:`~select.devpoll.fileno` " "and :meth:`~select.devpoll.close` methods, as well as a new attribute :attr:" "`~select.devpoll.closed`. (Contributed by Victor Stinner in :issue:`18794`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1352 +#: ../../whatsnew/3.4.rst:1351 msgid "shelve" msgstr "shelve" -#: ../../whatsnew/3.4.rst:1354 +#: ../../whatsnew/3.4.rst:1353 msgid "" ":class:`~shelve.Shelf` instances may now be used in :keyword:`with` " "statements, and will be automatically closed at the end of the :keyword:`!" "with` block. (Contributed by Filip Gruszczyński in :issue:`13896`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1360 +#: ../../whatsnew/3.4.rst:1359 msgid "shutil" msgstr "shutil" -#: ../../whatsnew/3.4.rst:1362 +#: ../../whatsnew/3.4.rst:1361 msgid "" ":func:`~shutil.copyfile` now raises a specific :exc:`~shutil.Error` " "subclass, :exc:`~shutil.SameFileError`, when the source and destination are " @@ -1969,11 +1970,11 @@ msgid "" "issue:`1492704`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1370 +#: ../../whatsnew/3.4.rst:1369 msgid "smtpd" msgstr "smtpd" -#: ../../whatsnew/3.4.rst:1372 +#: ../../whatsnew/3.4.rst:1371 msgid "" "The :class:`!SMTPServer` and :class:`!SMTPChannel` classes now accept a " "*map* keyword argument which, if specified, is passed in to :class:`!" @@ -1982,11 +1983,11 @@ msgid "" "issue:`11959`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1380 +#: ../../whatsnew/3.4.rst:1379 msgid "smtplib" msgstr "smtplib" -#: ../../whatsnew/3.4.rst:1382 +#: ../../whatsnew/3.4.rst:1381 msgid "" ":exc:`~smtplib.SMTPException` is now a subclass of :exc:`OSError`, which " "allows both socket level errors and SMTP protocol level errors to be caught " @@ -1994,45 +1995,45 @@ msgid "" "occurred. (Contributed by Ned Jackson Lovely in :issue:`2118`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1389 +#: ../../whatsnew/3.4.rst:1388 msgid "socket" msgstr "socket" -#: ../../whatsnew/3.4.rst:1391 +#: ../../whatsnew/3.4.rst:1390 msgid "" "The socket module now supports the :const:`~socket.CAN_BCM` protocol on " "platforms that support it. (Contributed by Brian Thorne in :issue:`15359`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1394 +#: ../../whatsnew/3.4.rst:1393 msgid "" "Socket objects have new methods to get or set their :ref:`inheritable flag " "`, :meth:`~socket.socket.get_inheritable` and :meth:`~socket." "socket.set_inheritable`." msgstr "" -#: ../../whatsnew/3.4.rst:1398 +#: ../../whatsnew/3.4.rst:1397 msgid "" "The ``socket.AF_*`` and ``socket.SOCK_*`` constants are now enumeration " "values using the new :mod:`enum` module. This allows meaningful names to be " "printed during debugging, instead of integer \"magic numbers\"." msgstr "" -#: ../../whatsnew/3.4.rst:1402 +#: ../../whatsnew/3.4.rst:1401 msgid "The :const:`~socket.AF_LINK` constant is now available on BSD and OSX." msgstr "" -#: ../../whatsnew/3.4.rst:1404 +#: ../../whatsnew/3.4.rst:1403 msgid "" ":func:`~socket.inet_pton` and :func:`~socket.inet_ntop` are now supported on " "Windows. (Contributed by Atsuo Ishimoto in :issue:`7171`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1409 +#: ../../whatsnew/3.4.rst:1408 msgid "sqlite3" msgstr "sqlite3" -#: ../../whatsnew/3.4.rst:1411 +#: ../../whatsnew/3.4.rst:1410 msgid "" "A new boolean parameter to the :func:`~sqlite3.connect` function, *uri*, can " "be used to indicate that the *database* parameter is a ``uri`` (see the " @@ -2040,11 +2041,11 @@ msgid "" "(Contributed by poq in :issue:`13773`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1418 +#: ../../whatsnew/3.4.rst:1417 msgid "ssl" msgstr "ssl" -#: ../../whatsnew/3.4.rst:1422 +#: ../../whatsnew/3.4.rst:1421 msgid "" ":data:`~ssl.PROTOCOL_TLSv1_1` and :data:`~ssl.PROTOCOL_TLSv1_2` (TLSv1.1 and " "TLSv1.2 support) have been added; support for these protocols is only " @@ -2052,7 +2053,7 @@ msgid "" "Michele Orrù and Antoine Pitrou in :issue:`16692`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1429 +#: ../../whatsnew/3.4.rst:1428 msgid "" "New function :func:`~ssl.create_default_context` provides a standard way to " "obtain an :class:`~ssl.SSLContext` whose settings are intended to be a " @@ -2066,7 +2067,7 @@ msgid "" "stdlib API. (Contributed by Christian Heimes in :issue:`19689`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1441 +#: ../../whatsnew/3.4.rst:1440 msgid "" ":class:`~ssl.SSLContext` method :meth:`~ssl.SSLContext." "load_verify_locations` accepts a new optional argument *cadata*, which can " @@ -2074,7 +2075,7 @@ msgid "" "bytes, respectively. (Contributed by Christian Heimes in :issue:`18138`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1446 +#: ../../whatsnew/3.4.rst:1445 msgid "" "New function :func:`~ssl.get_default_verify_paths` returns a named tuple of " "the paths and environment variables that the :meth:`~ssl.SSLContext." @@ -2083,7 +2084,7 @@ msgid "" "issues. (Contributed by Christian Heimes in :issue:`18143`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1453 +#: ../../whatsnew/3.4.rst:1452 msgid "" ":class:`~ssl.SSLContext` has a new method, :meth:`~ssl.SSLContext." "cert_store_stats`, that reports the number of loaded ``X.509`` certs, " @@ -2093,7 +2094,7 @@ msgid "" "`18147`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1460 +#: ../../whatsnew/3.4.rst:1459 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 " @@ -2104,7 +2105,7 @@ msgid "" "default. (Contributed by Christien Heimes in :issue:`8813`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1468 +#: ../../whatsnew/3.4.rst:1467 msgid "" "New :class:`~ssl.SSLContext` method :meth:`~ssl.SSLContext." "load_default_certs` loads a set of default \"certificate authority\" (CA) " @@ -2116,7 +2117,7 @@ msgid "" "by Christian Heimes in :issue:`19292`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1479 +#: ../../whatsnew/3.4.rst:1478 msgid "" "Two new windows-only functions, :func:`~ssl.enum_certificates` and :func:" "`~ssl.enum_crls` provide the ability to retrieve certificates, certificate " @@ -2124,14 +2125,14 @@ msgid "" "Christian Heimes in :issue:`17134`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1486 +#: ../../whatsnew/3.4.rst:1485 msgid "" "Support for server-side SNI (Server Name Indication) using the new :meth:" "`ssl.SSLContext.set_servername_callback` method. (Contributed by Daniel " "Black in :issue:`8109`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1490 +#: ../../whatsnew/3.4.rst:1489 msgid "" "The dictionary returned by :meth:`.SSLSocket.getpeercert` contains " "additional ``X509v3`` extension items: ``crlDistributionPoints``, " @@ -2139,29 +2140,29 @@ msgid "" "issue:`18379`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1496 +#: ../../whatsnew/3.4.rst:1495 msgid "stat" msgstr "stat" -#: ../../whatsnew/3.4.rst:1498 +#: ../../whatsnew/3.4.rst:1497 msgid "" "The :mod:`stat` module is now backed by a C implementation in :mod:`!_stat`. " "A C implementation is required as most of the values aren't standardized and " "are platform-dependent. (Contributed by Christian Heimes in :issue:`11016`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1502 +#: ../../whatsnew/3.4.rst:1501 msgid "" "The module supports new :mod:`~stat.ST_MODE` flags, :mod:`~stat.S_IFDOOR`, :" "const:`~stat.S_IFPORT`, and :const:`~stat.S_IFWHT`. (Contributed by " "Christian Hiemes in :issue:`11016`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1508 +#: ../../whatsnew/3.4.rst:1507 msgid "struct" msgstr "struct" -#: ../../whatsnew/3.4.rst:1510 +#: ../../whatsnew/3.4.rst:1509 msgid "" "New function :mod:`~struct.iter_unpack` and a new :meth:`struct.Struct." "iter_unpack` method on compiled formats provide streamed unpacking of a " @@ -2169,35 +2170,35 @@ msgid "" "by Antoine Pitrou in :issue:`17804`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1517 +#: ../../whatsnew/3.4.rst:1516 msgid "subprocess" msgstr "subprocess" -#: ../../whatsnew/3.4.rst:1519 +#: ../../whatsnew/3.4.rst:1518 msgid "" ":func:`~subprocess.check_output` now accepts an *input* argument that can be " "used to provide the contents of ``stdin`` for the command that is run. " "(Contributed by Zack Weinberg in :issue:`16624`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1523 +#: ../../whatsnew/3.4.rst:1522 msgid "" ":func:`~subprocess.getstatus` and :func:`~subprocess.getstatusoutput` now " "work on Windows. This change was actually inadvertently made in 3.3.4. " "(Contributed by Tim Golden in :issue:`10197`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1529 +#: ../../whatsnew/3.4.rst:1528 msgid "sunau" msgstr "sunau" -#: ../../whatsnew/3.4.rst:1531 +#: ../../whatsnew/3.4.rst:1530 msgid "" "The :meth:`!getparams` method now returns a namedtuple rather than a plain " "tuple. (Contributed by Claudiu Popa in :issue:`18901`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1534 +#: ../../whatsnew/3.4.rst:1533 msgid "" ":meth:`!sunau.open` now supports the context management protocol: when used " "in a :keyword:`with` block, the ``close`` method of the returned object will " @@ -2205,18 +2206,18 @@ msgid "" "Storchaka in :issue:`18878`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1539 +#: ../../whatsnew/3.4.rst:1538 msgid "" ":meth:`.AU_write.setsampwidth` now supports 24 bit samples, thus adding " "support for writing 24 sample using the module. (Contributed by Serhiy " "Storchaka in :issue:`19261`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1549 +#: ../../whatsnew/3.4.rst:1548 msgid "sys" msgstr "sys" -#: ../../whatsnew/3.4.rst:1551 +#: ../../whatsnew/3.4.rst:1550 msgid "" "New function :func:`sys.getallocatedblocks` returns the current number of " "blocks allocated by the interpreter. (In CPython with the default ``--with-" @@ -2226,7 +2227,7 @@ msgid "" "in :issue:`13390`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1558 +#: ../../whatsnew/3.4.rst:1557 msgid "" "When the Python interpreter starts in :ref:`interactive mode `, it checks for an :data:`~sys.__interactivehook__` attribute " @@ -2242,11 +2243,11 @@ msgid "" "Araujo and Antoine Pitrou in :issue:`5845`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1573 +#: ../../whatsnew/3.4.rst:1572 msgid "tarfile" msgstr "tarfile" -#: ../../whatsnew/3.4.rst:1575 +#: ../../whatsnew/3.4.rst:1574 msgid "" "The :mod:`tarfile` module now supports a simple :ref:`tarfile-commandline` " "when called as a script directly or via ``-m``. This can be used to create " @@ -2254,11 +2255,11 @@ msgid "" "`13477`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1581 +#: ../../whatsnew/3.4.rst:1580 msgid "textwrap" msgstr "textwrap" -#: ../../whatsnew/3.4.rst:1583 +#: ../../whatsnew/3.4.rst:1582 msgid "" "The :class:`~textwrap.TextWrapper` class has two new attributes/constructor " "arguments: :attr:`~textwrap.TextWrapper.max_lines`, which limits the number " @@ -2272,11 +2273,11 @@ msgid "" "issue:`18725`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1595 +#: ../../whatsnew/3.4.rst:1594 msgid "threading" msgstr "threading" -#: ../../whatsnew/3.4.rst:1597 +#: ../../whatsnew/3.4.rst:1596 msgid "" "The :class:`~threading.Thread` object representing the main thread can be " "obtained from the new :func:`~threading.main_thread` function. In normal " @@ -2284,11 +2285,11 @@ msgid "" "started. (Contributed by Andrew Svetlov in :issue:`18882`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1604 +#: ../../whatsnew/3.4.rst:1603 msgid "traceback" msgstr "traceback" -#: ../../whatsnew/3.4.rst:1606 +#: ../../whatsnew/3.4.rst:1605 msgid "" "A new :func:`traceback.clear_frames` function takes a traceback object and " "clears the local variables in all of the frames it references, reducing the " @@ -2296,11 +2297,11 @@ msgid "" "`1565525`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1613 +#: ../../whatsnew/3.4.rst:1612 msgid "types" msgstr "types" -#: ../../whatsnew/3.4.rst:1615 +#: ../../whatsnew/3.4.rst:1614 msgid "" "A new :func:`~types.DynamicClassAttribute` descriptor provides a way to " "define an attribute that acts normally when looked up through an instance " @@ -2310,18 +2311,18 @@ msgid "" "for an example). (Contributed by Ethan Furman in :issue:`19030`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1624 +#: ../../whatsnew/3.4.rst:1623 msgid "urllib" msgstr "urllib" -#: ../../whatsnew/3.4.rst:1626 +#: ../../whatsnew/3.4.rst:1625 msgid "" ":mod:`urllib.request` now supports ``data:`` URLs via the :class:`~urllib." "request.DataHandler` class. (Contributed by Mathias Panzenböck in :issue:" "`16423`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1630 +#: ../../whatsnew/3.4.rst:1629 msgid "" "The http method that will be used by a :class:`~urllib.request.Request` " "class can now be specified by setting a :class:`~urllib.request.Request." @@ -2329,7 +2330,7 @@ msgid "" "issue:`18978`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1635 +#: ../../whatsnew/3.4.rst:1634 msgid "" ":class:`~urllib.request.Request` objects are now reusable: if the :attr:" "`~urllib.request.Request.full_url` or :attr:`~urllib.request.Request.data` " @@ -2344,7 +2345,7 @@ msgid "" "`17485`, and Damien Brecht and Senthil Kumaran in :issue:`17272`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1648 +#: ../../whatsnew/3.4.rst:1647 msgid "" ":class:`~urllib.error.HTTPError` objects now have a :attr:`~urllib.error." "HTTPError.headers` attribute that provides access to the HTTP response " @@ -2352,11 +2353,11 @@ msgid "" "`15701`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1655 +#: ../../whatsnew/3.4.rst:1654 msgid "unittest" msgstr "unittest" -#: ../../whatsnew/3.4.rst:1657 +#: ../../whatsnew/3.4.rst:1656 msgid "" "The :class:`~unittest.TestCase` class has a new method, :meth:`~unittest." "TestCase.subTest`, that produces a context manager whose :keyword:`with` " @@ -2367,7 +2368,7 @@ msgid "" "of which will run even if one or more of them fail. For example::" msgstr "" -#: ../../whatsnew/3.4.rst:1665 +#: ../../whatsnew/3.4.rst:1664 msgid "" "class NumbersTest(unittest.TestCase):\n" " def test_even(self):\n" @@ -2381,7 +2382,7 @@ msgstr "" " with self.subTest(i=i):\n" " self.assertEqual(i % 2, 0)" -#: ../../whatsnew/3.4.rst:1671 +#: ../../whatsnew/3.4.rst:1670 msgid "" "will result in six subtests, each identified in the unittest verbose output " "with a label consisting of the variable name ``i`` and a particular value " @@ -2389,28 +2390,28 @@ msgid "" "version of this example. (Contributed by Antoine Pitrou in :issue:`16997`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1676 +#: ../../whatsnew/3.4.rst:1675 msgid "" ":func:`unittest.main` now accepts an iterable of test names for " "*defaultTest*, where previously it only accepted a single test name as a " "string. (Contributed by Jyrki Pulliainen in :issue:`15132`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1680 +#: ../../whatsnew/3.4.rst:1679 msgid "" "If :class:`~unittest.SkipTest` is raised during test discovery (that is, at " "the module level in the test file), it is now reported as a skip instead of " "an error. (Contributed by Zach Ware in :issue:`16935`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1684 +#: ../../whatsnew/3.4.rst:1683 msgid "" ":meth:`~unittest.TestLoader.discover` now sorts the discovered files to " "provide consistent test ordering. (Contributed by Martin Melin and Jeff " "Ramnani in :issue:`16709`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1688 +#: ../../whatsnew/3.4.rst:1687 msgid "" ":class:`~unittest.TestSuite` now drops references to tests as soon as the " "test has been run, if the test is successful. On Python interpreters that " @@ -2421,7 +2422,7 @@ msgid "" "Wardill, Matt McClure, and Andrew Svetlov in :issue:`11798`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1696 +#: ../../whatsnew/3.4.rst:1695 msgid "" "A new test assertion context-manager, :meth:`~unittest.TestCase.assertLogs`, " "will ensure that a given block of code emits a log message using the :mod:" @@ -2433,13 +2434,13 @@ msgid "" "in :issue:`18937`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1705 +#: ../../whatsnew/3.4.rst:1704 msgid "" "Test discovery now works with namespace packages (Contributed by Claudiu " "Popa in :issue:`17457`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1708 +#: ../../whatsnew/3.4.rst:1707 msgid "" ":mod:`unittest.mock` objects now inspect their specification signatures when " "matching calls, which means an argument can now be matched by either " @@ -2447,23 +2448,23 @@ msgid "" "Pitrou in :issue:`17015`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1713 +#: ../../whatsnew/3.4.rst:1712 msgid "" ":func:`~mock.mock_open` objects now have ``readline`` and ``readlines`` " "methods. (Contributed by Toshio Kuratomi in :issue:`17467`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1718 +#: ../../whatsnew/3.4.rst:1717 msgid "venv" msgstr "venv" -#: ../../whatsnew/3.4.rst:1720 +#: ../../whatsnew/3.4.rst:1719 msgid "" ":mod:`venv` now includes activation scripts for the ``csh`` and ``fish`` " "shells. (Contributed by Andrew Svetlov in :issue:`15417`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1723 +#: ../../whatsnew/3.4.rst:1722 msgid "" ":class:`~venv.EnvBuilder` and the :func:`~venv.create` convenience function " "take a new keyword argument *with_pip*, which defaults to ``False``, that " @@ -2472,47 +2473,47 @@ msgid "" "issue:`19552` as part of the :pep:`453` implementation.)" msgstr "" -#: ../../whatsnew/3.4.rst:1731 +#: ../../whatsnew/3.4.rst:1730 msgid "wave" msgstr "wave" -#: ../../whatsnew/3.4.rst:1733 +#: ../../whatsnew/3.4.rst:1732 msgid "" "The :meth:`~wave.getparams` method now returns a namedtuple rather than a " "plain tuple. (Contributed by Claudiu Popa in :issue:`17487`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1736 +#: ../../whatsnew/3.4.rst:1735 msgid "" ":meth:`wave.open` now supports the context management protocol. " "(Contributed by Claudiu Popa in :issue:`17616`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1739 +#: ../../whatsnew/3.4.rst:1738 msgid "" ":mod:`wave` can now :ref:`write output to unseekable files `. (Contributed by David Jones, Guilherme Polo, and Serhiy " "Storchaka in :issue:`5202`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1743 +#: ../../whatsnew/3.4.rst:1742 msgid "" "The :meth:`~wave.Wave_write.writeframesraw` and :meth:`~wave.Wave_write." "writeframes` methods now accept any :term:`bytes-like object`. (Contributed " "by Serhiy Storchaka in :issue:`8311`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1749 +#: ../../whatsnew/3.4.rst:1748 msgid "weakref" msgstr "weakref" -#: ../../whatsnew/3.4.rst:1751 +#: ../../whatsnew/3.4.rst:1750 msgid "" "New :class:`~weakref.WeakMethod` class simulates weak references to bound " "methods. (Contributed by Antoine Pitrou in :issue:`14631`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1754 +#: ../../whatsnew/3.4.rst:1753 msgid "" "New :class:`~weakref.finalize` class makes it possible to register a " "callback to be invoked when an object is garbage collected, without needing " @@ -2520,18 +2521,18 @@ msgid "" "(Contributed by Richard Oudkerk in :issue:`15528`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1759 +#: ../../whatsnew/3.4.rst:1758 msgid "" "The callback, if any, associated with a :class:`~weakref.ref` is now exposed " "via the :attr:`~weakref.ref.__callback__` attribute. (Contributed by Mark " "Dickinson in :issue:`17643`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1765 +#: ../../whatsnew/3.4.rst:1764 msgid "xml.etree" msgstr "xml.etree" -#: ../../whatsnew/3.4.rst:1767 +#: ../../whatsnew/3.4.rst:1766 msgid "" "A new parser, :class:`~xml.etree.ElementTree.XMLPullParser`, allows a non-" "blocking applications to parse XML documents. An example can be seen at :" @@ -2539,7 +2540,7 @@ msgid "" "`17741`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1772 +#: ../../whatsnew/3.4.rst:1771 msgid "" "The :mod:`xml.etree.ElementTree` :func:`~xml.etree.ElementTree.tostring` " "and :func:`~xml.etree.ElementTree.tostringlist` functions, and the :class:" @@ -2551,11 +2552,11 @@ msgid "" "Storchaka in :issue:`14377`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1783 +#: ../../whatsnew/3.4.rst:1782 msgid "zipfile" msgstr "zipfile" -#: ../../whatsnew/3.4.rst:1785 +#: ../../whatsnew/3.4.rst:1784 msgid "" "The :meth:`~zipfile.PyZipFile.writepy` method of the :class:`~zipfile." "PyZipFile` class has a new *filterfunc* option that can be used to control " @@ -2564,36 +2565,36 @@ msgid "" "Christian Tismer in :issue:`19274`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1791 +#: ../../whatsnew/3.4.rst:1790 msgid "" "The *allowZip64* parameter to :class:`~zipfile.ZipFile` and :class:`~zipfile." "PyZipfile` is now ``True`` by default. (Contributed by William Mallard in :" "issue:`17201`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1798 +#: ../../whatsnew/3.4.rst:1797 msgid "CPython Implementation Changes" msgstr "CPython 實作變更" -#: ../../whatsnew/3.4.rst:1804 +#: ../../whatsnew/3.4.rst:1803 msgid "PEP 445: Customization of CPython Memory Allocators" msgstr "" -#: ../../whatsnew/3.4.rst:1806 +#: ../../whatsnew/3.4.rst:1805 msgid "" ":pep:`445` adds new C level interfaces to customize memory allocation in the " "CPython interpreter." msgstr "" -#: ../../whatsnew/3.4.rst:1811 +#: ../../whatsnew/3.4.rst:1810 msgid ":pep:`445` -- Add new APIs to customize Python memory allocators" msgstr "" -#: ../../whatsnew/3.4.rst:1818 +#: ../../whatsnew/3.4.rst:1817 msgid "PEP 442: Safe Object Finalization" msgstr "" -#: ../../whatsnew/3.4.rst:1820 +#: ../../whatsnew/3.4.rst:1819 msgid "" ":pep:`442` removes the current limitations and quirks of object finalization " "in CPython. With it, objects with :meth:`__del__` methods, as well as " @@ -2601,7 +2602,7 @@ msgid "" "part of a reference cycle." msgstr "" -#: ../../whatsnew/3.4.rst:1825 +#: ../../whatsnew/3.4.rst:1824 msgid "" "As part of this change, module globals are no longer forcibly set to :const:" "`None` during interpreter shutdown in most cases, instead relying on the " @@ -2610,15 +2611,15 @@ msgid "" "that have plagued Python since the cyclic GC was first introduced." msgstr "" -#: ../../whatsnew/3.4.rst:1834 +#: ../../whatsnew/3.4.rst:1833 msgid ":pep:`442` -- Safe object finalization" msgstr "" -#: ../../whatsnew/3.4.rst:1841 +#: ../../whatsnew/3.4.rst:1840 msgid "PEP 456: Secure and Interchangeable Hash Algorithm" msgstr "" -#: ../../whatsnew/3.4.rst:1843 +#: ../../whatsnew/3.4.rst:1842 msgid "" ":pep:`456` follows up on earlier security fix work done on Python's hash " "algorithm to address certain DOS attacks to which public facing APIs backed " @@ -2630,18 +2631,18 @@ msgid "" "comparison with the older FNV algorithm are trivial." msgstr "" -#: ../../whatsnew/3.4.rst:1852 +#: ../../whatsnew/3.4.rst:1851 msgid "" "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 "" -#: ../../whatsnew/3.4.rst:1860 +#: ../../whatsnew/3.4.rst:1859 msgid "PEP 436: Argument Clinic" msgstr "" -#: ../../whatsnew/3.4.rst:1862 +#: ../../whatsnew/3.4.rst:1861 msgid "" "\"Argument Clinic\" (:pep:`436`) is now part of the CPython build process " "and can be used to simplify the process of defining and maintaining accurate " @@ -2649,21 +2650,21 @@ msgid "" "in C." msgstr "" -#: ../../whatsnew/3.4.rst:1867 +#: ../../whatsnew/3.4.rst:1866 msgid "" "Some standard library extension modules have been converted to use Argument " "Clinic in Python 3.4, and :mod:`pydoc` and :mod:`inspect` have been updated " "accordingly." msgstr "" -#: ../../whatsnew/3.4.rst:1871 +#: ../../whatsnew/3.4.rst:1870 msgid "" "It is expected that signature metadata for programmatic introspection will " "be added to additional callables implemented in C as part of Python 3.4 " "maintenance releases." msgstr "" -#: ../../whatsnew/3.4.rst:1876 +#: ../../whatsnew/3.4.rst:1875 msgid "" "The Argument Clinic PEP is not fully up to date with the state of the " "implementation. This has been deemed acceptable by the release manager and " @@ -2671,26 +2672,26 @@ msgid "" "available as a public API for third party use in Python 3.4." msgstr "" -#: ../../whatsnew/3.4.rst:1883 +#: ../../whatsnew/3.4.rst:1882 msgid ":pep:`436` -- The Argument Clinic DSL" msgstr "" -#: ../../whatsnew/3.4.rst:1884 +#: ../../whatsnew/3.4.rst:1883 msgid "PEP written and implemented by Larry Hastings." msgstr "由 Larry Hastings 撰寫 PEP 與實作。" -#: ../../whatsnew/3.4.rst:1888 +#: ../../whatsnew/3.4.rst:1887 msgid "Other Build and C API Changes" msgstr "" -#: ../../whatsnew/3.4.rst:1890 +#: ../../whatsnew/3.4.rst:1889 msgid "" "The new :c:func:`PyType_GetSlot` function has been added to the stable ABI, " "allowing retrieval of function pointers from named type slots when using the " "limited API. (Contributed by Martin von Löwis in :issue:`17162`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1894 +#: ../../whatsnew/3.4.rst:1893 msgid "" "The new :c:func:`!Py_SetStandardStreamEncoding` pre-initialization API " "allows applications embedding the CPython interpreter to reliably force a " @@ -2698,34 +2699,34 @@ msgid "" "by Bastien Montagne and Nick Coghlan in :issue:`16129`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1899 +#: ../../whatsnew/3.4.rst:1898 msgid "" "Most Python C APIs that don't mutate string arguments are now correctly " "marked as accepting ``const char *`` rather than ``char *``. (Contributed " "by Serhiy Storchaka in :issue:`1772673`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1903 +#: ../../whatsnew/3.4.rst:1902 msgid "" "A new shell version of ``python-config`` can be used even when a python " "interpreter is not available (for example, in cross compilation scenarios)." msgstr "" -#: ../../whatsnew/3.4.rst:1906 +#: ../../whatsnew/3.4.rst:1905 msgid "" ":c:func:`PyUnicode_FromFormat` now supports width and precision " "specifications for ``%s``, ``%A``, ``%U``, ``%V``, ``%S``, and ``%R``. " "(Contributed by Ysj Ray and Victor Stinner in :issue:`7330`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1910 +#: ../../whatsnew/3.4.rst:1909 msgid "" "New function :c:func:`PyStructSequence_InitType2` supplements the existing :" "c:func:`PyStructSequence_InitType` function. The difference is that it " "returns ``0`` on success and ``-1`` on failure." msgstr "" -#: ../../whatsnew/3.4.rst:1914 +#: ../../whatsnew/3.4.rst:1913 msgid "" "The CPython source can now be compiled using the address sanity checking " "features of recent versions of GCC and clang: the false alarms in the small " @@ -2733,7 +2734,7 @@ msgid "" "`18596`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1919 +#: ../../whatsnew/3.4.rst:1918 msgid "" "The Windows build now uses `Address Space Layout Randomization `_ and `Data Execution " @@ -2741,17 +2742,17 @@ msgid "" "(Contributed by Christian Heimes in :issue:`16632`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1924 +#: ../../whatsnew/3.4.rst:1923 msgid "" "New function :c:func:`PyObject_LengthHint` is the C API equivalent of :func:" "`operator.length_hint`. (Contributed by Armin Ronacher in :issue:`16148`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1932 +#: ../../whatsnew/3.4.rst:1931 msgid "Other Improvements" msgstr "" -#: ../../whatsnew/3.4.rst:1936 +#: ../../whatsnew/3.4.rst:1935 msgid "" "The :ref:`python ` command has a new :ref:`option `, ``-I``, which causes it to run in \"isolated mode\", " @@ -2765,7 +2766,7 @@ msgid "" "scripts. (Contributed by Christian Heimes in :issue:`16499`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1947 +#: ../../whatsnew/3.4.rst:1946 msgid "" "Tab-completion is now enabled by default in the interactive interpreter on " "systems that support :mod:`readline`. History is also enabled by default, " @@ -2773,7 +2774,7 @@ msgid "" "(Contributed by Antoine Pitrou and Éric Araujo in :issue:`5845`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1952 +#: ../../whatsnew/3.4.rst:1951 msgid "" "Invoking the Python interpreter with ``--version`` now outputs the version " "to standard output instead of standard error (:issue:`18338`). Similar " @@ -2781,7 +2782,7 @@ msgid "" "have script-like invocation capabilities (:issue:`18922`)." msgstr "" -#: ../../whatsnew/3.4.rst:1957 +#: ../../whatsnew/3.4.rst:1956 msgid "" "The CPython Windows installer now adds ``.py`` to the :envvar:`PATHEXT` " "variable when extensions are registered, allowing users to run a python " @@ -2789,40 +2790,40 @@ msgid "" "py`` extension. (Contributed by Paul Moore in :issue:`18569`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1962 +#: ../../whatsnew/3.4.rst:1961 msgid "" "A new ``make`` target `coverage-report `_ will build python, run " "the test suite, and generate an HTML coverage report for the C codebase " -"using ``gcov`` and `lcov `_." +"using ``gcov`` and `lcov `_." msgstr "" -#: ../../whatsnew/3.4.rst:1968 +#: ../../whatsnew/3.4.rst:1967 msgid "" "The ``-R`` option to the :ref:`python regression test suite ` now " "also checks for memory allocation leaks, using :func:`sys." "getallocatedblocks`. (Contributed by Antoine Pitrou in :issue:`13390`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1973 +#: ../../whatsnew/3.4.rst:1972 msgid "``python -m`` now works with namespace packages." msgstr "" -#: ../../whatsnew/3.4.rst:1975 +#: ../../whatsnew/3.4.rst:1974 msgid "" "The :mod:`stat` module is now implemented in C, which means it gets the " "values for its constants from the C header files, instead of having the " "values hard-coded in the python module as was previously the case." msgstr "" -#: ../../whatsnew/3.4.rst:1979 +#: ../../whatsnew/3.4.rst:1978 msgid "" "Loading multiple python modules from a single OS module (``.so``, ``.dll``) " "now works correctly (previously it silently returned the first python module " "in the file). (Contributed by Václav Šmilauer in :issue:`16421`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1983 +#: ../../whatsnew/3.4.rst:1982 msgid "" "A new opcode, :opcode:`LOAD_CLASSDEREF`, has been added to fix a bug in the " "loading of free variables in class bodies that could be triggered by certain " @@ -2830,21 +2831,21 @@ msgid "" "issue:`17853`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1988 +#: ../../whatsnew/3.4.rst:1987 msgid "" "A number of MemoryError-related crashes were identified and fixed by Victor " "Stinner using his :pep:`445`-based ``pyfailmalloc`` tool (:issue:`18408`, :" "issue:`18520`)." msgstr "" -#: ../../whatsnew/3.4.rst:1992 +#: ../../whatsnew/3.4.rst:1991 msgid "" "The ``pyvenv`` command now accepts a ``--copies`` option to use copies " "rather than symlinks even on systems where symlinks are the default. " "(Contributed by Vinay Sajip in :issue:`18807`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1996 +#: ../../whatsnew/3.4.rst:1995 msgid "" "The ``pyvenv`` command also accepts a ``--without-pip`` option to suppress " "the otherwise-automatic bootstrapping of pip into the virtual environment. " @@ -2852,7 +2853,7 @@ msgid "" "implementation.)" msgstr "" -#: ../../whatsnew/3.4.rst:2001 +#: ../../whatsnew/3.4.rst:2000 msgid "" "The encoding name is now optional in the value set for the :envvar:" "`PYTHONIOENCODING` environment variable. This makes it possible to set just " @@ -2860,24 +2861,24 @@ msgid "" "Serhiy Storchaka in :issue:`18818`.)" msgstr "" -#: ../../whatsnew/3.4.rst:2006 +#: ../../whatsnew/3.4.rst:2005 msgid "" "The :mod:`bz2`, :mod:`lzma`, and :mod:`gzip` module ``open`` functions now " "support ``x`` (exclusive creation) mode. (Contributed by Tim Heaney and " "Vajrasky Kok in :issue:`19201`, :issue:`19222`, and :issue:`19223`.)" msgstr "" -#: ../../whatsnew/3.4.rst:2012 +#: ../../whatsnew/3.4.rst:2011 msgid "Significant Optimizations" msgstr "顯著最佳化" -#: ../../whatsnew/3.4.rst:2014 +#: ../../whatsnew/3.4.rst:2013 msgid "" "The UTF-32 decoder is now 3x to 4x faster. (Contributed by Serhiy Storchaka " "in :issue:`14625`.)" msgstr "" -#: ../../whatsnew/3.4.rst:2017 +#: ../../whatsnew/3.4.rst:2016 msgid "" "The cost of hash collisions for sets is now reduced. Each hash table probe " "now checks a series of consecutive, adjacent key/hash pairs before " @@ -2890,7 +2891,7 @@ msgid "" "Raymond Hettinger in :issue:`18771`.)" msgstr "" -#: ../../whatsnew/3.4.rst:2028 +#: ../../whatsnew/3.4.rst:2027 msgid "" "The interpreter starts about 30% faster. A couple of measures lead to the " "speedup. The interpreter loads fewer modules on startup, e.g. the :mod:" @@ -2901,27 +2902,27 @@ msgid "" "`19209`, :issue:`19205` and :issue:`9548`.)" msgstr "" -#: ../../whatsnew/3.4.rst:2036 +#: ../../whatsnew/3.4.rst:2035 msgid "" ":class:`bz2.BZ2File` is now as fast or faster than the Python2 version for " "most cases. :class:`lzma.LZMAFile` has also been optimized. (Contributed " "by Serhiy Storchaka and Nadeem Vawda in :issue:`16034`.)" msgstr "" -#: ../../whatsnew/3.4.rst:2040 +#: ../../whatsnew/3.4.rst:2039 msgid "" ":func:`random.getrandbits` is 20%-40% faster for small integers (the most " "common use case). (Contributed by Serhiy Storchaka in :issue:`16674`.)" msgstr "" -#: ../../whatsnew/3.4.rst:2043 +#: ../../whatsnew/3.4.rst:2042 msgid "" "By taking advantage of the new storage format for strings, pickling of " "strings is now significantly faster. (Contributed by Victor Stinner and " "Antoine Pitrou in :issue:`15596`.)" msgstr "" -#: ../../whatsnew/3.4.rst:2047 +#: ../../whatsnew/3.4.rst:2046 msgid "" "A performance issue in :meth:`io.FileIO.readall` has been solved. This " "particularly affects Windows, and significantly speeds up the case of piping " @@ -2929,31 +2930,31 @@ msgid "" "Richard Oudkerk in :issue:`15758`.)" msgstr "" -#: ../../whatsnew/3.4.rst:2052 +#: ../../whatsnew/3.4.rst:2051 msgid "" ":func:`html.escape` is now 10x faster. (Contributed by Matt Bryant in :" "issue:`18020`.)" msgstr "" -#: ../../whatsnew/3.4.rst:2055 +#: ../../whatsnew/3.4.rst:2054 msgid "" "On Windows, the native ``VirtualAlloc`` is now used instead of the CRT " "``malloc`` in ``obmalloc``. Artificial benchmarks show about a 3% memory " "savings." msgstr "" -#: ../../whatsnew/3.4.rst:2059 +#: ../../whatsnew/3.4.rst:2058 msgid "" ":func:`os.urandom` now uses a lazily opened persistent file descriptor so as " "to avoid using many file descriptors when run in parallel from multiple " "threads. (Contributed by Antoine Pitrou in :issue:`18756`.)" msgstr "" -#: ../../whatsnew/3.4.rst:2067 +#: ../../whatsnew/3.4.rst:2066 msgid "Deprecated" msgstr "已棄用" -#: ../../whatsnew/3.4.rst:2069 +#: ../../whatsnew/3.4.rst:2068 msgid "" "This section covers various APIs and other features that have been " "deprecated in Python 3.4, and will be removed in Python 3.5 or later. In " @@ -2962,11 +2963,11 @@ msgid "" "enabled (for example, by using ``-Wd``)." msgstr "" -#: ../../whatsnew/3.4.rst:2077 +#: ../../whatsnew/3.4.rst:2076 msgid "Deprecations in the Python API" msgstr "" -#: ../../whatsnew/3.4.rst:2079 +#: ../../whatsnew/3.4.rst:2078 msgid "" "As mentioned in :ref:`whatsnew-pep-451`, a number of :mod:`importlib` " "methods and functions are deprecated: :meth:`!importlib.find_loader` is " @@ -2989,45 +2990,45 @@ msgid "" "now handled automatically by the import system." msgstr "" -#: ../../whatsnew/3.4.rst:2104 +#: ../../whatsnew/3.4.rst:2103 msgid "" "The :mod:`!imp` module is pending deprecation. To keep compatibility with " "Python 2/3 code bases, the module's removal is currently not scheduled." msgstr "" -#: ../../whatsnew/3.4.rst:2107 +#: ../../whatsnew/3.4.rst:2106 msgid "" "The :mod:`formatter` module is pending deprecation and is slated for removal " "in Python 3.6." msgstr "" -#: ../../whatsnew/3.4.rst:2110 +#: ../../whatsnew/3.4.rst:2109 msgid "" "``MD5`` as the default *digestmod* for the :func:`hmac.new` function is " "deprecated. Python 3.6 will require an explicit digest name or constructor " "as *digestmod* argument." msgstr "" -#: ../../whatsnew/3.4.rst:2114 +#: ../../whatsnew/3.4.rst:2113 msgid "" "The internal ``Netrc`` class in the :mod:`ftplib` module has been documented " "as deprecated in its docstring for quite some time. It now emits a :exc:" "`DeprecationWarning` and will be removed completely in Python 3.5." msgstr "" -#: ../../whatsnew/3.4.rst:2118 +#: ../../whatsnew/3.4.rst:2117 msgid "" "The undocumented *endtime* argument to :meth:`subprocess.Popen.wait` should " "not have been exposed and is hopefully not in use; it is deprecated and will " "mostly likely be removed in Python 3.5." msgstr "" -#: ../../whatsnew/3.4.rst:2122 +#: ../../whatsnew/3.4.rst:2121 msgid "" "The *strict* argument of :class:`~html.parser.HTMLParser` is deprecated." msgstr "" -#: ../../whatsnew/3.4.rst:2124 +#: ../../whatsnew/3.4.rst:2123 msgid "" "The :mod:`plistlib` :func:`~plistlib.readPlist`, :func:`~plistlib." "writePlist`, :func:`~plistlib.readPlistFromBytes`, and :func:`~plistlib." @@ -3037,13 +3038,13 @@ msgid "" "deprecated in favor of just using the :class:`bytes` constructor." msgstr "" -#: ../../whatsnew/3.4.rst:2131 +#: ../../whatsnew/3.4.rst:2130 msgid "" "The :mod:`sysconfig` key ``SO`` is deprecated, it has been replaced by " "``EXT_SUFFIX``." msgstr "" -#: ../../whatsnew/3.4.rst:2134 +#: ../../whatsnew/3.4.rst:2133 msgid "" "The ``U`` mode accepted by various ``open`` functions is deprecated. In " "Python3 it does not do anything useful, and should be replaced by " @@ -3051,7 +3052,7 @@ msgid "" "argument." msgstr "" -#: ../../whatsnew/3.4.rst:2139 +#: ../../whatsnew/3.4.rst:2138 msgid "" "The *parser* argument of :func:`xml.etree.ElementTree.iterparse` has been " "deprecated, as has the *html* argument of :func:`~xml.etree.ElementTree." @@ -3059,97 +3060,97 @@ msgid "" "``XMLParser`` should be passed by keyword." msgstr "" -#: ../../whatsnew/3.4.rst:2146 +#: ../../whatsnew/3.4.rst:2145 msgid "Deprecated Features" msgstr "已棄用功能" -#: ../../whatsnew/3.4.rst:2148 +#: ../../whatsnew/3.4.rst:2147 msgid "" "Running :ref:`idle` with the ``-n`` flag (no subprocess) is deprecated. " "However, the feature will not be removed until :issue:`18823` is resolved." msgstr "" -#: ../../whatsnew/3.4.rst:2151 +#: ../../whatsnew/3.4.rst:2150 msgid "" "The site module adding a \"site-python\" directory to sys.path, if it " "exists, is deprecated (:issue:`19375`)." msgstr "" -#: ../../whatsnew/3.4.rst:2157 +#: ../../whatsnew/3.4.rst:2156 msgid "Removed" msgstr "已移除" -#: ../../whatsnew/3.4.rst:2161 +#: ../../whatsnew/3.4.rst:2160 msgid "Operating Systems No Longer Supported" msgstr "" -#: ../../whatsnew/3.4.rst:2163 +#: ../../whatsnew/3.4.rst:2162 msgid "" "Support for the following operating systems has been removed from the source " "and build tools:" msgstr "" -#: ../../whatsnew/3.4.rst:2166 +#: ../../whatsnew/3.4.rst:2165 msgid "OS/2 (:issue:`16135`)." msgstr "OS/2 (:issue:`16135`)。" -#: ../../whatsnew/3.4.rst:2167 +#: ../../whatsnew/3.4.rst:2166 msgid "Windows 2000 (changeset e52df05b496a)." msgstr "" -#: ../../whatsnew/3.4.rst:2168 +#: ../../whatsnew/3.4.rst:2167 msgid "" "Windows systems where ``COMSPEC`` points to ``command.com`` (:issue:`14470`)." msgstr "" -#: ../../whatsnew/3.4.rst:2169 +#: ../../whatsnew/3.4.rst:2168 msgid "VMS (:issue:`16136`)." msgstr "VMS (:issue:`16136`)。" -#: ../../whatsnew/3.4.rst:2173 +#: ../../whatsnew/3.4.rst:2172 msgid "API and Feature Removals" msgstr "API 與功能的移除" -#: ../../whatsnew/3.4.rst:2175 +#: ../../whatsnew/3.4.rst:2174 msgid "" "The following obsolete and previously deprecated APIs and features have been " "removed:" msgstr "" -#: ../../whatsnew/3.4.rst:2178 +#: ../../whatsnew/3.4.rst:2177 msgid "" "The unmaintained ``Misc/TextMate`` and ``Misc/vim`` directories have been " "removed (see the `devguide `_ for suggestions " "on what to use instead)." msgstr "" -#: ../../whatsnew/3.4.rst:2182 +#: ../../whatsnew/3.4.rst:2181 msgid "" "The ``SO`` makefile macro is removed (it was replaced by the " "``SHLIB_SUFFIX`` and ``EXT_SUFFIX`` macros) (:issue:`16754`)." msgstr "" -#: ../../whatsnew/3.4.rst:2185 +#: ../../whatsnew/3.4.rst:2184 msgid "" "The ``PyThreadState.tick_counter`` field has been removed; its value has " "been meaningless since Python 3.2, when the \"new GIL\" was introduced (:" "issue:`19199`)." msgstr "" -#: ../../whatsnew/3.4.rst:2189 +#: ../../whatsnew/3.4.rst:2188 msgid "" "``PyLoader`` and ``PyPycLoader`` have been removed from :mod:`importlib`. " "(Contributed by Taras Lyapun in :issue:`15641`.)" msgstr "" -#: ../../whatsnew/3.4.rst:2192 +#: ../../whatsnew/3.4.rst:2191 msgid "" "The *strict* argument to :class:`~http.client.HTTPConnection` and :class:" "`~http.client.HTTPSConnection` has been removed. HTTP 0.9-style \"Simple " "Responses\" are no longer supported." msgstr "" -#: ../../whatsnew/3.4.rst:2196 +#: ../../whatsnew/3.4.rst:2195 msgid "" "The deprecated :mod:`urllib.request.Request` getter and setter methods " "``add_data``, ``has_data``, ``get_data``, ``get_type``, ``get_host``, " @@ -3157,19 +3158,19 @@ msgid "" "``is_unverifiable`` have been removed (use direct attribute access instead)." msgstr "" -#: ../../whatsnew/3.4.rst:2201 +#: ../../whatsnew/3.4.rst:2200 msgid "" "Support for loading the deprecated ``TYPE_INT64`` has been removed from :mod:" "`marshal`. (Contributed by Dan Riti in :issue:`15480`.)" msgstr "" -#: ../../whatsnew/3.4.rst:2204 +#: ../../whatsnew/3.4.rst:2203 msgid "" ":class:`inspect.Signature`: positional-only parameters are now required to " "have a valid name." msgstr "" -#: ../../whatsnew/3.4.rst:2207 +#: ../../whatsnew/3.4.rst:2206 msgid "" ":meth:`object.__format__` no longer accepts non-empty format strings, it now " "raises a :exc:`TypeError` instead. Using a non-empty string has been " @@ -3181,7 +3182,7 @@ msgid "" "`7994` for background." msgstr "" -#: ../../whatsnew/3.4.rst:2216 +#: ../../whatsnew/3.4.rst:2215 msgid "" ":meth:`difflib.SequenceMatcher.isbjunk` and :meth:`difflib.SequenceMatcher." "isbpopular` were deprecated in 3.2, and have now been removed: use ``x in sm." @@ -3189,17 +3190,17 @@ msgid "" "SequenceMatcher` object (:issue:`13248`)." msgstr "" -#: ../../whatsnew/3.4.rst:2224 +#: ../../whatsnew/3.4.rst:2223 msgid "Code Cleanups" msgstr "程式碼的清除" -#: ../../whatsnew/3.4.rst:2226 +#: ../../whatsnew/3.4.rst:2225 msgid "" "The unused and undocumented internal ``Scanner`` class has been removed from " "the :mod:`pydoc` module." msgstr "" -#: ../../whatsnew/3.4.rst:2229 +#: ../../whatsnew/3.4.rst:2228 msgid "" "The private and effectively unused ``_gestalt`` module has been removed, " "along with the private :mod:`platform` functions ``_mac_ver_lookup``, " @@ -3207,27 +3208,27 @@ msgid "" "called on badly broken OSX systems (see :issue:`18393`)." msgstr "" -#: ../../whatsnew/3.4.rst:2234 +#: ../../whatsnew/3.4.rst:2233 msgid "" "The hardcoded copies of certain :mod:`stat` constants that were included in " "the :mod:`tarfile` module namespace have been removed." msgstr "" -#: ../../whatsnew/3.4.rst:2240 +#: ../../whatsnew/3.4.rst:2239 msgid "Porting to Python 3.4" msgstr "" -#: ../../whatsnew/3.4.rst:2242 +#: ../../whatsnew/3.4.rst:2241 msgid "" "This section lists previously described changes and other bugfixes that may " "require changes to your code." msgstr "" -#: ../../whatsnew/3.4.rst:2247 +#: ../../whatsnew/3.4.rst:2246 msgid "Changes in 'python' Command Behavior" msgstr "" -#: ../../whatsnew/3.4.rst:2249 +#: ../../whatsnew/3.4.rst:2248 msgid "" "In a posix shell, setting the :envvar:`PATH` environment variable to an " "empty value is equivalent to not setting it at all. However, setting :" @@ -3238,25 +3239,25 @@ msgid "" "for :envvar:`PATH`." msgstr "" -#: ../../whatsnew/3.4.rst:2257 +#: ../../whatsnew/3.4.rst:2256 msgid "" "The [X refs, Y blocks] output of a debug (``--with-pydebug``) build of the " "CPython interpreter is now off by default. It can be re-enabled using the " "``-X showrefcount`` option. (Contributed by Ezio Melotti in :issue:`17323`.)" msgstr "" -#: ../../whatsnew/3.4.rst:2261 +#: ../../whatsnew/3.4.rst:2260 msgid "" "The python command and most stdlib scripts (as well as :mod:`argparse`) now " "output ``--version`` information to ``stdout`` instead of ``stderr`` (for " "issue list see :ref:`other-improvements-3.4` above)." msgstr "" -#: ../../whatsnew/3.4.rst:2267 +#: ../../whatsnew/3.4.rst:2266 msgid "Changes in the Python API" msgstr "Python API 的變更" -#: ../../whatsnew/3.4.rst:2269 +#: ../../whatsnew/3.4.rst:2268 msgid "" "The ABCs defined in :mod:`importlib.abc` now either raise the appropriate " "exception or return a default value instead of raising :exc:" @@ -3265,7 +3266,7 @@ msgid "" "catch both :exc:`NotImplementedError` or the appropriate exception as needed." msgstr "" -#: ../../whatsnew/3.4.rst:2275 +#: ../../whatsnew/3.4.rst:2274 msgid "" "The module type now initializes the :attr:`__package__` and :attr:" "`__loader__` attributes to ``None`` by default. To determine if these " @@ -3273,7 +3274,7 @@ msgid "" "``getattr(module, '__loader__', None) is not None``. (:issue:`17115`.)" msgstr "" -#: ../../whatsnew/3.4.rst:2280 +#: ../../whatsnew/3.4.rst:2279 msgid "" ":meth:`!importlib.util.module_for_loader` now sets ``__loader__`` and " "``__package__`` unconditionally to properly support reloading. If this is " @@ -3281,7 +3282,7 @@ msgid "" "use :func:`importlib.util.module_to_load` for module management." msgstr "" -#: ../../whatsnew/3.4.rst:2285 +#: ../../whatsnew/3.4.rst:2284 msgid "" "Import now resets relevant attributes (e.g. ``__name__``, ``__loader__``, " "``__package__``, ``__file__``, ``__cached__``) unconditionally when " @@ -3289,7 +3290,7 @@ msgid "" "module is re-found when re-loaded (:issue:`19413`)." msgstr "" -#: ../../whatsnew/3.4.rst:2290 +#: ../../whatsnew/3.4.rst:2289 msgid "" "Frozen packages no longer set ``__path__`` to a list containing the package " "name, they now set it to an empty list. The previous behavior could cause " @@ -3299,7 +3300,7 @@ msgid "" "'__path__')`` (:issue:`18065`)." msgstr "" -#: ../../whatsnew/3.4.rst:2297 +#: ../../whatsnew/3.4.rst:2296 msgid "" "Frozen modules no longer define a ``__file__`` attribute. It's semantically " "incorrect for frozen modules to set the attribute as they are not loaded " @@ -3310,7 +3311,7 @@ msgid "" "use :func:`!imp.is_frozen`." msgstr "" -#: ../../whatsnew/3.4.rst:2305 +#: ../../whatsnew/3.4.rst:2304 msgid "" ":func:`py_compile.compile` now raises :exc:`FileExistsError` if the file " "path it would write to is a symlink or a non-regular file. This is to act as " @@ -3318,7 +3319,7 @@ msgid "" "regardless of what type of file path they were originally." msgstr "" -#: ../../whatsnew/3.4.rst:2310 +#: ../../whatsnew/3.4.rst:2309 msgid "" ":meth:`importlib.abc.SourceLoader.get_source` no longer raises :exc:" "`ImportError` when the source code being loaded triggers a :exc:" @@ -3330,7 +3331,7 @@ msgid "" "exceptions now." msgstr "" -#: ../../whatsnew/3.4.rst:2319 +#: ../../whatsnew/3.4.rst:2318 msgid "" ":func:`functools.update_wrapper` and :func:`functools.wraps` now correctly " "set the ``__wrapped__`` attribute to the function being wrapped, even if " @@ -3342,7 +3343,7 @@ msgid "" "function in the chain that has no ``__wrapped__`` attribute." msgstr "" -#: ../../whatsnew/3.4.rst:2329 +#: ../../whatsnew/3.4.rst:2328 msgid "" ":func:`inspect.getfullargspec` has been reimplemented on top of :func:" "`inspect.signature` and hence handles a much wider variety of callable " @@ -3352,7 +3353,7 @@ msgid "" "will fail on non-Python callables may need to be adjusted accordingly." msgstr "" -#: ../../whatsnew/3.4.rst:2337 +#: ../../whatsnew/3.4.rst:2336 msgid "" ":class:`importlib.machinery.PathFinder` now passes on the current working " "directory to objects in :data:`sys.path_hooks` for the empty string. This " @@ -3366,7 +3367,7 @@ msgid "" "`18416`)." msgstr "" -#: ../../whatsnew/3.4.rst:2348 +#: ../../whatsnew/3.4.rst:2347 msgid "" "The removal of the *strict* argument to :class:`~http.client.HTTPConnection` " "and :class:`~http.client.HTTPSConnection` changes the meaning of the " @@ -3375,7 +3376,7 @@ msgid "" "should already be specifying any additional arguments via keywords." msgstr "" -#: ../../whatsnew/3.4.rst:2354 +#: ../../whatsnew/3.4.rst:2353 msgid "" "Strings between ``from __future__ import ...`` statements now *always* raise " "a :exc:`SyntaxError`. Previously if there was no leading docstring, an " @@ -3384,7 +3385,7 @@ msgid "" "`17434`)." msgstr "" -#: ../../whatsnew/3.4.rst:2360 +#: ../../whatsnew/3.4.rst:2359 msgid "" ":meth:`ssl.SSLSocket.getpeercert` and :meth:`ssl.SSLSocket.do_handshake` now " "raise an :exc:`OSError` with ``ENOTCONN`` when the ``SSLSocket`` is not " @@ -3393,7 +3394,7 @@ msgid "" "raise a :exc:`ValueError` if the handshake has not yet been done." msgstr "" -#: ../../whatsnew/3.4.rst:2366 +#: ../../whatsnew/3.4.rst:2365 msgid "" ":func:`base64.b32decode` now raises a :exc:`binascii.Error` when the input " "string contains non-b32-alphabet characters, instead of a :exc:`TypeError`. " @@ -3402,7 +3403,7 @@ msgid "" "`18011`.) Note: this change was also inadvertently applied in Python 3.3.3." msgstr "" -#: ../../whatsnew/3.4.rst:2373 +#: ../../whatsnew/3.4.rst:2372 msgid "" "The :attr:`!file` attribute is now automatically closed when the creating :" "class:`!cgi.FieldStorage` instance is garbage collected. If you were pulling " @@ -3412,14 +3413,14 @@ msgid "" "the :class:`!cgi.FieldStorage` instance is garbage collected." msgstr "" -#: ../../whatsnew/3.4.rst:2380 +#: ../../whatsnew/3.4.rst:2379 msgid "" "Calling ``read`` or ``write`` on a closed SSL socket now raises an " "informative :exc:`ValueError` rather than the previous more mysterious :exc:" "`AttributeError` (:issue:`9177`)." msgstr "" -#: ../../whatsnew/3.4.rst:2384 +#: ../../whatsnew/3.4.rst:2383 msgid "" ":meth:`slice.indices` no longer produces an :exc:`OverflowError` for huge " "values. As a consequence of this fix, :meth:`slice.indices` now raises a :" @@ -3427,7 +3428,7 @@ msgid "" "values (:issue:`14794`)." msgstr "" -#: ../../whatsnew/3.4.rst:2389 +#: ../../whatsnew/3.4.rst:2388 msgid "" "The :class:`complex` constructor, unlike the :mod:`cmath` functions, was " "incorrectly accepting :class:`float` values if an object's ``__complex__`` " @@ -3435,21 +3436,21 @@ msgid "" "`16290`.)" msgstr "" -#: ../../whatsnew/3.4.rst:2394 +#: ../../whatsnew/3.4.rst:2393 msgid "" "The :class:`int` constructor in 3.2 and 3.3 erroneously accepts :class:" "`float` values for the *base* parameter. It is unlikely anyone was doing " "this, but if so, it will now raise a :exc:`TypeError` (:issue:`16772`)." msgstr "" -#: ../../whatsnew/3.4.rst:2398 +#: ../../whatsnew/3.4.rst:2397 msgid "" "Defaults for keyword-only arguments are now evaluated *after* defaults for " "regular keyword arguments, instead of before. Hopefully no one wrote any " "code that depends on the previous buggy behavior (:issue:`16967`)." msgstr "" -#: ../../whatsnew/3.4.rst:2402 +#: ../../whatsnew/3.4.rst:2401 msgid "" "Stale thread states are now cleared after :func:`~os.fork`. This may cause " "some system resources to be released that previously were incorrectly kept " @@ -3457,21 +3458,21 @@ msgid "" "storage). (:issue:`17094`.)" msgstr "" -#: ../../whatsnew/3.4.rst:2407 +#: ../../whatsnew/3.4.rst:2406 msgid "" "Parameter names in ``__annotations__`` dicts are now mangled properly, " "similarly to :attr:`~function.__kwdefaults__`. (Contributed by Yury " "Selivanov in :issue:`20625`.)" msgstr "" -#: ../../whatsnew/3.4.rst:2411 +#: ../../whatsnew/3.4.rst:2410 msgid "" ":attr:`hashlib.hash.name` now always returns the identifier in lower case. " "Previously some builtin hashes had uppercase names, but now that it is a " "formal public interface the naming has been made consistent (:issue:`18532`)." msgstr "" -#: ../../whatsnew/3.4.rst:2415 +#: ../../whatsnew/3.4.rst:2414 msgid "" "Because :mod:`unittest.TestSuite` now drops references to tests after they " "are run, test harnesses that reuse a :class:`~unittest.TestSuite` to re-run " @@ -3484,7 +3485,7 @@ msgid "" "__iter__`) (:issue:`11798`)." msgstr "" -#: ../../whatsnew/3.4.rst:2425 +#: ../../whatsnew/3.4.rst:2424 msgid "" ":mod:`unittest` now uses :mod:`argparse` for command line parsing. There " "are certain invalid command forms that used to work that are no longer " @@ -3493,7 +3494,7 @@ msgid "" "use." msgstr "" -#: ../../whatsnew/3.4.rst:2430 +#: ../../whatsnew/3.4.rst:2429 msgid "" "The :func:`re.split`, :func:`re.findall`, and :func:`re.sub` functions, and " "the :meth:`~re.match.group` and :meth:`~re.match.groups` methods of " @@ -3503,13 +3504,13 @@ msgid "" "say, a ``bytearray``, you will need to change your code." msgstr "" -#: ../../whatsnew/3.4.rst:2437 +#: ../../whatsnew/3.4.rst:2436 msgid "" ":mod:`!audioop` functions now raise an error immediately if passed string " "input, instead of failing randomly later on (:issue:`16685`)." msgstr "" -#: ../../whatsnew/3.4.rst:2440 +#: ../../whatsnew/3.4.rst:2439 msgid "" "The new *convert_charrefs* argument to :class:`~html.parser.HTMLParser` " "currently defaults to ``False`` for backward compatibility, but will " @@ -3518,14 +3519,14 @@ msgid "" "HTMLParser` calls in your code (:issue:`13633`)." msgstr "" -#: ../../whatsnew/3.4.rst:2446 +#: ../../whatsnew/3.4.rst:2445 msgid "" "Since the *digestmod* argument to the :func:`hmac.new` function will in the " "future have no default, all calls to :func:`hmac.new` should be changed to " "explicitly specify a *digestmod* (:issue:`17276`)." msgstr "" -#: ../../whatsnew/3.4.rst:2450 +#: ../../whatsnew/3.4.rst:2449 msgid "" "Calling :func:`sysconfig.get_config_var` with the ``SO`` key, or looking " "``SO`` up in the results of a call to :func:`sysconfig.get_config_vars` is " @@ -3533,7 +3534,7 @@ msgid "" "``SHLIB_SUFFIX``, depending on the context (:issue:`19555`)." msgstr "" -#: ../../whatsnew/3.4.rst:2455 +#: ../../whatsnew/3.4.rst:2454 msgid "" "Any calls to ``open`` functions that specify ``U`` should be modified. ``U`` " "is ineffective in Python3 and will eventually raise an error if used. " @@ -3543,13 +3544,13 @@ msgid "" "`15204`)." msgstr "" -#: ../../whatsnew/3.4.rst:2462 +#: ../../whatsnew/3.4.rst:2461 msgid "" "If you use ``pyvenv`` in a script and desire that pip *not* be installed, " "you must add ``--without-pip`` to your command invocation." msgstr "" -#: ../../whatsnew/3.4.rst:2466 +#: ../../whatsnew/3.4.rst:2465 msgid "" "The default behavior of :func:`json.dump` and :func:`json.dumps` when an " "indent is specified has changed: it no longer produces trailing spaces after " @@ -3558,7 +3559,7 @@ msgid "" "output (:issue:`16333`)." msgstr "" -#: ../../whatsnew/3.4.rst:2472 +#: ../../whatsnew/3.4.rst:2471 msgid "" ":mod:`doctest` now looks for doctests in extension module ``__doc__`` " "strings, so if your doctest test discovery includes extension modules that " @@ -3566,7 +3567,7 @@ msgid "" "never seen before when running your tests (:issue:`3158`)." msgstr "" -#: ../../whatsnew/3.4.rst:2477 +#: ../../whatsnew/3.4.rst:2476 msgid "" "The :mod:`collections.abc` module has been slightly refactored as part of " "the Python startup improvements. As a consequence of this, it is no longer " @@ -3576,11 +3577,11 @@ msgid "" "`20784`)." msgstr "" -#: ../../whatsnew/3.4.rst:2486 +#: ../../whatsnew/3.4.rst:2485 msgid "Changes in the C API" msgstr "C API 中的改動" -#: ../../whatsnew/3.4.rst:2488 +#: ../../whatsnew/3.4.rst:2487 msgid "" ":c:func:`PyEval_EvalFrameEx`, :c:func:`PyObject_Repr`, and :c:func:" "`PyObject_Str`, along with some other internal C APIs, now include a " @@ -3594,14 +3595,14 @@ msgid "" "version of Python that is compiled with assertions enabled." msgstr "" -#: ../../whatsnew/3.4.rst:2500 +#: ../../whatsnew/3.4.rst:2499 msgid "" ":c:func:`PyErr_SetImportError` now sets :exc:`TypeError` when its **msg** " "argument is not set. Previously only ``NULL`` was returned with no exception " "set." msgstr "" -#: ../../whatsnew/3.4.rst:2504 +#: ../../whatsnew/3.4.rst:2503 msgid "" "The result of the :c:data:`PyOS_ReadlineFunctionPointer` callback must now " "be a string allocated by :c:func:`PyMem_RawMalloc` or :c:func:" @@ -3610,30 +3611,30 @@ msgid "" "`16742`)" msgstr "" -#: ../../whatsnew/3.4.rst:2510 +#: ../../whatsnew/3.4.rst:2509 msgid "" ":c:func:`PyThread_set_key_value` now always set the value. In Python 3.3, " "the function did nothing if the key already exists (if the current value is " "a non-``NULL`` pointer)." msgstr "" -#: ../../whatsnew/3.4.rst:2514 +#: ../../whatsnew/3.4.rst:2513 msgid "" "The ``f_tstate`` (thread state) field of the :c:type:`PyFrameObject` " "structure has been removed to fix a bug: see :issue:`14432` for the " "rationale." msgstr "" -#: ../../whatsnew/3.4.rst:2519 +#: ../../whatsnew/3.4.rst:2518 msgid "Changed in 3.4.3" msgstr "3.4.3 中的變更" -#: ../../whatsnew/3.4.rst:2524 +#: ../../whatsnew/3.4.rst:2523 msgid "" "PEP 476: Enabling certificate verification by default for stdlib http clients" msgstr "" -#: ../../whatsnew/3.4.rst:2526 +#: ../../whatsnew/3.4.rst:2525 msgid "" ":mod:`http.client` and modules which use it, such as :mod:`urllib.request` " "and :mod:`xmlrpc.client`, will now verify that the server presents a " @@ -3642,13 +3643,13 @@ msgid "" "improving security for many applications." msgstr "" -#: ../../whatsnew/3.4.rst:2532 +#: ../../whatsnew/3.4.rst:2531 msgid "" "For applications which require the old previous behavior, they can pass an " "alternate context::" msgstr "" -#: ../../whatsnew/3.4.rst:2535 +#: ../../whatsnew/3.4.rst:2534 msgid "" "import urllib.request\n" "import ssl\n" diff --git a/whatsnew/3.7.po b/whatsnew/3.7.po index c1c198bda7..2d895c796f 100644 --- a/whatsnew/3.7.po +++ b/whatsnew/3.7.po @@ -4,7 +4,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-23 07:52+0800\n" +"POT-Creation-Date: 2024-09-24 07:20+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-" @@ -531,9 +531,9 @@ msgstr "" #: ../../whatsnew/3.7.rst:356 msgid "" -"`Measurements `_ show that on Linux and Windows the resolution of :func:`time." -"time_ns` is approximately 3 times better than that of :func:`time.time`." +":pep:`Measurements <0564#annex-clocks-resolution-in-python>` show that on " +"Linux and Windows the resolution of :func:`time.time_ns` is approximately 3 " +"times better than that of :func:`time.time`." msgstr "" #: ../../whatsnew/3.7.rst:362 diff --git a/whatsnew/3.8.po b/whatsnew/3.8.po index 15f3d8d588..5603747792 100644 --- a/whatsnew/3.8.po +++ b/whatsnew/3.8.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-23 07:52+0800\n" +"POT-Creation-Date: 2024-09-24 07:20+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-" @@ -2783,7 +2783,7 @@ msgid "" "Starting with Python 3.3, importing ABCs from :mod:`collections` was " "deprecated, and importing should be done from :mod:`collections.abc`. Being " "able to import from collections was marked for removal in 3.8, but has been " -"delayed to 3.9. (See :issue:`36952`.)" +"delayed to 3.9. (See :gh:`81134`.)" msgstr "" #: ../../whatsnew/3.8.rst:1760