(self)
| 106 | assert False, "invalid literal: %r" % value |
| 107 | |
| 108 | def num_literals(self) -> int: |
| 109 | # The first three are for None, True and False |
| 110 | return ( |
| 111 | NUM_SINGLETONS |
| 112 | + len(self.str_literals) |
| 113 | + len(self.bytes_literals) |
| 114 | + len(self.int_literals) |
| 115 | + len(self.float_literals) |
| 116 | + len(self.complex_literals) |
| 117 | + len(self.tuple_literals) |
| 118 | + len(self.frozenset_literals) |
| 119 | ) |
| 120 | |
| 121 | # The following methods return the C encodings of literal values |
| 122 | # of different types |