diff --git a/c-api/stable.po b/c-api/stable.po index d65b33b945..5aa8323e0c 100644 --- a/c-api/stable.po +++ b/c-api/stable.po @@ -132,7 +132,6 @@ msgid "Limited C API" msgstr "受限 C API" #: ../../c-api/stable.rst:67 -#, fuzzy msgid "" "Python 3.2 introduced the *Limited API*, a subset of Python's C API. " "Extensions that only use the Limited API can be compiled once and be loaded " @@ -140,8 +139,8 @@ msgid "" "below `." msgstr "" "Python 3.2 引入了\\ *受限 API (Limited API)*,它是 Python C API 的一個子集。" -"僅使用受限 API 的擴充可以只編譯一次就使用於多個版本的 Python。受限 API 的內容" -"\\ :ref:`列在下方 `。" +"僅使用受限 API 的擴充可以只編譯一次就被載入於多個版本的 Python。受限 API 的內" +"容\\ :ref:`列在下方 `。" #: ../../c-api/stable.rst:74 msgid "" @@ -151,7 +150,6 @@ msgstr "" "在包含 ``Python.h`` 之前定義此巨集以選擇只使用受限 API,並挑選受限 API 版本。" #: ../../c-api/stable.rst:77 -#, fuzzy msgid "" "Define ``Py_LIMITED_API`` to the value of :c:macro:`PY_VERSION_HEX` " "corresponding to the lowest Python version your extension supports. The " @@ -159,8 +157,8 @@ msgid "" "specified one onward, and can use Limited API introduced up to that version." msgstr "" "將 ``Py_LIMITED_API`` 定義為對應於你的擴充有支援的最低 Python 版本的 :c:" -"macro:`PY_VERSION_HEX` 值。該擴充無需重新編譯即可與從指定版本開始的所有 " -"Python 3 版本一起使用,並且可以使用過去版本有引入的受限 API。" +"macro:`PY_VERSION_HEX` 值。該擴充與從指定版本開始的所有 Python 3 版本之 ABI " +"相容,並且可以使用過去版本有引入的受限 API。" #: ../../c-api/stable.rst:83 msgid "" @@ -185,13 +183,12 @@ msgid "Stable ABI" msgstr "穩定 ABI" #: ../../c-api/stable.rst:96 -#, fuzzy msgid "" "To enable this, Python provides a *Stable ABI*: a set of symbols that will " "remain ABI-compatible across Python 3.x versions." msgstr "" "為了實現它,Python 提供了一個\\ *穩定 ABI (Stable ABI)*:一組將在各個 Python " -"3.x 版本之間保持相容的符號。" +"3.x 版本之間保持 ABI 相容的符號。" #: ../../c-api/stable.rst:101 msgid "" diff --git a/howto/gdb_helpers.po b/howto/gdb_helpers.po index 397b0eb677..4dae44f916 100644 --- a/howto/gdb_helpers.po +++ b/howto/gdb_helpers.po @@ -389,22 +389,22 @@ msgstr "" "$4 = 42" #: ../../howto/gdb_helpers.rst:183 -#, fuzzy msgid "" "The internal structure can be revealed with a cast to :c:expr:`PyLongObject " "*`::" -msgstr "可以透過轉換 (cast) 為 :c:expr:`PyLongObject *` 來揭示內部結構:" +msgstr "可以透過轉換 (cast) 為 :c:expr:`PyLongObject *` 來揭示內部結構: ::" #: ../../howto/gdb_helpers.rst:185 -#, fuzzy msgid "" "(gdb) p *(PyLongObject*)some_python_integer\n" "$5 = {ob_base = {ob_base = {ob_refcnt = 8, ob_type = 0x3dad39f5e0}, ob_size " "= 1},\n" "ob_digit = {42}}" msgstr "" -"(gdb) p *(PyLongObject*)some_python_integer $5 = {ob_base = {ob_base = " -"{ob_refcnt = 8, ob_type = 0x3dad39f5e0}, ob_size = 1}, ob_digit = {42}}" +"(gdb) p *(PyLongObject*)some_python_integer\n" +"$5 = {ob_base = {ob_base = {ob_refcnt = 8, ob_type = 0x3dad39f5e0}, ob_size " +"= 1},\n" +"ob_digit = {42}}" #: ../../howto/gdb_helpers.rst:189 msgid "" diff --git a/library/ast.po b/library/ast.po index 6560698c80..a117a57e5a 100644 --- a/library/ast.po +++ b/library/ast.po @@ -3193,7 +3193,6 @@ msgstr "" "是預設值;如果 :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" @@ -3218,7 +3217,7 @@ msgid "" " ctx=Load()),\n" " ctx=Load()))])" msgstr "" -">>> print(ast.dump(ast.parse(\"type Alias[**P = (int, str)] = Callable[P, " +">>> print(ast.dump(ast.parse(\"type Alias[**P = [int, str]] = Callable[P, " "int]\"), indent=4))\n" "Module(\n" " body=[\n" @@ -3227,7 +3226,7 @@ msgstr "" " type_params=[\n" " ParamSpec(\n" " name='P',\n" -" default_value=Tuple(\n" +" default_value=List(\n" " elts=[\n" " Name(id='int', ctx=Load()),\n" " Name(id='str', ctx=Load())],\n" diff --git a/library/collections.po b/library/collections.po index 8dee53889d..abc99d12e2 100644 --- a/library/collections.po +++ b/library/collections.po @@ -1,11 +1,10 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) 2001-2022, Python Software Foundation +# Copyright (C) 2001-2024, Python Software Foundation # This file is distributed under the same license as the Python package. # # Translators: # 周 忠毅 , 2016 # Adrian Liaw , 2018 -# Matt Wang , 2022 +# Matt Wang , 2022-2024 msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" @@ -1225,7 +1224,6 @@ msgstr "" "值對序列轉換為包含 list 之字典:" #: ../../library/collections.rst:784 -#, fuzzy msgid "" "When each key is encountered for the first time, it is not already in the " "mapping; so an entry is automatically created using the :attr:`~defaultdict." @@ -1238,10 +1236,10 @@ msgid "" msgstr "" "當每個鍵第一次被存取時,它還沒有存在於對映中,所以會自動呼叫 :attr:" "`~defaultdict.default_factory` 方法來回傳一個空的 :class:`list` 以建立一個條" -"目,:meth:`list.append` 操作後續會再新增值到這個新的列表裡。當再次存取該鍵" -"時,就如普通字典般操作(回傳該鍵所對應到的 list),:meth:`list.append` 也會新" -"增另一個值到 list 中。和使用與其等價的 :meth:`dict.setdefault` 相比,這個技巧" -"更加快速和簡單:" +"目,:meth:`!list.append` 操作後續會再新增值到這個新的列表裡。當再次存取該鍵" +"時,就如普通字典般操作(回傳該鍵所對應到的 list),:meth:`!list.append` 也會" +"新增另一個值到 list 中。和使用與其等價的 :meth:`dict.setdefault` 相比,這個技" +"巧更加快速和簡單:" #: ../../library/collections.rst:799 msgid "" diff --git a/library/string.po b/library/string.po index 3a49d913a8..5537df8ef6 100644 --- a/library/string.po +++ b/library/string.po @@ -1,5 +1,4 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) 2001-2022, Python Software Foundation +# Copyright (C) 2001-2024, Python Software Foundation # This file is distributed under the same license as the Python package. # # Translators: @@ -64,15 +63,15 @@ msgid "" "The uppercase letters ``'ABCDEFGHIJKLMNOPQRSTUVWXYZ'``. This value is not " "locale-dependent and will not change." msgstr "" -"大寫字母 ``’ABCDEFGHIJKLMNOPQRSTUVWXYZ’``。 此值與地區設定無關且不會改變。" +"大寫字母 ``'ABCDEFGHIJKLMNOPQRSTUVWXYZ'``。此值與地區設定無關且不會改變。" #: ../../library/string.rst:44 msgid "The string ``'0123456789'``." -msgstr "字串 ``’0123456789’``。" +msgstr "字串 ``'0123456789'``。" #: ../../library/string.rst:49 msgid "The string ``'0123456789abcdefABCDEF'``." -msgstr "字串 ``’0123456789abcdefABCDEF’``。" +msgstr "字串 ``'0123456789abcdefABCDEF'``。" #: ../../library/string.rst:54 msgid "The string ``'01234567'``." @@ -83,7 +82,7 @@ msgid "" "String of ASCII characters which are considered punctuation characters in " "the ``C`` locale: ``!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~``." msgstr "" -"在 ``C`` 語言中被視為標點符號的 ASCII 字元的字串: ``!”#$%&’()*+,-./:;<=>?" +"在 ``C`` 語言中被視為標點符號的 ASCII 字元的字串:``!\"#$%&'()*+,-./:;<=>?" "@[\\]^_`{|}~``。" #: ../../library/string.rst:64 @@ -545,7 +544,7 @@ msgstr "" #: ../../library/string.rst:368 ../../library/string.rst:382 msgid "space" -msgstr "" +msgstr "空格" #: ../../library/string.rst:382 msgid "" @@ -579,16 +578,12 @@ msgid "" msgstr "" #: ../../library/string.rst:412 -#, fuzzy msgid "" "The ``','`` option signals the use of a comma for a thousands separator for " "floating-point presentation types and for integer presentation type ``'d'``. " "For other presentation types, this option is an error. For a locale aware " "separator, use the ``'n'`` integer presentation type instead." msgstr "" -"``'_'`` 選項表示對於浮點表示型別和整數表示型別 ``'d'`` 使用底線作為千位分隔符" -"號。對於整數表示型別 ``'b'``,``'o'``,``'x'`` 和 ``'X'``,每 4 位數字會插入" -"底線。對於其他表示型別,指定此選項會出錯。" #: ../../library/string.rst:418 msgid "Added the ``','`` option (see also :pep:`378`)." @@ -679,7 +674,7 @@ msgstr "None" #: ../../library/string.rst:464 msgid "The same as ``'s'``." -msgstr "" +msgstr "與 ``'s'`` 相同。" #: ../../library/string.rst:467 msgid "The available integer presentation types are:" @@ -754,7 +749,7 @@ msgstr "" #: ../../library/string.rst:493 msgid "The same as ``'d'``." -msgstr "" +msgstr "與 ``'d'`` 相同。" #: ../../library/string.rst:496 msgid "" @@ -973,6 +968,16 @@ msgid "" "repeated\n" "'abracadabra'" msgstr "" +">>> '{0}, {1}, {2}'.format('a', 'b', 'c')\n" +"'a, b, c'\n" +">>> '{}, {}, {}'.format('a', 'b', 'c') # 3.1+ only\n" +"'a, b, c'\n" +">>> '{2}, {1}, {0}'.format('a', 'b', 'c')\n" +"'c, b, a'\n" +">>> '{2}, {1}, {0}'.format(*'abc') # 解包引數序列\n" +"'c, b, a'\n" +">>> '{0}{1}{0}'.format('abra', 'cad') # 引數索引可以重複\n" +"'abracadabra'" #: ../../library/string.rst:637 msgid "Accessing arguments by name::" @@ -1019,6 +1024,9 @@ msgid "" ">>> 'X: {0[0]}; Y: {0[1]}'.format(coord)\n" "'X: 3; Y: 5'" msgstr "" +">>> coord = (3, 5)\n" +">>> 'X: {0[0]}; Y: {0[1]}'.format(coord)\n" +"'X: 3; Y: 5'" #: ../../library/string.rst:666 msgid "Replacing ``%s`` and ``%r``::" @@ -1064,6 +1072,13 @@ msgid "" "f}; {:f}'\n" "'3.140000; -3.140000'" msgstr "" +">>> '{:+f}; {:+f}'.format(3.14, -3.14) # 總會顯示\n" +"'+3.140000; -3.140000'\n" +">>> '{: f}; {: f}'.format(3.14, -3.14) # 若為正數則顯示空格\n" +"' 3.140000; -3.140000'\n" +">>> '{:-f}; {:-f}'.format(3.14, -3.14) # 只顯示負號 -- 與 '{:f}; {:f}' 相" +"同\n" +"'3.140000; -3.140000'" #: ../../library/string.rst:691 msgid "" diff --git a/tutorial/datastructures.po b/tutorial/datastructures.po index bd3df71158..d466df73d1 100644 --- a/tutorial/datastructures.po +++ b/tutorial/datastructures.po @@ -160,6 +160,27 @@ msgid "" ">>> fruits.pop()\n" "'pear'" msgstr "" +">>> fruits = ['orange', 'apple', 'pear', 'banana', 'kiwi', 'apple', " +"'banana']\n" +">>> fruits.count('apple')\n" +"2\n" +">>> fruits.count('tangerine')\n" +"0\n" +">>> fruits.index('banana')\n" +"3\n" +">>> fruits.index('banana', 4) # 從位置 4 開始找到下一個 banana\n" +"6\n" +">>> fruits.reverse()\n" +">>> fruits\n" +"['banana', 'apple', 'kiwi', 'banana', 'pear', 'apple', 'orange']\n" +">>> fruits.append('grape')\n" +">>> fruits\n" +"['banana', 'apple', 'kiwi', 'banana', 'pear', 'apple', 'orange', 'grape']\n" +">>> fruits.sort()\n" +">>> fruits\n" +"['apple', 'apple', 'banana', 'banana', 'grape', 'kiwi', 'orange', 'pear']\n" +">>> fruits.pop()\n" +"'pear'" #: ../../tutorial/datastructures.rst:122 msgid "" @@ -190,7 +211,6 @@ msgid "Using Lists as Stacks" msgstr "將 List 作為 Stack(堆疊)使用" #: ../../tutorial/datastructures.rst:143 -#, fuzzy msgid "" "The list methods make it very easy to use a list as a stack, where the last " "element added is the first element retrieved (\"last-in, first-out\"). To " @@ -200,8 +220,8 @@ msgid "" msgstr "" "List 的操作方法使得它非常簡單可以用來實作 stack(堆疊)。Stack 為一個遵守最後" "加入元素最先被取回(後進先出,\"last-in, first-out\")規則的資料結構。你可以" -"使用方法 :meth:`~list.append` 將一個項目放到堆疊的頂層。而使用方法 :meth:" -"`~list.pop` 且不給定索引值去取得堆疊最上面的項目。舉例而言: ::" +"使用方法 :meth:`!append` 將一個項目放到堆疊的頂層。而使用方法 :meth:`!pop` 且" +"不給定索引值去取得堆疊最上面的項目。舉例而言: ::" #: ../../tutorial/datastructures.rst:148 msgid "" @@ -275,6 +295,16 @@ msgid "" ">>> queue # Remaining queue in order of arrival\n" "deque(['Michael', 'Terry', 'Graham'])" msgstr "" +">>> from collections import deque\n" +">>> queue = deque([\"Eric\", \"John\", \"Michael\"])\n" +">>> queue.append(\"Terry\") # Terry 加進來\n" +">>> queue.append(\"Graham\") # Graham 加進來\n" +">>> queue.popleft() # 第一個加進來的現在離開\n" +"'Eric'\n" +">>> queue.popleft() # 第二個加進來的現在離開\n" +"'John'\n" +">>> queue # queue 裡剩下的會按照加進來的順序排列\n" +"deque(['Michael', 'Terry', 'Graham'])" #: ../../tutorial/datastructures.rst:196 msgid "List Comprehensions" @@ -529,6 +559,16 @@ msgid "" ">>> transposed\n" "[[1, 5, 9], [2, 6, 10], [3, 7, 11], [4, 8, 12]]" msgstr "" +">>> transposed = []\n" +">>> for i in range(4):\n" +"... # 下面這三行實作了巢狀的 listcomp\n" +"... transposed_row = []\n" +"... for row in matrix:\n" +"... transposed_row.append(row[i])\n" +"... transposed.append(transposed_row)\n" +"...\n" +">>> transposed\n" +"[[1, 5, 9], [2, 6, 10], [3, 7, 11], [4, 8, 12]]" #: ../../tutorial/datastructures.rst:329 msgid "" @@ -556,7 +596,6 @@ msgid "The :keyword:`!del` statement" msgstr ":keyword:`!del` 陳述式" #: ../../tutorial/datastructures.rst:342 -#, fuzzy msgid "" "There is a way to remove an item from a list given its index instead of its " "value: the :keyword:`del` statement. This differs from the :meth:`!pop` " @@ -565,9 +604,9 @@ msgid "" "earlier by assignment of an empty list to the slice). For example::" msgstr "" "有一個方法可以藉由索引而不是值來刪除 list 中的項目::keyword:`del` 陳述式。這" -"和 :meth:`~list.pop` method 傳回一個值不同,:keyword:`!del` 陳述式可以用來刪" -"除 list 中的片段或者清空整個 list(我們之前藉由指派一個空的 list 給想刪除的片" -"段來完成這件事)。例如: ::" +"和 :meth:`!pop` method 傳回一個值不同,:keyword:`!del` 陳述式可以用來刪除 " +"list 中的片段或者清空整個 list(我們之前藉由指派一個空的 list 給想刪除的片段" +"來完成這件事)。例如: ::" #: ../../tutorial/datastructures.rst:348 msgid "" @@ -652,6 +691,24 @@ msgid "" ">>> v\n" "([1, 2, 3], [3, 2, 1])" msgstr "" +">>> t = 12345, 54321, 'hello!'\n" +">>> t[0]\n" +"12345\n" +">>> t\n" +"(12345, 54321, 'hello!')\n" +">>> # Tuple 可以為巢狀的:\n" +">>> u = t, (1, 2, 3, 4, 5)\n" +">>> u\n" +"((12345, 54321, 'hello!'), (1, 2, 3, 4, 5))\n" +">>> # Tuple 為不可變的:\n" +">>> t[0] = 88888\n" +"Traceback (most recent call last):\n" +" File \"\", line 1, in \n" +"TypeError: 'tuple' object does not support item assignment\n" +">>> # but they can contain mutable objects:\n" +">>> v = ([1, 2, 3], [3, 2, 1])\n" +">>> v\n" +"([1, 2, 3], [3, 2, 1])" #: ../../tutorial/datastructures.rst:400 msgid "" @@ -708,6 +765,14 @@ msgid "" ">>> singleton\n" "('hello',)" msgstr "" +">>> empty = ()\n" +">>> singleton = 'hello', # <-- 注意後面有個逗號\n" +">>> len(empty)\n" +"0\n" +">>> len(singleton)\n" +"1\n" +">>> singleton\n" +"('hello',)" #: ../../tutorial/datastructures.rst:430 msgid "" @@ -815,7 +880,6 @@ msgid "Dictionaries" msgstr "字典(Dictionary)" #: ../../tutorial/datastructures.rst:495 -#, fuzzy msgid "" "Another useful data type built into Python is the *dictionary* (see :ref:" "`typesmapping`). Dictionaries are sometimes found in other languages as " @@ -835,8 +899,7 @@ msgstr "" "和數字都可以當作鍵。Tuple 也可以當作鍵,如果他們只含有字串、數字或 tuple;若" "一個 tuple 直接或間接地含有任何可變的物件,它就不能當作鍵。你無法使用 list 當" "作鍵,因為 list 可以經由索引指派 (index assignment)、切片指派 (slice " -"assignment) 或是像 :meth:`~list.append` 和 :meth:`~list.extend` 等 method 被" -"修改。" +"assignment) 或是像 :meth:`!append` 和 :meth:`!extend` 等 method 被修改。" #: ../../tutorial/datastructures.rst:506 msgid "" diff --git a/whatsnew/2.6.po b/whatsnew/2.6.po index c5606c2af5..a7e0c2a770 100644 --- a/whatsnew/2.6.po +++ b/whatsnew/2.6.po @@ -34,6 +34,8 @@ msgid "" "This article explains the new features in Python 2.6, released on October 1, " "2008. The release schedule is described in :pep:`361`." msgstr "" +"本文介紹了已於 2008 年 10 月 1 日發布的 Python 2.6 有哪些新功能。發布時間表請" +"見 :pep:`361`。" #: ../../whatsnew/2.6.rst:53 msgid "" @@ -199,7 +201,7 @@ msgstr "https://bugs.python.org" #: ../../whatsnew/2.6.rst:183 msgid "The Python bug tracker." -msgstr "" +msgstr "Python 問題追蹤系統。" #: ../../whatsnew/2.6.rst:185 msgid "https://bugs.jython.org:" @@ -207,7 +209,7 @@ msgstr "https://bugs.jython.org:" #: ../../whatsnew/2.6.rst:186 msgid "The Jython bug tracker." -msgstr "" +msgstr "Jython 問題追蹤系統。" #: ../../whatsnew/2.6.rst:188 msgid "https://roundup.sourceforge.io/" @@ -223,11 +225,11 @@ msgstr "https://svn.python.org/view/tracker/importer/" #: ../../whatsnew/2.6.rst:192 msgid "Martin von Löwis's conversion scripts." -msgstr "" +msgstr "Martin von Löwis 的轉換腳本。" #: ../../whatsnew/2.6.rst:195 msgid "New Documentation Format: reStructuredText Using Sphinx" -msgstr "" +msgstr "新文件格式:使用 Sphinx 的 reStructuredText" #: ../../whatsnew/2.6.rst:197 msgid "" @@ -276,31 +278,31 @@ msgstr "" #: ../../whatsnew/2.6.rst:233 msgid "`Documenting Python `__" -msgstr "" +msgstr "`Python 文件撰寫 `__" #: ../../whatsnew/2.6.rst:234 msgid "Describes how to write for Python's documentation." -msgstr "" +msgstr "說明如何為 Python 撰寫文件。" #: ../../whatsnew/2.6.rst:236 msgid "`Sphinx `__" -msgstr "" +msgstr "`Sphinx `__" #: ../../whatsnew/2.6.rst:237 msgid "Documentation and code for the Sphinx toolchain." -msgstr "" +msgstr "Sphinx 工具鏈的文件和程式碼。" #: ../../whatsnew/2.6.rst:239 msgid "`Docutils `__" -msgstr "" +msgstr "`Docutils `__" #: ../../whatsnew/2.6.rst:240 msgid "The underlying reStructuredText parser and toolset." -msgstr "" +msgstr "底層 reStructuredText 剖析器和工具集。" #: ../../whatsnew/2.6.rst:246 msgid "PEP 343: The 'with' statement" -msgstr "" +msgstr "PEP 343:'with' 陳述式" #: ../../whatsnew/2.6.rst:248 msgid "" @@ -333,6 +335,8 @@ msgid "" "with expression [as variable]:\n" " with-block" msgstr "" +"with expression [as variable]:\n" +" with-block" #: ../../whatsnew/2.6.rst:269 msgid "" @@ -370,6 +374,10 @@ msgid "" " print line\n" " ... more processing code ..." msgstr "" +"with open('/etc/passwd', 'r') as f:\n" +" for line in f:\n" +" print line\n" +" ... 更多處理程式碼 ..." #: ../../whatsnew/2.6.rst:290 msgid "" @@ -458,7 +466,7 @@ msgstr "" #: ../../whatsnew/2.6.rst:347 msgid "The code in *BLOCK* is executed." -msgstr "" +msgstr "*BLOCK* 中的程式碼會被執行。" #: ../../whatsnew/2.6.rst:349 msgid "" @@ -508,6 +516,11 @@ msgid "" " cursor.execute('delete from ...')\n" " # ... more operations ..." msgstr "" +"db_connection = DatabaseConnection()\n" +"with db_connection as cursor:\n" +" cursor.execute('insert into ...')\n" +" cursor.execute('delete from ...')\n" +" # ... 更多操作 ..." #: ../../whatsnew/2.6.rst:379 msgid "" @@ -625,6 +638,22 @@ msgid "" "with db_transaction(db) as cursor:\n" " ..." msgstr "" +"from contextlib import contextmanager\n" +"\n" +"@contextmanager\n" +"def db_transaction(connection):\n" +" cursor = connection.cursor()\n" +" try:\n" +" yield cursor\n" +" except:\n" +" connection.rollback()\n" +" raise\n" +" else:\n" +" connection.commit()\n" +"\n" +"db = DatabaseConnection()\n" +"with db_transaction(db) as cursor:\n" +" ..." #: ../../whatsnew/2.6.rst:463 msgid "" @@ -641,6 +670,9 @@ msgid "" "with nested (db_transaction(db), lock) as (cursor, locked):\n" " ..." msgstr "" +"lock = threading.Lock()\n" +"with nested (db_transaction(db), lock) as (cursor, locked):\n" +" ..." #: ../../whatsnew/2.6.rst:472 msgid "" @@ -658,10 +690,16 @@ msgid "" " for line in f:\n" " sys.stdout.write(line)" msgstr "" +"import urllib, sys\n" +"from contextlib import closing\n" +"\n" +"with closing(urllib.urlopen('http://www.yahoo.com')) as f:\n" +" for line in f:\n" +" sys.stdout.write(line)" #: ../../whatsnew/2.6.rst:486 msgid ":pep:`343` - The \"with\" statement" -msgstr "" +msgstr ":pep:`343` - \"with\" 陳述式" #: ../../whatsnew/2.6.rst:487 msgid "" @@ -721,11 +759,11 @@ msgstr "" #: ../../whatsnew/2.6.rst:530 msgid "Unix and Mac OS X: :file:`~/.local/`" -msgstr "" +msgstr "Unix 和 Mac OS X::file:`~/.local/`" #: ../../whatsnew/2.6.rst:531 msgid "Windows: :file:`%APPDATA%/Python`" -msgstr "" +msgstr "Windows::file:`%APPDATA%/Python`" #: ../../whatsnew/2.6.rst:533 msgid "" @@ -822,6 +860,35 @@ msgid "" " result = queue.get()\n" " print 'Factorial', N, '=', result" msgstr "" +"import time\n" +"from multiprocessing import Process, Queue\n" +"\n" +"\n" +"def factorial(queue, N):\n" +" \"計算階乘。\"\n" +" # 如果 N 是 4 的倍數,則此函式將花費更多時間。\n" +" if (N % 4) == 0:\n" +" time.sleep(.05 * N/4)\n" +"\n" +" # 計算結果\n" +" fact = 1L\n" +" for i in range(1, N+1):\n" +" fact = fact * i\n" +"\n" +" # 將結果放進佇列裡\n" +" queue.put(fact)\n" +"\n" +"if __name__ == '__main__':\n" +" queue = Queue()\n" +"\n" +" N = 5\n" +"\n" +" p = Process(target=factorial, args=(queue, N))\n" +" p.start()\n" +" p.join()\n" +"\n" +" result = queue.get()\n" +" print 'Factorial', N, '=', result" #: ../../whatsnew/2.6.rst:614 msgid "" @@ -856,6 +923,15 @@ msgid "" "for v in result:\n" " print v" msgstr "" +"from multiprocessing import Pool\n" +"\n" +"def factorial(N, dictionary):\n" +" \"計算階乘。\"\n" +" ...\n" +"p = Pool(5)\n" +"result = p.map(factorial, range(1, 1000, 10))\n" +"for v in result:\n" +" print v" #: ../../whatsnew/2.6.rst:640 msgid "This produces the following output::" @@ -870,6 +946,12 @@ msgid "" "33452526613163807108170062053440751665152000000000\n" "..." msgstr "" +"1\n" +"39916800\n" +"51090942171709440000\n" +"8222838654177922817725562880000000\n" +"33452526613163807108170062053440751665152000000000\n" +"..." #: ../../whatsnew/2.6.rst:649 msgid "" @@ -1014,6 +1096,16 @@ msgid "" ">>> 'Content-type: {0[.mp4]}'.format(mimetypes.types_map)\n" "'Content-type: video/mp4'" msgstr "" +">>> import sys\n" +">>> print 'Platform: {0.platform}\\nPython version: {0.version}'." +"format(sys)\n" +"Platform: darwin\n" +"Python version: 2.6a1+ (trunk:61261M, Mar 5 2008, 20:29:41)\n" +"[GCC 4.0.1 (Apple Computer, Inc. build 5367)]'\n" +"\n" +">>> import mimetypes\n" +">>> 'Content-type: {0[.mp4]}'.format(mimetypes.types_map)\n" +"'Content-type: video/mp4'" #: ../../whatsnew/2.6.rst:754 msgid "" @@ -1065,11 +1157,11 @@ msgstr "" #: ../../whatsnew/2.6.rst:787 msgid "Character" -msgstr "" +msgstr "字元" #: ../../whatsnew/2.6.rst:787 msgid "Effect" -msgstr "" +msgstr "效果" #: ../../whatsnew/2.6.rst:789 msgid "< (default)" @@ -1117,6 +1209,10 @@ msgid "" ">>> '{0:e}'.format(3.75)\n" "'3.750000e+00'" msgstr "" +">>> '{0:g}'.format(3.75)\n" +"'3.75'\n" +">>> '{0:e}'.format(3.75)\n" +"'3.750000e+00'" #: ../../whatsnew/2.6.rst:804 msgid "" @@ -1223,6 +1319,11 @@ msgid "" " else:\n" " return str(self)" msgstr "" +"def __format__(self, format_spec):\n" +" if isinstance(format_spec, unicode):\n" +" return unicode(str(self))\n" +" else:\n" +" return str(self)" #: ../../whatsnew/2.6.rst:836 msgid "" @@ -1235,6 +1336,8 @@ msgid "" ">>> format(75.6564, '.2f')\n" "'75.66'" msgstr "" +">>> format(75.6564, '.2f')\n" +"'75.66'" #: ../../whatsnew/2.6.rst:846 msgid ":ref:`formatstrings`" @@ -1274,6 +1377,8 @@ msgid "" ">>> from __future__ import print_function\n" ">>> print('# of entries', len(dictionary), file=sys.stderr)" msgstr "" +">>> from __future__ import print_function\n" +">>> print('# of entries', len(dictionary), file=sys.stderr)" #: ../../whatsnew/2.6.rst:869 msgid "The signature of the new function is::" @@ -1281,7 +1386,7 @@ msgstr "" #: ../../whatsnew/2.6.rst:871 msgid "def print(*args, sep=' ', end='\\n', file=None)" -msgstr "" +msgstr "def print(*args, sep=' ', end='\\n', file=None)" #: ../../whatsnew/2.6.rst:874 msgid "The parameters are:" @@ -1307,7 +1412,7 @@ msgstr "" #: ../../whatsnew/2.6.rst:884 msgid ":pep:`3105` - Make print a function" -msgstr "" +msgstr ":pep:`3105` - 將 print 變成函式" #: ../../whatsnew/2.6.rst:885 msgid "PEP written by Georg Brandl." @@ -1330,6 +1435,10 @@ msgid "" "except TypeError, ValueError: # Wrong!\n" " ..." msgstr "" +"try:\n" +" ...\n" +"except TypeError, ValueError: # 錯誤!\n" +" ..." #: ../../whatsnew/2.6.rst:902 msgid "" @@ -1347,6 +1456,10 @@ msgid "" "except (TypeError, ValueError):\n" " ..." msgstr "" +"try:\n" +" ...\n" +"except (TypeError, ValueError):\n" +" ..." #: ../../whatsnew/2.6.rst:914 msgid "" @@ -1369,6 +1482,10 @@ msgid "" "except TypeError as exc:\n" " ..." msgstr "" +"try:\n" +" ...\n" +"except TypeError as exc:\n" +" ..." #: ../../whatsnew/2.6.rst:927 msgid "" @@ -1435,6 +1552,12 @@ msgid "" "\n" "print len(s) # 12 Unicode characters" msgstr "" +"from __future__ import unicode_literals\n" +"\n" +"s = ('\\u751f\\u3080\\u304e\\u3000\\u751f\\u3054'\n" +" '\\u3081\\u3000\\u751f\\u305f\\u307e\\u3054')\n" +"\n" +"print len(s) # 12 個 Unicode 字元" #: ../../whatsnew/2.6.rst:977 msgid "" @@ -1465,6 +1588,16 @@ msgid "" ">>> unicode(str(b), 'utf-8')\n" "u'\\u31ef \\u3244'" msgstr "" +">>> bytearray([65, 66, 67])\n" +"bytearray(b'ABC')\n" +">>> b = bytearray(u'\\u21ef\\u3244', 'utf-8')\n" +">>> b\n" +"bytearray(b'\\xe2\\x87\\xaf\\xe3\\x89\\x84')\n" +">>> b[0] = '\\xe3'\n" +">>> b\n" +"bytearray(b'\\xe3\\x87\\xaf\\xe3\\x89\\x84')\n" +">>> unicode(str(b), 'utf-8')\n" +"u'\\u31ef \\u3244'" #: ../../whatsnew/2.6.rst:999 msgid "" @@ -1481,6 +1614,11 @@ msgid "" ">>> b\n" "bytearray(b'ABCde')" msgstr "" +">>> b = bytearray('ABC')\n" +">>> b.append('d')\n" +">>> b.append(ord('e'))\n" +">>> b\n" +"bytearray(b'ABCde')" #: ../../whatsnew/2.6.rst:1012 msgid "" @@ -1498,7 +1636,7 @@ msgstr "" #: ../../whatsnew/2.6.rst:1027 msgid "PEP 3116: New I/O Library" -msgstr "" +msgstr "PEP 3116:新 I/O 函式庫" #: ../../whatsnew/2.6.rst:1029 msgid "" @@ -1721,6 +1859,10 @@ msgid "" "class Storage(collections.MutableMapping):\n" " ..." msgstr "" +"import collections\n" +"\n" +"class Storage(collections.MutableMapping):\n" +" ..." #: ../../whatsnew/2.6.rst:1196 msgid "" @@ -1738,6 +1880,12 @@ msgid "" "\n" "collections.MutableMapping.register(Storage)" msgstr "" +"import collections\n" +"\n" +"class Storage:\n" +" ...\n" +"\n" +"collections.MutableMapping.register(Storage)" #: ../../whatsnew/2.6.rst:1207 msgid "" @@ -1755,6 +1903,10 @@ msgid "" "PrintableType.register(float)\n" "PrintableType.register(str)" msgstr "" +"# 註冊 Python 的型別\n" +"PrintableType.register(int)\n" +"PrintableType.register(float)\n" +"PrintableType.register(str)" #: ../../whatsnew/2.6.rst:1219 msgid "" @@ -1775,6 +1927,9 @@ msgid "" " if not isinstance(d, collections.MutableMapping):\n" " raise ValueError(\"Mapping object expected, not %r\" % d)" msgstr "" +"def func(d):\n" +" if not isinstance(d, collections.MutableMapping):\n" +" raise ValueError(\"Mapping object expected, not %r\" % d)" #: ../../whatsnew/2.6.rst:1230 msgid "" @@ -1811,6 +1966,22 @@ msgid "" " def draw(self, x, y, scale):\n" " ..." msgstr "" +"from abc import ABCMeta, abstractmethod\n" +"\n" +"class Drawable():\n" +" __metaclass__ = ABCMeta\n" +"\n" +" @abstractmethod\n" +" def draw(self, x, y, scale=1.0):\n" +" pass\n" +"\n" +" def draw_doubled(self, x, y):\n" +" self.draw(x, y, scale=2.0)\n" +"\n" +"\n" +"class Square(Drawable):\n" +" def draw(self, x, y, scale):\n" +" ..." #: ../../whatsnew/2.6.rst:1258 msgid "" @@ -1843,6 +2014,15 @@ msgid "" "draw\n" ">>>" msgstr "" +">>> class Circle(Drawable):\n" +"... pass\n" +"...\n" +">>> c = Circle()\n" +"Traceback (most recent call last):\n" +" File \"\", line 1, in \n" +"TypeError: Can't instantiate abstract class Circle with abstract methods " +"draw\n" +">>>" #: ../../whatsnew/2.6.rst:1281 msgid "" @@ -1859,6 +2039,12 @@ msgid "" "def readonly(self):\n" " return self._x" msgstr "" +"from abc import abstractproperty\n" +"...\n" +"\n" +"@abstractproperty\n" +"def readonly(self):\n" +" return self._x" #: ../../whatsnew/2.6.rst:1291 msgid "Subclasses must then define a :meth:`readonly` property." @@ -1898,6 +2084,10 @@ msgid "" ">>> 0b101111\n" "47" msgstr "" +">>> 0o21, 2*8 + 1\n" +"(17, 17)\n" +">>> 0b101111\n" +"47" #: ../../whatsnew/2.6.rst:1320 msgid "" @@ -1915,6 +2105,12 @@ msgid "" ">>> bin(173)\n" "'0b10101101'" msgstr "" +">>> oct(42)\n" +"'052'\n" +">>> future_builtins.oct(42)\n" +"'0o52'\n" +">>> bin(173)\n" +"'0b10101101'" #: ../../whatsnew/2.6.rst:1331 msgid "" @@ -1935,6 +2131,14 @@ msgid "" ">>> int('0b1101', 0)\n" "13" msgstr "" +">>> int ('0o52', 0)\n" +"42\n" +">>> int('1101', 2)\n" +"13\n" +">>> int('0b1101', 2)\n" +"13\n" +">>> int('0b1101', 0)\n" +"13" #: ../../whatsnew/2.6.rst:1348 msgid ":pep:`3127` - Integer Literal Support and Syntax" @@ -1961,10 +2165,14 @@ msgid "" "class A:\n" " pass" msgstr "" +"@foo\n" +"@bar\n" +"class A:\n" +" pass" #: ../../whatsnew/2.6.rst:1367 msgid "This is equivalent to::" -msgstr "" +msgstr "這等價於: ::" #: ../../whatsnew/2.6.rst:1369 msgid "" @@ -1973,6 +2181,10 @@ msgid "" "\n" "A = foo(bar(A))" msgstr "" +"class A:\n" +" pass\n" +"\n" +"A = foo(bar(A))" #: ../../whatsnew/2.6.rst:1376 msgid ":pep:`3129` - Class Decorators" @@ -2093,6 +2305,15 @@ msgid "" ">>> a/b\n" "Fraction(5, 3)" msgstr "" +">>> from fractions import Fraction\n" +">>> a = Fraction(2, 3)\n" +">>> b = Fraction(2, 5)\n" +">>> float(a), float(b)\n" +"(0.66666666666666663, 0.40000000000000002)\n" +">>> a+b\n" +"Fraction(16, 15)\n" +">>> a/b\n" +"Fraction(5, 3)" #: ../../whatsnew/2.6.rst:1455 msgid "" @@ -2110,6 +2331,12 @@ msgid "" ">>> (1./3) .as_integer_ratio()\n" "(6004799503160661L, 18014398509481984L)" msgstr "" +">>> (2.5) .as_integer_ratio()\n" +"(5, 2)\n" +">>> (3.1415) .as_integer_ratio()\n" +"(7074029114692207L, 2251799813685248L)\n" +">>> (1./3) .as_integer_ratio()\n" +"(6004799503160661L, 18014398509481984L)" #: ../../whatsnew/2.6.rst:1467 msgid "" @@ -2171,6 +2398,14 @@ msgid "" ">>> f(**ud)\n" "['a', 'b']" msgstr "" +">>> def f(**kw):\n" +"... print sorted(kw)\n" +"...\n" +">>> ud=UserDict.UserDict()\n" +">>> ud['a'] = 1\n" +">>> ud['b'] = 'string'\n" +">>> f(**ud)\n" +"['a', 'b']" #: ../../whatsnew/2.6.rst:1511 msgid "(Contributed by Alexander Belopolsky; :issue:`1686487`.)" @@ -2190,6 +2425,11 @@ msgid "" ">>> f(1,2,3, *(4,5,6), keyword=13)\n" "(1, 2, 3, 4, 5, 6) {'keyword': 13}" msgstr "" +">>> def f(*args, **kw):\n" +"... print args, kw\n" +"...\n" +">>> f(1,2,3, *(4,5,6), keyword=13)\n" +"(1, 2, 3, 4, 5, 6) {'keyword': 13}" #: ../../whatsnew/2.6.rst:1522 msgid "" @@ -2264,6 +2504,27 @@ msgid "" " def x(self, value):\n" " self._x = value / 2" msgstr "" +"class C(object):\n" +" @property\n" +" def x(self):\n" +" return self._x\n" +"\n" +" @x.setter\n" +" def x(self, value):\n" +" self._x = value\n" +"\n" +" @x.deleter\n" +" def x(self):\n" +" del self._x\n" +"\n" +"class D(C):\n" +" @C.x.getter\n" +" def x(self):\n" +" return self._x * 2\n" +"\n" +" @x.setter\n" +" def x(self, value):\n" +" self._x = value / 2" #: ../../whatsnew/2.6.rst:1576 msgid "" @@ -2323,6 +2584,14 @@ msgid "" ">>> b.hex()\n" "'0x1.5555555555555p-2'" msgstr "" +">>> a = 3.75\n" +">>> a.hex()\n" +"'0x1.e000000000000p+1'\n" +">>> float.fromhex('0x1.e000000000000p+1')\n" +"3.75\n" +">>> b=1./3\n" +">>> b.hex()\n" +"'0x1.5555555555555p-2'" #: ../../whatsnew/2.6.rst:1619 msgid "" @@ -2701,6 +2970,16 @@ msgid "" ">>> dq\n" "deque([2, 3, 4], maxlen=3)" msgstr "" +">>> from collections import deque\n" +">>> dq=deque(maxlen=3)\n" +">>> dq\n" +"deque([], maxlen=3)\n" +">>> dq.append(1); dq.append(2); dq.append(3)\n" +">>> dq\n" +"deque([1, 2, 3], maxlen=3)\n" +">>> dq.append(4)\n" +">>> dq\n" +"deque([2, 3, 4], maxlen=3)" #: ../../whatsnew/2.6.rst:1898 msgid "" @@ -2758,6 +3037,12 @@ msgid "" ">>> Decimal(1000).log10()\n" "Decimal(\"3\")" msgstr "" +">>> Decimal(1).exp()\n" +"Decimal(\"2.718281828459045235360287471\")\n" +">>> Decimal(\"2.7182818\").ln()\n" +"Decimal(\"0.9999999895305022877376682436\")\n" +">>> Decimal(1000).log10()\n" +"Decimal(\"3\")" #: ../../whatsnew/2.6.rst:1935 msgid "" @@ -2826,6 +3111,8 @@ msgid "" ">>> list(heapq.merge([1, 3, 5, 9], [2, 8, 16]))\n" "[1, 2, 3, 5, 8, 9, 16]" msgstr "" +">>> list(heapq.merge([1, 3, 5, 9], [2, 8, 16]))\n" +"[1, 2, 3, 5, 8, 9, 16]" #: ../../whatsnew/2.6.rst:1978 msgid "" @@ -2880,6 +3167,8 @@ msgid "" ">>> tuple(itertools.izip_longest([1,2,3], [1,2,3,4,5]))\n" "((1, 1), (2, 2), (3, 3), (None, 4), (None, 5))" msgstr "" +">>> tuple(itertools.izip_longest([1,2,3], [1,2,3,4,5]))\n" +"((1, 1), (2, 2), (3, 3), (None, 4), (None, 5))" #: ../../whatsnew/2.6.rst:2013 msgid "" @@ -2895,6 +3184,10 @@ msgid "" " (2, 4), (2, 5), (2, 6),\n" " (3, 4), (3, 5), (3, 6)]" msgstr "" +">>> list(itertools.product([1,2,3], [4,5,6]))\n" +"[(1, 4), (1, 5), (1, 6),\n" +" (2, 4), (2, 5), (2, 6),\n" +" (3, 4), (3, 5), (3, 6)]" #: ../../whatsnew/2.6.rst:2022 msgid "" @@ -2909,6 +3202,9 @@ msgid "" "[(1, 1, 1), (1, 1, 2), (1, 2, 1), (1, 2, 2),\n" " (2, 1, 1), (2, 1, 2), (2, 2, 1), (2, 2, 2)]" msgstr "" +">>> list(itertools.product([1,2], repeat=3))\n" +"[(1, 1, 1), (1, 1, 2), (1, 2, 1), (1, 2, 2),\n" +" (2, 1, 1), (2, 1, 2), (2, 2, 1), (2, 2, 2)]" #: ../../whatsnew/2.6.rst:2031 msgid "With two iterables, *2N*-tuples are returned. ::" @@ -2922,6 +3218,11 @@ msgid "" " (2, 3, 1, 3), (2, 3, 1, 4), (2, 3, 2, 3), (2, 3, 2, 4),\n" " (2, 4, 1, 3), (2, 4, 1, 4), (2, 4, 2, 3), (2, 4, 2, 4)]" msgstr "" +">>> list(itertools.product([1,2], [3,4], repeat=2))\n" +"[(1, 3, 1, 3), (1, 3, 1, 4), (1, 3, 2, 3), (1, 3, 2, 4),\n" +" (1, 4, 1, 3), (1, 4, 1, 4), (1, 4, 2, 3), (1, 4, 2, 4),\n" +" (2, 3, 1, 3), (2, 3, 1, 4), (2, 3, 2, 3), (2, 3, 2, 4),\n" +" (2, 4, 1, 3), (2, 4, 1, 4), (2, 4, 2, 3), (2, 4, 2, 4)]" #: ../../whatsnew/2.6.rst:2039 msgid "" @@ -2939,6 +3240,13 @@ msgid "" "[('1', '2', '3'), ('1', '2', '4'),\n" " ('1', '3', '4'), ('2', '3', '4')]" msgstr "" +">>> list(itertools.combinations('123', 2))\n" +"[('1', '2'), ('1', '3'), ('2', '3')]\n" +">>> list(itertools.combinations('123', 3))\n" +"[('1', '2', '3')]\n" +">>> list(itertools.combinations('1234', 3))\n" +"[('1', '2', '3'), ('1', '2', '4'),\n" +" ('1', '3', '4'), ('2', '3', '4')]" #: ../../whatsnew/2.6.rst:2050 msgid "" @@ -2955,6 +3263,11 @@ msgid "" " (3, 1), (3, 2), (3, 4),\n" " (4, 1), (4, 2), (4, 3)]" msgstr "" +">>> list(itertools.permutations([1,2,3,4], 2))\n" +"[(1, 2), (1, 3), (1, 4),\n" +" (2, 1), (2, 3), (2, 4),\n" +" (3, 1), (3, 2), (3, 4),\n" +" (4, 1), (4, 2), (4, 3)]" #: ../../whatsnew/2.6.rst:2060 msgid "" @@ -2970,6 +3283,8 @@ msgid "" ">>> list(itertools.chain.from_iterable([[1,2,3], [4,5,6]]))\n" "[1, 2, 3, 4, 5, 6]" msgstr "" +">>> list(itertools.chain.from_iterable([[1,2,3], [4,5,6]]))\n" +"[1, 2, 3, 4, 5, 6]" #: ../../whatsnew/2.6.rst:2070 msgid "(All contributed by Raymond Hettinger.)" @@ -3103,6 +3418,12 @@ msgid "" ">>> inst_name(help)\n" "'_Helper'" msgstr "" +">>> inst_name = operator.attrgetter(\n" +"... '__class__.__name__')\n" +">>> inst_name('')\n" +"'str'\n" +">>> inst_name(help)\n" +"'_Helper'" #: ../../whatsnew/2.6.rst:2157 msgid "(Contributed by Georg Brandl, after a suggestion by Barry Warsaw.)" @@ -3217,6 +3538,16 @@ msgid "" " +-- StandardError\n" " ..." msgstr "" +">>> import pkgutil\n" +">>> print pkgutil.get_data('test', 'exception_hierarchy.txt')\n" +"BaseException\n" +" +-- SystemExit\n" +" +-- KeyboardInterrupt\n" +" +-- GeneratorExit\n" +" +-- Exception\n" +" +-- StopIteration\n" +" +-- StandardError\n" +" ..." #: ../../whatsnew/2.6.rst:2236 msgid "(Contributed by Paul Moore; :issue:`2439`.)" @@ -3320,6 +3651,8 @@ msgid "" "shutil.copytree('Doc/library', '/tmp/library',\n" " ignore=shutil.ignore_patterns('*~', '.svn'))" msgstr "" +"shutil.copytree('Doc/library', '/tmp/library',\n" +" ignore=shutil.ignore_patterns('*~', '.svn'))" #: ../../whatsnew/2.6.rst:2310 msgid "(Contributed by Tarek Ziadé; :issue:`2663`.)" @@ -3504,6 +3837,8 @@ msgid "" "tar = tarfile.open(\"output.tar\", \"w\",\n" " format=tarfile.PAX_FORMAT)" msgstr "" +"tar = tarfile.open(\"output.tar\", \"w\",\n" +" format=tarfile.PAX_FORMAT)" #: ../../whatsnew/2.6.rst:2444 msgid "" @@ -3583,6 +3918,10 @@ msgid "" " f = urllib.urlopen('https://sf.net')\n" " ..." msgstr "" +"with test_support.TransientResource(IOError,\n" +" errno=errno.ETIMEDOUT):\n" +" f = urllib.urlopen('https://sf.net')\n" +" ..." #: ../../whatsnew/2.6.rst:2498 msgid "" @@ -3735,6 +4074,12 @@ msgid "" "urllib2.URLError: \n" ">>>" msgstr "" +">>> u = urllib2.urlopen(\"http://slow.example.com\",\n" +" timeout=3)\n" +"Traceback (most recent call last):\n" +" ...\n" +"urllib2.URLError: \n" +">>>" #: ../../whatsnew/2.6.rst:2592 msgid "(Added by Facundo Batista.)" @@ -3864,6 +4209,15 @@ msgid "" "\"\"\")\n" "print ast.dump(t)" msgstr "" +"import ast\n" +"\n" +"t = ast.parse(\"\"\"\n" +"d = {}\n" +"for i in 'abcdefghijklm':\n" +" d[i + i] = ord(i) - ord('a') + 1\n" +"print d\n" +"\"\"\")\n" +"print ast.dump(t)" #: ../../whatsnew/2.6.rst:2685 msgid "This outputs a deeply nested tree::" @@ -3902,6 +4256,36 @@ msgid "" " ], nl=True)\n" " ])" msgstr "" +"Module(body=[\n" +" Assign(targets=[\n" +" Name(id='d', ctx=Store())\n" +" ], value=Dict(keys=[], values=[]))\n" +" For(target=Name(id='i', ctx=Store()),\n" +" iter=Str(s='abcdefghijklm'), body=[\n" +" Assign(targets=[\n" +" Subscript(value=\n" +" Name(id='d', ctx=Load()),\n" +" slice=\n" +" Index(value=\n" +" BinOp(left=Name(id='i', ctx=Load()), op=Add(),\n" +" right=Name(id='i', ctx=Load()))), ctx=Store())\n" +" ], value=\n" +" BinOp(left=\n" +" BinOp(left=\n" +" Call(func=\n" +" Name(id='ord', ctx=Load()), args=[\n" +" Name(id='i', ctx=Load())\n" +" ], keywords=[], starargs=None, kwargs=None),\n" +" op=Sub(), right=Call(func=\n" +" Name(id='ord', ctx=Load()), args=[\n" +" Str(s='a')\n" +" ], keywords=[], starargs=None, kwargs=None)),\n" +" op=Add(), right=Num(n=1)))\n" +" ], orelse=[])\n" +" Print(dest=None, values=[\n" +" Name(id='d', ctx=Load())\n" +" ], nl=True)\n" +" ])" #: ../../whatsnew/2.6.rst:2718 msgid "" @@ -3923,6 +4307,13 @@ msgid "" " ...\n" "ValueError: malformed string" msgstr "" +">>> literal = '(\"a\", \"b\", {2:4, 3:8, 1:2})'\n" +">>> print ast.literal_eval(literal)\n" +"('a', 'b', {1: 2, 2: 4, 3: 8})\n" +">>> print ast.literal_eval('\"a\" + \"b\"')\n" +"Traceback (most recent call last):\n" +" ...\n" +"ValueError: malformed string" #: ../../whatsnew/2.6.rst:2734 msgid "" diff --git a/whatsnew/2.7.po b/whatsnew/2.7.po index 8eaa5f46cd..969d821d8b 100644 --- a/whatsnew/2.7.po +++ b/whatsnew/2.7.po @@ -307,6 +307,12 @@ msgid "" ">>> d.items()\n" "[('first', 1), ('second', 2), ('third', 3)]" msgstr "" +">>> from collections import OrderedDict\n" +">>> d = OrderedDict([('first', 1),\n" +"... ('second', 2),\n" +"... ('third', 3)])\n" +">>> d.items()\n" +"[('first', 1), ('second', 2), ('third', 3)]" #: ../../whatsnew/2.7.rst:233 msgid "" @@ -320,6 +326,9 @@ msgid "" ">>> d.items()\n" "[('first', 1), ('second', 4), ('third', 3)]" msgstr "" +">>> d['second'] = 4\n" +">>> d.items()\n" +"[('first', 1), ('second', 4), ('third', 3)]" #: ../../whatsnew/2.7.rst:240 msgid "Deleting an entry and reinserting it will move it to the end::" @@ -332,6 +341,10 @@ msgid "" ">>> d.items()\n" "[('first', 1), ('third', 3), ('second', 5)]" msgstr "" +">>> del d['second']\n" +">>> d['second'] = 5\n" +">>> d.items()\n" +"[('first', 1), ('third', 3), ('second', 5)]" #: ../../whatsnew/2.7.rst:247 msgid "" @@ -353,6 +366,15 @@ msgid "" ">>> od.popitem(last=False)\n" "(1, 0)" msgstr "" +">>> od = OrderedDict([(x,0) for x in range(20)])\n" +">>> od.popitem()\n" +"(19, 0)\n" +">>> od.popitem()\n" +"(18, 0)\n" +">>> od.popitem(last=False)\n" +"(0, 0)\n" +">>> od.popitem(last=False)\n" +"(1, 0)" #: ../../whatsnew/2.7.rst:262 msgid "" @@ -375,6 +397,18 @@ msgid "" ">>> od1 == od2\n" "True" msgstr "" +">>> od1 = OrderedDict([('first', 1),\n" +"... ('second', 2),\n" +"... ('third', 3)])\n" +">>> od2 = OrderedDict([('third', 3),\n" +"... ('first', 1),\n" +"... ('second', 2)])\n" +">>> od1 == od2\n" +"False\n" +">>> # Move 'third' key to the end\n" +">>> del od2['third']; od2['third'] = 3\n" +">>> od1 == od2\n" +"True" #: ../../whatsnew/2.7.rst:278 msgid "" @@ -461,6 +495,8 @@ msgid "" ">>> '{:20,.2f}'.format(18446744073709551616.0)\n" "'18,446,744,073,709,551,616.00'" msgstr "" +">>> '{:20,.2f}'.format(18446744073709551616.0)\n" +"'18,446,744,073,709,551,616.00'" #: ../../whatsnew/2.7.rst:333 msgid "When formatting an integer, include the comma after the width:" @@ -563,6 +599,20 @@ msgid "" " -o FILE direct output to FILE instead of stdout\n" " -C NUM display NUM lines of added context" msgstr "" +"-> ./python.exe argparse-example.py --help\n" +"usage: argparse-example.py [-h] [-v] [-o FILE] [-C NUM] [inputs " +"[inputs ...]]\n" +"\n" +"Command-line example.\n" +"\n" +"positional arguments:\n" +" inputs input filenames (default is stdin)\n" +"\n" +"optional arguments:\n" +" -h, --help show this help message and exit\n" +" -v produce verbose output\n" +" -o FILE direct output to FILE instead of stdout\n" +" -C NUM display NUM lines of added context" #: ../../whatsnew/2.7.rst:410 msgid "" @@ -584,6 +634,17 @@ msgid "" " 'context': 4,\n" " 'inputs': ['file1', 'file2']}" msgstr "" +"-> ./python.exe argparse-example.py -v\n" +"{'output': None,\n" +" 'is_verbose': True,\n" +" 'context': 0,\n" +" 'inputs': []}\n" +"\n" +"-> ./python.exe argparse-example.py -v -o /tmp/output -C 4 file1 file2\n" +"{'output': '/tmp/output',\n" +" 'is_verbose': True,\n" +" 'context': 4,\n" +" 'inputs': ['file1', 'file2']}" #: ../../whatsnew/2.7.rst:425 msgid "" @@ -773,6 +834,11 @@ msgid "" ">>> d.viewkeys()\n" "dict_keys([0, 130, 10, 140, 20, 150, 30, ..., 250])" msgstr "" +">>> d = dict((i*10, chr(65+i)) for i in range(26))\n" +">>> d\n" +"{0: 'A', 130: 'N', 10: 'B', 140: 'O', 20: ..., 250: 'Z'}\n" +">>> d.viewkeys()\n" +"dict_keys([0, 130, 10, 140, 20, 150, 30, ..., 250])" #: ../../whatsnew/2.7.rst:568 msgid "" @@ -789,6 +855,12 @@ msgid "" ">>> d1.viewkeys() | range(0, 30)\n" "set([0, 1, 130, 3, 4, 5, 6, ..., 120, 250])" msgstr "" +">>> d1 = dict((i*10, chr(65+i)) for i in range(26))\n" +">>> d2 = dict((i**.5, i) for i in range(1000))\n" +">>> d1.viewkeys() & d2.viewkeys()\n" +"set([0.0, 10.0, 20.0, 30.0])\n" +">>> d1.viewkeys() | range(0, 30)\n" +"set([0, 1, 130, 3, 4, 5, 6, ..., 120, 250])" #: ../../whatsnew/2.7.rst:579 msgid "" @@ -805,6 +877,12 @@ msgid "" ">>> vk\n" "dict_keys([0, 130, 260, 10, ..., 250])" msgstr "" +">>> vk = d.viewkeys()\n" +">>> vk\n" +"dict_keys([0, 130, 10, ..., 250])\n" +">>> d[260] = '&'\n" +">>> vk\n" +"dict_keys([0, 130, 260, 10, ..., 250])" #: ../../whatsnew/2.7.rst:589 msgid "" @@ -821,6 +899,12 @@ msgid "" " File \"\", line 1, in \n" "RuntimeError: dictionary changed size during iteration" msgstr "" +">>> for k in vk:\n" +"... d[k*2] = k\n" +"...\n" +"Traceback (most recent call last):\n" +" File \"\", line 1, in \n" +"RuntimeError: dictionary changed size during iteration" #: ../../whatsnew/2.7.rst:599 msgid "" @@ -878,6 +962,11 @@ msgid "" "[97, 98, 99, 100, 101, 102, 103, ... 121, 122]\n" ">>>" msgstr "" +">>> m2.tobytes()\n" +"'abcdefghijklmnopqrstuvwxyz'\n" +">>> m2.tolist()\n" +"[97, 98, 99, 100, 101, 102, 103, ... 121, 122]\n" +">>>" #: ../../whatsnew/2.7.rst:643 msgid "" @@ -956,6 +1045,10 @@ msgid "" ">>> {('a'*x) for x in range(6)}\n" "set(['', 'a', 'aa', 'aaa', 'aaaa', 'aaaaa'])" msgstr "" +">>> {x: x*x for x in range(6)}\n" +"{0: 0, 1: 1, 2: 4, 3: 9, 4: 16, 5: 25}\n" +">>> {('a'*x) for x in range(6)}\n" +"set(['', 'a', 'aa', 'aaa', 'aaaa', 'aaaaa'])" #: ../../whatsnew/2.7.rst:707 msgid "Backported by Alexandre Vassalotti; :issue:`2333`." @@ -976,7 +1069,7 @@ msgstr "" #: ../../whatsnew/2.7.rst:717 msgid "is equivalent to::" -msgstr "" +msgstr "等價於: ::" #: ../../whatsnew/2.7.rst:719 msgid "" @@ -996,6 +1089,7 @@ msgid "" "(Proposed in https://codereview.appspot.com/53094; implemented by Georg " "Brandl.)" msgstr "" +"(於 https://codereview.appspot.com/53094 提出;由 Georg Brandl 實作。)" #: ../../whatsnew/2.7.rst:729 msgid "" @@ -1050,6 +1144,11 @@ msgid "" ">>> n - long(float(n))\n" "65535L" msgstr "" +">>> n = 295147905179352891391\n" +">>> float(n)\n" +"2.9514790517935283e+20\n" +">>> n - long(float(n))\n" +"65535L" #: ../../whatsnew/2.7.rst:773 msgid "" @@ -1065,6 +1164,11 @@ msgid "" ">>> n - long(float(n))\n" "-1L" msgstr "" +">>> n = 295147905179352891391\n" +">>> float(n)\n" +"2.9514790517935289e+20\n" +">>> n - long(float(n))\n" +"-1L" #: ../../whatsnew/2.7.rst:782 msgid "(Implemented by Mark Dickinson; :issue:`3166`.)" @@ -1097,6 +1201,10 @@ msgid "" ">>> '{}:{}:{day}'.format(2009, 4, day='Sunday')\n" "'2009:4:Sunday'" msgstr "" +">>> '{}:{}:{}'.format(2009, 04, 'Sunday')\n" +"'2009:4:Sunday'\n" +">>> '{}:{}:{day}'.format(2009, 4, day='Sunday')\n" +"'2009:4:Sunday'" #: ../../whatsnew/2.7.rst:800 msgid "" @@ -1155,6 +1263,16 @@ msgid "" ">>> (n+1).bit_length()\n" "124" msgstr "" +">>> n = 37\n" +">>> bin(n)\n" +"'0b100101'\n" +">>> n.bit_length()\n" +"6\n" +">>> n = 2**123-1\n" +">>> n.bit_length()\n" +"123\n" +">>> (n+1).bit_length()\n" +"124" #: ../../whatsnew/2.7.rst:843 msgid "(Contributed by Fredrik Johansson and Victor Stinner; :issue:`3439`.)" @@ -1268,7 +1386,7 @@ msgstr "" #: ../../whatsnew/2.7.rst:924 msgid "export PYTHONWARNINGS=all,error:::Cookie:0" -msgstr "" +msgstr "export PYTHONWARNINGS=all,error:::Cookie:0" #: ../../whatsnew/2.7.rst:930 msgid "Optimizations" @@ -1336,6 +1454,9 @@ msgid "" ">>> sys.long_info\n" "sys.long_info(bits_per_digit=30, sizeof_digit=4)" msgstr "" +">>> import sys\n" +">>> sys.long_info\n" +"sys.long_info(bits_per_digit=30, sizeof_digit=4)" #: ../../whatsnew/2.7.rst:978 msgid "(Contributed by Mark Dickinson; :issue:`4258`.)" @@ -1474,6 +1595,19 @@ msgid "" ">>> c['z']\n" "0" msgstr "" +">>> from collections import Counter\n" +">>> c = Counter()\n" +">>> for letter in 'here is a sample of english text':\n" +"... c[letter] += 1\n" +"...\n" +">>> c \n" +"Counter({' ': 6, 'e': 5, 's': 3, 'a': 2, 'i': 2, 'h': 2,\n" +"'l': 2, 't': 2, 'g': 1, 'f': 1, 'm': 1, 'o': 1, 'n': 1,\n" +"'p': 1, 'r': 1, 'x': 1})\n" +">>> c['e']\n" +"5\n" +">>> c['z']\n" +"0" #: ../../whatsnew/2.7.rst:1081 msgid "" @@ -1504,7 +1638,7 @@ msgstr "" #: ../../whatsnew/2.7.rst:1104 msgid "Contributed by Raymond Hettinger; :issue:`1696199`." -msgstr "" +msgstr "由 Raymond Hettinger 貢獻;:issue:`1696199`。" #: ../../whatsnew/2.7.rst:1108 msgid "" @@ -1840,7 +1974,7 @@ msgstr "" #: ../../whatsnew/2.7.rst:1346 msgid "Contributed by George Sakkis; :issue:`3135`." -msgstr "" +msgstr "由 George Sakkis 貢獻;:issue:`3135`。" #: ../../whatsnew/2.7.rst:1348 msgid "" @@ -2846,14 +2980,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 @@ -3379,7 +3513,7 @@ msgstr "" #: ../../whatsnew/2.7.rst:2439 msgid "Porting to Python 2.7" -msgstr "" +msgstr "移植至 Python 2.7" #: ../../whatsnew/2.7.rst:2441 msgid "" diff --git a/whatsnew/3.0.po b/whatsnew/3.0.po index cd241ff1fb..77d4d2f766 100644 --- a/whatsnew/3.0.po +++ b/whatsnew/3.0.po @@ -1,4 +1,4 @@ -# Copyright (C) 2001-2022, Python Software Foundation +# Copyright (C) 2001-2024, Python Software Foundation # This file is distributed under the same license as the Python package. # # Translators: @@ -72,7 +72,7 @@ msgstr "" #: ../../whatsnew/3.0.rst:95 msgid "Print Is A Function" -msgstr "" +msgstr "Print 是一個函式" #: ../../whatsnew/3.0.rst:97 msgid "" @@ -80,6 +80,8 @@ msgid "" "with keyword arguments to replace most of the special syntax of the old " "``print`` statement (:pep:`3105`). Examples::" msgstr "" +"``print`` 陳述式已經被 :func:`print` 函式所取代,且舊 ``print`` 陳述式的大部" +"分特殊語法也被關鍵字引數所取代 (:pep:`3105`)。範例如下: ::" #: ../../whatsnew/3.0.rst:101 msgid "" @@ -146,7 +148,7 @@ msgstr "" #: ../../whatsnew/3.0.rst:145 msgid "Some well-known APIs no longer return lists:" -msgstr "" +msgstr "一些眾所周知的 API 不再回傳串列:" #: ../../whatsnew/3.0.rst:147 msgid "" @@ -191,7 +193,7 @@ msgstr "" #: ../../whatsnew/3.0.rst:177 msgid ":func:`zip` now returns an iterator." -msgstr "" +msgstr ":func:`zip` 現在會回傳一個疊代器。" #: ../../whatsnew/3.0.rst:180 msgid "Ordering Comparisons" @@ -438,7 +440,7 @@ msgstr "" #: ../../whatsnew/3.0.rst:354 msgid "New Syntax" -msgstr "" +msgstr "新增語法" #: ../../whatsnew/3.0.rst:356 msgid "" @@ -484,11 +486,12 @@ msgstr "" #: ../../whatsnew/3.0.rst:383 msgid "(a, *rest, b) = range(5)" -msgstr "" +msgstr "(a, *rest, b) = range(5)" #: ../../whatsnew/3.0.rst:385 msgid "This sets *a* to ``0``, *b* to ``4``, and *rest* to ``[1, 2, 3]``." msgstr "" +"這會將 *a* 設為 ``0``、將 *b* 設為 ``4``,並將 *rest* 設為 ``[1, 2, 3]``。" #: ../../whatsnew/3.0.rst:387 msgid "" @@ -560,16 +563,21 @@ msgid "" " __metaclass__ = M\n" " ..." msgstr "" +"class C:\n" +" __metaclass__ = M\n" +" ..." #: ../../whatsnew/3.0.rst:426 msgid "you must now use::" -msgstr "" +msgstr "現在必須使用: ::" #: ../../whatsnew/3.0.rst:428 msgid "" "class C(metaclass=M):\n" " ..." msgstr "" +"class C(metaclass=M):\n" +" ..." #: ../../whatsnew/3.0.rst:431 msgid "" @@ -608,11 +616,11 @@ msgstr "" #: ../../whatsnew/3.0.rst:456 msgid "Removed backticks (use :func:`repr` instead)." -msgstr "" +msgstr "移除反引號(請改用 :func:`repr`)。" #: ../../whatsnew/3.0.rst:458 msgid "Removed ``<>`` (use ``!=`` instead)." -msgstr "移除 ``<>``\\ (請改用 ``!=``\\ )。" +msgstr "移除 ``<>``\\ (請改用 ``!=``)。" #: ../../whatsnew/3.0.rst:460 msgid "" @@ -955,11 +963,12 @@ msgid "" msgstr "" #: ../../whatsnew/3.0.rst:642 -#, fuzzy msgid "" "Cleanup of the :mod:`operator` module: removed :func:`!sequenceIncludes` " "and :func:`!isCallable`." -msgstr "清理 :mod:`random` 模組:移除 :func:`jumpahead` API。" +msgstr "" +"清理 :mod:`operator` 模組:移除 :func:`!sequenceIncludes` 和 :func:`!" +"isCallable`。" #: ../../whatsnew/3.0.rst:645 msgid "" @@ -969,10 +978,9 @@ msgid "" msgstr "" #: ../../whatsnew/3.0.rst:649 -#, fuzzy msgid "" "Cleanup of the :mod:`random` module: removed the :func:`!jumpahead` API." -msgstr "清理 :mod:`random` 模組:移除 :func:`jumpahead` API。" +msgstr "清理 :mod:`random` 模組:移除 :func:`!jumpahead` API。" #: ../../whatsnew/3.0.rst:651 msgid "The :mod:`!new` module is gone." @@ -1049,9 +1057,8 @@ msgid "" msgstr "" #: ../../whatsnew/3.0.rst:705 -#, fuzzy msgid ":exc:`!StandardError` was removed." -msgstr ":exc:`StandardError` 被移除。" +msgstr ":exc:`!StandardError` 已被移除。" #: ../../whatsnew/3.0.rst:707 msgid "" @@ -1162,9 +1169,8 @@ msgid "" msgstr "" #: ../../whatsnew/3.0.rst:781 -#, fuzzy msgid "Removed support for :attr:`!__members__` and :attr:`!__methods__`." -msgstr "移除對 :attr:`__members__` 和 :attr:`__methods__` 的支援。" +msgstr "移除對 :attr:`!__members__` 和 :attr:`!__methods__` 的支援。" #: ../../whatsnew/3.0.rst:783 msgid "" @@ -1226,12 +1232,9 @@ msgid "Moved :func:`!intern` to :func:`sys.intern`." msgstr "" #: ../../whatsnew/3.0.rst:825 -#, fuzzy msgid "" "Removed: :func:`!apply`. Instead of ``apply(f, args)`` use ``f(*args)``." -msgstr "" -"移除 :func:`execfile`。請使用 ``exec(open(fn).read())`` 來替換 " -"``execfile(fn)``。" +msgstr "移除 :func:`!apply`。請使用 ``f(*args)`` 來替換 ``apply(f, args)``。" #: ../../whatsnew/3.0.rst:828 msgid "" @@ -1247,12 +1250,11 @@ msgid "" msgstr "" #: ../../whatsnew/3.0.rst:835 -#, fuzzy msgid "" "Removed :func:`!execfile`. Instead of ``execfile(fn)`` use ``exec(open(fn)." "read())``." msgstr "" -"移除 :func:`execfile`。請使用 ``exec(open(fn).read())`` 來替換 " +"移除 :func:`!execfile`。請使用 ``exec(open(fn).read())`` 來替換 " "``execfile(fn)``。" #: ../../whatsnew/3.0.rst:838 @@ -1270,7 +1272,7 @@ msgstr "" #: ../../whatsnew/3.0.rst:845 msgid "Removed :func:`!reload`. Use :func:`!imp.reload`." -msgstr "" +msgstr "移除 :func:`!reload`。請使用 :func:`!imp.reload`。" #: ../../whatsnew/3.0.rst:847 msgid "" diff --git a/whatsnew/3.12.po b/whatsnew/3.12.po index b0f93a3c71..3202bc30a7 100644 --- a/whatsnew/3.12.po +++ b/whatsnew/3.12.po @@ -3991,7 +3991,7 @@ msgstr "(由 Zhang Na 於 :gh:`90656` 中貢獻。)" #: ../../whatsnew/3.12.rst:1819 msgid "``PYTHON_FOR_REGEN`` now require Python 3.10 or newer." -msgstr "" +msgstr "``PYTHON_FOR_REGEN`` 現在需要 Python 3.10 或更新的版本。" #: ../../whatsnew/3.12.rst:1821 msgid "" diff --git a/whatsnew/3.13.po b/whatsnew/3.13.po index 5e82698d42..ea9bec402b 100644 --- a/whatsnew/3.13.po +++ b/whatsnew/3.13.po @@ -513,7 +513,7 @@ msgstr "" #: ../../whatsnew/3.13.rst:308 msgid "" "(Contributed by Pablo Galindo Salgado and Shantanu Jain in :gh:`107944`.)" -msgstr "" +msgstr "(由 Pablo Galindo Salgado 和 Shantanu Jain 於 :gh:`107944` 中貢獻。)" #: ../../whatsnew/3.13.rst:314 msgid "Free-threaded CPython" diff --git a/whatsnew/3.6.po b/whatsnew/3.6.po index b63071a79e..d4e6ccd8c2 100644 --- a/whatsnew/3.6.po +++ b/whatsnew/3.6.po @@ -1167,7 +1167,7 @@ msgstr "" #: ../../whatsnew/3.6.rst:801 msgid "Contributed by Serhiy Storchaka in :issue:`26492`." -msgstr "" +msgstr "由 Serhiy Storchaka 於 :issue:`26492` 中貢獻。" #: ../../whatsnew/3.6.rst:804 msgid "ast" @@ -1181,7 +1181,7 @@ msgstr "" #: ../../whatsnew/3.6.rst:809 msgid "Contributed by Victor Stinner in :issue:`26146`." -msgstr "" +msgstr "由 Victor Stinner 於 :issue:`26146` 中貢獻。" #: ../../whatsnew/3.6.rst:813 msgid "asyncio" diff --git a/whatsnew/3.7.po b/whatsnew/3.7.po index 6e6f30678a..b2c04d4e21 100644 --- a/whatsnew/3.7.po +++ b/whatsnew/3.7.po @@ -882,7 +882,7 @@ msgstr "" #: ../../whatsnew/3.7.rst:610 msgid "Contributed by Barry Warsaw and Brett Cannon in :issue:`32248`." -msgstr "" +msgstr "由 Barry Warsaw 與 Brett Cannon 在 :issue:`32248` 中貢獻。" #: ../../whatsnew/3.7.rst:614 msgid ""