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

Skip to content

Commit dc0c0db

Browse files
committed
[po] auto sync bot
1 parent 7471bc1 commit dc0c0db

1 file changed

Lines changed: 20 additions & 3 deletions

File tree

reference/datamodel.po

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1807,27 +1807,33 @@ msgid ""
18071807
"classes will either delegate formatting to one of the built-in types, or use"
18081808
" a similar formatting option syntax."
18091809
msgstr ""
1810+
"通过 :func:`format` 内置函数、扩展、:ref:`格式化字符串字面值 <f-strings>` 的求值以及 "
1811+
":meth:`str.format` 方法调用以生成一个对象的“格式化”字符串表示。``format_spec`` "
1812+
"参数为包含所需格式选项描述的字符串。``format_spec`` 参数的解读是由实现 :meth:`__format__` "
1813+
"的类型决定的,不过大多数类或是将格式化委托给某个内置类型,或是使用相似的格式化语法。"
18101814

18111815
#: ../../reference/datamodel.rst:1325
18121816
msgid ""
18131817
"See :ref:`formatspec` for a description of the standard formatting syntax."
1814-
msgstr ""
1818+
msgstr "请参看 :ref:`formatspec` 了解标准格式化语法的描述。"
18151819

18161820
#: ../../reference/datamodel.rst:1327
18171821
msgid "The return value must be a string object."
1818-
msgstr ""
1822+
msgstr "返回值必须为一个字符串对象。"
18191823

18201824
#: ../../reference/datamodel.rst:1329
18211825
msgid ""
18221826
"The __format__ method of ``object`` itself raises a :exc:`TypeError` if "
18231827
"passed any non-empty string."
1824-
msgstr ""
1828+
msgstr "``object`` 本身的 __format__ 方法如果被传入任何非空字符,将会引发一个 :exc:`TypeError`。"
18251829

18261830
#: ../../reference/datamodel.rst:1333
18271831
msgid ""
18281832
"``object.__format__(x, '')`` is now equivalent to ``str(x)`` rather than "
18291833
"``format(str(self), '')``."
18301834
msgstr ""
1835+
"``object.__format__(x, '')`` 现在等同于 ``str(x)`` 而不再是 ``format(str(self), "
1836+
"'')``。"
18311837

18321838
#: ../../reference/datamodel.rst:1349
18331839
msgid ""
@@ -1837,6 +1843,9 @@ msgid ""
18371843
"``x.__eq__(y)``, ``x!=y`` calls ``x.__ne__(y)``, ``x>y`` calls "
18381844
"``x.__gt__(y)``, and ``x>=y`` calls ``x.__ge__(y)``."
18391845
msgstr ""
1846+
"以上这些被称为“富比较”方法。运算符号与方法名称的对应关系如下:``x<y`` 调用 ``x.__lt__(y)``、``x<=y`` 调用 "
1847+
"``x.__le__(y)``、``x==y`` 调用 ``x.__eq__(y)``、``x!=y`` 调用 "
1848+
"``x.__ne__(y)``、``x>y`` 调用 ``x.__gt__(y)``、``x>=y`` 调用 ``x.__ge__(y)``。"
18401849

18411850
#: ../../reference/datamodel.rst:1355
18421851
msgid ""
@@ -1848,6 +1857,9 @@ msgid ""
18481857
"statement), Python will call :func:`bool` on the value to determine if the "
18491858
"result is true or false."
18501859
msgstr ""
1860+
"如果指定的参数对没有相应的实现,富比较方法可能会返回单例对象 ``NotImplemented``。按照惯例,成功的比较会返回 ``False`` 或 "
1861+
"``True``。不过实际上这些方法可以返回任意值,因此如果比较运算符是要用于布尔值判断(例如作为 ``if`` 语句的条件),Python "
1862+
"会对返回值调用 :func:`bool` 以确定结果为真还是假。"
18511863

18521864
#: ../../reference/datamodel.rst:1362
18531865
msgid ""
@@ -1858,13 +1870,18 @@ msgid ""
18581870
"ordering operations from a single root operation, see "
18591871
":func:`functools.total_ordering`."
18601872
msgstr ""
1873+
"在默认情况下 :meth:`__ne__` 会委托给 :meth:`__eq__` 并将结果取反,除非结果为 "
1874+
"``NotImplemented``。比较运算符之间没有其他隐含关系,例如 ``(x<y or x==y)`` 为真并不意味着 "
1875+
"``x<=y``。要根据单根运算自动生成排序操作,请参看 :func:`functools.total_ordering`。"
18611876

18621877
#: ../../reference/datamodel.rst:1369
18631878
msgid ""
18641879
"See the paragraph on :meth:`__hash__` for some important notes on creating "
18651880
":term:`hashable` objects which support custom comparison operations and are "
18661881
"usable as dictionary keys."
18671882
msgstr ""
1883+
"请查看 :meth:`__hash__` 的相关段落,了解创建可支持自定义比较运算并可用作字典键的 :term:`hashable` "
1884+
"对象时要注意的一些事项。"
18681885

18691886
#: ../../reference/datamodel.rst:1373
18701887
msgid ""

0 commit comments

Comments
 (0)