What style of defining variables in Python today will be used in the community of programmers: myVariable or my_variable ?
- 2The one that is described in the PEP (For example: pythonworld.ru/osnovy/… ) - nobody
|
1 answer
The Basic Coding Style Guide for Python is outlined in PEP8 . In short, the variables and functions should be called my_own_variable , my_own_function (lower-case, underscore-separated) This style (IMHO) is the generally accepted Python-style. The use of camelCase ( myVar , myFunc ) is myFunc , provided that this style prevails in the project.
|