Raymond Hettinger wrote:
> > On Jul 13, 2019, at 1:56 PM, Serhiy Storchaka storch...@gmail.com... wrote:
> > Could we strictly define what is considered a public module interface in 
> > Python?
> > The RealDefinition™ is that whatever we include in the docs is public, 
> > otherwise
> not.
> Beyond that, there is a question of how users can deduce what is public when 
> they run
> "import somemodule; print(dir(some module))".
> In some modules, we've been careful to use both all and to use an
> underscore prefix to indicate private variables and helper functions 
> (collections and
> random for example).  IMO, when a module has shown that care, future 
> maintainers should
> stick with that practice.
> The calendar module is an example of where that care was taken for many years 
> and then
> a recent patch went against that practice.

I agree with Raymond that if the calendar module was following the leading 
underscore practice (which we should probably encourage all new modules to 
follow for consistency going forward) then I think the module should be updated 
to keep the practice going.

-Brett
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/WRREKS5LYMB5VYFON7RWGDKZW4KTYMIE/

Reply via email to