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/021818.html below:

R: [Python-Dev] Deprecating string exceptions

R: [Python-Dev] Deprecating string exceptions R: [Python-Dev] Deprecating string exceptionsGuido van Rossum guido@python.org
Wed, 27 Mar 2002 20:09:01 -0500
> But this is legal in 2.2
> 
> >>> class Z(str,Exception):
> ...  pass
> ...
> >>> Z.__bases__
> (<type 'str'>, <class exceptions.Exception at 0x00757700>)
> >>> Z.__base__
> <type 'str'>
> 
> so the issue is more subtle or I'm missing something?

Legal, but not particularly useful.  Anyway, I think that "derives
from Exception" overrules "derives from str" here, so this should be
allowed.  Note that currently it creates a new-style class and thus it
doesn't work.

--Guido van Rossum (home page: http://www.python.org/~guido/)



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