8000 Add translation of section 3.3.4 · python/python-docs-zh-tw@84d7826 · GitHub
[go: up one dir, main page]

Skip to content

Commit 84d7826

Browse files
committed
Add translation of section 3.3.4
1 parent 5008221 commit 84d7826

File tree

1 file changed

+21
-5
lines changed

1 file changed

+21
-5
lines changed

tutorial/classes.po

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgstr ""
88
"Project-Id-Version: Python 3.6 TW\n"
99
"Report-Msgid-Bugs-To: \n"
1010
"POT-Creation-Date: 2018-06-26 18:54+0800\n"
11-
"PO-Revision-Date: 2018-07-18 00:52+0800\n"
11+
"PO-Revision-Date: 2018-10-19 01:31+0800\n"
1212
"Last-Translator: Adrian Liaw <adrianliaw2000@gmail.com>\n"
1313
"Language-Team: Chinese Traditional (http://www.transifex.com/python-tw-doc/"
1414
"python-36-tw/language/zh-Hant/)\n"
@@ -17,7 +17,7 @@ msgstr ""
1717
"Content-Type: text/plain; charset=UTF-8\n"
1818
"Content-Transfer-Encoding: 8bit\n"
1919
"Plural-Forms: nplurals=1; plural=0;\n"
20-
"X-Generator: Poedit 2.0.9\n"
20+
"X-Generator: Poedit 2.2\n"
2121
"X-Poedit-Bookmarks: 0,26,52,77,102,-1,-1,-1,-1,-1\n"
2222

2323
#: ../../tutorial/classes.rst:5
@@ -566,11 +566,11 @@ msgstr ""
566566

567567
#: ../../tutorial/classes.rst:360
568568
msgid "Method Objects"
569-
msgstr ""
569+
msgstr "方法物件"
570570

571571
#: ../../tutorial/classes.rst:362
572572
msgid "Usually, a method is called right after it is bound::"
573-
msgstr ""
573+
msgstr "通常,一個方法在他被綁定後立即被呼叫::"
574574

575575
#: ../../tutorial/classes.rst:366
576576
msgid ""
@@ -579,10 +579,13 @@ msgid ""
579579
"is a method object, and can be stored away and called at a later time. For "
580580
"example::"
581581
msgstr ""
582+
"在 :class:`MyClass` 的例子中,這將回傳字串 ``’hello world’``。然而,沒有必要"
583+
"立即呼叫這個方法: ``x.f`` 是一個方法物件,並且可以被儲存一陣子後再被呼叫。舉"
584+
"例來說::"
582585

583586
#: ../../tutorial/classes.rst:374
584587
msgid "will continue to print ``hello world`` until the end of time."
585-
msgstr ""
588+
msgstr "將會持續印出 ``hello world`` 直到結束。"
586589

587590
#: ../../tutorial/classes.rst:376
588591
msgid ""
@@ -593,6 +596,10 @@ msgid ""
593596
"argument is called without any --- even if the argument isn't actually "
594597
"used..."
595598
msgstr ""
599+
"當一個方法被呼叫時究竟會發生什麼?你可能已經注意到 ``x.f()`` 呼叫時沒有放置任"
600+
"何的參數,儘管 :meth:`f` 函式定義指定了一個參數。這個參數發生了什麼事?當一個"
601+
"需要參數的函數被調用而沒有任何東西時,Python肯定會引發異常 --- 即使參數實際上"
602+
"沒有被使用..."
596603

597604
#: ../../tutorial/classes.rst:382
598605
msgid ""
@@ -604,6 +611,10 @@ msgid ""
604611
"that is created by inserting the method's instance object before the first "
605612
"argument."
606613
msgstr ""
614+
"事實上,你可能已經猜到了答案:方法的特殊之處在於實例物件作為該函數中的第一個"
615+
"參數傳遞。在我們的例子中, ``x.f()`` 此呼叫等同於 ``MyClass.f(x)``。一般來"
616+
"說,呼叫一個有 *n* 個參數的方法等同於呼叫一個對應在第一個參數之前插入一個實例"
617+
"物件的一串參數的函數。"
607618

608619
#: ../../tutorial/classes.rst:389
609620
msgid ""
@@ -617,6 +628,11 @@ msgid ""
617628
"from the instance object and the argument list, and the function object is "
618629
"called with this new argument list."
619630
msgstr ""
631+
"假如你仍然不了解方法怎麼運作,看一眼實作可能會清楚這件事。當一個不是資料屬性"
632+
"的實例屬性被參照時,物件的類別會被搜尋。假如該名字表示函數物件,亦為一個有效"
633+
"的類別屬性,則一個方法物件會藉由打包(指向)實例物件而被創建並且該函數物件只"
634+
"是在抽象物件中被一起找到:這就是方法物件。當方法物件以一串參數被呼叫,新的一"
635+
"串參數會由實例物件和該串參數建構,而該函數物件會藉由新的一串參數被呼叫。"
620636

621637
#: ../../tutorial/classes.rst:403
622638
msgid "Class and Instance Variables"

0 commit comments

Comments
 (0)
0