[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.


http://bugs.python.org/review/10536/diff/1792/Doc/library/gettext.rst
File Doc/library/gettext.rst (right):

http://bugs.python.org/review/10536/diff/1792/Doc/library/gettext.rst#newcode446
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.

http://bugs.python.org/review/10536/


More information about the docs mailing list