> [!META]- Inline Metadata
[status:: boat]
[tags:: #state/boat #note/evergreen #concepts/python/oop ]
[up:: [[Python MOC]]]
In order to override a class method, the overriding method should also be decorated as a class method and take a required parameter `cls`, from which you can get class attributes. This is important to keep in mind when overriding things like [[PynamoDB MOC|PynamoDB]] models.
# Example
```python
class OverridingClass(Model):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
@classmethod
def classmethod(cls, *args, **kwargs):
class_attribute_example = cls.class_attribute
return super().classmethod(*args, **kwargs)
```