[docs] Enhancements to gettext docs (issue 10536)

andreas.r.maier at gmx.de andreas.r.maier at gmx.de
Thu Jul 3 11:17:32 CEST 2014

Added a minor comment on using the context handler approach for opening
a file in example code.

File Doc/library/gettext.rst (right):

Doc/library/gettext.rst:446: fp.close()
The fp.close() is not needed, because the context handler exit closes
the file (see
https://docs.python.org/2.7/library/stdtypes.html#file.close). I fully
agree with the change to use the context handler approach for opening
the file, and if we use it we should be consequent and rely on it fully.


More information about the docs mailing list