Returns value as bytes
(value: Union[str, bytes])
| 64 | |
| 65 | |
| 66 | def as_bytes(value: Union[str, bytes]) -> bytes: |
| 67 | """ |
| 68 | Returns value as bytes |
| 69 | """ |
| 70 | if not isinstance(value, bytes): |
| 71 | return value.encode('UTF-8') |
| 72 | return value |
| 73 | |
| 74 | |
| 75 | def to_digit(value: str) -> int: |
searching dependent graphs…