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的更多相关文章

  1. Effective Java 56 Adhere to generally accepted naming conventions

    Typographical naming conventions Identifier Type Type Examples Package com.google.inject, org.joda.t ...

  2. Naming Conventions for .NET / C# Projects

    http://www.akadia.com/services/naming_conventions.html Naming Conventions for .NET / C# Projects Mar ...

  3. C# Coding & Naming Conventions

    Reference document https://msdn.microsoft.com/en-us/library/ff926074.aspx https://msdn.microsoft.com ...

  4. Spring mvc 4系列教程(二)——依赖管理(Dependency Management)和命名规范(Naming Conventions)

    依赖管理(Dependency Management)和命名规范(Naming Conventions) 依赖管理和依赖注入(dependency injection)是有区别的.为了将Spring的 ...

  5. JavaScript Patterns 2.10 Naming Conventions

    1. Capitalizing Constructors var adam = new Person(); 2. Separating Words camel case - type the word ...

  6. Python PEP-8编码风格指南中文版

    #PEP 8 – Python编码风格指南 PEP: 8 Title: Style Guide for Python Code Author: Guido van Rossum , Barry War ...

  7. (转)PEP 8——Python编码风格指南

    PEP 8——Python编码风格指南标签(空格分隔): Python PEP8 编码规范原文:https://lizhe2004.gitbooks.io/code-style-guideline-c ...

  8. PEP8中文翻译(转)

    原文:https://github.com/zgia/manual PEP 8 -- Style Guide for Python Code PEP Index > PEP 8 -- Style ...

  9. Python编码规范(PEP8)

    Introduction 介绍 本文提供的Python代码编码规范基于Python主要发行版本的标准库.Python的C语言实现的C代码规范请查看相应的PEP指南1. 这篇文档以及PEP 257(文档 ...

随机推荐

  1. DataBase -- Second Highest Salary

    Question: Write a SQL query to get the second highest salary from the Employee table. +----+-------- ...

  2. Citrix Netscaler版本管理和选择

    Citrix Netscaler版本管理和选择 来源 http://blog.51cto.com/caojin/1898164 随着Citrix Netscaler的快速发展,有很多人在维护设备时经常 ...

  3. WebServer参数长度超出解决

    当内容超过了4M会报错 System.Web.Services.Protocols.SoapException: 运行配置文件中指定的扩展时出现异常. ---> System.Web.HttpE ...

  4. Acunetix Web Vulnarability Scanner V10.5 详细中文手册

    目录: 0×00.什么是Acunetix Web Vulnarability Scanner ( What is AWVS?) 0×01.AWVS安装过程.主要文件介绍.界面简介.主要操作区域简介(I ...

  5. pb_ds

    #include<ext/pb_ds/priority_queue.hpp>#define ll long long#define pa pair<ll,int>using n ...

  6. HNOI2002 营业额统计 [Splay]

    题目描述 Tiger最近被公司升任为营业部经理,他上任后接受公司交给的第一项任务便是统计并分析公司成立以来的营业情况. Tiger拿出了公司的账本,账本上记录了公司成立以来每天的营业额.分析营业情况是 ...

  7. POJ3189:Steady Cow Assignment(二分+二分图多重匹配)

    Steady Cow Assignment Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 7482   Accepted: ...

  8. Exponial~(欧拉函数)~(发呆题)

    Description Everybody loves big numbers (if you do not, you might want to stop reading at this point ...

  9. HDU2571--命运---DP

    http://acm.hdu.edu.cn/showproblem.php?pid=2571 #include "iostream" #include "cstdio&q ...

  10. jzoj2700 【GDKOI2012模拟02.01】数字

    传送门:https://jzoj.net/senior/#main/show/2700 [题目大意] 令n为正整数,S(n)为n的各位数字之和,令