Skip to content

Instantly share code, notes, and snippets.

View jamilnoyda's full-sized avatar
🏠
Working from home

jamil noyda jamilnoyda

🏠
Working from home
View GitHub Profile
@jamilnoyda
jamilnoyda / 1.srp.py
Created April 20, 2022 17:17 — forked from dmmeteo/1.srp.py
SOLID Principles explained in Python with examples.
"""
Single Responsibility Principle
“…You had one job” — Loki to Skurge in Thor: Ragnarok
A class should have only one job.
If a class has more than one responsibility, it becomes coupled.
A change to one responsibility results to modification of the other responsibility.
"""
class Animal:
def __init__(self, name: str):