Inheritance and Composition in Python: OOP in Python, Part 2
Inheritance and composition in Python with tested code: when to use each, how super() really works, duck typing, and why deep class hierarchies backfire.
Search
4 articles matched your search.
Inheritance and composition in Python with tested code: when to use each, how super() really works, duck typing, and why deep class hierarchies backfire.
Python classes and objects explained with tested code: __init__, self, dunder methods, properties and dataclasses, plus the shared-list bug to learn first.
Exception handling in Python done properly: try, except, else and finally, custom exceptions, chaining and logging, and why a bare except can break Ctrl-C.
Iterators and generators in Python explained: yield, pipelines that stream big files in flat memory, itertools, and why a generator silently runs only once.