
PEP 8 would concur, whatever the current preferred style was. Under "Naming Conventions": """New modules and packages (including third party frameworks) should be written to these standards, but where an existing library has a different style, internal consistency is preferred.""" The requirement for internal consistency (essential for readability in code of any size) alone justifies Raymond's wish to update it. On Wed, Jul 17, 2019 at 1:32 AM Brett Cannon <brett@python.org> wrote:
On Jul 13, 2019, at 1:56 PM, Serhiy Storchaka storchaka@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
Raymond Hettinger wrote: 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-leave@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/WRREKS5L...