-
Notifications
You must be signed in to change notification settings - Fork 0
Mixins
Vinicius Reif Biavatti edited this page Jul 25, 2022
·
2 revisions
- Use the Suffix
Mixin
to determinate that the class is a mixin - The Child class should inherit mixins as first, and then the other base classes
✅ Do
# Mixin suffix
class JSONMixin():
...
# Mixin as first base
class Child(JSONMixin, BaseClass):
...
❌ Don't
# Without mixin suffix
class JSON():
...
# Mixin as second base (wrong)
class Child(BaseClass, JSONMixin):
...
- Home
- Structural Naming Conventions
- Format Conventions
- Code Naming Conventions
- Inheritance
- Access Modifiers
- Importation
- Functions and Methods
- Documentation
- Resources