stackoverflow链接:
结论:PEP8 规定是:为了更好的可读性,应该用下划线来命名变量
Function names should be lowercase, with words separated by underscores as necessary to improve readability.
mixedCase is allowed only in contexts where that's already the prevailing style
Use the function naming rules: lowercase with words separated by underscores as necessary to improve readability.
Google Python Style Guide 的例子:
module_name, package_name, ClassName, method_name, ExceptionName, function_name, GLOBAL_CONSTANT_NAME, global_var_name, instance_var_name, function_parameter_name, local_var_name
2.另一个讨论:
https://stackoverflow.com/questions/8908760/should-i-use-camel-case-or-underscores-in-python
结论:
应该用:
而不是:
def myFunction():