Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork216
Tutorial/datastructures#24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes fromall commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -14,7 +14,7 @@ msgstr "" | ||
"Project-Id-Version: Python 3.7\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2018-06-26 18:54+0800\n" | ||
"PO-Revision-Date: 2018-07-19 17:45-0400\n" | ||
"Last-Translator: Ching-Hao Liu <chinghao.liu@gmail.com>\n" | ||
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" | ||
"tw)\n" | ||
@@ -23,6 +23,7 @@ msgstr "" | ||
"Content-Type: text/plain; charset=UTF-8\n" | ||
"Content-Transfer-Encoding: 8bit\n" | ||
"Plural-Forms: nplurals=1; plural=0;\n" | ||
"X-Generator: Poedit 2.0.9\n" | ||
#: ../../tutorial/datastructures.rst:5 | ||
msgid "Data Structures" | ||
@@ -71,13 +72,10 @@ msgstr "" | ||
"``a.append(x)``。" | ||
#: ../../tutorial/datastructures.rst:43 | ||
msgid "" | ||
"Remove the first item from the list whose value is equal to *x*. It is an " | ||
"error if there is no such item." | ||
msgstr "刪除 list 中第一個值等於為 *x* 的元素。若 list 中無此元素則會產生錯誤。" | ||
#: ../../tutorial/datastructures.rst:50 | ||
msgid "" | ||
@@ -98,13 +96,12 @@ msgid "Remove all items from the list. Equivalent to ``del a[:]``." | ||
msgstr "刪除 list 中所有項目。這等同於 ``del a[:]`` 。" | ||
#: ../../tutorial/datastructures.rst:66 | ||
msgid "" | ||
"Return zero-based index in the list of the first item whose value is equal " | ||
"to *x*. Raises a :exc:`ValueError` if there is no such item." | ||
msgstr "" | ||
"回傳 list中第一個值等於為 *x* 的項目之索引值(從零開始的索引)。若 list 中無此項目,則丟" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. s/值等於為/值等於/ | ||
"出:exc:`ValueError` 錯誤。" | ||
#: ../../tutorial/datastructures.rst:69 | ||
msgid "" | ||
@@ -549,18 +546,17 @@ msgstr "" | ||
"meth:`append` 和 :meth:`extend` 來修改。" | ||
#: ../../tutorial/datastructures.rst:500 | ||
msgid "" | ||
"It is best to think of a dictionary as a set of *key: value* pairs, with the " | ||
"requirement that the keys are unique (within one dictionary). A pair of " | ||
"braces creates an empty dictionary: ``{}``. Placing a comma-separated list " | ||
"of key:value pairs within the braces adds initial key:value pairs to the " | ||
"dictionary; this is also the way dictionaries are written on output." | ||
msgstr "" | ||
"思考 dict最好的方式是把它想成是一組鍵值對 (*key: value* pair) 的集合,其" | ||
"中 key在同一個 dictionary(字典)裡必須是獨一無二的。使用一對大括號可創建一" | ||
"個空的字典:``{}``。將一串由逗號分隔的鍵值對置於大括號則可初始化字典。這" | ||
"同樣也是字典輸出時的格式。" | ||
#: ../../tutorial/datastructures.rst:506 | ||
msgid "" | ||
@@ -575,16 +571,15 @@ msgstr "" | ||
"蓋。使用不存在的鍵來取出值會造成錯誤。" | ||
#: ../../tutorial/datastructures.rst:512 | ||
msgid "" | ||
"Performing ``list(d)`` on a dictionary returns a list of all the keys used " | ||
"in the dictionary, in insertion order (if you want it sorted, just use " | ||
"``sorted(d)`` instead). To check whether a single key is in the dictionary, " | ||
"use the :keyword:`in` keyword." | ||
msgstr "" | ||
"對字典使用``list(d)``會得到一個包含該字典所有鍵 (key),其排列順序為插入時的順序。" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. 這邊要說的是「會得到一個包含該字典所有鍵(key)的 list」嗎? | ||
"(若想要排序,則使用 ``sorted(d)`` 代替即可)。如果想確認一" | ||
"個鍵是否已存在於字典中,可使用關鍵字 :keyword:`in` 。" | ||
#: ../../tutorial/datastructures.rst:517 | ||
msgid "Here is a small example using a dictionary::" | ||