r""" >>> import io >>> read_uint1(io.BytesIO(b'\xff')) 255
(f)
| 210 | from struct import unpack as _unpack |
| 211 | |
| 212 | def read_uint1(f): |
| 213 | r""" |
| 214 | >>> import io |
| 215 | >>> read_uint1(io.BytesIO(b'\xff')) |
| 216 | 255 |
| 217 | """ |
| 218 | |
| 219 | data = f.read(1) |
| 220 | if data: |
| 221 | return data[0] |
| 222 | raise ValueError("not enough data in stream to read uint1") |
| 223 | |
| 224 | uint1 = ArgumentDescriptor( |
| 225 | name='uint1', |
no test coverage detected
searching dependent graphs…