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