diff --git a/library/io.po b/library/io.po index 44b4cd6031..a9848787b9 100644 --- a/library/io.po +++ b/library/io.po @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2023-05-09 00:15+0000\n" -"PO-Revision-Date: 2023-07-17 17:38+0800\n" +"PO-Revision-Date: 2023-07-18 21:30+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" "tw)\n" @@ -20,7 +20,7 @@ msgstr "" #: ../../library/io.rst:2 msgid ":mod:`io` --- Core tools for working with streams" -msgstr "" +msgstr ":mod:`io` — 處理資料串流的核心工具" #: ../../library/io.rst:15 msgid "**Source code:** :source:`Lib/io.py`" @@ -56,12 +56,18 @@ msgid "" "stream will raise a :exc:`TypeError`. So will giving a :class:`bytes` " "object to the ``write()`` method of a text stream." msgstr "" +"所有的資料串流都會謹慎處理你所提供的資料的型別。舉例來說,提供一個 :class:" +"`str` 物件給二進位資料串流的 ``write()`` 方法將會引發 :exc:`TypeError`。同樣" +"地,若提供一個 :class:`bytes` 物件給文字資料串流的 ``write()`` 方法,也會引發同" +"樣的錯誤。" #: ../../library/io.rst:45 msgid "" "Operations that used to raise :exc:`IOError` now raise :exc:`OSError`, " "since :exc:`IOError` is now an alias of :exc:`OSError`." msgstr "" +"原本會引發 :exc:`IOError` 的操作,現在將改成引發 :exc:`OSError`。因為 :" +"exc:`IOError` 現在是 :exc:`OSError` 的別名。" #: ../../library/io.rst:51 ../../library/io.rst:855 ../../library/io.rst:1122 msgid "Text I/O" @@ -80,17 +86,23 @@ msgid "" "The easiest way to create a text stream is with :meth:`open()`, optionally " "specifying an encoding::" msgstr "" +"建立文字資料串流最簡單的方法是使用 :meth:`open()`,可選擇性地指定編碼:\n" +"\n" +"::" #: ../../library/io.rst:63 msgid "" "In-memory text streams are also available as :class:`StringIO` objects::" msgstr "" +"記憶體內的文字資料串流也可以使用 :class:`StringIO` 物件建立:\n" +"\n" +"::" #: ../../library/io.rst:67 msgid "" "The text stream API is described in detail in the documentation of :class:" "`TextIOBase`." -msgstr "" +msgstr "文字資料串流 API 的詳細說明在 :class:`TextIOBase` 文件當中。" #: ../../library/io.rst:72 ../../library/io.rst:1110 msgid "Binary I/O" @@ -110,11 +122,18 @@ msgid "" "The easiest way to create a binary stream is with :meth:`open()` with " "``'b'`` in the mode string::" msgstr "" +"建立二進位資料串流最簡單的方法是使用 :meth:`open()`,並在 mode 字串中加入 " +"``'b'``:\n" +"\n" +"::" #: ../../library/io.rst:85 msgid "" "In-memory binary streams are also available as :class:`BytesIO` objects::" msgstr "" +"記憶體內的二進位資料串流也可以透過 :class:`BytesIO` 物件來建立:\n" +"\n" +"::" #: ../../library/io.rst:89 msgid "" @@ -214,6 +233,9 @@ msgid "" "`PYTHONWARNDEFAULTENCODING` environment variable, which will emit an :exc:" "`EncodingWarning` when the default encoding is used." msgstr "" +"要找出哪些地方使用到預設的地區編碼,你可以啟用 ``-X warn_default_encoding`` " +"命令列選項,或者設定環境變數 :envvar:`PYTHONWARNDEFAULTENCODING`。當使用到預" +"設編碼時,會引發 :exc:`EncodingWarning`。" #: ../../library/io.rst:153 msgid "" @@ -226,7 +248,7 @@ msgstr "" #: ../../library/io.rst:162 msgid "High-level Module Interface" -msgstr "" +msgstr "高階模組介面" #: ../../library/io.rst:166 msgid "" @@ -237,7 +259,7 @@ msgstr "" #: ../../library/io.rst:173 msgid "This is an alias for the builtin :func:`open` function." -msgstr "" +msgstr "這是內建函式 :func:`open` 的別名。" #: ../../library/io.rst:175 msgid "" @@ -259,10 +281,12 @@ msgid "" "Opens the provided file with mode ``'rb'``. This function should be used " "when the intent is to treat the contents as executable code." msgstr "" +"以 ``'rb'`` 模式開啟提供的檔案。此函式應用於意圖將內容視為可執行的程式碼的情" +"況下。" #: ../../library/io.rst:187 msgid "``path`` should be a :class:`str` and an absolute path." -msgstr "" +msgstr "``path`` 應該要屬於 :class:`str` 類別,且是個絕對路徑。" #: ../../library/io.rst:189 msgid ""