Introduction Two weeks ago I wrote an article about ABCs and interface enforcement. Shortly after I learned that you can do this as well with protocols. Python 3.8 introduced quite a groundbreaking feature that further advanced the language’s capabilities in type checking: the typing.Protocol which allows Python developers to define and enforce interface contracts in… Continue reading Leveraging typing.Protocol: Faster Error Detection And Beyond Inheritance
Articles on inheritance
Write more maintainable Python code, avoid these 15 code smells
By PyBites Team on 15 September 2023
This week we talk about code smells. 💡 Listen here: Also available on our YouTube channel: Code smells are characteristics in the code that might indicate deeper issues or potential problems. While they’re not necessarily bugs, they can be a sign of poor code quality or maintainability issues. 😱 We distilled 15 common smells ranging… Continue reading Write more maintainable Python code, avoid these 15 code smells
Django class based vs function based views
By PyBites Team on 28 February 2023
This post first appeared as an email on our friends list. We decided to publish it here because the question is still commonly asked 🤔 The other day I did a presentation on Django class based vs function based views. (Warning: this post is opinionated 😃) Also if you’re not into Django don’t stop reading just yet, because there are… Continue reading Django class based vs function based views
When to Write Classes in Python And Why it Matters
By Bob Belderbos on 25 April 2020
When people come to Python one of the things they struggle with is OOP (Object Oriented Programming). Not so much the syntax of classes, but more when and when not to use them. If that’s you, read on. In this article I will give you some insights that will get you clarity on this.
Code Challenge 20 – Object Oriented Programming Fun – Review
By PyBites Team on 29 May 2017
It’s review time again. Wow: challenge #20 already! We can’t believe we have worked through so many already. We also keep receiving amazing PRs, awesome!
Code Challenge 20 – Object Oriented Programming Fun
By PyBites Team on 22 May 2017
Hi Pythonistas, a new week, a new ‘bite’ of Python coding! This week we will let you experiment with Object Oriented Programming, an important skill and fundamental building block of (everthing-is-an-object) Python. Enjoy!
Everything is an Object, Python OOP primer
By Bob Belderbos on 24 January 2017
I created a notebook on OOP (object oriented programming) in Python.