Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update PEP 8 中文翻译.md #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Translation/PEP 8 中文翻译.md
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,7 @@ Python 将这种名称和类名混合到一起使用:如果类`Foo`有一个
常量通常是在模块级别定义的,并且全部采用大写字母,单词之间以下划线分隔。例如:`TOTAL` `MAX_OVERFLOW`。

继承的设计
永远记得区别类方法和实例变量(属性)应该是公开的还是非公开的。如果有所疑虑,就选择非公开。因为,将非公开属性变成公开属性和容易,反之很难。
永远记得区别类方法和实例变量(属性)应该是公开的还是非公开的。如果有所疑虑,就选择非公开。因为,将非公开属性变成公开属性很容易,反之很难。

类中的公开属性是留给与此类无关的客户使用的,并且保证向后的兼容性。非公开属性是那些不打算让第三方使用的部分,这类属性可能被更改甚至移除。

Expand Down Expand Up @@ -948,4 +948,4 @@ PEP 526 引入了变量注解。他们的风格建议与上面介绍的函数注
------
本文档没有版权限制,公众可随时参阅。

来源:https://github.com/python/peps/blob/master/pep-0008.txt
来源:https://github.com/python/peps/blob/master/pep-0008.txt