Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf0946af

Browse files
[po] auto sync
1 parent51649f2 commitf0946af

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

‎.stat.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"translation":"81.41%","updated_at":"2025-04-22T15:55:52Z"}
1+
{"translation":"81.42%","updated_at":"2025-04-23T02:23:53Z"}

‎whatsnew/3.0.po

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,8 @@ msgid ""
302302
"there is only one built-in integral type, named :class:`int`; but it behaves"
303303
" mostly like the old :class:`!long` type."
304304
msgstr""
305+
":pep:`237`: 在实质上,:class:`!long` 已改名为 :class:`int`。 也就是说,只存在一种内置整数类型,即 "
306+
":class:`int`;但其行为与旧的 :class:`!long` 类型极其相似。"
305307

306308
#:../../whatsnew/3.0.rst:213
307309
msgid""
@@ -321,6 +323,9 @@ msgid ""
321323
":data:`!sys.maxint` in previous releases on the same platform (assuming the "
322324
"same build options)."
323325
msgstr""
326+
":data:`!sys.maxint` 常量已被移除,因为整数的值不再有任何限制。 不过,:data:`sys.maxsize` "
327+
"也可被用作大于任何实际列表或字符串索引的整数。 它与具体实现的“自然”整数大小保持一致并且通常与同一平台上之前发布版中的 "
328+
":data:`!sys.maxint` 相同(假定使用相同的构建选项)。"
324329

325330
#:../../whatsnew/3.0.rst:224
326331
msgid""
@@ -358,6 +363,12 @@ msgid ""
358363
":exc:`UnicodeDecodeError` if it contained non-ASCII values. This value-"
359364
"specific behavior has caused numerous sad faces over the years."
360365
msgstr""
366+
"Python 3.0 使用 *文本* 和 (二进制) *数据* 等概念来替代 Unicode 字符串和 8 位字符串。 所有文本均使用 "
367+
"Unicode;不过 *已编码* Unicode 是以二进制数据来表示的。 用于存放文本的类型是 :class:`str`,用于存放数据的类型是 "
368+
":class:`bytes`。 与 2.x 场景的最大区别是在 Python 3.0 中任何混用文本和数据的尝试都将引发 "
369+
":exc:`TypeError`,而当你在 Python 2.x 中混用 Unicode 和 8 位字符串时,如果 8 位字符串恰好仅包含 7 位 "
370+
"(ASCII) 字节数据那就没有问题,但是如果包含非 ASCII 值则将引发 :exc:`UnicodeDecodeError`。 "
371+
"这种依赖于特定值的行为多年来造成了无数的苦恼。"
361372

362373
#:../../whatsnew/3.0.rst:250
363374
msgid""
@@ -369,6 +380,9 @@ msgid ""
369380
":class:`str` for binary or encoded data only. Then the ``2to3`` tool will "
370381
"do most of the work for you."
371382
msgstr""
383+
"作为此项设计哲学方面的修改造成的影响,几乎所有使用 Unicode、编码格式或二进制数据的代码都很有可能必须被修改。 这项改变是有益的,因为在 2.x "
384+
"世界中存在着无数涉及混用已编码和未编码文本的程序缺陷。 要在 Python 2.x 中做好准备,请使用 :class:`!unicode` "
385+
"表示所有未编码文本,只对二进制或已编码数据使用 :class:`str`。 这样 ``2to3`` 工具将为你完成大部分工作。"
372386

373387
#:../../whatsnew/3.0.rst:258
374388
msgid""
@@ -384,6 +398,10 @@ msgid ""
384398
":class:`bytes` to :class:`str`. You can also use ``bytes(s, encoding=...)``"
385399
" and ``str(b, encoding=...)``, respectively."
386400
msgstr""
401+
"由于 :class:`str` 和 :class:`bytes` 类型无法混用,你必须始终在它们之间执行显式转换。 使用 "
402+
":meth:`str.encode` 将 :class:`str` 转为 :class:`bytes`,并使用 :meth:`bytes.decode`"
403+
" 将 :class:`bytes` 转为 :class:`str`。 你也可以分别使用 ``bytes(s, encoding=...)`` 和 "
404+
"``str(b, encoding=...)``。"
387405

388406
#:../../whatsnew/3.0.rst:268
389407
msgid""

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp