File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2382,6 +2382,8 @@ msgid ""
23822382"underlying binary :data:`~io.TextIOBase.buffer` object. For example, to "
23832383"write bytes to :data:`stdout`, use ``sys.stdout.buffer.write(b'abc')``."
23842384msgstr ""
2385+ "要从标准流写入或读取二进制数据,请使用底层二进制 :data:`~io.TextIOBase.buffer` 对象。例如,要将字节写入 "
2386+ ":data:`stdout`,请使用 ``sys.stdout.buffer.write(b'abc')``。"
23852387
23862388#: ../../library/sys.rst:1484
23872389msgid ""
@@ -2390,6 +2392,8 @@ msgid ""
23902392"replaced with file-like objects like :class:`io.StringIO` which do not "
23912393"support the :attr:`~io.BufferedIOBase.buffer` attribute."
23922394msgstr ""
2395+ "但是,如果你在写一个库(并且不限制执行库代码时的上下文),那么请注意,标准流可能会被替换为文件类对象,如 "
2396+ ":class:`io.StringIO`,它们是不支持 :attr:`~io.BufferedIOBase.buffer` 属性的。"
23932397
23942398#: ../../library/sys.rst:1494
23952399msgid ""
You can’t perform that action at this time.
0 commit comments