[Python-ideas] Was `os.errno` undocumented?

Terry Reedy tjreedy at udel.edu
Tue May 29 18:53:18 EDT 2018


On 5/29/2018 12:09 PM, Guido van Rossum wrote:
> Yes. What Steve says at the end. Let's be kind and mention this one on 
> the release notes. But not all the others.

How about adding a general reminder. In Porting to 3.7:

"Imports into a module are a private implementation detail unless 
otherwise noted.  Private imports can be removed when not needed.  (See 
PEP 8.)  For example, the os module no longer needs the errno module, so 
'import errno' was removed for 3.7.  If you accessed 'errno' as 
'os.errno', add 'import errno' to your code and remove the 'os.' prefix. 
  The same applies to the 200 other unneeded imports removed in 3.7."

Since this is a repeated problem, and a repeated drain on us core 
developers, a version of this should be repeated in every What's New.

-- 
Terry Jan Reedy



More information about the Python-ideas mailing list