File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3101,6 +3101,7 @@ msgid ""
31013101"iteration. It should return a new iterator object that iterates over all "
31023102"the objects in the container in reverse order."
31033103msgstr ""
3104+ "此方法(如果存在)会被 :func:`reversed` 内置函数调用以实现逆向迭代。它应当返回一个新的以逆序逐个迭代容器内所有对象的迭代器对象。"
31043105
31053106#: ../../reference/datamodel.rst:2222
31063107msgid ""
@@ -3110,6 +3111,9 @@ msgid ""
31103111"only provide :meth:`__reversed__` if they can provide an implementation that"
31113112" is more efficient than the one provided by :func:`reversed`."
31123113msgstr ""
3114+ "如果未提供 :meth:`__reversed__` 方法,则 :func:`reversed` 内置函数将回退到使用序列协议 "
3115+ "(:meth:`__len__` 和 :meth:`__getitem__`)。支持序列协议的对象应当仅在能够提供比 :func:`reversed` "
3116+ "所提供的实现更高效的实现时才提供 :meth:`__reversed__` 方法。"
31133117
31143118#: ../../reference/datamodel.rst:2229
31153119msgid ""
You can’t perform that action at this time.
0 commit comments