From 7775ff3ac73f0d6444432bafc8ee140d14cfbb3d Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Wed, 5 Aug 2015 22:32:15 +1000 Subject: [PATCH] Updated docstrings --- PIL/Image.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/PIL/Image.py b/PIL/Image.py index 87d77ef09..0c254c61d 100644 --- a/PIL/Image.py +++ b/PIL/Image.py @@ -1640,7 +1640,7 @@ class Image(object): implement the ``seek``, ``tell``, and ``write`` methods, and be opened in binary mode. - :param fp: File name or file object. + :param fp: A filename (string), pathlib.Path object or file object. :param format: Optional format override. If omitted, the format to use is determined from the filename extension. If a file object was used instead of a filename, this @@ -2267,9 +2267,9 @@ def open(fp, mode="r"): :py:meth:`~PIL.Image.Image.load` method). See :py:func:`~PIL.Image.new`. - :param fp: A filename (string) or a file object. The file object - must implement :py:meth:`~file.read`, :py:meth:`~file.seek`, and - :py:meth:`~file.tell` methods, and be opened in binary mode. + :param fp: A filename (string), pathlib.Path object or a file object. + The file object must implement :py:meth:`~file.read`, :py:meth:`~file.seek`, + and :py:meth:`~file.tell` methods, and be opened in binary mode. :param mode: The mode. If given, this argument must be "r". :returns: An :py:class:`~PIL.Image.Image` object. :exception IOError: If the file cannot be found, or the image cannot be