File tree Expand file tree Collapse file tree 1 file changed +0
-29
lines changed
Expand file tree Collapse file tree 1 file changed +0
-29
lines changed Original file line number Diff line number Diff line change @@ -469,35 +469,6 @@ def read_string4(f):
469469 """ )
470470
471471
472- def read_bytes1 (f ):
473- r"""
474- >>> import io
475- >>> read_bytes1(io.BytesIO(b"\x00"))
476- b''
477- >>> read_bytes1(io.BytesIO(b"\x03abcdef"))
478- b'abc'
479- """
480-
481- n = read_uint1 (f )
482- assert n >= 0
483- data = f .read (n )
484- if len (data ) == n :
485- return data
486- raise ValueError ("expected %d bytes in a bytes1, but only %d remain" %
487- (n , len (data )))
488-
489- bytes1 = ArgumentDescriptor (
490- name = "bytes1" ,
491- n = TAKEN_FROM_ARGUMENT1 ,
492- reader = read_bytes1 ,
493- doc = """A counted bytes string.
494-
495- The first argument is a 1-byte unsigned int giving the number
496- of bytes in the string, and the second argument is that many
497- bytes.
498- """ )
499-
500-
501472def read_bytes1 (f ):
502473 r"""
503474 >>> import io
You can’t perform that action at this time.
0 commit comments