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/2003-June/036055.html below:

[Python-Dev] Re: PEP-317

[Python-Dev] Re: PEP-317Phillip J. Eby pje@telecommunity.com
Mon, 09 Jun 2003 14:52:18 -0400
At 12:54 PM 6/9/03 -0600, Steven Taschuk wrote:
>Quoth Raymond Hettinger:
>   [...]
> > Except for conceptual purity, is there any real payoff in terms
> > of performance or capability that would warrant a wholesale
> > revision of working code?
>
>There's also the question (mentioned in the PEP, albeit
>parenthetically) of how implicit instantiation could work with any
>future plan to allow new-style exceptions.

isinstance(ob,Exception)
issubclass(cls,Exception)

That is, a new-style exception would have to be an instance or subclass of 
Exception.

The *real* thing that's broken is the check to see if an exception is a 
tuple!  isinstance(ob,Exception) should be checked first.

I guess I'm missing why this wouldn't work for new-style exceptions, 
provided they are required to subclass Exception (which I thought 
everything was going to be required to do eventually).




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