Home
last modified time | relevance | path

Searched refs:feature_version (Results 1 – 14 of 14) sorted by relevance

/third_party/python/Lib/test/
Dtest_type_comments.py227 def parse(self, source, feature_version=highest): argument
229 feature_version=feature_version)
233 feature_version = (3, version)
236 yield self.parse(source, feature_version)
242 self.parse(source, feature_version)
Dtest_ast.py690 ast.parse('f"{x=}"', feature_version=(3, 8))
692 ast.parse('f"{x=}"', feature_version=(3, 7))
/third_party/python/Python/clinic/
Dbltinmodule.c.h171 int optimize, int feature_version);
187 int feature_version = -1; in builtin_compile() local
244 feature_version = _PyLong_AsInt(args[6]); in builtin_compile()
245 if (feature_version == -1 && PyErr_Occurred()) { in builtin_compile()
249 …iltin_compile_impl(module, source, filename, mode, flags, dont_inherit, optimize, feature_version); in builtin_compile()
/third_party/python/Parser/
Dpegen.h73 int feature_version; member
238 if (p->feature_version < version) { in INVALID_VERSION_CHECK()
Dstring_parser.c196 if (fmode && p->feature_version < 6) { in _PyPegen_parsestr()
399 Parser *p2 = _PyPegen_Parser_New(tok, Py_fstring_input, p->flags, p->feature_version, in fstring_compile_expr()
718 if (p->feature_version < 8) { in fstring_find_expr()
Dpegen.c1112 if (p->feature_version < 6 && strchr(num_raw, '_') != NULL) { in _PyPegen_number_token()
1225 int feature_version, int *errcode, PyArena *arena) in _PyPegen_Parser_New() argument
1270 p->feature_version = feature_version; in _PyPegen_Parser_New()
1480 int feature_version = flags && (flags->cf_flags & PyCF_ONLY_AST) ? in _PyPegen_run_parser_from_string() local
1482 Parser *p = _PyPegen_Parser_New(tok, start_rule, parser_flags, feature_version, in _PyPegen_run_parser_from_string()
/third_party/python/Lib/
Dast.py34 type_comments=False, feature_version=None): argument
43 if isinstance(feature_version, tuple):
44 major, minor = feature_version # Should be a 2-tuple.
46 feature_version = minor
47 elif feature_version is None:
48 feature_version = -1
51 _feature_version=feature_version)
/third_party/python/Doc/library/
Dtoken.rst94 ``feature_version`` set to 6 or lower).
Dast.rst1894 …on:: parse(source, filename='<unknown>', mode='exec', *, type_comments=False, feature_version=None)
1913 Also, setting ``feature_version`` to a tuple ``(major, minor)``
1916 ``feature_version=(3, 4)`` will allow the use of ``async`` and
1939 Added ``type_comments``, ``mode='func_type'`` and ``feature_version``.
/third_party/python/Misc/NEWS.d/
D3.8.0a3.rst208 Add a ``feature_version`` flag to ``ast.parse()`` (documented) and
210 versions of the grammar. In particular, if ``feature_version`` is 5 or 6,
D3.10.0a1.rst2240 when passed ``feature_version`` is less than ``(3, 8)``.
D3.9.0a1.rst3048 Change the format of feature_version to be a (major, minor) tuple.
/third_party/python/Python/
Dbltinmodule.c750 int optimize, int feature_version) in builtin_compile_impl() argument
762 if (feature_version >= 0 && (flags & PyCF_ONLY_AST)) { in builtin_compile_impl()
763 cf.cf_feature_version = feature_version; in builtin_compile_impl()
/third_party/python/Doc/whatsnew/
D3.8.rst588 * ``feature_version=(3, N)`` allows specifying an earlier Python 3
589 version. For example, ``feature_version=(3, 4)`` will treat