Home
last modified time | relevance | path

Searched refs:posonlyargs (Results 1 – 16 of 16) sorted by relevance

/third_party/python/Lib/test/
Dtest_type_comments.py330 self.assertEqual(len(t.args.args) + len(t.args.posonlyargs),
340 assert 0 <= ord(c) - ord('a') < len(t.args.posonlyargs + t.args.args)
341 if index < len(t.args.posonlyargs):
342 arg = t.args.posonlyargs[ord(c) - ord('a')]
344 arg = t.args.args[ord(c) - ord('a') - len(t.args.posonlyargs)]
Dtest_ast.py1130 def arguments(args=None, posonlyargs=None, vararg=None, argument
1135 if posonlyargs is None:
1136 posonlyargs = []
1143 args = ast.arguments(args, posonlyargs, vararg, kwonlyargs,
1148 check(arguments(posonlyargs=args), "must have Load context")
/third_party/python/Parser/
Dpegen.c2049 asdl_arg_seq **posonlyargs) { in _make_posonlyargs() argument
2051 *posonlyargs = slash_without_default; in _make_posonlyargs()
2059 *posonlyargs = (asdl_arg_seq*)_PyPegen_join_sequences( in _make_posonlyargs()
2065 *posonlyargs = _Py_asdl_arg_seq_new(0, p->arena); in _make_posonlyargs()
2067 return *posonlyargs == NULL ? -1 : 0; in _make_posonlyargs()
2162 asdl_arg_seq *posonlyargs; in _PyPegen_make_arguments() local
2163 if (_make_posonlyargs(p, slash_without_default, slash_with_default, &posonlyargs) == -1) { in _PyPegen_make_arguments()
2193 return _PyAST_arguments(posonlyargs, posargs, vararg, kwonlyargs, in _PyPegen_make_arguments()
2203 asdl_arg_seq *posonlyargs = _Py_asdl_arg_seq_new(0, p->arena); in _PyPegen_empty_arguments() local
2204 if (!posonlyargs) { in _PyPegen_empty_arguments()
[all …]
DPython.asdl111 arguments = (arg* posonlyargs, arg* args, arg? vararg, arg* kwonlyargs,
/third_party/python/Python/
Dast_unparse.c224 posonlyarg_count = asdl_seq_LEN(args->posonlyargs); in append_ast_args()
230 APPEND(arg, (arg_ty)asdl_seq_GET(args->posonlyargs, i)); in append_ast_args()
286 asdl_seq_LEN(e->v.Lambda.args->posonlyargs)); in append_ast_lambda()
Dsymtable.c1868 if (a->posonlyargs && !symtable_visit_argannotations(st, a->posonlyargs)) in symtable_visit_annotations()
1893 if (a->posonlyargs && !symtable_visit_params(st, a->posonlyargs)) in symtable_visit_arguments()
Dast.c102 if (!validate_args(state, args->posonlyargs) || !validate_args(state, args->args)) { in validate_arguments()
115 if (asdl_seq_LEN(args->defaults) > asdl_seq_LEN(args->posonlyargs) + asdl_seq_LEN(args->args)) { in validate_arguments()
DPython-ast.c240 Py_CLEAR(state->posonlyargs); in _PyAST_Fini()
338 if ((state->posonlyargs = PyUnicode_InternFromString("posonlyargs")) == NULL) return 0; in init_identifiers()
3268 _PyAST_arguments(asdl_arg_seq * posonlyargs, asdl_arg_seq * args, arg_ty in _PyAST_arguments() argument
3277 p->posonlyargs = posonlyargs; in _PyAST_arguments()
4884 value = ast2obj_list(state, (asdl_seq*)o->posonlyargs, ast2obj_arg); in ast2obj_arguments()
4886 if (PyObject_SetAttr(result, state->posonlyargs, value) == -1) in ast2obj_arguments()
10194 asdl_arg_seq* posonlyargs; in obj2ast_arguments() local
10202 if (_PyObject_LookupAttr(obj, state->posonlyargs, &tmp) < 0) { in obj2ast_arguments()
10218 posonlyargs = _Py_asdl_arg_seq_new(len, arena); in obj2ast_arguments()
10219 if (posonlyargs == NULL) goto failed; in obj2ast_arguments()
[all …]
Dast_opt.c633 CALL_SEQ(astfold_arg, arg, node_->posonlyargs); in astfold_arguments()
Dcompile.c2203 if (!compiler_visit_argannotations(c, args->posonlyargs, &annotations_len)) in compiler_visit_annotations()
2303 if (!compiler_check_debug_args_seq(c, args->posonlyargs)) in compiler_check_debug_args()
2391 c->u->u_posonlyargcount = asdl_seq_LEN(args->posonlyargs); in compiler_function()
2798 c->u->u_posonlyargcount = asdl_seq_LEN(args->posonlyargs); in compiler_lambda()
/third_party/python/Include/internal/
Dpycore_ast_state.h226 PyObject *posonlyargs; member
Dpycore_ast.h514 asdl_arg_seq *posonlyargs; member
794 arguments_ty _PyAST_arguments(asdl_arg_seq * posonlyargs, asdl_arg_seq * args,
/third_party/python/Doc/library/
Dast.rst1648 posonlyargs=[],
1659 .. class:: arguments(posonlyargs, args, vararg, kwonlyargs, kw_defaults, kwarg, defaults)
1663 * ``posonlyargs``, ``args`` and ``kwonlyargs`` are lists of :class:`arg` nodes.
1696 posonlyargs=[],
1857 posonlyargs=[],
/third_party/python/Lib/
Dinspect.py1300 posonlyargs = []
1314 posonlyargs.append(name)
1341 return FullArgSpec(posonlyargs + args, varargs, varkw, defaults,
Dast.py1508 all_args = node.posonlyargs + node.args
1520 if index == len(node.posonlyargs):
/third_party/python/Misc/NEWS.d/
D3.9.0a1.rst722 Swap the positions of the *posonlyargs* and *args* parameters in the