MCPcopy Index your code
hub / github.com/python/mypy / num_literals

Method num_literals

mypyc/codegen/literals.py:108–119  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

lenFunction · 0.85

Tested by

no test coverage detected