@@ -9,7 +9,7 @@ msgstr ""
9
9
"Project-Id-Version : Python 3.10\n "
10
10
"Report-Msgid-Bugs-To : \n "
11
11
"POT-Creation-Date : 2022-07-06 00:17+0000\n "
12
- "PO-Revision-Date : 2022-08-18 11:19 +0800\n "
12
+ "PO-Revision-Date : 2022-08-19 21:55 +0800\n "
13
13
"Last-Translator : Adrian Liaw <adrianliaw2000@gmail.com>\n "
14
14
"Language-Team : Chinese - TAIWAN (https://github.com/python/python-docs-zh- "
15
15
"tw)\n "
@@ -19,7 +19,7 @@ msgstr ""
19
19
"Content-Transfer-Encoding : 8bit\n "
20
20
"Plural-Forms : nplurals=1; plural=0;\n "
21
21
"X-Generator : Poedit 3.1.1\n "
22
- "X-Poedit-Bookmarks : -1,-1,-1,-1,-1,-1 ,25,-1,-1,-1\n "
22
+ "X-Poedit-Bookmarks : -1,-1,-1,-1,-1,93 ,25,-1,-1,-1\n "
23
23
24
24
#: ../../faq/design.rst:3
25
25
msgid "Design and History FAQ"
@@ -570,7 +570,7 @@ msgstr ""
570
570
571
571
#: ../../faq/design.rst:331
572
572
msgid "How does Python manage memory?"
573
- msgstr "Python如何管理記憶體 ?"
573
+ msgstr "Python 如何管理記憶體 ?"
574
574
575
575
#: ../../faq/design.rst:333
576
576
msgid ""
@@ -582,6 +582,11 @@ msgid ""
582
582
"provides functions to perform a garbage collection, obtain debugging "
583
583
"statistics, and tune the collector's parameters."
584
584
msgstr ""
585
+ "Python 記憶體管理的細節取決於實作。Python 的標準實作 :term:`CPython` 使用參照"
586
+ "計次 (reference counting) 來偵測不再被存取的物件,並用另一個機制來收集參照循"
587
+ "環 (reference cycle)、定期執行循環偵測演算法來找不再使用的循環並刪除相關物"
588
+ "件。 :mod:`gc` 模組提供了可以執行垃圾收集、抓取除錯統計數據和調整收集器參數的"
589
+ "函式。"
585
590
586
591
#: ../../faq/design.rst:341
587
592
msgid ""
@@ -591,12 +596,20 @@ msgid ""
591
596
"porting problems if your Python code depends on the behavior of the "
592
597
"reference counting implementation."
593
598
msgstr ""
599
+ "然而,在其他實作(像是 `Jython <http://www.jython.org>`_ 或 `PyPy <http://"
600
+ "www.pypy.org>`_)中,會使用像是成熟的垃圾收集器等不同機制。如果你的 Python 程"
601
+ "式碼的表現取決於參照計次 (reference counting) 的實作,這個相異處會導致一些微"
602
+ "小的移植問題。"
594
603
595
604
#: ../../faq/design.rst:347
596
605
msgid ""
597
606
"In some Python implementations, the following code (which is fine in "
598
607
"CPython) will probably run out of file descriptors::"
599
608
msgstr ""
609
+ "在一些 Python 實作中,下面這段程式碼(在 CPython 可以正常運作)可能會把檔案描"
610
+ "述子 (file descriptors) 用盡:\n"
611
+ "\n"
612
+ "::"
600
613
601
614
#: ../../faq/design.rst:354
602
615
msgid ""
@@ -605,13 +618,21 @@ msgid ""
605
618
"those file objects will only get collected (and closed) at varying and "
606
619
"possibly long intervals."
607
620
msgstr ""
621
+ "實際上,使用 CPython 的參照計次 (reference counting) 和解構方案 (destructor "
622
+ "scheme),每個對 *f* 的新指派都會關閉前面打開的檔案。然而用傳統的垃圾回收 "
623
+ "(GC) 的話,這些檔案物件只會在不固定且有可能很長的時間後被收集(並關閉)。"
608
624
609
625
#: ../../faq/design.rst:359
610
626
msgid ""
611
627
"If you want to write code that will work with any Python implementation, you "
612
628
"should explicitly close the file or use the :keyword:`with` statement; this "
613
629
"will work regardless of memory management scheme::"
614
630
msgstr ""
631
+ "如果你希望你的程式碼在任何 Python 實作版本中都可以運作,那你應該清楚地關閉檔"
632
+ "案或是使用 :keyword:`with` 陳述句,如此一來,不用管記憶體管理的方法,他也會正"
633
+ "常運作:\n"
634
+ "\n"
635
+ "::"
615
636
616
637
#: ../../faq/design.rst:369
617
638
msgid "Why doesn't CPython use a more traditional garbage collection scheme?"
0 commit comments