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

Skip to content

Commit 511fa9c

Browse files
committed
[po] auto sync bot
1 parent 8fd3f13 commit 511fa9c

1 file changed

Lines changed: 13 additions & 11 deletions

File tree

tutorial/datastructures.po

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -449,6 +449,8 @@ msgid ""
449449
"use, the old value associated with that key is forgotten. It is an error to"
450450
" extract a value using a non-existent key."
451451
msgstr ""
452+
"字典主要的操作是使用关键字存储和解析值。也可以用 ``del`` "
453+
"来删除一个键值对。如果你使用了一个已经存在的关键字来存储值,那么之前与这个关键字关联的值就会被遗忘。用一个不存在的键来取值则会报错。"
452454

453455
#: ../../tutorial/datastructures.rst:512
454456
msgid ""
@@ -460,25 +462,25 @@ msgstr ""
460462

461463
#: ../../tutorial/datastructures.rst:517
462464
msgid "Here is a small example using a dictionary::"
463-
msgstr ""
465+
msgstr "以下是使用字典的一些简单示例 ::"
464466

465467
#: ../../tutorial/datastructures.rst:538
466468
msgid ""
467469
"The :func:`dict` constructor builds dictionaries directly from sequences of "
468470
"key-value pairs::"
469-
msgstr ""
471+
msgstr ":func:`dict` 构造函数可以直接从键值对序列里创建字典。"
470472

471473
#: ../../tutorial/datastructures.rst:544
472474
msgid ""
473475
"In addition, dict comprehensions can be used to create dictionaries from "
474476
"arbitrary key and value expressions::"
475-
msgstr ""
477+
msgstr "次卧,字典推导式可以从任意的键值表达式中创建字典 ::"
476478

477479
#: ../../tutorial/datastructures.rst:550
478480
msgid ""
479481
"When the keys are simple strings, it is sometimes easier to specify pairs "
480482
"using keyword arguments::"
481-
msgstr ""
483+
msgstr "当关键字是简单字符串时,有时直接通过关键字参数来指定键值对更方便 ::"
482484

483485
#: ../../tutorial/datastructures.rst:560
484486
msgid "Looping Techniques"
@@ -488,37 +490,37 @@ msgstr "循环的技巧"
488490
msgid ""
489491
"When looping through dictionaries, the key and corresponding value can be "
490492
"retrieved at the same time using the :meth:`items` method. ::"
491-
msgstr ""
493+
msgstr "当在字典中循环时,用 :meth:`items` 方法可将关键字和对应的值同时取出 ::"
492494

493495
#: ../../tutorial/datastructures.rst:572
494496
msgid ""
495497
"When looping through a sequence, the position index and corresponding value "
496498
"can be retrieved at the same time using the :func:`enumerate` function. ::"
497-
msgstr ""
499+
msgstr "当在序列中循环时,用 :func:`enumerate` 函数可以将索引位置和其对应的值同时取出 ::"
498500

499501
#: ../../tutorial/datastructures.rst:582
500502
msgid ""
501503
"To loop over two or more sequences at the same time, the entries can be "
502504
"paired with the :func:`zip` function. ::"
503-
msgstr ""
505+
msgstr "当同时在两个或更多序列中循环时,可以用 :func:`zip` 函数将其内元素一一匹配 ::"
504506

505507
#: ../../tutorial/datastructures.rst:594
506508
msgid ""
507509
"To loop over a sequence in reverse, first specify the sequence in a forward "
508510
"direction and then call the :func:`reversed` function. ::"
509-
msgstr ""
511+
msgstr "当逆向循环一个序列时,先正向定位序列,然后调用 :func:`reversed` 函数 ::"
510512

511513
#: ../../tutorial/datastructures.rst:606
512514
msgid ""
513515
"To loop over a sequence in sorted order, use the :func:`sorted` function "
514516
"which returns a new sorted list while leaving the source unaltered. ::"
515-
msgstr ""
517+
msgstr "如果要按某个指定顺序循环一个序列,可以用 :func:`sorted` 函数,它可以在不改动原序列的基础上返回一个新的排好序的序列 ::"
516518

517519
#: ../../tutorial/datastructures.rst:618
518520
msgid ""
519521
"It is sometimes tempting to change a list while you are looping over it; "
520522
"however, it is often simpler and safer to create a new list instead. ::"
521-
msgstr ""
523+
msgstr "有时可能会想在循环时修改列表内容,一般来说改为创建一个新列表是比较简单且安全的 ::"
522524

523525
#: ../../tutorial/datastructures.rst:635
524526
msgid "More on Conditions"
@@ -528,7 +530,7 @@ msgstr "深入条件控制"
528530
msgid ""
529531
"The conditions used in ``while`` and ``if`` statements can contain any "
530532
"operators, not just comparisons."
531-
msgstr ""
533+
msgstr "``while`` 和 ``if`` 条件句中可以使用任意操作,而不仅仅是比较操作。"
532534

533535
#: ../../tutorial/datastructures.rst:640
534536
msgid ""

0 commit comments

Comments
 (0)