Home
last modified time | relevance | path

Searched refs:co_varnames (Results 1 - 17 of 17) sorted by relevance

/third_party/python/Lib/lib2to3/tests/data/
H A Dpy2_test_grammar.py157 self.assertEquals(f2.func_code.co_varnames, ('one_argument',))
158 self.assertEquals(f3.func_code.co_varnames, ('two', 'arguments'))
160 self.assertEquals(f4.func_code.co_varnames,
163 self.assertEquals(f5.func_code.co_varnames,
166 self.assertEquals(f4.func_code.co_varnames,
168 self.assertEquals(f5.func_code.co_varnames,
204 self.assertEquals(v3.func_code.co_varnames, ('a', '(b, c)', 'rest', 'b', 'c'))
206 self.assertEquals(v3.func_code.co_varnames, ('a', '.1', 'rest', 'b', 'c'))
H A Dpy3_test_grammar.py192 self.assertEquals(f2.__code__.co_varnames, ('one_argument',))
193 self.assertEquals(f3.__code__.co_varnames, ('two', 'arguments'))
/third_party/python/Lib/test/
H A Dtest_code.py233 co.co_varnames,
255 # different co_name, co_varnames, co_consts
273 ("co_varnames", ('spam',)),
284 new_code = code.replace(co_varnames=code2.co_varnames,
286 self.assertEqual(new_code.co_varnames, code2.co_varnames)
310 co.co_varnames,
H A Dtest_compile.py440 self.assertIn("_A__mangled", A.f.__code__.co_varnames)
441 self.assertIn("__not_mangled__", A.f.__code__.co_varnames)
442 self.assertIn("_A__mangled_mod", A.f.__code__.co_varnames)
443 self.assertIn("__package__", A.f.__code__.co_varnames)
H A Dtest_grammar.py547 self.assertEqual(f2.__code__.co_varnames, ('one_argument',))
548 self.assertEqual(f3.__code__.co_varnames, ('two', 'arguments'))
/third_party/python/Objects/clinic/
H A Dcodeobject.c.h163 " co_names=None, co_varnames=None, co_freevars=None,\n"
179 PyObject *co_varnames, PyObject *co_freevars,
189 static const char * const _keywords[] = {"co_argcount", "co_posonlyargcount", "co_kwonlyargcount", "co_nlocals", "co_stacksize", "co_flags", "co_firstlineno", "co_code", "co_consts", "co_names", "co_varnames", "co_freevars", "co_cellvars", "co_filename", "co_name", "co_qualname", "co_linetable", "co_exceptiontable", NULL}; in code_replace()
203 PyObject *co_varnames = NULL; in code_replace() local
314 _PyArg_BadArgument("replace", "argument 'co_varnames'", "tuple", args[10]); in code_replace()
317 co_varnames = args[10]; in code_replace()
397 return_value = code_replace_impl(self, co_argcount, co_posonlyargcount, co_kwonlyargcount, co_nlocals, co_stacksize, co_flags, co_firstlineno, co_code, co_consts, co_names, co_varnames, co_freevars, co_cellvars, co_filename, co_name, co_qualname, co_linetable, co_exceptiontable); in code_replace()
/third_party/node/tools/inspector_protocol/jinja2/
H A Ddebug.py274 code.co_names, code.co_varnames, filename,
281 code.co_names, code.co_varnames, filename,
/third_party/python/Tools/scripts/
H A Ddeepfreeze.py50 for name in code.co_varnames:
77 assert nlocals == len(code.co_varnames) == code.co_nlocals, \
78 (nlocals, len(code.co_varnames), code.co_nlocals)
H A Dumarshal.py70 def co_varnames(self) -> Tuple[str, ...]: member in Code
83 return len(self.co_varnames)
/third_party/jinja2/
H A Ddebug.py133 code.co_varnames,
/third_party/python/Lib/
H A Ddis.py212 if co.co_varnames:
214 for i_n in enumerate(co.co_varnames):
H A Dinspect.py502 co_varnames tuple of names of arguments and local variables"""
1315 names = co.co_varnames
1325 varargs = co.co_varnames[nargs]
1329 varkw = co.co_varnames[nargs]
2355 arg_names = func_code.co_varnames
2952 as listed in `code.co_varnames`).
H A Dpdb.py1222 name = co.co_varnames[i]
/third_party/python/Objects/
H A Dcodeobject.c269 /* Ensure that the co_varnames has enough names to cover the arg counts. in _PyCode_Validate()
281 PyErr_SetString(PyExc_ValueError, "code: co_varnames is too small"); in _PyCode_Validate()
606 "code: co_nlocals != len(co_varnames)"); in PyCode_NewWithPosOnlyArgs()
1849 {"co_varnames", (getter)code_getvarnames, NULL, NULL},
1891 co_varnames: object(subclass_of="&PyTuple_Type", c_default="NULL") = None
1909 PyObject *co_varnames, PyObject *co_freevars, in code_replace_impl()
1953 if (co_varnames == NULL) { in code_replace_impl()
1958 co_varnames = varnames; in code_replace_impl()
1978 co_varnames, co_freevars, co_cellvars, co_filename, co_name, in code_replace_impl()
1904 code_replace_impl(PyCodeObject *self, int co_argcount, int co_posonlyargcount, int co_kwonlyargcount, int co_nlocals, int co_stacksize, int co_flags, int co_firstlineno, PyBytesObject *co_code, PyObject *co_consts, PyObject *co_names, PyObject *co_varnames, PyObject *co_freevars, PyObject *co_cellvars, PyObject *co_filename, PyObject *co_name, PyObject *co_qualname, PyBytesObject *co_linetable, PyBytesObject *co_exceptiontable) code_replace_impl() argument
/third_party/python/Modules/
H A D_testcapimodule.c6242 /* co_varnames */ in test_code_api()
6244 PyObject *co_varnames = PyCode_GetVarnames(co); in test_code_api() local
6245 if (co_varnames == NULL) { in test_code_api()
6248 if (!PyTuple_CheckExact(co_varnames)) { in test_code_api()
6249 PyErr_SetString(PyExc_TypeError, "co_varnames not tuple"); in test_code_api()
6250 Py_DECREF(co_varnames); in test_code_api()
6253 if (PyTuple_GET_SIZE(co_varnames) != 0) { in test_code_api()
6254 PyErr_SetString(PyExc_ValueError, "non-empty co_varnames"); in test_code_api()
6255 Py_DECREF(co_varnames); in test_code_api()
6258 Py_DECREF(co_varnames); in test_code_api()
[all...]
/third_party/python/Python/
H A Dceval.c6204 PyObject **co_varnames; local
6218 co_varnames = ((PyTupleObject *)(co->co_localsplusnames))->ob_item;
6220 PyObject *varname = co_varnames[j];
6228 PyObject *varname = co_varnames[j];
/third_party/python/Lib/unittest/
H A Dmock.py2216 code_mock.co_varnames = ('args', 'kwargs')

Completed in 52 milliseconds