From: Ezio Melotti Date: Tue, 30 Apr 2013 13:34:04 +0000 (+0300) Subject: #17881: clarify documentation of plistlib. X-Git-Tag: v3.3.2~44 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ab6ab15e7d4191fe8ea885262d48f880b591c7e8;p=thirdparty%2FPython%2Fcpython.git #17881: clarify documentation of plistlib. --- diff --git a/Doc/library/plistlib.rst b/Doc/library/plistlib.rst index ae5e94d1a909..a26736884818 100644 --- a/Doc/library/plistlib.rst +++ b/Doc/library/plistlib.rst @@ -47,8 +47,8 @@ This module defines the following functions: .. function:: readPlist(pathOrFile) - Read a plist file. *pathOrFile* may either be a file name or a (readable) - file object. Return the unpacked root object (which usually is a + Read a plist file. *pathOrFile* may either be a file name or a (readable and + binary) file object. Return the unpacked root object (which usually is a dictionary). The XML data is parsed using the Expat parser from :mod:`xml.parsers.expat` @@ -59,7 +59,7 @@ This module defines the following functions: .. function:: writePlist(rootObject, pathOrFile) Write *rootObject* to a plist file. *pathOrFile* may either be a file name - or a (writable) file object. + or a (writable and binary) file object. A :exc:`TypeError` will be raised if the object is of an unsupported type or a container that contains objects of unsupported types.