From e9864c5e30f574f599d9c27e5907d1d541ec6e4b Mon Sep 17 00:00:00 2001 From: Tim Golden Date: Tue, 29 Apr 2014 16:11:18 +0100 Subject: [PATCH] Issue #19630 Emphasise that the file parameter to marshal.dump must be a real file object --- Doc/library/marshal.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Doc/library/marshal.rst b/Doc/library/marshal.rst index f463a7a133..f4dfc1f04f 100644 --- a/Doc/library/marshal.rst +++ b/Doc/library/marshal.rst @@ -66,8 +66,9 @@ The module defines these functions: .. function:: dump(value, file[, version]) Write the value on the open file. The value must be a supported type. The - file must be an open file object such as ``sys.stdout`` or returned by - :func:`open` or :func:`os.popen`. It must be opened in binary mode (``'wb'`` + file must be a open file object such as ``sys.stdout`` or returned by + :func:`open` or :func:`os.popen`. It may not be a wrapper such as + TemporaryFile on Windows. It must be opened in binary mode (``'wb'`` or ``'w+b'``). If the value has (or contains an object that has) an unsupported type, a -- 2.50.1