[Python-Dev] Re: What has become of PEP224 ?

Guido van Rossum guido@python.org
Sun, 18 Mar 2001 17:43:27 -0500


[On c.l.py]
"Aahz Maruch" <aahz@panix.com> wrote in message
news:992tb4$qf5$1@panix2.panix.com...
> [cc'd to Barry Warsaw in case he wants to comment]

(I happen to be skimming c.l.py this lazy Sunday afternoon :-)

> In article <3ab4f320@nntp.server.uni-frankfurt.de>,
> Michael 'Mickey' Lauer  <mickey@Vanille.de> wrote:
> >
> >Hi. If I remember correctly PEP224 (the famous "attribute docstrings")
> >has only been postponed because Python 2.0 was in feature freeze
> >in August 2000. Will it be in 2.1 ? If not, what's the reason ? What
> >is needed for it to be included in 2.1 ?
>
> I believe it has been essentially superseded by PEP 232; I thought
> function attributes were going to be in 2.1, but I don't see any clear
> indication.

Actually, the attribute docstrings PEP is about a syntax for giving
non-function objects a docstring.  That's quite different than the function
attributes PEP.

The attribute docstring PEP didn't get in (and is unlikely to get in in its
current form) because I don't like the syntax much, *and* because the way to
look up the docstrings is weird and ugly: you'd have to use something like
instance.spam__doc__ or instance.__doc__spam (I forget which; they're both
weird and ugly).

I also expect that the doc-sig will be using the same syntax (string
literals in non-docstring positions) for a different purpose.  So I see
little chance for PEP 224.  Maybe I should just pronounce on this, and
declare the PEP rejected.

Unless Ping thinks this would be a really cool feature to be added to pydoc?
(Ping's going to change pydoc from importing the target module to scanning
its surce, I believe -- then he could add this feature without changing the
Python parser. :-)

--Guido van Rossum