Lines Matching defs:source

715     source: object
724 Compile source into a code object that can be executed by exec() or eval().
726 The source code may represent a Python module, statement or expression.
739 builtin_compile_impl(PyObject *module, PyObject *source, PyObject *filename,
800 is_ast = PyAST_Check(source);
805 Py_INCREF(source);
806 result = source;
815 mod = PyAST_obj2mod(source, arena, compile_mode);
827 str = _Py_SourceAsString(source, "compile", "string, bytes or AST", &cf, &source_copy);
889 source: object
894 Evaluate the given source in the context of globals and locals.
896 The source may be a string representing a Python expression
904 builtin_eval_impl(PyObject *module, PyObject *source, PyObject *globals,
947 if (PyCode_Check(source)) {
948 if (PySys_Audit("exec", "O", source) < 0) {
952 if (PyCode_GetNumFree((PyCodeObject *)source) > 0) {
957 return PyEval_EvalCode(source, globals, locals);
962 str = _Py_SourceAsString(source, "eval", "string, bytes or code", &cf, &source_copy);
978 source: object
985 Execute the given source in the context of globals and locals.
987 The source may be a string representing one or more Python statements
993 when source is a code object requiring exactly that many cellvars.
997 builtin_exec_impl(PyObject *module, PyObject *source, PyObject *globals,
1042 if (PyCode_Check(source)) {
1043 Py_ssize_t num_free = PyCode_GetNumFree((PyCodeObject *)source);
1072 if (PySys_Audit("exec", "O", source) < 0) {
1077 v = PyEval_EvalCode(source, globals, locals);
1079 v = PyEval_EvalCodeEx(source, globals, locals,
1090 "closure can only be used when source is a code object");
1096 str = _Py_SourceAsString(source, "exec",