Re: Python Distilled



Marc 'BlackJack' Rintsch wrote:
In <1162790565.418382.237050@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>, Simon Wittber
wrote:

I'd also like to remove any deprecated or stuff which is left in for
backwards functionality (eg Classic classes).

Classic classes are still needed for exceptions:

class E(object):
... pass
...
raise E
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: exceptions must be classes, instances, or strings (deprecated),
not type

The error is a bit misleading, since in Python 2.5 all exceptions are new-style,
but new exception classes must be derived from an existing one.
Classic classes, their instances and strings are only allowed for backwards compatibility.

Georg
.