Python 101 : Naming style - Underscores and double underscores -
Names that start with an underscore - _var - are not imported into other programs using the - from ... import ... - instruction.
They are meant to be used within the program as "internals":
The name that is represented by single underscore - _ - is used by python to store the result of the last result, for example to go through a loop where the index is of no use to us:
Names with a trailing underscore - var_ - are usually used so the name doesn't get mixed up with a python keyword.
Comments
Post a Comment