MCPcopy Index your code
hub / github.com/python/cpython / skip

Method skip

Lib/wave.py:201–225  ·  view source on GitHub ↗

Skip the rest of the chunk. If you are not interested in the contents of the chunk, this method should be called so that the file points to the start of the next chunk.

(self)

Source from the content-addressed store, hash-verified

199 return data
200
201 def skip(self):
202 """Skip the rest of the chunk.
203 If you are not interested in the contents of the chunk,
204 this method should be called so that the file points to
205 the start of the next chunk.
206 """
207
208 if self.closed:
209 raise ValueError("I/O operation on closed file")
210 if self.seekable:
211 try:
212 n = self.chunksize - self.size_read
213 # maybe fix alignment
214 if self.align and (self.chunksize & 1):
215 n = n + 1
216 self.file.seek(n, 1)
217 self.size_read = self.size_read + n
218 return
219 except OSError:
220 pass
221 while self.size_read < self.chunksize:
222 n = min(8192, self.chunksize - self.size_read)
223 dummy = self.read(n)
224 if not dummy:
225 raise EOFError
226
227
228class Wave_read:

Callers 15

closeMethod · 0.95
initfpMethod · 0.80
skip_unless_internalhashFunction · 0.80
skipdecFunction · 0.80
test_connect_starttlsMethod · 0.80
symlink_testFunction · 0.80
writes_bytecode_filesFunction · 0.80
unicode_filenameMethod · 0.80
test_c_cleandocMethod · 0.80

Calls 2

readMethod · 0.95
seekMethod · 0.45

Tested by 8

skip_unless_internalhashFunction · 0.64
skipdecFunction · 0.64
test_connect_starttlsMethod · 0.64
symlink_testFunction · 0.64
test_c_cleandocMethod · 0.64