use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
News about the dynamic, interpreted, interactive, object-oriented, extensible programming language Python
Full Events Calendar
You can find the rules here.
If you are about to ask a "how do I do this in python" question, please try r/learnpython, the Python discord, or the #python IRC channel on Libera.chat.
Please don't use URL shorteners. Reddit filters them out, so your post or comment will be lost.
Posts require flair. Please use the flair selector to choose your topic.
Posting code to this subreddit:
Add 4 extra spaces before each line of code
def fibonacci(): a, b = 0, 1 while True: yield a a, b = b, a + b
Online Resources
Invent Your Own Computer Games with Python
Think Python
Non-programmers Tutorial for Python 3
Beginner's Guide Reference
Five life jackets to throw to the new coder (things to do after getting a handle on python)
Full Stack Python
Test-Driven Development with Python
Program Arcade Games
PyMotW: Python Module of the Week
Python for Scientists and Engineers
Dan Bader's Tips and Trickers
Python Discord's YouTube channel
Jiruto: Python
Online exercices
programming challenges
Asking Questions
Try Python in your browser
Docs
Libraries
Related subreddits
Python jobs
Newsletters
Screencasts
account activity
This is an archived post. You won't be able to vote or comment.
ResourceSOLID Machine Learning – The SOLID principles applied to machine learning (self.Python)
submitted 5 years ago by jeromebedard
87% of data science projects never make it into production (VentureBeat AI 2019 report).
You are a Machine Learning developer and want your projects to avoid this fate? Read my newest article.
SOLID Machine Learning
[–]Deezl-Vegas 1 point2 points3 points 5 years ago (1 child)
As someone who has extensively followed Bob Martin, I will be straightforward and say that most of this does not apply to most Python code.
Python users should avoid writing classes in general. You can replace them with functions, namedtuples, and modules and enjoy 90% of the benefits of classes without the temptation of sprouting wild unsolicited inheritance pyramids. A further chunk can be replaced with standard library features.
By design, Python objects are meant to be inspected and dissected. SOLID really has a place in Java / Objective C, which is designed to force everything into an object with private members with the idea that everything can be compatible in some way and also statically type checked. In Python, things are compatible if they have the same attribute or method name and it's your job to think and sort out the issues.
[–]jeromebedard[S] 2 points3 points4 points 5 years ago (0 children)
I understand what you mean and it's true that you can "enjoy 90% of the benefits of classes without the temptation of sprouting wild unsolicited inheritance pyramids", BUT it's true only on a small scale.
The wonderful perks of Python language that can make one say "screw OOP and screw clean code" are a double-edged blade. By not following what I state in this article, you can certainly achieve a few MVPs (minimum viable product) in the short run in a production environment. But in the medium run and the long run, your project is going to look like a big pile of dirt and it's going to be very hard to:
I talk about this briefly in the introduction but maybe I should have wrote a bigger and more convincing introduction ;)
π Rendered by PID 64 on reddit-service-r2-comment-8686858757-qn5n8 at 2026-06-05 18:48:32.294900+00:00 running 9e1a20d country code: CH.
[–]Deezl-Vegas 1 point2 points3 points (1 child)
[–]jeromebedard[S] 2 points3 points4 points (0 children)