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

Skip to content

Commit 59422f8

Browse files
committed
[po] auto sync bot
1 parent c75194b commit 59422f8

2 files changed

Lines changed: 42 additions & 27 deletions

File tree

faq/programming.po

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1657,6 +1657,9 @@ msgid ""
16571657
"calling ``extend`` on the list and returning the list. That's why we say "
16581658
"that for lists, ``+=`` is a \"shorthand\" for ``list.extend``::"
16591659
msgstr ""
1660+
"要明白为何会这样,你需要知道 (a) 如果一个对象实现了 ``__iadd__`` 魔术方法,它会在执行 ``+=`` "
1661+
"增强赋值时被调用,并且其返回值将用于该赋值语句; (b) 对于列表来说,``__iadd__`` 等价于在列表上调用 ``extend`` "
1662+
"并返回该列表。 因此对于列表我们可以说 ``+=`` 就是 ``list.extend`` 的“快捷方式”::"
16601663

16611664
#: ../../faq/programming.rst:1335
16621665
msgid "This is equivalent to::"
@@ -1669,6 +1672,8 @@ msgid ""
16691672
"assignment is a no-op, since it is a pointer to the same object that "
16701673
"``a_list`` was previously pointing to, but the assignment still happens."
16711674
msgstr ""
1675+
"a_list 所引用的对象已被修改,而引用被修改对象的指针又重新被赋值给 ``a_list``。 赋值的最终结果没有变化,因为它是引用 "
1676+
"``a_list`` 之前所引用的同一对象的指针,但仍然发生了赋值操作。"
16721677

16731678
#: ../../faq/programming.rst:1345
16741679
msgid "Thus, in our tuple example what is happening is equivalent to::"
@@ -1681,6 +1686,8 @@ msgid ""
16811686
"that final assignment still results in an error, because tuples are "
16821687
"immutable."
16831688
msgstr ""
1689+
"``__iadd__`` 成功执行,因此列表得到了扩充,但是虽然 ``result`` 指向了 ``a_tuple[0]`` "
1690+
"已经指向的同一对象,最后的赋值仍然导致了报错,因为元组是不可变的。"
16841691

16851692
#: ../../faq/programming.rst:1359
16861693
msgid ""
@@ -1789,7 +1796,7 @@ msgstr "另请参阅 :ref:`why-self` 。"
17891796
msgid ""
17901797
"How do I check if an object is an instance of a given class or of a subclass"
17911798
" of it?"
1792-
msgstr "如何检查对象是否是给定类或其子类的实例?"
1799+
msgstr "如何检查对象是否为给定类或其子类的一个实例?"
17931800

17941801
#: ../../faq/programming.rst:1444
17951802
msgid ""
@@ -1799,6 +1806,10 @@ msgid ""
17991806
"and can also check whether an object is one of Python's built-in types, e.g."
18001807
" ``isinstance(obj, str)`` or ``isinstance(obj, (int, float, complex))``."
18011808
msgstr ""
1809+
"可使用内置函数 ``isinstance(obj, cls)``。 你可以提供一个元组而不是单个类来检查某个对象是否为任意多个类当中某一个类的实例,例如"
1810+
" ``isinstance(obj, (class1, class2, ...))``,也可以检查某个对象是否为 Python "
1811+
"内置类型当中某一个类型的对象,例如 ``isinstance(obj, str)`` 或 ``isinstance(obj, (int, float, "
1812+
"complex))``。"
18021813

18031814
#: ../../faq/programming.rst:1450
18041815
msgid ""
@@ -1809,6 +1820,9 @@ msgid ""
18091820
"and doing a different thing based on what class it is. For example, if you "
18101821
"have a function that does something::"
18111822
msgstr ""
1823+
"请注意大多数程序不会经常对用户自定义类使用 :func:`isinstance`。 "
1824+
"如果是你自已开发的类,更正确的面向对象风格是在类中定义方法来封装特定的行为,而不是检查对象的类并根据它属于什么类来做不同的事。 "
1825+
"例如,如果你有一个执行某些操作的函数::"
18121826

18131827
#: ../../faq/programming.rst:1464
18141828
msgid ""

library/sqlite3.po

Lines changed: 27 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
# Jerry Chen <[email protected]>, 2017
88
# Fei Yin <[email protected]>, 2018
99
# ww song <[email protected]>, 2018
10-
# Freesand Leo <[email protected]>, 2019
1110
# Kade For, 2019
1211
# ppcfish <[email protected]>, 2019
1312
# dogn he <[email protected]>, 2019
13+
# Freesand Leo <[email protected]>, 2019
1414
#
1515
#, fuzzy
1616
msgid ""
@@ -19,7 +19,7 @@ msgstr ""
1919
"Report-Msgid-Bugs-To: \n"
2020
"POT-Creation-Date: 2019-05-20 11:27+0900\n"
2121
"PO-Revision-Date: 2017-02-16 23:27+0000\n"
22-
"Last-Translator: dogn he <hedogn@163.com>, 2019\n"
22+
"Last-Translator: Freesand Leo <yuqinju@163.com>, 2019\n"
2323
"Language-Team: Chinese (China) (https://www.transifex.com/python-doc/teams/5390/zh_CN/)\n"
2424
"MIME-Version: 1.0\n"
2525
"Content-Type: text/plain; charset=UTF-8\n"
@@ -574,9 +574,9 @@ msgid ""
574574
"access attempt or :const:`None` if this access attempt is directly from "
575575
"input SQL code."
576576
msgstr ""
577-
"回调的第一个参数表示要授权的操作类型。 第二个和第三个参数将是参数或:const:None”,其取决于第一个参数。 "
578-
"第四个参数是数据库的名称(“main”,“temp”等)(如果适用)。 "
579-
"第五个参数是负责访问尝试的最内层触发器或视图的名称,或者:如果此访问尝试直接来自输入SQL代码,则为:const:None。"
577+
"回调的第一个参数表示要授权的操作类型。 第二个和第三个参数将是参数或 :const:`None`,具体取决于第一个参数的值。 第 4 "
578+
"个参数是数据库的名称(“main”,“temp”等),如果需要的话。 第 5 "
579+
"个参数是负责访问尝试的最内层触发器或视图的名称,或者如果此访问尝试直接来自输入 SQL 代码,则为 :const:`None`。"
580580

581581
#: ../../library/sqlite3.rst:416
582582
msgid ""
@@ -585,8 +585,8 @@ msgid ""
585585
" the first one. All necessary constants are available in the :mod:`sqlite3` "
586586
"module."
587587
msgstr ""
588-
"请参阅SQLite文档,了解第一个参数的可能值以及第二个和第三个参数的含义,具体取决于第一个参数。 "
589-
"所有必需的常量都可以在:mod`sqlite3`模块中找到。"
588+
"请参阅 SQLite 文档,了解第一个参数的可能值以及第二个和第三个参数的含义,具体取决于第一个参数。 所有必需的常量都可以在 "
589+
":mod:`sqlite3` 模块中找到。"
590590

591591
#: ../../library/sqlite3.rst:423
592592
msgid ""
@@ -601,20 +601,20 @@ msgstr ""
601601
msgid ""
602602
"If you want to clear any previously installed progress handler, call the "
603603
"method with :const:`None` for *handler*."
604-
msgstr "如果要清除以前安装的任何进度处理程序,调用该方法时请将handler参数设置为:const:None。"
604+
msgstr "如果要清除以前安装的任何进度处理程序,调用该方法时请将 *handler* 参数设置为 :const:`None`。"
605605

606606
#: ../../library/sqlite3.rst:431
607607
msgid ""
608608
"Returning a non-zero value from the handler function will terminate the "
609609
"currently executing query and cause it to raise an :exc:`OperationalError` "
610610
"exception."
611-
msgstr "从处理函数返回非零值将终止当前正在执行的查询并导致它引发 :exc:`OperationalError`异常。"
611+
msgstr "从处理函数返回非零值将终止当前正在执行的查询并导致它引发 :exc:`OperationalError` 异常。"
612612

613613
#: ../../library/sqlite3.rst:438
614614
msgid ""
615615
"Registers *trace_callback* to be called for each SQL statement that is "
616616
"actually executed by the SQLite backend."
617-
msgstr "为每个SQLite后端实际执行的SQL语句注册* trace_callback *调用。"
617+
msgstr "为每个 SQLite 后端实际执行的 SQL 语句注册要调用的 *trace_callback*。"
618618

619619
#: ../../library/sqlite3.rst:441
620620
msgid ""
@@ -625,13 +625,13 @@ msgid ""
625625
"management of the Python module and the execution of triggers defined in the"
626626
" current database."
627627
msgstr ""
628-
"传递给回调的唯一参数是正在执行的语句(作为字符串)。 回调的返回值将被忽略。 请注意,后端不仅运行传递给 "
629-
":meth:`Cursor.execute`方法的语句。 其他来源包括Python模块的事务管理和当前数据库中定义的触发器的执行。"
628+
"传递给回调的唯一参数是正在执行的语句(作为字符串)。 回调的返回值将被忽略。 请注意,后端不仅运行传递给 :meth:`Cursor.execute` "
629+
"方法的语句。 其他来源包括 Python 模块的事务管理和当前数据库中定义的触发器的执行。"
630630

631631
#: ../../library/sqlite3.rst:447
632632
msgid ""
633633
"Passing :const:`None` as *trace_callback* will disable the trace callback."
634-
msgstr "将* trace_callback *传递为:const:`None`将禁用跟踪回调。"
634+
msgstr "将传入的 *trace_callback* 设为 :const:`None` 将禁用跟踪回调。"
635635

636636
#: ../../library/sqlite3.rst:454
637637
msgid ""
@@ -652,7 +652,8 @@ msgid ""
652652
"This routine loads a SQLite extension from a shared library. You have to "
653653
"enable extension loading with :meth:`enable_load_extension` before you can "
654654
"use this routine."
655-
msgstr "此例程从共享库加载SQLite扩展。 在使用此例程之前,必须使用:meth:`enable_load_extension`启用扩展加载。"
655+
msgstr ""
656+
"此例程从共享库加载SQLite扩展。 在使用此例程之前,必须使用 :meth:`enable_load_extension` 启用扩展加载。"
656657

657658
#: ../../library/sqlite3.rst:477
658659
msgid ""
@@ -673,9 +674,9 @@ msgid ""
673674
"overhead. It will probably be better than your own custom dictionary-based "
674675
"approach or even a db_row based solution."
675676
msgstr ""
676-
"如果返回一个元组是不够的,并且你想要对列进行基于名称的访问,你应该考虑将:attr:`row_factory`设置为高度优化的:class:`sqlite3.Row`类型。"
677-
" :class:`Row`提供基于索引和不区分大小写的基于名称的访问,几乎没有内存开销。 "
678-
"它可能比您自己的基于字典的自定义方法甚至基于db_row的解决方案更好。"
677+
"如果返回一个元组是不够的,并且你想要对列进行基于名称的访问,你应该考虑将 :attr:`row_factory` 设置为高度优化的 "
678+
":class:`sqlite3.Row` 类型。 :class:`Row` 提供基于索引和不区分大小写的基于名称的访问,几乎没有内存开销。 "
679+
"它可能比您自己的基于字典的自定义方法甚至基于 db_row 的解决方案更好。"
679680

680681
#: ../../library/sqlite3.rst:498
681682
msgid ""
@@ -684,14 +685,14 @@ msgid ""
684685
"the :mod:`sqlite3` module will return Unicode objects for ``TEXT``. If you "
685686
"want to return bytestrings instead, you can set it to :class:`bytes`."
686687
msgstr ""
687-
"使用此属性可以控制为``TEXT``数据类型返回的对象。 默认情况下,此属性设置为 :class:`str` "
688-
":mod:`sqlite3`模块将返回``TEXT``的Unicode对象。 如果要返回字节串,可以将其设置为 :class:`bytes`。"
688+
"使用此属性可以控制为 ``TEXT`` 数据类型返回的对象。 默认情况下,此属性设置为 :class:`str` 和 :mod:`sqlite3` "
689+
"模块将返回 ``TEXT`` 的 Unicode 对象。 如果要返回字节串,可以将其设置为 :class:`bytes`。"
689690

690691
#: ../../library/sqlite3.rst:503
691692
msgid ""
692693
"You can also set it to any other callable that accepts a single bytestring "
693694
"parameter and returns the resulting object."
694-
msgstr "您还可以将其设置为接受单个bytestring参数的任何其他可调用对象,并返回结果对象。"
695+
msgstr "您还可以将其设置为接受单个 bytestring 参数的任何其他可调用对象,并返回结果对象。"
695696

696697
#: ../../library/sqlite3.rst:506
697698
msgid "See the following example code for illustration:"
@@ -710,8 +711,8 @@ msgid ""
710711
" the same capabilities as the :kbd:`.dump` command in the :program:`sqlite3`"
711712
" shell."
712713
msgstr ""
713-
"返回以SQL文本格式转储数据库的迭代器。 保存内存数据库以便以后恢复时很有用。 此函数提供与 :program:``sqlite3` shell中的 "
714-
":kbd:`.dump`命令相同的功能。"
714+
"返回以SQL文本格式转储数据库的迭代器。 保存内存数据库以便以后恢复时很有用。 此函数提供与 :program:``sqlite3` shell 中的 "
715+
":kbd:`.dump` 命令相同的功能。"
715716

716717
#: ../../library/sqlite3.rst:524
717718
msgid "Example::"
@@ -724,16 +725,16 @@ msgid ""
724725
" will be written into the mandatory argument *target*, that must be another "
725726
":class:`Connection` instance."
726727
msgstr ""
727-
"即使在SQLite数据库被其他客户端访问时,或者同时由同一连接访问,该方法也会对其进行备份。 该副本将写入强制参数* target "
728-
"*,该参数必须是另一个 :class:`Connection`实例。"
728+
"即使在 SQLite 数据库被其他客户端访问时,或者同时由同一连接访问,该方法也会对其进行备份。 该副本将写入强制参数 "
729+
"*target*,该参数必须是另一个 :class:`Connection` 实例。"
729730

730731
#: ../../library/sqlite3.rst:543
731732
msgid ""
732733
"By default, or when *pages* is either ``0`` or a negative integer, the "
733734
"entire database is copied in a single step; otherwise the method performs a "
734735
"loop copying up to *pages* pages at a time."
735736
msgstr ""
736-
"默认情况下,或者当* pages *为“0”或负整数时,整个数据库将在一个步骤中复制; 否则该方法一次循环复制* pages *规定数量的页面。"
737+
"默认情况下,或者当 *pages* 为 ``0`` 或负整数时,整个数据库将在一个步骤中复制否则该方法一次循环复制 *pages* 规定数量的页面。"
737738

738739
#: ../../library/sqlite3.rst:547
739740
msgid ""
@@ -773,7 +774,7 @@ msgstr "可用性:SQLite 3.6.11 或以上版本"
773774

774775
#: ../../library/sqlite3.rst:592
775776
msgid "Cursor Objects"
776-
msgstr "游标对象*Cursor*"
777+
msgstr "Cursor 对象"
777778

778779
#: ../../library/sqlite3.rst:596
779780
msgid "A :class:`Cursor` instance has the following attributes and methods."

0 commit comments

Comments
 (0)