Skip to content

Instantly share code, notes, and snippets.

View DougBR's full-sized avatar
👨‍🔬

Douglas Luan DougBR

👨‍🔬
  • Finbits
  • Brasil
  • 10:22 (UTC -03:00)
View GitHub Profile
@dmmeteo
dmmeteo / 1.srp.py
Last active June 7, 2024 14:11
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):