mirror of
https://github.com/python/cpython.git
synced 2025-07-19 09:15:34 +00:00
bpo-35766: compile(): rename feature_version parameter (GH-13994) (GH-14001)
Rename compile() feature_version parameter to _feature_version and
convert it to a keyword-only parameter.
Update also test_type_comments to pass feature_version as a tuple.
(cherry picked from commit efdf6ca90f
)
This commit is contained in:
parent
70a4178ec4
commit
b2fd32b2f0
4 changed files with 16 additions and 10 deletions
|
@ -696,7 +696,8 @@ compile as builtin_compile
|
|||
flags: int = 0
|
||||
dont_inherit: bool(accept={int}) = False
|
||||
optimize: int = -1
|
||||
feature_version: int = -1
|
||||
*
|
||||
_feature_version as feature_version: int = -1
|
||||
|
||||
Compile source into a code object that can be executed by exec() or eval().
|
||||
|
||||
|
@ -716,7 +717,7 @@ static PyObject *
|
|||
builtin_compile_impl(PyObject *module, PyObject *source, PyObject *filename,
|
||||
const char *mode, int flags, int dont_inherit,
|
||||
int optimize, int feature_version)
|
||||
/*[clinic end generated code: output=b0c09c84f116d3d7 input=5fcc30651a6acaa9]*/
|
||||
/*[clinic end generated code: output=b0c09c84f116d3d7 input=40171fb92c1d580d]*/
|
||||
{
|
||||
PyObject *source_copy;
|
||||
const char *str;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue