Coming from a C# background the naming convention for variables and method names are usually either camelCase or PascalCase:
(来自C#背景,变量和方法名称的命名约定通常是camelCase或PascalCase:)
// C# example
string thisIsMyVariable = "a"
public void ThisIsMyMethod()
In Python, I have seen the above but I have also seen underscores being used:
(在Python中,我已经看到了上面的内容,但我也看到了使用下划线:)
# python example
this_is_my_variable = 'a'
def this_is_my_function():
Is there a more preferable, definitive coding style for Python?
(Python有更优选的,明确的编码风格吗?)
ask by Ray Vega translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…