[Python-checkins] r71713 - python/branches/py3k/Lib/_pyio.py

benjamin.peterson python-checkins at python.org
Sat Apr 18 16:47:50 CEST 2009


Author: benjamin.peterson
Date: Sat Apr 18 16:47:50 2009
New Revision: 71713

Log:
add annotations to open()

Modified:
   python/branches/py3k/Lib/_pyio.py

Modified: python/branches/py3k/Lib/_pyio.py
==============================================================================
--- python/branches/py3k/Lib/_pyio.py	(original)
+++ python/branches/py3k/Lib/_pyio.py	Sat Apr 18 16:47:50 2009
@@ -35,8 +35,9 @@
         self.characters_written = characters_written
 
 
-def open(file, mode="r", buffering=None, encoding=None, errors=None,
-         newline=None, closefd=True):
+def open(file: (str, bytes), mode: str = "r", buffering: int = None,
+         encoding: str = None, errors: str = None,
+         newline: str = None, closefd: bool = True) -> "IOBase":
 
     r"""Open file and return a stream.  Raise IOError upon failure.
 


More information about the Python-checkins mailing list