Lines Matching refs:co
151 def dump(co): argument
156 print("%s: %s" % (attr, getattr(co, "co_" + attr)))
157 print("consts:", tuple(consts(co.co_consts)))
169 co = _testcapi.code_newempty("filename", "funcname", 15)
170 self.assertEqual(co.co_filename, "filename")
171 self.assertEqual(co.co_name, "funcname")
172 self.assertEqual(co.co_firstlineno, 15)
213 co = func.__code__
214 CodeType = type(co)
217 return CodeType(co.co_argcount,
218 co.co_posonlyargcount,
219 co.co_kwonlyargcount,
220 co.co_nlocals,
221 co.co_stacksize,
222 co.co_flags,
223 co.co_code,
224 co.co_consts,
225 co.co_names,
226 co.co_varnames,
227 co.co_filename,
228 co.co_name,
229 co.co_firstlineno,
230 co.co_lnotab,
231 co.co_freevars,
232 co.co_cellvars)
291 co = compile('res = "str_value"', '?', 'exec')
292 v = self.find_const(co.co_consts, 'str_value')
297 co = compile('res = ("str_value",)', '?', 'exec')
298 v = self.find_const(co.co_consts, ('str_value',))
303 co = compile('res = a in {"str_value"}', '?', 'exec')
304 v = self.find_const(co.co_consts, frozenset(('str_value',)))
315 co = compile(r'res = "str\0value!"', '?', 'exec')
316 v = self.find_const(co.co_consts, 'str\0value!')