[Python-Dev] Re: [Python-checkins] CVS: python/dist/src/Include rangeobject.h,2.16,2.17

Barry A. Warsaw barry@digicool.com
Mon, 9 Jul 2001 00:20:46 -0400

>>>>> "TP" == Tim Peters <tim.one@home.com> writes:

    TP> Since instance objects have always been the flakiest in this
    TP> respect, and the instance/class machinery is undergoing
    TP> radical surgery on descr-branch (in particular, classes are
    TP> themselves becoming instances (of metaclasses)), I think Guido
    TP> is trying to get a feel for how loudly people will howl if we
    TP> don't add reams of obscure code seeking to reproduce old
    TP> accidents exactly.

As you say, this has always been flaky, inconsistent, underspecified,
and unpredictable, so IMO Guido's free to change this kind of thing as
he sees fit.  Builtins like list() or len() which implicitly do
attribute access under the covers should be free to raise either
exception, and good defensive programs have already probably been
catching both.

I know there's no danger in changing the behavior for an explicit
instance.attr access.  We all agree that that should always raise
AttributeError, right? :)