A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2002-March/021814.html below:

[Python-Dev] Deprecating string exceptions

[Python-Dev] Deprecating string exceptions [Python-Dev] Deprecating string exceptionsMartin v. Loewis martin@v.loewis.de
27 Mar 2002 23:17:02 +0100
Guido van Rossum <guido@python.org> writes:

> > Paul Prescod <paul@prescod.net> writes:
> > 
> > > Should it be arbitrary objects or just subclasses of exception: "It is
> > > recommended that user-defined exceptions in new code be derived from
> > > Exception, although for backward compatibility reasons, this is not
> > > required. Eventually this rule will be tightened."
> 
> [Martin]
> > If that is the rule, the bug report can be closed as "not-a-bug".
> 
> I seem to have a particularly dense day. :-(
> 
> What does "that" (in "If that is the rule") refer back to?

"user-defined exceptions be derived from Exception". It is only a
recommendation in the sense that you can use arbitrary classic
classes. If the rule is eventually tightened, it is ok if new-style
classes are not allowed as exceptions right now. An action is only
needed if you pronounce that it is desirable to allow new-style
classes as exceptions - which would necessarily have a base class that
is not derived from Exception.

Regards,
Martin




RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4