Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e18b246

Browse files
[po] auto sync
1 parent d423453 commit e18b246

1 file changed

Lines changed: 14 additions & 15 deletions

File tree

faq/programming.po

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
# eric R <[email protected]>, 2018
99
# Meng Du <[email protected]>, 2019
1010
# ppcfish <[email protected]>, 2019
11-
# Freesand Leo <[email protected]>, 2021
1211
# Dai Xu <[email protected]>, 2021
12+
# Freesand Leo <[email protected]>, 2021
1313
#
1414
#, fuzzy
1515
msgid ""
@@ -18,7 +18,7 @@ msgstr ""
1818
"Report-Msgid-Bugs-To: \n"
1919
"POT-Creation-Date: 2021-05-23 06:25+0000\n"
2020
"PO-Revision-Date: 2017-02-16 17:43+0000\n"
21-
"Last-Translator: Dai Xu <daixu61@hotmail.com>, 2021\n"
21+
"Last-Translator: Freesand Leo <yuqinju@163.com>, 2021\n"
2222
"Language-Team: Chinese (China) (https://www.transifex.com/python-doc/teams/5390/zh_CN/)\n"
2323
"MIME-Version: 1.0\n"
2424
"Content-Type: text/plain; charset=UTF-8\n"
@@ -1789,7 +1789,7 @@ msgid ""
17891789
msgstr ""
17901790
"请注意 :func:`isinstance` 还会检测派生自 :term:`abstract base class` 的虚继承。 "
17911791
"因此对于已注册的类,即便没有直接或间接继承自抽象基类,对抽象基类的检测都将返回 ``True`` 。要想检测“真正的继承”,请扫描类的 "
1792-
":term:`MRO`"
1792+
":term:`MRO`:"
17931793

17941794
#: ../../faq/programming.rst:1462
17951795
msgid ""
@@ -1800,9 +1800,8 @@ msgid ""
18001800
"and doing a different thing based on what class it is. For example, if you "
18011801
"have a function that does something::"
18021802
msgstr ""
1803-
"请注意大多数程序不会经常对用户自定义类使用 :func:`isinstance`。 "
1804-
"如果是你自已开发的类,更正确的面向对象风格是在类中定义方法来封装特定的行为,而不是检查对象的类并根据它属于什么类来做不同的事。 "
1805-
"例如,如果你有一个执行某些操作的函数::"
1803+
"请注意,大多数程序不会经常用 :func:`isinstance` 对用户自定义类进行检测。 "
1804+
"如果是自已开发的类,更合适的面向对象编程风格应该是在类中定义多种方法,以封装特定的行为,而不是检查对象属于什么类再据此干不同的事。假定有如下执行某些操作的函数::"
18061805

18071806
#: ../../faq/programming.rst:1476
18081807
msgid ""
@@ -1822,15 +1821,15 @@ msgid ""
18221821
"implementation of the method you're interested in changing and delegates all"
18231822
" other methods to the corresponding method of ``x``."
18241823
msgstr ""
1825-
"委托是一种面向对象的技巧(也称为设计模式)。 假设您有一个对象 ``x`` 并且想要改变其中一个方法的行为。 "
1826-
"您可以创建一个新类,它提供您感兴趣的方法的新实现,并将所有其他方法委托给 ``x`` 的相应方法。"
1824+
"委托是一种面向对象的技术(也称为设计模式)。假设对象 ``x`` "
1825+
"已经存在,现在想要改变其某个方法的行为。可以创建一个新类,其中提供了所需修改方法的新实现,而将所有其他方法都委托给 ``x`` 的对应方法。"
18271826

18281827
#: ../../faq/programming.rst:1499
18291828
msgid ""
18301829
"Python programmers can easily implement delegation. For example, the "
18311830
"following class implements a class that behaves like a file but converts all"
18321831
" written data to uppercase::"
1833-
msgstr "Python程序员可以轻松实现委托。 例如,以下类实现了一个类,该类的行为类似于文件,但将所有写入的数据转换为大写:"
1832+
msgstr "Python 程序员可以轻松实现委托。比如以下实现了一个类似于文件的类,只是会把所有写入的数据转换为大写:"
18341833

18351834
#: ../../faq/programming.rst:1514
18361835
msgid ""
@@ -1841,9 +1840,9 @@ msgid ""
18411840
" ``__getattr__`` method; consult :ref:`the language reference <attribute-"
18421841
"access>` for more information about controlling attribute access."
18431842
msgstr ""
1844-
"在这里 ``UpperOut`` 类重新定义了 ``write()`` 方法在调用下层的 ``self._outfile.write()`` "
1845-
"方法之前将参数字符串转换为大写形式。 所有其他方法都被委托给下层的 ``self._outfile`` 对象。 委托是通过 "
1846-
"``__getattr__`` 方法来完成的;请参阅 :ref:`语言参考 <attribute-access>` 了解有关控制属性访问的更多信息。"
1843+
"这里 ``UpperOut`` 类重新定义了 ``write()`` 方法,在调用下层的 ``self._outfile.write()`` "
1844+
"方法之前,会将参数字符串转换为大写。其他所有方法则都被委托给下层的 ``self._outfile`` 对象。委托是通过 ``__getattr__``"
1845+
" 方法完成的;请参阅 :ref:`语言参考 <attribute-access>` 了解有关控制属性访问的更多信息。"
18471846

18481847
#: ../../faq/programming.rst:1521
18491848
msgid ""
@@ -1853,15 +1852,15 @@ msgid ""
18531852
"implementation of :meth:`__setattr__` is roughly equivalent to the "
18541853
"following::"
18551854
msgstr ""
1856-
"请注意对于更一般的情况来说,委托可能包含更多细节问题。 当某些属性既需要读取又需要设置时,类还必须定义 :meth:`__setattr__` "
1857-
"方法,并且这样做必须小心谨慎。 :meth:`__setattr__` 的基本实现大致相当于以下代码::"
1855+
"请注意,更常见情况下,委托可能会变得比较棘手。如果属性既需要写入又需要读取,那么类还必须定义 :meth:`__setattr__` "
1856+
"方法,而这时就必须十分的小心。基础的 :meth:`__setattr__` 实现代码大致如下:"
18581857

18591858
#: ../../faq/programming.rst:1532
18601859
msgid ""
18611860
"Most :meth:`__setattr__` implementations must modify ``self.__dict__`` to "
18621861
"store local state for self without causing an infinite recursion."
18631862
msgstr ""
1864-
"大多数 :meth:`__setattr__` 实现必须修改 ``self.__dict__`` 来为自身保存局部状态而又不至于造成无限递归。"
1863+
"大多数 :meth:`__setattr__` 实现必须修改 ``self.__dict__`` 来为自身保存局部状态,而不至于引起无限递归。"
18651864

18661865
#: ../../faq/programming.rst:1537
18671866
msgid ""

0 commit comments

Comments
 (0)