Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 1ceb8cf

Browse files
committed
err
1 parent 62b6797 commit 1ceb8cf

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

‎README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@
4040
* [Programming Recommendations - 编码建议](#9)
4141
* [Function Annotations - 函数注释](#9.1)
4242

43-
<h2 id="1">简介<h2>
43+
<h2 id="1">简介</h2>
4444
许多工程项目都有自己独有的编码风格指南。如果发生任何规则冲突,当然是与项目级别的代码风格保持一致。美其名曰:入乡随俗,Do what Romans do in Rome,到了罗马就跟着吃马肉,生在唐朝就吃胖点。
4545

46-
<h2 id="2">愚蠢的一致性是小心灵的大地精<h2>
46+
<h2 id="2">愚蠢的一致性是小心灵的大地精</h2>
4747
代码风格一致性当然重要,毕竟读起来跟做spa一样爽,但有时也要有自己的判断,不要跟个傻X一样,明明是个90后,非得穿丝袜。
4848

4949
例如以下场景:
@@ -52,7 +52,7 @@
5252

5353
2、遵循此风格后和其他 python 版本不兼容,甚至出现错误。
5454

55-
<h2 id="3">代码布局<h2>
55+
<h2 id="3">代码布局</h2>
5656

5757
<h3 id="3.1">缩进</h3>
5858
一个缩进级别四个空格。
@@ -238,12 +238,12 @@ import os
238238
import sys
239239
```
240240

241-
<h2 id="4">字符串引号<h2>
241+
<h2 id="4">字符串引号</h2>
242242
在 Python 中,单引号和双引号是等价的,只需要坚持使用一种并保持一致即可。
243243

244244
在双引号中使用单引号,单引号中使用双引号。三引号中使用双引号。
245245

246-
<h2 id="5">表达式和语句中的空格<h2>
246+
<h2 id="5">表达式和语句中的空格<h2/>
247247
<h3 id="5.1">心理藏的小烦恼</h3>
248248
在以下场景避免不必要的空格
249249

@@ -389,7 +389,7 @@ do_one(); do_two(); do_three(long, argument,
389389

390390
if foo == 'blah': one(); two(); three()
391391
```
392-
<h2 id="6">何时使用逗号结尾<h2>
392+
<h2 id="6">何时使用逗号结尾</h2>
393393

394394
单元素元组强制使用逗号:
395395

@@ -419,7 +419,7 @@ FILES = ['setup.cfg', 'tox.ini',]
419419
initialize(FILES, error=True,)
420420
```
421421

422-
<h2 id="7">注释<h2>
422+
<h2 id="7">注释</h2>
423423

424424
糟糕的注释不如没有注释,一定要用 English 注释。
425425

@@ -452,7 +452,7 @@ Optional plotz says to frobnicate the bizbaz first.
452452
"""
453453
```
454454

455-
<h2 id="8">命名约定<h2>
455+
<h2 id="8">命名约定</h2>
456456
<h3 id="8.1">圣经戒律</h3>
457457

458458
对用户可见的公共 API 部分的命名应该遵从反应如何使用而不是怎么实现。
@@ -742,6 +742,6 @@ No: if greeting == True:
742742
Worse: if greeting is True:
743743
```
744744

745-
<h2 id="9.1">函数注释<h2>
745+
<h2 id="9.1">函数注释</h2>
746746

747747
个人建议:和项目注释风格保持一致。赏心悦目,纷吾既有此内美兮,又重之以修能,即可。

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /