[Python-Dev] subclassing builtin data structures
Greg Ewing
greg.ewing at canterbury.ac.nz
Sat Feb 14 01:19:15 CET 2015
Isaac Schwabacher wrote:
> IIUC, the argument is that the Liskov Substitution Principle is a statement
> about how objects of a subtype behave relative to objects of a supertype, and
> it doesn't apply to constructors because they aren't behaviors of existing
> objects.
Another way to say that is that constructors are class
methods, not instance methods.
--
Greg
More information about the Python-Dev
mailing list