/third_party/python/Lib/test/ |
D | test_type_comments.py | 227 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)
|
D | test_ast.py | 690 ast.parse('f"{x=}"', feature_version=(3, 8)) 692 ast.parse('f"{x=}"', feature_version=(3, 7))
|
/third_party/python/Python/clinic/ |
D | bltinmodule.c.h | 171 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/ |
D | pegen.h | 73 int feature_version; member 238 if (p->feature_version < version) { in INVALID_VERSION_CHECK()
|
D | string_parser.c | 196 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()
|
D | pegen.c | 1112 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/ |
D | ast.py | 34 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/ |
D | token.rst | 94 ``feature_version`` set to 6 or lower).
|
D | ast.rst | 1894 …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/ |
D | 3.8.0a3.rst | 208 Add a ``feature_version`` flag to ``ast.parse()`` (documented) and 210 versions of the grammar. In particular, if ``feature_version`` is 5 or 6,
|
D | 3.10.0a1.rst | 2240 when passed ``feature_version`` is less than ``(3, 8)``.
|
D | 3.9.0a1.rst | 3048 Change the format of feature_version to be a (major, minor) tuple.
|
/third_party/python/Python/ |
D | bltinmodule.c | 750 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/ |
D | 3.8.rst | 588 * ``feature_version=(3, N)`` allows specifying an earlier Python 3 589 version. For example, ``feature_version=(3, 4)`` will treat
|