[Python-ideas] Was `os.errno` undocumented?
rosuav at gmail.com
Tue May 29 06:45:41 EDT 2018
On Tue, May 29, 2018 at 8:06 PM, Petr Viktorin <encukou at gmail.com> wrote:
> I don't think we can reasonably expect people who used built-in help as
> above to go back and check that Python's official docs *do not* contain
> `os.errno`. Effectively, while `os.errno` is not very *discoverable* using
> official docs alone, I don't think calling it *undocumented* is fair.
> So, removing it without notice is not very friendly to our users.
At no point did you show that it's *documented*. What you've shown is
that it's an unadorned name. There are a lot of those around:
<module 'webbrowser' from '/usr/local/lib/python3.8/webbrowser.py'>
<module 'struct' from '/usr/local/lib/python3.8/struct.py'>
<module 'types' from '/usr/local/lib/python3.8/types.py'>
If people are attempting "from os import errno", they need to learn to
type "import errno" instead. While it's nice to hide those modules
with "import errno as _errno", failure to do so is a bug, not an API
feature. The change might break code, but ANY change might break code:
More information about the Python-ideas