A RetroSearch Logo

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

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2004-August/046871.html below:

[Python-Dev] Python in Unicode context)

Exceptional inheritance patterns (was Re: [Python-Dev] Python in Unicode context) Exceptional inheritance patterns (was Re: [Python-Dev] Python in Unicode context)Aahz aahz at pythoncraft.com
Thu Aug 5 17:26:45 CEST 2004
On Thu, Aug 05, 2004, Holger Krekel wrote:
> Guido van Rossum wrote:
>>
>> (It will also break code that creates a class used as an exception
>> that doesn't derive from Exception, but those should be shot. :-)
> 
> Then i guess that searching down into a recursive structure and just 
> raising an "i found it" result object up doesn't count as a use case in
> your book, right?   It can avoid boilerplate code like return-if-not-None 
> checks and I have used it for e.g. finding patterns in an AST-Tree. 

In cases where I've done this, I've always inherited from Exception or a
subclass.  Is there any reason not to?
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

"To me vi is Zen.  To use vi is to practice zen.  Every command is a
koan.  Profound to the user, unintelligible to the uninitiated.  You
discover truth everytime you use it."  --reddy at lion.austin.ibm.com
More information about the Python-Dev mailing list

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