Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f31d313

Browse files
committed
Remove redefinition of writelines() method
Remove unused variable and import
1 parent 77f9caf commit f31d313

1 file changed

Lines changed: 0 additions & 5 deletions

File tree

Lib/gzip.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,6 @@ def write(self,data):
141141
self.fileobj.write( self.compress.compress(data) )
142142
self.offset += len(data)
143143

144-
def writelines(self,lines):
145-
self.write(" ".join(lines))
146-
147144
def read(self, size=-1):
148145
if self.extrasize <= 0 and self.fileobj is None:
149146
return ''
@@ -305,7 +302,6 @@ def seek(self, offset):
305302
def readline(self, size=-1):
306303
if size < 0: size = sys.maxint
307304
bufs = []
308-
orig_size = size
309305
readsize = min(100, size) # Read from the file in small chunks
310306
while 1:
311307
if size == 0:
@@ -352,7 +348,6 @@ def _test():
352348
# Act like gzip; with -d, act like gunzip.
353349
# The input file is not deleted, however, nor are any other gzip
354350
# options or features supported.
355-
import sys
356351
args = sys.argv[1:]
357352
decompress = args and args[0] == "-d"
358353
if decompress:

0 commit comments

Comments
 (0)