Nick Coghlan wrote:
I have a Python 2.5 candidate hierarchy below, which uses dual inheritance to avoid breaking backward compatibility - any existing except clauses will catch all of the exceptions they used to catch. The only new inheritance introduced is to new exceptions, also avoiding backward compatibility problems, as any existing except clauses will let by all of the exceptions they used to let by. There are no removals, but the deprecation process is started in order to change the names of ReferenceError and RuntimeWarning to WeakReferenceError and SemanticsWarning.
I like this approach of using multiple inheritence to solve the b/w compatibility problem.