[Python-Dev] Gradual migration

Barry A. Warsaw barry@wooz.org
Tue, 24 Oct 2000 12:40:50 -0400 (EDT)

>>>>> "PP" == Paul Prescod <paul@prescod.net> writes:

    PP>  * implementation language and Python inheritance semantics
    PP> are almost completely distinct. After all, we have Python
    PP> implementations in a variety of languages with minor
    PP> incompatibilities. Python could have a proper type/class
    PP> merging even if it were written in assembly language.  So
    PP> let's leave implementation language aside.

Jython experience backs this up.  It would be incredibly convenient if
we could just map Java classes to Python classes, so that for example,
we'd have in Java a PyException class that is exceptions.Exception
with minimal or no Java wrappings.  And Finn nearly did this.

The problem that we ran into with Java is that it allows only single
inheritance.  So you couldn't create a Python exception that multiply
inherited from two or more other Python exceptions.  Doesn't happen
often, but it does happen, so is that an acceptable tradeoff?

C++ might be better in this particular respect, but there will be
other issues, because as soon as you start transparently showing the
implementation's classes into Python, you inherit their semantics and
restrictions as well.

Just saying that it's tricky.