“Private” (implementation) class in Python

Use a single underscore prefix:

class _Internal:
    ...

This is the official Python convention for ‘internal’ symbols; “from module import *” does not import underscore-prefixed objects.

Reference to the single underscore convention.

Leave a Comment