Home
last modified time | relevance | path

Searched refs:co_freevars (Results 1 - 10 of 10) sorted by relevance

/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()
204 PyObject *co_freevars = NULL; in code_replace() local
324 _PyArg_BadArgument("replace", "argument 'co_freevars'", "tuple", args[11]); in code_replace()
327 co_freevars = args[11]; 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/python/Lib/test/
H A Dtest_code.py195 return c.replace(co_freevars=c.co_freevars + ('__class__',), co_code=bytes([COPY_FREE_VARS, 1])+c.co_code)
240 co.co_freevars,
274 ("co_freevars", ("freevar",)),
317 co.co_freevars,
H A Dtest_future.py389 self.assertEqual(foo().__code__.co_freevars, ())
/third_party/jinja2/
H A Ddebug.py138 code.co_freevars,
/third_party/python/Tools/scripts/
H A Ddeepfreeze.py54 for name in code.co_freevars:
80 assert nfreevars == len(code.co_freevars)
H A Dumarshal.py78 def co_freevars(self) -> Tuple[str, ...]: member in Code
/third_party/python/Lib/
H A Ddis.py216 if co.co_freevars:
218 for i_n in enumerate(co.co_freevars):
H A Dinspect.py494 co_freevars tuple of names of free variables
1600 # Nonlocal references are named in co_freevars and resolved
1607 for var, cell in zip(code.co_freevars, func.__closure__)
/third_party/python/Objects/
H A Dcodeobject.c1851 {"co_freevars", (getter)code_getfreevars, NULL, NULL},
1892 co_freevars: object(subclass_of="&PyTuple_Type", c_default="NULL") = None
1909 PyObject *co_varnames, PyObject *co_freevars, in code_replace_impl()
1967 if (co_freevars == NULL) { in code_replace_impl()
1972 co_freevars = freevars; 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.c6278 /* co_freevars */ in test_code_api()
6280 PyObject *co_freevars = PyCode_GetFreevars(co); in test_code_api() local
6281 if (co_freevars == NULL) { in test_code_api()
6284 if (!PyTuple_CheckExact(co_freevars)) { in test_code_api()
6285 PyErr_SetString(PyExc_TypeError, "co_freevars not tuple"); in test_code_api()
6286 Py_DECREF(co_freevars); in test_code_api()
6289 if (PyTuple_GET_SIZE(co_freevars) != 0) { in test_code_api()
6290 PyErr_SetString(PyExc_ValueError, "non-empty co_freevars"); in test_code_api()
6291 Py_DECREF(co_freevars); in test_code_api()
6294 Py_DECREF(co_freevars); in test_code_api()
[all...]

Completed in 21 milliseconds