On Tue, Nov 2, 2010 at 8:47 PM, Ben Finney <ben+pyt...@benfinney.id.au> wrote:
> I would say that names without a single leading underscore are part of
> the public API, whether documented or not.

I don't recall this ever being the standard library's policy.  There are
many modules using leading underscores as hints, and many others which
don't.

Other people consider the presence of a docstring on a non-underscored
name significant, while still others refer to the out-of-line
documentation as definitive.

For modules, an __all__ attribute is generally agreed on as definitive,
if present, but that's a fairly limited case.

At this point, there isn't a single clear way to determine if something
is public API.  I doubt it will be likely to agree on a single
definition now without engendering a lengthy discussion on whether names
can be changed to reflect such a policy (where backward compatibility is
sure to be lost).

I'm sticking to the out-of-line documentation to determine what's public.


  -Fred

--
Fred L. Drake, Jr.    <fdrake at acm.org>
"A storm broke loose in my mind."  --Albert Einstein
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to