trekhleb / learn-python

📚 Playground and cheatsheet for learning Python. Collection of Python scripts that are split by topics and contain code examples with explanations.
MIT License
16.45k stars 2.69k forks source link

Design Patterns concepts implementations in Python #35

Open rhoitjadhav opened 3 years ago

rhoitjadhav commented 3 years ago

It would be very nice if you could implement design patterns in Python. I hope you are aware of these concepts.

For more info please navigate to this link

evaldez89 commented 3 years ago

I agreed. People often discard python as an OOP language and use it only for its scripting advantages. Nonetheless, it it as powerful as any other OOP typed language.

Here, I started a project implementing abstract factory. It needs improvement, but it's a start.

https://github.com/evaldez89/banks-transaction-email-reader

ghost commented 3 years ago

@rhoitjadhav @evaldez89 I agree, too. Maybe, let's start by building up a repo folder structure and then fill it over time with good examples. But imho, structural and behavioral patterns should be covered at least...

ghost commented 3 years ago

@rhoitjadhav @evaldez89 @giugiozza @ANONYJNOKA @sebaslucio-actuary @trekhleb I added a first structural frame (directory backbone) with some first examples that I found really useful. Since many design principles are already partially or fully integrated into today's core-python, there are not THAT many design patterns out there. Nevertheless the first examples should give a nice overview and make devs appreciate python even more.
Feel free to add more example classes/functions to the specific directories/modules.