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/2008-March/077714.html below:

[Python-Dev] New/Old class exception pitfall

[Python-Dev] New/Old class exception pitfall [Python-Dev] New/Old class exception pitfallOleg Broytmann phd at phd.pp.ru
Tue Mar 18 00:13:14 CET 2008
On Mon, Mar 17, 2008 at 06:35:46PM -0400, Alexander Belopolsky wrote:
> class x:
>  pass
> class y(x):
>  pass
> try:
>  raise y
> except y:
>  print "a"
> except:
>  print "b"
> 
> It prints 'b'.

   Python 2.2, 2.3, 2.4 and 2.5 on Linux: prints 'a'.

Oleg.
-- 
     Oleg Broytmann            http://phd.pp.ru/            phd at phd.pp.ru
           Programmers don't die, they just GOSUB without RETURN.
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