[Python-Dev] Re: PEP 246: LiskovViolation as a name

Guido van Rossum gvanrossum at gmail.com
Wed Jan 12 00:20:12 CET 2005


> My point is that it'd be nice if we could come up with an exception name
> which could be grokkable without requiring 1) Google, 2) relatively
> high-level understanding of type theory.

How about SubstitutabilityError?

> The point is broader, though -- when I get my turn in the time machine,
> I'll lobby for replacing NameError with UndefinedVariable or something
> similar (or more useful still).  The former is confusing to novices, and
> while it can be learned, that's yet another bit of learning which is,
> IMO, unnecessary, even though it may be technically more correct.

We did that for UnboundLocalError, which subclasses NameError. Perhaps
we can rename NameError to UnboundVariableError (and add NameError as
an alias for b/w compat).

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


More information about the Python-Dev mailing list