Naming conventions of python
1.package name
全部小写字母,中间可以由点分隔开,作为命名空间,包名应该具有唯一性,推荐采用公司或组织域名的倒置,如com.apple.quicktime.v2
2.module name
全部小写字母,如果是多个单词构成,可以用下划线隔开,如dummy_threading.
3.class name
采用大驼峰法命名,如SplitViewController
4.var name
全部小写字母,如果由多个单词构成,可以用下划线隔开。如果变量应用于模块或函数内部,则变量名可以用单下划线开头;变量类内部私有变量使用变量名可以双下划线开头。另外,避免使用小写L、大写O和大写I作为变量名。
5.函数名和方法名
命名同变量命名,如balance_account
6 .常量名
全部大写字母,如果是由多个单词构成,可以用下划线隔开,如YEAR和 WEEK_OF_MONTH
Naming conventions of python的更多相关文章
- Effective Java 56 Adhere to generally accepted naming conventions
Typographical naming conventions Identifier Type Type Examples Package com.google.inject, org.joda.t ...
- Naming Conventions for .NET / C# Projects
http://www.akadia.com/services/naming_conventions.html Naming Conventions for .NET / C# Projects Mar ...
- C# Coding & Naming Conventions
Reference document https://msdn.microsoft.com/en-us/library/ff926074.aspx https://msdn.microsoft.com ...
- Spring mvc 4系列教程(二)——依赖管理(Dependency Management)和命名规范(Naming Conventions)
依赖管理(Dependency Management)和命名规范(Naming Conventions) 依赖管理和依赖注入(dependency injection)是有区别的.为了将Spring的 ...
- JavaScript Patterns 2.10 Naming Conventions
1. Capitalizing Constructors var adam = new Person(); 2. Separating Words camel case - type the word ...
- Python PEP-8编码风格指南中文版
#PEP 8 – Python编码风格指南 PEP: 8 Title: Style Guide for Python Code Author: Guido van Rossum , Barry War ...
- (转)PEP 8——Python编码风格指南
PEP 8——Python编码风格指南标签(空格分隔): Python PEP8 编码规范原文:https://lizhe2004.gitbooks.io/code-style-guideline-c ...
- PEP8中文翻译(转)
原文:https://github.com/zgia/manual PEP 8 -- Style Guide for Python Code PEP Index > PEP 8 -- Style ...
- Python编码规范(PEP8)
Introduction 介绍 本文提供的Python代码编码规范基于Python主要发行版本的标准库.Python的C语言实现的C代码规范请查看相应的PEP指南1. 这篇文档以及PEP 257(文档 ...
随机推荐
- AGC016B Colorful Hats(构造)
题目大意: 给定n和n个数,每个数a[i]代表除了i外序列中颜色不同的数的个数,问能否构造出来这个数列. 比较简单,首先先求出来a数列的最大值Max, 如果有数小于Max-1,那么显然是不存在的 接下 ...
- 洛谷 P1379 八数码难题 解题报告
P1379 八数码难题 题目描述 在3×3的棋盘上,摆有八个棋子,每个棋子上标有1至8的某一数字.棋盘中留有一个空格,空格用0来表示.空格周围的棋子可以移到空格中.要求解的问题是:给出一种初始布局(初 ...
- 【BZOJ 4103】 [Thu Summer Camp 2015]异或运算 可持久化01Trie
我们观察数据:树套树 PASS 主席树 PASS 一层一个Trie PASS 再看,异或!我们就把目光暂时定在01Tire然后我们发现,我们可以带着一堆点在01Trie上行走,因为O(n*q* ...
- Codeforces Round #524 (Div. 2) B. Margarite and the best present
B. Margarite and the best present 题目链接:https://codeforces.com/contest/1080/problem/B 题意: 给出一个数列:an=( ...
- BZOJ1191:超级英雄(二分图匹配)
[HNOI2006]超级英雄Hero 题目链接:https://www.lydsy.com/JudgeOnline/problem.php?id=1191 Description: 现在电视台有一种节 ...
- saltshaker填坑
参考资料: https://github.com/yueyongyue/saltshaker http://blog.sina.com.cn/s/blog_b21312340102whzw.html ...
- bzoj 2425 [HAOI2010]计数 dp+组合计数
[HAOI2010]计数 Time Limit: 10 Sec Memory Limit: 128 MBSubmit: 451 Solved: 289[Submit][Status][Discus ...
- [CVPR2017]Online Video Object Segmentation via Convolutional Trident Network
基于三端卷积网络的在线视频目标分割 针对半监督视频目标分割任务,作者采取了和MaskTrace类似的思路,以optical flow为主. 本文亮点在于: 1. 使用共享backbone,三输出的自编 ...
- DP---背包问题
http://www.hawstein.com/posts/dp-knapsack.html http://www.cnblogs.com/wwwjieo0/archive/2013/04/01/29 ...
- bzoj2453/2120 数颜色
传送门:http://www.lydsy.com/JudgeOnline/problem.php?id=2120 http://www.lydsy.com/JudgeOnline/problem.ph ...