From b1cbbedd5a3148a84efe71dafe20f3b7d7dbcc1f Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 14 Feb 2021 12:05:40 +0800 Subject: [PATCH 1/2] PRF --- ...ell if implementing your Python code is a good idea.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/translated/tech/20191229 How to tell if implementing your Python code is a good idea.md b/translated/tech/20191229 How to tell if implementing your Python code is a good idea.md index e468233c23..6a40f0df90 100644 --- a/translated/tech/20191229 How to tell if implementing your Python code is a good idea.md +++ b/translated/tech/20191229 How to tell if implementing your Python code is a good idea.md @@ -7,12 +7,12 @@ [#]: via: (https://opensource.com/article/19/12/zen-python-implementation) [#]: author: (Moshe Zadka https://opensource.com/users/moshez) -如何判断实现你的 Python 代码是否是个好主意? +如何判断你的 Python 代码实现是否合适? ====== > 这是 Python 之禅特别系列的一部分,重点介绍第十七和十八条原则:困难和容易。 -!["开发人员和运营经理两个人之间的砖墙"][1] +![](https://img.linux.net.cn/data/attachment/album/202102/14/120518rjkwvjs76p9d1911.jpg) 一门语言并不是抽象存在的。每一个语言功能都必须用代码来实现。承诺一些功能是很容易的,但实现起来就会很麻烦。复杂的实现意味着更多潜在的 bug,甚至更糟糕的是,会带来日复一日的维护负担。 @@ -20,9 +20,9 @@ ### 如果一个实现难以解释,那就是个坏思路If the implementation is hard to explain, it's a bad idea -编程语言最重要的是可预测性。有时我们用抽象的编程模型来解释某个结构的语义,而这些模型与实现并不完全对应。然而,最好的解释只是*解释实现*。 +编程语言最重要的是可预测性。有时我们用抽象的编程模型来解释某个结构的语义,而这些模型与实现并不完全对应。然而,最好的释义就是*解释该实现*。 -如果该实现很难解释,那就意味着这个途径是不可能的。 +如果该实现很难解释,那就意味着这条路行不通。 ### 如果一个实现易于解释,那它可能是一个好思路If the implementation is easy to explain, it may be a good idea From 7082c70d9ac4d820217ac73ea0b0aed95ab5897f Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 14 Feb 2021 12:06:17 +0800 Subject: [PATCH 2/2] PUB @wxy https://linux.cn/article-13116-1.html --- ...to tell if implementing your Python code is a good idea.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20191229 How to tell if implementing your Python code is a good idea.md (97%) diff --git a/translated/tech/20191229 How to tell if implementing your Python code is a good idea.md b/published/20191229 How to tell if implementing your Python code is a good idea.md similarity index 97% rename from translated/tech/20191229 How to tell if implementing your Python code is a good idea.md rename to published/20191229 How to tell if implementing your Python code is a good idea.md index 6a40f0df90..1a2358a77c 100644 --- a/translated/tech/20191229 How to tell if implementing your Python code is a good idea.md +++ b/published/20191229 How to tell if implementing your Python code is a good idea.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-13116-1.html) [#]: subject: (How to tell if implementing your Python code is a good idea) [#]: via: (https://opensource.com/article/19/12/zen-python-implementation) [#]: author: (Moshe Zadka https://opensource.com/users/moshez)