@@ -342,7 +342,7 @@ msgstr ""
342342
343343#: ../../reference/datamodel.rst:359
344344msgid "Sequences"
345- msgstr ""
345+ msgstr "序列 "
346346
347347#: ../../reference/datamodel.rst:252
348348msgid ""
@@ -351,6 +351,8 @@ msgid ""
351351"When the length of a sequence is *n*, the index set contains the numbers 0, "
352352"1, ..., *n*-1. Item *i* of sequence *a* is selected by ``a[i]``."
353353msgstr ""
354+ "此类对象表示以非负整数作为索引的有限有序集。内置函数 :func:`len` 可返回一个序列的条目数量。当一个序列的长度为 *n* 时,索引集包含数字 "
355+ "0, 1, ..., *n*-1。序列 *a* 的条目 *i* 可通过 ``a[i]`` 选择。"
354356
355357#: ../../reference/datamodel.rst:259
356358msgid ""
@@ -359,21 +361,25 @@ msgid ""
359361"a sequence of the same type. This implies that the index set is renumbered "
360362"so that it starts at 0."
361363msgstr ""
364+ "序列还支持切片: ``a[i:j]`` 选择索引号为 *k* 的所有条目,*i* ``<=`` *k* ``<`` "
365+ "*j*。当用作表达式时,序列的切片就是一个与序列类型相同的新序列。新序列的索引还是从 0 开始。"
362366
363367#: ../../reference/datamodel.rst:264
364368msgid ""
365369"Some sequences also support \" extended slicing\" with a third \" step\" "
366370"parameter: ``a[i:j:k]`` selects all items of *a* with index *x* where ``x = "
367371"i + n*k``, *n* ``>=`` ``0`` and *i* ``<=`` *x* ``<`` *j*."
368372msgstr ""
373+ "有些序列还支持带有第三个 \" step\" 形参的 \" 扩展切片\" : ``a[i:j:k]`` 选择 *a* 中索引号为 *x* 的所有条目,``x "
374+ "= i + n*k``, *n* ``>=`` ``0`` 且 *i* ``<=`` *x* ``<`` *j*。"
369375
370376#: ../../reference/datamodel.rst:268
371377msgid "Sequences are distinguished according to their mutability:"
372- msgstr ""
378+ msgstr "序列可根据其可变性来加以区分: "
373379
374380#: ../../reference/datamodel.rst:325
375381msgid "Immutable sequences"
376- msgstr ""
382+ msgstr "不可变序列 "
377383
378384#: ../../reference/datamodel.rst:275
379385msgid ""
@@ -382,10 +388,11 @@ msgid ""
382388" be mutable and may be changed; however, the collection of objects directly "
383389"referenced by an immutable object cannot change.)"
384390msgstr ""
391+ "不可变序列类型的对象一旦创建就不能再改变。(如果对象包含对其他对象的引用,其中的可变对象就是可以改变的;但是,一个不可变对象所直接引用的对象集是不能改变的。)"
385392
386393#: ../../reference/datamodel.rst:280
387394msgid "The following types are immutable sequences:"
388- msgstr ""
395+ msgstr "以下类型属于不可变对象: "
389396
390397#: ../../reference/datamodel.rst:303
391398msgid "Strings"
@@ -404,10 +411,15 @@ msgid ""
404411"using the given text encoding, and :meth:`bytes.decode` can be used to "
405412"achieve the opposite."
406413msgstr ""
414+ "字符串是由 Unicode 码位值组成的序列。范围在 ``U+0000 - U+10FFFF`` 之内的所有码位值都可在字符串中使用。Python 没有"
415+ " :c:type:`char` 类型;而是将字符串中的每个码位表示为一个长度为 ``1`` 的字符串对象。内置函数 :func:`ord` "
416+ "可将一个码位由字符串形式转换成一个范围在 ``0 - 10FFFF`` 之内的整型数;:func:`chr` 可将一个范围在 ``0 - "
417+ "10FFFF`` 之内的整型数转换为长度为 ``1`` 的对应字符串对象。:meth:`str.encode` 可以使用指定的文本编码将 "
418+ ":class:`str` 转换为 :class:`bytes`,而 :meth:`bytes.decode` 则可以实现反向的解码。"
407419
408420#: ../../reference/datamodel.rst:316
409421msgid "Tuples"
410- msgstr ""
422+ msgstr "元组 "
411423
412424#: ../../reference/datamodel.rst:311
413425msgid ""
0 commit comments