2017년 5월 4일 목요일

Python Naming Convention


Type Option Default regular expression
Argument argument-rgx [a-z_][a-z0-9_]{2,30}$
Attribute attr-rgx [a-z_][a-z0-9_]{2,30}$
Class class-rgx [A-Z_][a-zA-Z0-9]+$
Constant const-rgx (([A-Z_][A-Z0-9_]*)|(__.*__))$
Function function-rgx [a-z_][a-z0-9_]{2,30}$
Method method-rgx [a-z_][a-z0-9_]{2,30}$
Module module-rgx (([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
Variable variable-rgx [a-z_][a-z0-9_]{2,30}$
Variable, inline1 inlinevar-rgx [A-Za-z_][A-Za-z0-9_]*$

1. Used as part of list comprehensions and generators.

댓글 없음:

댓글 쓰기

Python Naming Convention

Type Option Default regular expression Argument argument-rgx [a-z_][a-z0-9_]{2,30}$ Attribute attr-rgx [a-z_][a-z0-9_]{2,30}...