I’ve spent quite some time working with Python, and one thing I’ve consistently followed is the CapWords convention for class names—it’s a cornerstone of the Python class naming convention. When you reference a class, it’s a good idea to use capitalized variable names. This visually distinguishes class references from instance variables, which typically use lowercase or underscores.
Here’s an example:
class MyClass:
pass
# Correct convention
ReferenceToClass = MyClass
This makes it immediately clear that ReferenceToClass is a class and not an instance, adhering to clean, readable code practices.