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/2006-April/063433.html below:

[Python-Dev] Should issubclass() be more like isinstance()?

[Python-Dev] Should issubclass() be more like isinstance()? [Python-Dev] Should issubclass() be more like isinstance()?James Y Knight foom at fuhm.net
Wed Apr 5 06:59:41 CEST 2006
On Apr 4, 2006, at 11:41 PM, Alex Martelli wrote:
> IMHO, the solution to THAT very real problem is to supply a built-in
> function that catches some exceptions and maps them into suitable
> return values. Simplest would be something like:
[...]
> though I'm sure we can get better syntax if we turn 'catch' into some
> kind of syntactic special form.  My point is that there are umpteen
> predicates one can write which would have to be distorted to ensure
> they can't raise -- better to let them raise if they must, and allow
> catching the expected exception(s), somewhat like this example.

And while you're at it, how about some syntax to use try/finally and  
while inside expressions too.

That will complete the duplication of flow control syntax between  
statement and expression form.

James
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