7
7
msgstr ""
8
8
"Project-Id-Version :Python 3.12\n "
9
9
"Report-Msgid-Bugs-To :\n "
10
- "POT-Creation-Date :2023-12-13 00:03+0000\n "
10
+ "POT-Creation-Date :2023-12-14 00:03+0000\n "
11
11
"PO-Revision-Date :2018-05-23 16:20+0000\n "
12
12
"Last-Translator :Adrian Liaw <adrianliaw2000@gmail.com>\n "
13
13
"Language-Team :Chinese - TAIWAN (https://github.com/python/python-docs-zh- "
@@ -1007,8 +1007,8 @@ msgid ""
1007
1007
":pep:`3109`: Raising exceptions. You must now use :samp:`raise {Exception}"
1008
1008
"({args})` instead of :samp:`raise {Exception}, {args}`. Additionally, you "
1009
1009
"can no longer explicitly specify a traceback; instead, if you *have* to do "
1010
- "this, you can assign directly to the :attr:`__traceback__` attribute (see "
1011
- "below)."
1010
+ "this, you can assign directly to the :attr:`~BaseException. __traceback__` "
1011
+ "attribute (see below)."
1012
1012
msgstr ""
1013
1013
1014
1014
#: ../../whatsnew/3.0.rst:716
@@ -1026,84 +1026,85 @@ msgid ""
1026
1026
"an :keyword:`except` or :keyword:`finally` handler block. This usually "
1027
1027
"happens due to a bug in the handler block; we call this a *secondary* "
1028
1028
"exception. In this case, the original exception (that was being handled) is "
1029
- "saved as the :attr:`__context__` attribute of the secondary exception. "
1030
- "Explicit chaining is invoked with this syntax::"
1029
+ "saved as the :attr:`~BaseException. __context__` attribute of the secondary "
1030
+ "exception. Explicit chaining is invoked with this syntax::"
1031
1031
msgstr ""
1032
1032
1033
1033
#: ../../whatsnew/3.0.rst:733
1034
1034
msgid ""
1035
1035
"(where *primary_exception* is any expression that produces an exception "
1036
1036
"object, probably an exception that was previously caught). In this case, the "
1037
- "primary exception is stored on the :attr:`__cause__` attribute of the "
1038
- "secondary exception. The traceback printed when an unhandled exception "
1039
- "occurs walks the chain of :attr:`__cause__` and :attr:`__context__` "
1040
- "attributes and prints a separate traceback for each component of the chain, "
1041
- "with the primary exception at the top. (Java users may recognize this "
1042
- "behavior.)"
1037
+ "primary exception is stored on the :attr:`~BaseException. __cause__` "
1038
+ "attribute of the secondary exception. The traceback printed when an "
1039
+ "unhandled exception occurs walks the chain of :attr:`! __cause__` and :attr:"
1040
+ "`~BaseException.__context__` attributes and prints a separate traceback for "
1041
+ "each component of the chain, with the primary exception at the top. (Java "
1042
+ "users may recognize this behavior.)"
1043
1043
msgstr ""
1044
1044
1045
- #: ../../whatsnew/3.0.rst:742
1045
+ #: ../../whatsnew/3.0.rst:743
1046
1046
msgid ""
1047
1047
":pep:`3134`: Exception objects now store their traceback as the :attr:"
1048
- "`__traceback__` attribute. This means that an exception object now contains "
1049
- "all the information pertaining to an exception, and there are fewer reasons "
1050
- "to use :func:`sys.exc_info` (though the latter is not removed)."
1048
+ "`~BaseException.__traceback__` attribute. This means that an exception "
1049
+ "object now contains all the information pertaining to an exception, and "
1050
+ "there are fewer reasons to use :func:`sys.exc_info` (though the latter is "
1051
+ "not removed)."
1051
1052
msgstr ""
1052
1053
1053
- #: ../../whatsnew/3.0.rst:748
1054
+ #: ../../whatsnew/3.0.rst:749
1054
1055
msgid ""
1055
1056
"A few exception messages are improved when Windows fails to load an "
1056
1057
"extension module. For example, ``error code 193`` is now ``%1 is not a "
1057
1058
"valid Win32 application``. Strings now deal with non-English locales."
1058
1059
msgstr ""
1059
1060
1060
- #: ../../whatsnew/3.0.rst:755
1061
+ #: ../../whatsnew/3.0.rst:756
1061
1062
msgid "Miscellaneous Other Changes"
1062
1063
msgstr ""
1063
1064
1064
- #: ../../whatsnew/3.0.rst:758
1065
+ #: ../../whatsnew/3.0.rst:759
1065
1066
msgid "Operators And Special Methods"
1066
1067
msgstr ""
1067
1068
1068
- #: ../../whatsnew/3.0.rst:760
1069
+ #: ../../whatsnew/3.0.rst:761
1069
1070
msgid ""
1070
1071
"``!=`` now returns the opposite of ``==``, unless ``==`` returns :data:"
1071
1072
"`NotImplemented`."
1072
1073
msgstr ""
1073
1074
1074
- #: ../../whatsnew/3.0.rst:763
1075
+ #: ../../whatsnew/3.0.rst:764
1075
1076
msgid ""
1076
1077
"The concept of\" unbound methods\" has been removed from the language. When "
1077
1078
"referencing a method as a class attribute, you now get a plain function "
1078
1079
"object."
1079
1080
msgstr ""
1080
1081
1081
- #: ../../whatsnew/3.0.rst:767
1082
+ #: ../../whatsnew/3.0.rst:768
1082
1083
msgid ""
1083
1084
":meth:`__getslice__`, :meth:`__setslice__` and :meth:`__delslice__` were "
1084
1085
"killed. The syntax ``a[i:j]`` now translates to ``a.__getitem__(slice(i, "
1085
1086
"j))`` (or :meth:`__setitem__` or :meth:`__delitem__`, when used as an "
1086
1087
"assignment or deletion target, respectively)."
1087
1088
msgstr ""
1088
1089
1089
- #: ../../whatsnew/3.0.rst:773
1090
+ #: ../../whatsnew/3.0.rst:774
1090
1091
msgid ""
1091
1092
":pep:`3114`: the standard :meth:`next` method has been renamed to :meth:"
1092
1093
"`~iterator.__next__`."
1093
1094
msgstr ""
1094
1095
1095
- #: ../../whatsnew/3.0.rst:776
1096
+ #: ../../whatsnew/3.0.rst:777
1096
1097
msgid ""
1097
1098
"The :meth:`__oct__` and :meth:`__hex__` special methods are removed -- :func:"
1098
1099
"`oct` and :func:`hex` use :meth:`__index__` now to convert the argument to "
1099
1100
"an integer."
1100
1101
msgstr ""
1101
1102
1102
- #: ../../whatsnew/3.0.rst:780
1103
+ #: ../../whatsnew/3.0.rst:781
1103
1104
msgid "Removed support for :attr:`__members__` and :attr:`__methods__`."
1104
1105
msgstr "移除對 :attr:`__members__` 和 :attr:`__methods__` 的支援。"
1105
1106
1106
- #: ../../whatsnew/3.0.rst:782
1107
+ #: ../../whatsnew/3.0.rst:783
1107
1108
msgid ""
1108
1109
"The function attributes named :attr:`!func_X` have been renamed to use the :"
1109
1110
"attr:`!__X__` form, freeing up these names in the function attribute "
@@ -1115,15 +1116,15 @@ msgid ""
1115
1116
"`~function.__globals__`, :attr:`~function.__name__`, respectively."
1116
1117
msgstr ""
1117
1118
1118
- #: ../../whatsnew/3.0.rst:793
1119
+ #: ../../whatsnew/3.0.rst:794
1119
1120
msgid ":meth:`!__nonzero__` is now :meth:`~object.__bool__`."
1120
1121
msgstr ":meth:`!__nonzero__` 現在為 :meth:`~object.__bool__`。"
1121
1122
1122
- #: ../../whatsnew/3.0.rst:796
1123
+ #: ../../whatsnew/3.0.rst:797
1123
1124
msgid "Builtins"
1124
1125
msgstr ""
1125
1126
1126
- #: ../../whatsnew/3.0.rst:798
1127
+ #: ../../whatsnew/3.0.rst:799
1127
1128
msgid ""
1128
1129
":pep:`3135`: New :func:`super`. You can now invoke :func:`super` without "
1129
1130
"arguments and (assuming this is in a regular instance method defined inside "
@@ -1132,7 +1133,7 @@ msgid ""
1132
1133
"unchanged."
1133
1134
msgstr ""
1134
1135
1135
- #: ../../whatsnew/3.0.rst:804
1136
+ #: ../../whatsnew/3.0.rst:805
1136
1137
msgid ""
1137
1138
":pep:`3111`: :func:`raw_input` was renamed to :func:`input`. That is, the "
1138
1139
"new :func:`input` function reads a line from :data:`sys.stdin` and returns "
@@ -1141,13 +1142,13 @@ msgid ""
1141
1142
"use ``eval(input())``."
1142
1143
msgstr ""
1143
1144
1144
- #: ../../whatsnew/3.0.rst:810
1145
+ #: ../../whatsnew/3.0.rst:811
1145
1146
msgid ""
1146
1147
"A new built-in function :func:`next` was added to call the :meth:`~iterator."
1147
1148
"__next__` method on an object."
1148
1149
msgstr ""
1149
1150
1150
- #: ../../whatsnew/3.0.rst:813
1151
+ #: ../../whatsnew/3.0.rst:814
1151
1152
msgid ""
1152
1153
"The :func:`round` function rounding strategy and return type have changed. "
1153
1154
"Exact halfway cases are now rounded to the nearest even result instead of "
@@ -1158,163 +1159,163 @@ msgid ""
1158
1159
"arguments."
1159
1160
msgstr ""
1160
1161
1161
- #: ../../whatsnew/3.0.rst:822
1162
+ #: ../../whatsnew/3.0.rst:823
1162
1163
msgid "Moved :func:`intern` to :func:`sys.intern`."
1163
1164
msgstr ""
1164
1165
1165
- #: ../../whatsnew/3.0.rst:824
1166
+ #: ../../whatsnew/3.0.rst:825
1166
1167
msgid ""
1167
1168
"Removed: :func:`apply`. Instead of ``apply(f, args)`` use ``f(*args)``."
1168
1169
msgstr ""
1169
1170
1170
- #: ../../whatsnew/3.0.rst:827
1171
+ #: ../../whatsnew/3.0.rst:828
1171
1172
msgid ""
1172
1173
"Removed :func:`callable`. Instead of ``callable(f)`` you can use "
1173
1174
"``isinstance(f, collections.Callable)``. The :func:`operator.isCallable` "
1174
1175
"function is also gone."
1175
1176
msgstr ""
1176
1177
1177
- #: ../../whatsnew/3.0.rst:831
1178
+ #: ../../whatsnew/3.0.rst:832
1178
1179
msgid ""
1179
1180
"Removed :func:`coerce`. This function no longer serves a purpose now that "
1180
1181
"classic classes are gone."
1181
1182
msgstr ""
1182
1183
1183
- #: ../../whatsnew/3.0.rst:834
1184
+ #: ../../whatsnew/3.0.rst:835
1184
1185
msgid ""
1185
1186
"Removed :func:`execfile`. Instead of ``execfile(fn)`` use ``exec(open(fn)."
1186
1187
"read())``."
1187
1188
msgstr ""
1188
1189
1189
- #: ../../whatsnew/3.0.rst:837
1190
+ #: ../../whatsnew/3.0.rst:838
1190
1191
msgid ""
1191
1192
"Removed the :class:`file` type. Use :func:`open`. There are now several "
1192
1193
"different kinds of streams that open can return in the :mod:`io` module."
1193
1194
msgstr ""
1194
1195
1195
- #: ../../whatsnew/3.0.rst:840
1196
+ #: ../../whatsnew/3.0.rst:841
1196
1197
msgid ""
1197
1198
"Removed :func:`reduce`. Use :func:`functools.reduce` if you really need it; "
1198
1199
"however, 99 percent of the time an explicit :keyword:`for` loop is more "
1199
1200
"readable."
1200
1201
msgstr ""
1201
1202
1202
- #: ../../whatsnew/3.0.rst:844
1203
+ #: ../../whatsnew/3.0.rst:845
1203
1204
msgid "Removed :func:`reload`. Use :func:`!imp.reload`."
1204
1205
msgstr ""
1205
1206
1206
- #: ../../whatsnew/3.0.rst:846
1207
+ #: ../../whatsnew/3.0.rst:847
1207
1208
msgid ""
1208
1209
"Removed. :meth:`dict.has_key` -- use the :keyword:`in` operator instead."
1209
1210
msgstr ""
1210
1211
1211
- #: ../../whatsnew/3.0.rst:853
1212
+ #: ../../whatsnew/3.0.rst:854
1212
1213
msgid "Build and C API Changes"
1213
1214
msgstr ""
1214
1215
1215
- #: ../../whatsnew/3.0.rst:855
1216
+ #: ../../whatsnew/3.0.rst:856
1216
1217
msgid ""
1217
1218
"Due to time constraints, here is a *very* incomplete list of changes to the "
1218
1219
"C API."
1219
1220
msgstr ""
1220
1221
1221
- #: ../../whatsnew/3.0.rst:858
1222
+ #: ../../whatsnew/3.0.rst:859
1222
1223
msgid ""
1223
1224
"Support for several platforms was dropped, including but not limited to Mac "
1224
1225
"OS 9, BeOS, RISCOS, Irix, and Tru64."
1225
1226
msgstr ""
1226
1227
1227
- #: ../../whatsnew/3.0.rst:861
1228
+ #: ../../whatsnew/3.0.rst:862
1228
1229
msgid ":pep:`3118`: New Buffer API."
1229
1230
msgstr ""
1230
1231
1231
- #: ../../whatsnew/3.0.rst:863
1232
+ #: ../../whatsnew/3.0.rst:864
1232
1233
msgid ":pep:`3121`: Extension Module Initialization & Finalization."
1233
1234
msgstr ""
1234
1235
1235
- #: ../../whatsnew/3.0.rst:865
1236
+ #: ../../whatsnew/3.0.rst:866
1236
1237
msgid ":pep:`3123`: Making :c:macro:`PyObject_HEAD` conform to standard C."
1237
1238
msgstr ""
1238
1239
1239
- #: ../../whatsnew/3.0.rst:867
1240
+ #: ../../whatsnew/3.0.rst:868
1240
1241
msgid "No more C API support for restricted execution."
1241
1242
msgstr ""
1242
1243
1243
- #: ../../whatsnew/3.0.rst:869
1244
+ #: ../../whatsnew/3.0.rst:870
1244
1245
msgid ""
1245
1246
":c:func:`!PyNumber_Coerce`, :c:func:`!PyNumber_CoerceEx`, :c:func:`!"
1246
1247
"PyMember_Get`, and :c:func:`!PyMember_Set` C APIs are removed."
1247
1248
msgstr ""
1248
1249
1249
- #: ../../whatsnew/3.0.rst:872
1250
+ #: ../../whatsnew/3.0.rst:873
1250
1251
msgid ""
1251
1252
"New C API :c:func:`PyImport_ImportModuleNoBlock`, works like :c:func:"
1252
1253
"`PyImport_ImportModule` but won't block on the import lock (returning an "
1253
1254
"error instead)."
1254
1255
msgstr ""
1255
1256
1256
- #: ../../whatsnew/3.0.rst:876
1257
+ #: ../../whatsnew/3.0.rst:877
1257
1258
msgid ""
1258
1259
"Renamed the boolean conversion C-level slot and method: ``nb_nonzero`` is "
1259
1260
"now ``nb_bool``."
1260
1261
msgstr ""
1261
1262
1262
- #: ../../whatsnew/3.0.rst:879
1263
+ #: ../../whatsnew/3.0.rst:880
1263
1264
msgid ""
1264
1265
"Removed :c:macro:`!METH_OLDARGS` and :c:macro:`!WITH_CYCLE_GC` from the C "
1265
1266
"API."
1266
1267
msgstr ""
1267
1268
"移除 C API 中的 :c:macro:`!METH_OLDARGS` 和 :c:macro:`!WITH_CYCLE_GC`。"
1268
1269
1269
- #: ../../whatsnew/3.0.rst:885
1270
+ #: ../../whatsnew/3.0.rst:886
1270
1271
msgid "Performance"
1271
1272
msgstr ""
1272
1273
1273
- #: ../../whatsnew/3.0.rst:887
1274
+ #: ../../whatsnew/3.0.rst:888
1274
1275
msgid ""
1275
1276
"The net result of the 3.0 generalizations is that Python 3.0 runs the "
1276
1277
"pystone benchmark around 10% slower than Python 2.5. Most likely the "
1277
1278
"biggest cause is the removal of special-casing for small integers. There's "
1278
1279
"room for improvement, but it will happen after 3.0 is released!"
1279
1280
msgstr ""
1280
1281
1281
- #: ../../whatsnew/3.0.rst:897
1282
+ #: ../../whatsnew/3.0.rst:898
1282
1283
msgid "Porting To Python 3.0"
1283
1284
msgstr ""
1284
1285
1285
- #: ../../whatsnew/3.0.rst:899
1286
+ #: ../../whatsnew/3.0.rst:900
1286
1287
msgid ""
1287
1288
"For porting existing Python 2.5 or 2.6 source code to Python 3.0, the best "
1288
1289
"strategy is the following:"
1289
1290
msgstr ""
1290
1291
1291
- #: ../../whatsnew/3.0.rst:902
1292
+ #: ../../whatsnew/3.0.rst:903
1292
1293
msgid "(Prerequisite:) Start with excellent test coverage."
1293
1294
msgstr ""
1294
1295
1295
- #: ../../whatsnew/3.0.rst:904
1296
+ #: ../../whatsnew/3.0.rst:905
1296
1297
msgid ""
1297
1298
"Port to Python 2.6. This should be no more work than the average port from "
1298
1299
"Python 2.x to Python 2.(x+1). Make sure all your tests pass."
1299
1300
msgstr ""
1300
1301
1301
- #: ../../whatsnew/3.0.rst:908
1302
+ #: ../../whatsnew/3.0.rst:909
1302
1303
msgid ""
1303
1304
"(Still using 2.6:) Turn on the :option:`!-3` command line switch. This "
1304
1305
"enables warnings about features that will be removed (or change) in 3.0. "
1305
1306
"Run your test suite again, and fix code that you get warnings about until "
1306
1307
"there are no warnings left, and all your tests still pass."
1307
1308
msgstr ""
1308
1309
1309
- #: ../../whatsnew/3.0.rst:914
1310
+ #: ../../whatsnew/3.0.rst:915
1310
1311
msgid ""
1311
1312
"Run the ``2to3`` source-to-source translator over your source code tree. "
1312
1313
"(See :ref:`2to3-reference` for more on this tool.) Run the result of the "
1313
1314
"translation under Python 3.0. Manually fix up any remaining issues, fixing "
1314
1315
"problems until all tests pass again."
1315
1316
msgstr ""
1316
1317
1317
- #: ../../whatsnew/3.0.rst:919
1318
+ #: ../../whatsnew/3.0.rst:920
1318
1319
msgid ""
1319
1320
"It is not recommended to try to write source code that runs unchanged under "
1320
1321
"both Python 2.6 and 3.0; you'd have to use a very contorted coding style, e."
@@ -1325,7 +1326,7 @@ msgid ""
1325
1326
"editing the 3.0 version of the source code."
1326
1327
msgstr ""
1327
1328
1328
- #: ../../whatsnew/3.0.rst:928
1329
+ #: ../../whatsnew/3.0.rst:929
1329
1330
msgid ""
1330
1331
"For porting C extensions to Python 3.0, please see :ref:`cporting-howto`."
1331
1332
msgstr ""