[docs] [PATCH] update tempfile docs to say that TemporaryFile is secure (issue 23725)

Zbigniew Jędrzejewski-Szmek zbyszek at in.waw.pl
Sun Apr 19 02:37:35 CEST 2015


On Sat, Apr 18, 2015 at 07:13:48PM -0000, rdmurray at bitdance.com wrote:
> One minor suggestion, otherwise this looks good.
> 
> 
> http://bugs.python.org/review/23725/diff/14651/Doc/library/tempfile.rst
> File Doc/library/tempfile.rst (right):
> 
> http://bugs.python.org/review/23725/diff/14651/Doc/library/tempfile.rst#newcode49
> Doc/library/tempfile.rst:49: from the filesystem.
> OK, somehow I thought the last paragraph (where before I said "why did
> you delete this" was talking about a different object...just not paying
> attention on my part.  But I think the flow would be better if you moved
> this paragraph to the end of the section, where that deleted sentence
> was, and start it with "Either way, the returned object can be used
> as..."
I don't think so. The fact that the file object is the main object or an attribute
is not really important for the user, it is an implementation detail, like the
fact that O_TMPFILE is used. OTOH, using TemporaryFile as a context manager
is important information, and should be exposed at the beginning of the description.

> http://bugs.python.org/review/23725/

So I'm leaving the patch as is, just adding the extra blank line.

Zbyszek


More information about the docs mailing list