Re: Python Distilled
- From: Georg Brandl <g.brandl-nospam@xxxxxxx>
- Date: Mon, 06 Nov 2006 11:26:11 +0100
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:
... passclass E(object):
...
Traceback (most recent call last):raise E
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
.
- References:
- Python Distilled
- From: Simon Wittber
- Re: Python Distilled
- From: Marc 'BlackJack' Rintsch
- Python Distilled
- Prev by Date: Re: Creating db front end or middleware.
- Next by Date: Re: Python Distilled
- Previous by thread: Re: Python Distilled
- Next by thread: Re: Python Distilled
- Index(es):