From dea2728c5b941a45785be67ff2b8a77a294cbd06 Mon Sep 17 00:00:00 2001 From: woshihuo12 <253268499@qq.com> Date: Sat, 15 Feb 2020 11:58:27 +0800 Subject: [PATCH 1/4] =?UTF-8?q?6.6=20=E8=A7=A3=E6=9E=90=E5=92=8C=E4=BF=AE?= =?UTF-8?q?=E6=94=B9XML=20=E4=BF=AE=E6=94=B9=E9=94=99=E5=88=AB=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/c06/p06_parse_modify_rewrite_xml.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/c06/p06_parse_modify_rewrite_xml.rst b/source/c06/p06_parse_modify_rewrite_xml.rst index 72fa4ef7..df0193a5 100644 --- a/source/c06/p06_parse_modify_rewrite_xml.rst +++ b/source/c06/p06_parse_modify_rewrite_xml.rst @@ -5,7 +5,7 @@ ---------- 问题 ---------- -你想读取一个XML文档,对它最一些修改,然后将结果写回XML文档。 +你想读取一个XML文档,对它做一些修改,然后将结果写回XML文档。 ---------- 解决方案 From 54a2635927127e1fa6fa569126e9efe3b8a24e5b Mon Sep 17 00:00:00 2001 From: woshihuo12 <253268499@qq.com> Date: Sat, 15 Feb 2020 18:45:12 +0800 Subject: [PATCH 2/4] =?UTF-8?q?6.9=20=E7=BC=96=E7=A0=81=E5=92=8C=E8=A7=A3?= =?UTF-8?q?=E7=A0=81=E5=8D=81=E5=85=AD=E8=BF=9B=E5=88=B6=E6=95=B0=20?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=94=99=E5=88=AB=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/c06/p09_decode_encode_hexadecimal_digits.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/c06/p09_decode_encode_hexadecimal_digits.rst b/source/c06/p09_decode_encode_hexadecimal_digits.rst index a34c8b16..55ad1795 100644 --- a/source/c06/p09_decode_encode_hexadecimal_digits.rst +++ b/source/c06/p09_decode_encode_hexadecimal_digits.rst @@ -47,7 +47,7 @@ 而 ``binascii`` 模块中的函数大小写都能处理。 还有一点需要注意的是编码函数所产生的输出总是一个字节字符串。 -如果想强制以Unicode形式输出,你需要增加一个额外的界面步骤。例如: +如果想强制以Unicode形式输出,你需要增加一个额外的解码步骤。例如: .. code-block:: python From 9d124f4314392c56d6df528492a5b1d12ff06cdb Mon Sep 17 00:00:00 2001 From: woshihuo12 <253268499@qq.com> Date: Sat, 22 Feb 2020 09:40:28 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E9=94=99=E5=88=AB?= =?UTF-8?q?=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/c08/p05_encapsulating_names_in_class.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/c08/p05_encapsulating_names_in_class.rst b/source/c08/p05_encapsulating_names_in_class.rst index 4f8ef5d7..bb05f99b 100644 --- a/source/c08/p05_encapsulating_names_in_class.rst +++ b/source/c08/p05_encapsulating_names_in_class.rst @@ -80,6 +80,6 @@ Python并不会真的阻止别人访问内部名称。但是如果你这么做 lambda_ = 2.0 # Trailing _ to avoid clash with lambda keyword -这里我们并不使用单下划线前缀的原因是它避免误解它的使用初衷 -(如使用单下划线前缀的目的是为了防止命名冲突而不是指明这个属性是私有的)。 +这里我们并不使用单下划线前缀的原因是避免误解它的使用初衷 +(如使用单下划线后缀的目的是为了防止命名冲突而不是指明这个属性是私有的)。 通过使用单下划线后缀可以解决这个问题。 From e85ae42d2ae489eae6e35081d7918778742e772e Mon Sep 17 00:00:00 2001 From: woshihuo12 <253268499@qq.com> Date: Sat, 22 Feb 2020 10:06:06 +0800 Subject: [PATCH 4/4] =?UTF-8?q?8.6=20=E5=88=9B=E5=BB=BA=E5=8F=AF=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E7=9A=84=E5=B1=9E=E6=80=A7=20=E4=BF=AE=E6=AD=A3?= =?UTF-8?q?=E9=94=99=E5=88=AB=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/c08/p06_create_managed_attributes.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/c08/p06_create_managed_attributes.rst b/source/c08/p06_create_managed_attributes.rst index 3d6075c3..100be65d 100644 --- a/source/c08/p06_create_managed_attributes.rst +++ b/source/c08/p06_create_managed_attributes.rst @@ -110,7 +110,7 @@ property的一个关键特征是它看上去跟普通的attribute没什么两样 >>> -通常来讲,你不会直接取调用fget或者fset,它们会在访问property的时候自动被触发。 +通常来讲,你不会直接去调用fget或者fset,它们会在访问property的时候自动被触发。 只有当你确实需要对attribute执行其他额外的操作的时候才应该使用到property。 有时候一些从其他编程语言(比如Java)过来的程序员总认为所有访问都应该通过getter和setter,