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

georg.brandl python-checkins at python.org
Thu Jan 13 08:13:06 CET 2011


Author: georg.brandl
Date: Thu Jan 13 08:13:06 2011
New Revision: 87983

Log:
More PEP 8: no space around "=" in argument lists.

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	Thu Jan 13 08:13:06 2011
@@ -34,9 +34,8 @@
         self.characters_written = characters_written
 
 
-def open(file, mode = "r", buffering = -1,
-         encoding = None, errors = None,
-         newline = None, closefd = True):
+def open(file, mode="r", buffering=-1, encoding=None, errors=None,
+         newline=None, closefd=True):
 
     r"""Open file and return a stream.  Raise IOError upon failure.
 
@@ -294,7 +293,7 @@
 
     ### Positioning ###
 
-    def seek(self, pos, whence = 0):
+    def seek(self, pos, whence=0):
         """Change stream position.
 
         Change the stream position to byte offset offset. offset is
@@ -313,7 +312,7 @@
         """Return current stream position."""
         return self.seek(0, 1)
 
-    def truncate(self, pos = None):
+    def truncate(self, pos=None):
         """Truncate file to size bytes.
 
         Size defaults to the current IO position as reported by tell().  Return
@@ -446,7 +445,7 @@
 
     ### Readline[s] and writelines ###
 
-    def readline(self, limit = -1):
+    def readline(self, limit=-1):
         r"""Read and return a line from the stream.
 
         If limit is specified, at most limit bytes will be read.
@@ -532,7 +531,7 @@
     # primitive operation, but that would lead to nasty recursion in case
     # a subclass doesn't implement either.)
 
-    def read(self, n = -1):
+    def read(self, n=-1):
         """Read and return up to n bytes.
 
         Returns an empty bytes object on EOF, or None if the object is
@@ -596,7 +595,7 @@
     implementation, but wrap one.
     """
 
-    def read(self, n = None):
+    def read(self, n=None):
         """Read and return up to n bytes.
 
         If the argument is omitted, None, or negative, reads and
@@ -616,7 +615,7 @@
         """
         self._unsupported("read")
 
-    def read1(self, n = None):
+    def read1(self, n=None):
         """Read up to n bytes with at most one read() system call."""
         self._unsupported("read1")
 
@@ -1272,7 +1271,7 @@
     are immutable. There is no public constructor.
     """
 
-    def read(self, n = -1):
+    def read(self, n=-1):
         """Read at most n characters from stream.
 
         Read from underlying buffer until we have n characters or we hit EOF.
@@ -1284,7 +1283,7 @@
         """Write string s to stream."""
         self._unsupported("write")
 
-    def truncate(self, pos = None):
+    def truncate(self, pos=None):
         """Truncate size to pos."""
         self._unsupported("truncate")
 


More information about the Python-checkins mailing list