[Python-Dev] Bare except clauses in PEP 348

Reinhold Birkenfeld reinhold-birkenfeld-nospam at wolke7.net
Thu Aug 25 19:17:14 CEST 2005

Raymond Hettinger wrote:
>> Deprecation means your code will still work I hope every book that
>> documents "except:" also adds "but don't use this except under very
>> special circumstances".
>> I think you're overreacting (again), Raymond. 3.0 will be much more
>> successful if we can introduce many of its features into 2.x. Many of
>> those features are in fact improvements of the language even if they
>> break old code. We're trying to balance between breaking old code and
>> introducing new features; deprecation is the accepted way to do this.

> Fredrik, please speak up.  Someone should represent the users here.  I'm
> reached my limit on how much time I can devote to thinking out the
> implications of these proposals.  Someone else needs to "overreact".

Perhaps I may add a pragmatic POV (yes, I know that "pragmatic" is usually
attributed to another language ;-).

If "except:" issues a deprecation warning in 2.5, many people will come and
say "woohoo, Python breaks backwards compatibility" and "I knew it, Python
is unreliable, my script issues 1,233 warnings now" and such.

You can see this effect looking at the discussion that broke out when Guido
announced that map, filter and reduce would vanish (as builtins) in 3.0.
People spoke up and said, "if that's going to be the plan, I'll stop using
Python" etc.

That said, I think that unless it is a new feature (like with statements)
transitions to Python 3.0 shouldn't be enforced in the 2.x series. With 3.0,
everyone expects a clear cut and a compatibility breach.


Mail address is perfectly valid!

More information about the Python-Dev mailing list