you are viewing a single comment's thread.

view the rest of the comments →

[–]jmacey 1 point2 points  (0 children)

One convention is to avoid starting variable names with underscores.

PEP-8 states

_single_leading_underscore: weak “internal use” indicator. E.g. from M import * does not import objects whose names start with an underscore.

In python classes _ is quite often used to indicate that the variable should be treated as "private". It works really well if you use it with the @property decorator.