Cast a buffer object to bytes
(buf)
| 34 | return s |
| 35 | |
| 36 | def buffer_to_bytes(buf): |
| 37 | """Cast a buffer object to bytes""" |
| 38 | if not isinstance(buf, bytes): |
| 39 | buf = bytes(buf) |
| 40 | return buf |
| 41 | |
| 42 | def _modify_str_or_docstring(str_change_func): |
| 43 | @functools.wraps(str_change_func) |
nothing calls this directly
no outgoing calls
no test coverage detected