Skip to content

Commit 2082b9e

Browse files
authored
Merge branch 'python:3.12' into 3.12
2 parents 13cc2e2 + c05a42a commit 2082b9e

File tree

3 files changed

+31
-20
lines changed

3 files changed

+31
-20
lines changed

howto/perf_profiling.po

+12-12
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ msgid ""
4949
"output of ``perf``."
5050
msgstr ""
5151
"在 Python 應用程式中使用 ``perf`` 分析器的主要問題是 ``perf`` 僅獲取有關原生"
52-
"符號的資訊,即用 C 編寫的函式和程式的名稱。這表示程式碼中的 Python 函式名"
53-
"稱和檔案名稱不會出現在 ``perf`` 的輸出中。"
52+
"符號的資訊,即用 C 編寫的函式和程式的名稱。這表示程式碼中的 Python 函式名稱和"
53+
"檔案名稱不會出現在 ``perf`` 的輸出中。"
5454

5555
#: ../../howto/perf_profiling.rst:22
5656
msgid ""
@@ -73,9 +73,9 @@ msgid ""
7373
"check the output of ``python -m sysconfig | grep HAVE_PERF_TRAMPOLINE`` to "
7474
"see if your system is supported."
7575
msgstr ""
76-
"目前對 ``perf`` 分析器的支援僅適用於 Linux 的特定架構上。檢查 "
77-
"``configure`` 建構步驟的輸出或檢查 ``python -m sysconfig | grep "
78-
"HAVE_PERF_TRAMPOLINE`` 的輸出來查看你的系統是否支援。"
76+
"目前對 ``perf`` 分析器的支援僅適用於 Linux 的特定架構上。檢查 ``configure`` "
77+
"建構步驟的輸出或檢查 ``python -m sysconfig | grep HAVE_PERF_TRAMPOLINE`` 的輸"
78+
"出來查看你的系統是否支援。"
7979

8080
#: ../../howto/perf_profiling.rst:36
8181
msgid "For example, consider the following script:"
@@ -98,9 +98,9 @@ msgid ""
9898
"which Python function corresponds to which bytecode-evaluating function."
9999
msgstr ""
100100
"如你所見,Python 函式未顯示在輸出中,僅顯示 ``_Py_Eval_EvalFrameDefault`` "
101-
"(為 Python 位元組碼 (bytecode) 求值的函式)。不幸的是,這不是很有用,因為所有 "
102-
"Python 函式都使用相同的 C 函式來替位元組碼求值,因此我們無法知道哪個 Python 函"
103-
"式是對應於哪個位元組碼計算函式。"
101+
"(為 Python 位元組碼 (bytecode) 求值的函式)。不幸的是,這不是很有用,因為所"
102+
"Python 函式都使用相同的 C 函式來替位元組碼求值,因此我們無法知道哪個 "
103+
"Python 函式是對應於哪個位元組碼計算函式。"
104104

105105
#: ../../howto/perf_profiling.rst:105
106106
msgid ""
@@ -162,8 +162,8 @@ msgid ""
162162
msgstr ""
163163
"為了獲得最佳結果,應使用 ``CFLAGS=\"-fno-omit-frame-pointer -mno-omit-leaf-"
164164
"frame-pointer\"`` 來進行 Python 編譯,因為這能允許分析器僅使用 frame 指標而不"
165-
"是 DWARF 除錯資訊來解析 (unwind)。這是因為,由於插入以允許 ``perf`` 支援的程式碼是動"
166-
"態生成的,因此它沒有任何可用的 DWARF 除錯資訊。"
165+
"是 DWARF 除錯資訊來解析 (unwind)。這是因為,由於插入以允許 ``perf`` 支援的程"
166+
"式碼是動態生成的,因此它沒有任何可用的 DWARF 除錯資訊。"
167167

168168
#: ../../howto/perf_profiling.rst:201
169169
msgid ""
@@ -176,5 +176,5 @@ msgid ""
176176
"compiled with frame pointers and therefore it may not be able to show Python "
177177
"functions in the output of ``perf``."
178178
msgstr ""
179-
"如果你沒有看到任何輸出,則表示你的直譯器尚未使用 frame 指標進行編譯,因此它"
180-
"可能無法在 ``perf`` 的輸出中顯示 Python 函式。"
179+
"如果你沒有看到任何輸出,則表示你的直譯器尚未使用 frame 指標進行編譯,因此它可"
180+
"能無法在 ``perf`` 的輸出中顯示 Python 函式。"

library/io.po

+16-5
Original file line numberDiff line numberDiff line change
@@ -729,45 +729,52 @@ msgid ""
729729
"to the position indicated by *whence*, and return the new absolute position. "
730730
"Values for *whence* are:"
731731
msgstr ""
732+
"將串流位置改變到給定的位元組 *offset*,此位置是相對於由 *whence* 指示的位置解"
733+
"釋的,並回傳新的絕對位置。*whence* 的值可為:"
732734

733735
#: ../../library/io.rst:413
734736
msgid ""
735737
":data:`os.SEEK_SET` or ``0`` -- start of the stream (the default); *offset* "
736738
"should be zero or positive"
737739
msgstr ""
740+
":data:`os.SEEK_SET` 或 ``0`` -- 串流的起點(預設值);*offset* 應為零或正數"
738741

739742
#: ../../library/io.rst:415
740743
msgid ""
741744
":data:`os.SEEK_CUR` or ``1`` -- current stream position; *offset* may be "
742745
"negative"
743-
msgstr ""
746+
msgstr ":data:`os.SEEK_CUR` 或 ``1`` -- 目前串流位置;*offset* 可以是負數"
744747

745748
#: ../../library/io.rst:417
746749
msgid ""
747750
":data:`os.SEEK_END` or ``2`` -- end of the stream; *offset* is usually "
748751
"negative"
749-
msgstr ""
752+
msgstr ":data:`os.SEEK_END` 或 ``2`` -- 串流的結尾;*offset* 通常是負數"
750753

751754
#: ../../library/io.rst:420 ../../library/io.rst:930
752755
msgid "The :data:`!SEEK_*` constants."
753-
msgstr ""
756+
msgstr ":data:`!SEEK_*` 常數。"
754757

755758
#: ../../library/io.rst:423
756759
msgid ""
757760
"Some operating systems could support additional values, like :const:`os."
758761
"SEEK_HOLE` or :const:`os.SEEK_DATA`. The valid values for a file could "
759762
"depend on it being open in text or binary mode."
760763
msgstr ""
764+
"某些作業系統可以支援額外的值,例如 :const:`os.SEEK_HOLE` 或 :const:`os."
765+
"SEEK_DATA`。檔案的合法值取決於它是以文字模式還是二進位模式開啟。"
761766

762767
#: ../../library/io.rst:430
763768
msgid ""
764769
"Return ``True`` if the stream supports random access. If ``False``, :meth:"
765770
"`seek`, :meth:`tell` and :meth:`truncate` will raise :exc:`OSError`."
766771
msgstr ""
772+
"如果串流支援隨機存取,則回傳 ``True``。如果是 ``False``,則 :meth:`seek`、:"
773+
"meth:`tell` 和 :meth:`truncate` 會引發 :exc:`OSError`。"
767774

768775
#: ../../library/io.rst:435
769776
msgid "Return the current stream position."
770-
msgstr ""
777+
msgstr "回傳目前串流的位置。"
771778

772779
#: ../../library/io.rst:439
773780
msgid ""
@@ -777,10 +784,14 @@ msgid ""
777784
"the contents of the new file area depend on the platform (on most systems, "
778785
"additional bytes are zero-filled). The new file size is returned."
779786
msgstr ""
787+
"將串流的大小調整為指定的 *size* 位元組(如果沒有指定 *size*,則調整為目前位"
788+
"置)。目前串流位置不會改變。這種調整可以擴展或縮減當前檔案大小。在擴展的情況"
789+
"下,新檔案區域的內容取決於平台(在大多數系統上,額外的位元組會被填充為零)。"
790+
"回傳新的檔案大小。"
780791

781792
#: ../../library/io.rst:446
782793
msgid "Windows will now zero-fill files when extending."
783-
msgstr ""
794+
msgstr "Windows 現在在擴展時會對檔案進行零填充 (zero-fill)。"
784795

785796
#: ../../library/io.rst:451
786797
msgid ""

library/multiprocessing.shared_memory.po

+3-3
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,9 @@ msgstr ""
6262
"確實作),而不是指「分散式共享記憶體 (distributed shared memory)」。這種型別"
6363
"的共享記憶體允許不同的行程潛在地讀取和寫入揮發性記憶體 (volatile memory) 的公"
6464
"開(或共享)區域。通常行程只能存取自己的行程記憶體空間,但共享記憶體允許在行"
65-
"程之間共享資料,從而避免需要跨行程傳遞資料的情境。與透過硬碟或 "
66-
"socket 或其他需要序列化/還原序列化 (serialization/deserialization) 和複製資料"
67-
"的通訊方式以共享資料相比,直接透過記憶體共享資料可以提供顯著的性能優勢。"
65+
"程之間共享資料,從而避免需要跨行程傳遞資料的情境。與透過硬碟或 socket 或其他"
66+
"需要序列化/還原序列化 (serialization/deserialization) 和複製資料的通訊方式以"
67+
"共享資料相比,直接透過記憶體共享資料可以提供顯著的性能優勢。"
6868

6969
#: ../../library/multiprocessing.shared_memory.rst:41
7070
msgid ""

0 commit comments

Comments
 (0)