Éric Araujo <[email protected]> added the comment:
Thanks for the patch.
- This function returns a file-like object with two additional methods from
+ This function returns a file-like object that supports the Context Manager
+ protocol, with two additional methods from
The capitalization seems unneeded to me. Also, in my opinion saying
“file-like” implies support for the context manager protocol, even if not all
file-likes do, and anyway not all users share my assumption. What do you think
about this wording:
This function returns a file-like object that works as a :term:`context
manager`
and has two additional methods from the :mod:`urllib.response` module
The term role creates a link to the glossary. (BTW the entry for context
manager could be improved to give open as example; I’ll do that.)
+It is also possible to achieve the same result using a context manager
+approach. ::
I would rather use with statements everywhere, or if it makes sense to have
examples both with and without with, to put the example with with first.
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue12365>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com