(cls, str_base)
| 63 | |
| 64 | @classmethod |
| 65 | def from_string(cls, str_base): |
| 66 | l = [] |
| 67 | for c in bytearray(reversed(str_base)): |
| 68 | for i in range(8): |
| 69 | l.append(c & 1) |
| 70 | c = c >> 1 |
| 71 | return cls(len(str_base) * 8, list(reversed(l))) |
| 72 | |
| 73 | @classmethod |
| 74 | def from_int(cls, size, x): |
no outgoing calls
no test coverage detected