Subclassing in Python Redux
Read OriginalThis in-depth article examines the ongoing debate between subclassing and composition in object-oriented programming, specifically within Python. It argues that while composition is often preferable, Python's design sometimes necessitates subclassing. The author identifies and analyzes three distinct types of inheritance (code sharing, type specification, and implementation reuse) to provide a nuanced framework for making informed design decisions.
Comments
No comments yet
Be the first to share your thoughts!
Browser Extension
Get instant access to AllDevBlogs from your browser