@@ -75,7 +75,7 @@ msgid ""
75
75
msgstr ""
76
76
"在 C++ 的術語中,class 成員(包含資料成員)通常都是\\ *公開*\\ 的(除了以下內"
77
77
"容:\\ :ref:`tut-private`\\ ),而所有的成員函式都是\\ *虛擬*\\ 的。如同在 "
78
- "Modula-3 中一樣,Python 並沒有提供簡寫可以從物件的 method 裡引用其成員 :"
78
+ "Modula-3 中一樣,Python 並沒有提供簡寫可以從物件的 method 裡參照其成員 :"
79
79
"method 函式與一個外顯的 (explicit)、第一個代表物件的引數被宣告,而此引數是在呼"
80
80
"叫時隱性地 (implicitly) 被提供。如同在 Smalltak 中,class 都是物件,這為 "
81
81
"import 及重新命名提供了語意。不像 C++ 和 Modula-3,Pyhon 內建的型別可以被使用"
@@ -231,7 +231,7 @@ msgid ""
231
231
"reference to a name attempts to find the name in the namespace."
232
232
msgstr ""
233
233
"*作用域*\\ 是 Python 程式中的一個文本區域 (textual region),在此區域,命名空間"
234
- "是可直接存取的。這裡的「可直接存取的」意思是,對一個名稱的非限定引用 "
234
+ "是可直接存取的。這裡的「可直接存取的」意思是,對一個名稱的非限定參照 "
235
235
"(unqualified reference) 可以在命名空間內嘗試尋找該名稱。"
236
236
237
237
#: ../../tutorial/classes.rst:116
@@ -253,7 +253,7 @@ msgid ""
253
253
"nearest enclosing scope, contains non-local, but also non-global names"
254
254
msgstr ""
255
255
"任何外圍函式 (enclosing function) 的作用域,會從最近的外圍作用域開始搜尋,它包"
256
- "含了非區域 (non-local) 也非全域 (non-global) 的名稱"
256
+ "含了非區域 (non-local) 和非全域 (non-global) 的名稱"
257
257
258
258
#: ../../tutorial/classes.rst:123
259
259
msgid "the next-to-last scope contains the current module's global names"
@@ -274,7 +274,7 @@ msgid ""
274
274
"variable in the innermost scope, leaving the identically named outer variable "
275
275
"unchanged)."
276
276
msgstr ""
277
- "如果一個名稱被宣告為全域,則所有的引用和賦值將直接轉到包含模組全域名稱的中間作 "
277
+ "如果一個名稱被宣告為全域,則所有的參照和賦值將直接轉到包含模組全域名稱的中間作 "
278
278
"用域。要重新連結最內層作用域以外找到的變數,可以使用 :keyword:`nonlocal` 陳述"
279
279
"式;如果那些變數沒有被宣告為 nonlocal,則它們會是唯讀的(嘗試寫入這樣的變數只"
280
280
"會在最內層的作用域內建立一個\\ *新的*\\ 區域變數,同名的外部變數則維持不變)。"
@@ -286,8 +286,8 @@ msgid ""
286
286
"namespace as the global scope: the module's namespace. Class definitions "
287
287
"place yet another namespace in the local scope."
288
288
msgstr ""
289
- "通常,區域作用域會引用 (文本的)當前函式的區域名稱。在函式外部,區域作用域與全"
290
- "域作用域引用相同的命名空間 :模組的命名空間。然而,Class definition 會在區域作"
289
+ "通常,區域作用域會參照 (文本的)當前函式的區域名稱。在函式外部,區域作用域與全"
290
+ "域作用域參照相同的命名空間 :模組的命名空間。然而,Class definition 會在區域作"
291
291
"用域中放置另一個命名空間。"
292
292
293
293
#: ../../tutorial/classes.rst:138
@@ -344,7 +344,7 @@ msgid ""
344
344
"namespaces, and how :keyword:`global` and :keyword:`nonlocal` affect variable "
345
345
"binding::"
346
346
msgstr ""
347
- "這是一個範例,演示如何引用不同的作用域和命名空間 ,以及 :keyword:`global` 和 :"
347
+ "這是一個範例,演示如何參照不同的作用域和命名空間 ,以及 :keyword:`global` 和 :"
348
348
"keyword:`nonlocal` 如何影響變數的綁定:\n"
349
349
"\n"
350
350
"::"
@@ -659,7 +659,7 @@ msgid ""
659
659
"called with this new argument list."
660
660
msgstr ""
661
661
"如果你仍然不了解 method 怎麼運作,看一眼實作可能會清楚一些事。當一個實例的非資"
662
- "料屬性被引用時 ,該實例的 class 會被搜尋。如果該名稱是一個有效的 class 屬性,而"
662
+ "料屬性被參照時 ,該實例的 class 會被搜尋。如果該名稱是一個有效的 class 屬性,而"
663
663
"且是一個函式物件,則一個 method 物件會被建立,建立的方法是藉由打包(指向)該實"
664
664
"例物件及剛被找到的函式物件,形成一個抽象的物件:這就是 method 物件。當 method "
665
665
"物件帶著一個引數列表被呼叫,則一個新的引數列表會從實例物件和該引數列表被建構,"
@@ -739,7 +739,7 @@ msgid ""
739
739
"without affecting the validity of the methods, as long as name conflicts are "
740
740
"avoided --- again, a naming convention can save a lot of headaches here."
741
741
msgstr ""
742
- "客戶端應該小心使用資料屬性——客戶端可能會因為標記他們的資料屬性 ,而破壞了被 "
742
+ "客戶端應該小心使用資料屬性——客戶端可能會因為覆寫他們的資料屬性 ,而破壞了被 "
743
743
"method 維護的不變性。注意,客戶端可以增加他們自己的資料屬性到實例物件,但不影"
744
744
"響 method 的有效性,只要避免名稱衝突即可——再一次提醒,命名慣例可以在這裡節省很"
745
745
"多麻煩。"
@@ -751,7 +751,7 @@ msgid ""
751
751
"methods: there is no chance of confusing local variables and instance "
752
752
"variables when glancing through a method."
753
753
msgstr ""
754
- "在 method 中參照資料屬性 (或其他 method!)是沒有簡寫的。我發現這實際上增加了 "
754
+ "在 method 中參照用資料屬性 (或其他 method!)是沒有簡寫的。我發現這實際上增加了 "
755
755
"method 的可閱讀性:在瀏覽 method 時,絕不會混淆區域變數和實例變數。"
756
756
757
757
#: ../../tutorial/classes.rst:504
@@ -1167,7 +1167,7 @@ msgid ""
1167
1167
"returns an object with a :meth:`~iterator.__next__` method. If the class "
1168
1168
"defines :meth:`__next__`, then :meth:`__iter__` can just return ``self``::"
1169
1169
msgstr ""
1170
- "看過疊代器流程的幕後機制後 ,在你的 class 加入疊代器的行為就很容易了。定義一"
1170
+ "看過疊代器協定的幕後機制後 ,在你的 class 加入疊代器的行為就很容易了。定義一"
1171
1171
"個 :meth:`__iter__` method 來回傳一個帶有 :meth:`~iterator.__next__` method 的"
1172
1172
"物件。如果 class 已定義了 :meth:`__next__`\\ ,則 :meth:`__iter__` 可以只回傳 "
1173
1173
"``self``:\n"
0 commit comments