Is there a reason for SendNotificationMixin to be a class or a mixin? It's methods do not use 'self' at all (except self.send_email, and that should just be a function call). Classes which do not have any state, and do not use self, are just namespaces for functions, except they are harder to use (e.g. you have to instantiate them or inherit from them etc.). Python normally uses modules for namespaces, not classes. youtube.com/watch?v=o9pEzgHorH0
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Is there a reason for SendNotificationMixin to be a class or a mixin? It's methods do not use 'self' at all (except
self.send_email
, and that should just be a function call). Classes which do not have any state, and do not useself
, are just namespaces for functions, except they are harder to use (e.g. you have to instantiate them or inherit from them etc.). Python normally uses modules for namespaces, not classes. youtube.com/watch?v=o9pEzgHorH0