From 8c77b8cb9188165a123f2512026e3629bf03dc9b Mon Sep 17 00:00:00 2001 From: Pablo Galindo Date: Mon, 29 Apr 2019 13:36:57 +0100 Subject: bpo-36540: PEP 570 -- Implementation (GH-12701) This commit contains the implementation of PEP570: Python positional-only parameters. * Update Grammar/Grammar with new typedarglist and varargslist * Regenerate grammar files * Update and regenerate AST related files * Update code object * Update marshal.c * Update compiler and symtable * Regenerate importlib files * Update callable objects * Implement positional-only args logic in ceval.c * Regenerate frozen data * Update standard library to account for positional-only args * Add test file for positional-only args * Update other test files to account for positional-only args * Add News entry * Update inspect module and related tests --- Include/code.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Include/code.h') diff --git a/Include/code.h b/Include/code.h index 2e661e8b36..933de97d07 100644 --- a/Include/code.h +++ b/Include/code.h @@ -21,6 +21,7 @@ typedef uint16_t _Py_CODEUNIT; typedef struct { PyObject_HEAD int co_argcount; /* #arguments, except *args */ + int co_posonlyargcount; /* #positional only arguments */ int co_kwonlyargcount; /* #keyword only arguments */ int co_nlocals; /* #local variables */ int co_stacksize; /* #entries needed for evaluation stack */ @@ -102,7 +103,7 @@ PyAPI_DATA(PyTypeObject) PyCode_Type; /* Public interface */ PyAPI_FUNC(PyCodeObject *) PyCode_New( - int, int, int, int, int, PyObject *, PyObject *, + int, int, int, int, int, int, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, int, PyObject *); /* same as struct above */ -- cgit v1.2.1