Home
last modified time | relevance | path

Searched refs:ImportFrom (Results 1 - 8 of 8) sorted by relevance

/third_party/python/Python/
H A Dfuture.c15 asdl_alias_seq *names = s->v.ImportFrom.names; in future_check_features()
93 identifier modname = s->v.ImportFrom.module; in future_parse()
H A Dast.c896 if (stmt->v.ImportFrom.level < 0) { in validate_stmt()
897 PyErr_SetString(PyExc_ValueError, "Negative ImportFrom level"); in validate_stmt()
900 ret = validate_nonempty_seq(stmt->v.ImportFrom.names, "names", "ImportFrom"); in validate_stmt()
H A Dcompile.c3963 Py_ssize_t i, n = asdl_seq_LEN(s->v.ImportFrom.names); in compiler_from_import()
3966 ADDOP_LOAD_CONST_NEW(c, PyLong_FromLong(s->v.ImportFrom.level)); in compiler_from_import()
3974 alias_ty alias = (alias_ty)asdl_seq_GET(s->v.ImportFrom.names, i); in compiler_from_import()
3979 if (s->lineno > c->c_future->ff_lineno && s->v.ImportFrom.module && in compiler_from_import()
3980 _PyUnicode_EqualToASCIIString(s->v.ImportFrom.module, "__future__")) { in compiler_from_import()
3987 if (s->v.ImportFrom.module) { in compiler_from_import()
3988 ADDOP_NAME(c, IMPORT_NAME, s->v.ImportFrom.module, names); in compiler_from_import()
3995 alias_ty alias = (alias_ty)asdl_seq_GET(s->v.ImportFrom.names, i); in compiler_from_import()
H A DPython-ast.c1153 " | ImportFrom(identifier? module, alias* names, int? level)\n" in init_types()
1280 state->ImportFrom_type = make_type(state, "ImportFrom", state->stmt_type, in init_types()
1282 "ImportFrom(identifier? module, alias* names, int? level)"); in init_types()
2466 p->v.ImportFrom.module = module; in _PyAST_ImportFrom()
2467 p->v.ImportFrom.names = names; in _PyAST_ImportFrom()
2468 p->v.ImportFrom.level = level; in _PyAST_ImportFrom()
4155 value = ast2obj_identifier(state, o->v.ImportFrom.module); in ast2obj_stmt()
4160 value = ast2obj_list(state, (asdl_seq*)o->v.ImportFrom.names, in ast2obj_stmt()
4166 value = ast2obj_int(state, o->v.ImportFrom.level); in ast2obj_stmt()
7901 if (_Py_EnterRecursiveCall(" while traversing 'ImportFrom' nod in obj2ast_stmt()
[all...]
H A Dsymtable.c1351 VISIT_SEQ(st, alias, s->v.ImportFrom.names); in symtable_visit_stmt()
/third_party/python/Lib/test/
H A Dtest_unparse.py426 tree = ast.ImportFrom(module='mod', names=[ast.alias(name='x')])
428 tree = ast.ImportFrom(module='mod', names=[ast.alias(name='x')], level=None)
H A Dtest_ast.py109 # ImportFrom
386 self.assertIsInstance(mod.body[0], ast.ImportFrom)
1239 body = [ast.ImportFrom(module='time',
1249 body = [ast.ImportFrom(module='time',
1495 imp = ast.ImportFrom(None, [ast.alias("x", None)], -42)
1496 self.stmt(imp, "Negative ImportFrom level")
1497 self.stmt(ast.ImportFrom(None, [], 0), "empty names on ImportFrom")
2508 ('Module', [('ImportFrom', (1, 0, 1, 17), 'sys', [('alias', (1, 16, 1, 17), 'v', None)], 0)], []),
/third_party/python/Include/internal/
H A Dpycore_ast.h318 } ImportFrom; member

Completed in 33 milliseconds