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/2005-October/057666.html below:

[Python-Dev] Proposed resolutions for open PEP 343 issues

[Python-Dev] Proposed resolutions for open PEP 343 issues [Python-Dev] Proposed resolutions for open PEP 343 issuesEric Nieuwland eric.nieuwland at xs4all.nl
Wed Oct 26 08:17:01 CEST 2005
Guido van Rossum wrote:

> [Eric "are all your pets called Eric?" Nieuwland]
>>>> Hmmm... Would it be reasonable to introduce a ProtocolError 
>>>> exception?
>
> [Guido]
>>> And which perceived problem would that solve?
>
> [Eric]
>> It was meant to be a bit more informative about what is wrong.
>>
>> ProtocolError: lacks __enter__ or __exit__
>
> That's exactly what I'm trying to avoid. :)
>
> I find "AttributeError: __exit__" just as informative. In either case,
> if you know what __exit__ means, you'll know what you did wrong. And
> if you don't know what it means, you'll have to look it up anyway. And
> searching for ProtocolError doesn't do you any good -- you'll have to
> learn about what __exit__ is and where it is required.

I see. Then why don't we unify *Error into Error?
Just read the message and know what it means.
And we could then drop the burden of exception classes and only use the 
message.
A sense of deja-vu comes over me somehow ;-)

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