[Python-Dev] list.extend

Tim Peters tim.one@comcast.net
Fri, 28 Jun 2002 11:50:42 -0400

> The access statement was experimental and went away.  I guess it is
> the exception that proves the rule.

There are no exceptions to Guido's channeled rules <wink>:

    no *advertised* experimental feature has ever gone away

and the access stmt was never documented ("advertised").  The closest it got
was its NEWS entry for 0.9.9:

    * There's a new reserved word: "access".  The syntax and semantics
      are still subject of research and debate (as well as undocumented),
      but the parser knows about the keyword so you must not use it as a
      variable, function, or attribute name.

The "debate" mentioned there may have been limited to email between Guido
and (IIRC) Tommy Burnette.

> It was removed about the time I started using Python, so I don't know
> what it's intended use was.

    access_stmt: 'access' NAME (',' NAME)* ':' accesstype (',' accesstype)*
    accesstype: NAME+
    # accesstype should be ('public' | 'protected' | 'private')
    #                      ['read'] ['write']
    # but can't be because that would create undesirable reserved words!

So it was for creating attributes that could be written by the public but
read only by class methods <wink>.

> Many of the Python 2.2 features are also labeled experimental.  And I
> don't expect that they will go away either.

Well, at least not the ones we've told people about.  Barry's hack to make

    print << file, '%d' % i

read an int i from file may well go away.