Python supports LSP, does it?

Mike Meyer mwm at mired.org
Wed Aug 10 21:41:18 EDT 2005


bruno modulix <onurb at xiludom.gro> writes:
> Clearly, somethingElse is a subtype of baseClass, when derivedClass is
> not. Don't confuse suclassing with subtyping. issinstance() let you
> check for subclassing, not for subtyping. The only language-level
> mechanism I know of that more or less inforce LSP is Eiffel's contracts.

Eiffel's DbC has been picked up by other languages. D and SPARK come
to mind.

In a broader sense, a couple of Python frameworks support interfaces,
which basically guarantee subtyping at the same level as Liskov's CLU
language does.

         <mike
-- 
Mike Meyer <mwm at mired.org>			http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.



More information about the Python-list mailing list