Question #198

What is the purpose of a single leading underscore for a name in a class?

To quote PEP-8: _single_leading_underscore: weak "internal use" indicator. E.g. from M import * does not import objects whose name starts with an underscore. However, it is only an indication, it is always possible to access or modify it depending of its implementation. (python.org/dev/peps/pep-0008)


Comment on Disqus:

Question difficulty: 🔵🔵🔵🔵🔵