Meta tags:
description= @vectorcall with **kwargs always delegated to the keyword helper, which only reads a kwargs dict, so it couldn t be generated. The vectorcall now parses positionals with the shared positional emitter and builds the dict from kwnames only when there are keywords, otherwise passing NULL, as the tuple parser does.
The *args and **kwargs parsers take the calling convention explicitly rather than reading self.fastcall, which describes the Python-visible entry point having stack style args, not the vectorcall.
Allow **kwargs as name: *args as name already set the C name, but the as regex only allowed a single leading star.
_testclinic.VcKwds exercises the generated vectorcall at runtime.
Split from GH-161597, which converts xml.etree.ElementTree.Element to use this. per request by @asvetlov. Also added a small test_clinic.py which uses the code generation.
Issue: gh-87613;
Headings (most frequently used words):
uh, oh, navigation, gh, 87613, support, kwargs, in, ac, vc, 162465, footer, diff, view, menu, repository, there, are, no, files, selected, for, viewing, filter, by, extension,
Text of the page (most frequently used words):
self (92), file (40), def (28), expand (27), line (24), and (23), the (22), none (22), parser_code (20), str (18), github (17), libclinic (17), this (16), clinic (16), that (15), for (15), hidden (15), characters (15), unicode (15), show (14), vectorcall (13), nargs (13), diff (13), vckwds (13), ac_tester (13), not (12), down (12), fastcall (12), open (12), applied (11), code (11), all (11), number (11), _testclinic (11), changes (10), indent (10), append (10), support (10), bidirectional (10), kwargs (10), reload (9), parse_var_keyword (9), args (9), normalize_snippet (9), comments (8), parameters (8), limited_capi (8), return (8), learn (8), about (8), view (8), pyobject (8), kwds (8), you (7), suggestion (7), cannot (7), suggestions (7), while (7), loading (7), var_keyword (7), parse_arg (7), stackargs (7), more (7), tools (7), with (7), cmaloney (7), 87613 (7), sign (7), 2026 (6), check (6), change (6), there (6), converters (6), bool (6), what (6), review (6), desktop (6), delete (6), edit (6), files (6), assertequal (6), security (5), please (5), error (5), varpos (5), argname_fmt (5), arguments (5), tuple (5), _parse_kwarg (5), converter (5), original (5), contains (5), text (5), may (5), interpreted (5), compiled (5), differently (5), than (5), appears (5), below (5), editor (5), reveals (5), additions (5), null (5), modules (5), commits (5), your (5), can (4), pull (4), was (4), page (4), retry (4), elif (4), _parse_positional_args (4), pos_code (4), else (4), assert (4), has_optional (4), name (4), dict (4), argument (4), param_name (4), static (4), through_new (4), typeerror (4), assertraises (4), test (4), copilot (4), community (3), navigation (3), back (3), request (3), from (3), must (3), add (3), batch (3), single (3), commit (3), true (3), false (3), parser_prototype (3), flags (3), parsing (3), parser_body (3), _parse_vararg (3), goto (3), arg (3), _pyarg_nopositional (3), kwnames (3), list (3), returns (3), varkeywordcconverter (3), parse_args (3), deletions (3), match (3), dsl_parser (3), deletion (3), parser_name (3), are (3), class (3), generated (3), load (3), type (3), input (3), __new__ (3), function (3), lib (3), test_clinic (3), hide (3), whitespace (3), nbsp (3), filter (3), nov (3), 162465 (3), merged (3), python (3), account (3), quality (3), another (3), tab (3), window (3), refresh (3), session (3), developers (3), changelog (3), customer (3), enterprise (3), grade (3), features (3), build (3), contact (2), status (2), privacy (2), terms (2), footer (2), one (2), per (2), viewing (2), toggle (2), oops (2), something (2), went (2), wrong (2), convention (2), which (2), handles (2), gets (2), array (2), use (2), already (2), have (2), meth_keywords (2), func (2), int (2), call (2), body (2), extend (2), skip_optional (2), pytuple_get_item (2), enumerate (2), _check_positional (2), exit (2), pycore_modsupport (2), add_include (2), codegen (2), pytuple_get_size (2), parser_prototype_keyword (2), parse_pos_only (2), caller (2), fall (2), stack (2), parser (2), snippets (2), doesn (2), 967 (2), 933 (2), end (2), start (2), c_name (2), 996 (2), py_xnewref (2), 1448 (2), raise (2), should (2), 1437 (2), heap_specs (2), vckwds_spec (2), vcinit_spec (2), output (2), vckwds_slots (2), vc_kwds_new (2), pytypeobject (2), object (2), 2671 (2), through_init (2), vckwonly (2), module (2), foo (2), 1847 (2), selected (2), apply (2), split (2), unified (2), failed (2), jump (2), extension (2), oct (2), select (2), tree (2), issue (2), insights (2), projects (2), actions (2), repository (2), cpython (2), signed (2), universe (2), training (2), integrations (2), stories (2), center (2), documentation (2), business (2), fixes (2), products (2), secret (2), perform, action, time, share, personal, information, manage, cookies, docs, inc, right, now, later, queued, merge, multi, pending, reviews, has, been, marked, resolved, outdated, existing, order, create, valid, applying, deleted, lines, supported, only, subset, closed, invalid, because, were, made, annotations, notes, is_keyword_only, any, parse_vectorcall_pos_only, len, pos_only, parse_vectorcall_kw_required, parse_vectorcall_no_args, 1781, 1768, parse_vectorcall, arity_checked, 1624, 1613, _vectorcall_positional, _new_or_init_parser_body, _new_or_init_delegate_to_helper, parser_prototype_keyword_helper, parser_retval, return_value_declaration, method_init, kind, 1456, 1445, handle_new_or_init, prepare, use_converters, vectorcall_body, is_optional, get_displayname, max_pos, min_pos, _vectorcall_type_check, _pyarg_nopositionalstack, meth_varargs, 1112, 1111, select_positional_convention, 998, 997, shared, paths, emit, parameter, positional, isinstance, handle, too, parse_parameter, addition, _pystack_asdict, when, keywords, allocates, empty, py_xdecref, cleanup, var_keyword_dict_converter, notimplementederror, never, called, assertionerror, displayname, argname, cconverter, some, rendered, default, how, customized, appear, pytype_frommoduleandspec, py_array_length, size_t, deprkwdinitnoinline_spec, deprkwdinit_spec, deprkwdnew_spec, deprstarinitnoinline_spec, deprstarinit_spec, deprstarnew_spec, heaptestclass_spec, 2897, 2931, _testclinic_exec, push, slots, py_tpflags_immutabletype, py_tpflags_default, sizeof, basicsize, pytype_spec, vc_kwds_vectorcall, py_tp_vectorcall, py_tp_new, pytype_slot, pack_arguments_newref, 481e680d2e76fdbd, 3d8e5218fd593383, vc_kwds_new_impl, classmethod, parsed, vckwonly_type, invalid_calls, vcinit, vcnewbase, vcnew, 5871, 5894, cls, messages, explicit, calls, __init__, well, tp_vectorcall, tp_new, tp_init, slot, test_parse_errors_match_slot, test_vc_kwds, 5846, 5855, test_vc_kwonly_missing_required, block, test_base_invalid_syntax, kwargs_as_kwds, bar, parse_function, test_var_keyword_c_name, c_basename, os_stat_fn, test_c_name, conversations, clear, filters, viewed, types, make, heap, 60efdbd, f15f969, allow, a0b9093, 96edc5e, hold, shift, click, range, changed, checks, conversation, 176, into, clinic_vc_kwargs_ac, main, clicking, agree, our, occasionally, send, related, emails, statement, service, free, its, maintainers, question, project, new, items, requests, issues, message, dismiss, alert, switched, accounts, out, appearance, settings, search, pricing, event, talks, workshops, next, partners, company, forum, events, webinars, blog, resource, connect, resources, premium, advanced, ons, trust, why, evaluate, see, industries, government, manufacturing, financial, services, healthcare, industry, nonprofits, startups, team, enterprises, stage, businesses, source, latest, improvements, across, place, developer, articles, sponsors, trending, repos, explore, customize, certifications, scanning, leak, prevention, protection, vulnerability, detection, remediation, secure, cloud, development, environments, codespaces, analysis, enforcement, automation, ship, coding, agent, tasks, automated, work, hosting, collaboration, platform, menu, skip, content,
|