[Python-Dev] Proposed resolutions for open PEP 343 issues (original) (raw)

Guido van Rossum guido at python.org
Tue Oct 25 22:35:14 CEST 2005


[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.

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



More information about the Python-Dev mailing list