Arguments, local variables, and global variables coding convention in Python
Posted
by prosseek
on Stack Overflow
See other posts from Stack Overflow
or by prosseek
Published on 2010-04-08T15:39:52Z
Indexed on
2010/04/08
16:53 UTC
Read the original article
Hit count: 705
python
|coding-standards
In python, there is no way to differentiate between arguments, local variables, and global variables. The easy way to do so might be have some coding convention such as
- Global variables start with _ and capital letter
- arguments end with with _
_Gvariable = 10 def hello(x_, y_): z = x_ + y_
Is this a Pythonian way to go? I mean, is there well established/agreed coding-standards to differentiate them in python?
© Stack Overflow or respective owner