chunk_id stringlengths 36 36 | source stringclasses 35
values | source_url stringlengths 0 290 | upstream_license stringclasses 1
value | document_id stringlengths 36 36 | chunk_index int64 0 324k | retrieved_at stringclasses 2
values | chunker_version stringclasses 4
values | content_hash stringlengths 15 64 | content stringlengths 50 44.7k | namespace stringclasses 9
values | source_name stringclasses 35
values | raw_text stringlengths 50 44.7k | cleaned_text stringlengths 50 44.7k | tags stringclasses 49
values | collection_name stringclasses 11
values |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
717f034b-27d4-4172-9428-aa0d0aeef83d | CPython Docs | file://datasets/cpython/Doc/library/ast.rst | unknown | d088e5d2-01b6-4edf-8f87-f277552a22d9 | 29,225 | supabase-export-v2 | baf99ea072130ae8 | .. class:: Attribute(value, attr, ctx)
Attribute access, e.g. ``d.keys``. ``value`` is a node, typically a
:class:`Name`. ``attr`` is a bare string giving the name of the attribute,
and ``ctx`` is :class:`Load`, :class:`Store` or :class:`Del` according to how
the attribute is acted on. | trusted_official_docs | CPython Docs | .. class:: Attribute(value, attr, ctx)
Attribute access, e.g. ``d.keys``. ``value`` is a node, typically a
:class:`Name`. ``attr`` is a bare string giving the name of the attribute,
and ``ctx`` is :class:`Load`, :class:`Store` or :class:`Del` according to how
the attribute is acted on. | .. class:: Attribute(value, attr, ctx)
Attribute access, e.g. ``d.keys``. ``value`` is a node, typically a
:class:`Name`. ``attr`` is a bare string giving the name of the attribute,
and ``ctx`` is :class:`Load`, :class:`Store` or :class:`Del` according to how
the attribute is acted on. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
7422729c-0801-419b-a268-64d824fff036 | CPython Docs | file://datasets/cpython/Doc/library/ast.rst | unknown | d088e5d2-01b6-4edf-8f87-f277552a22d9 | 29,330 | supabase-export-v2 | 486285c85e1a3163 | .. doctest::
>>> print(ast.dump(ast.parse("""\
... for a in b:
... if a > 5:
... break
... else:
... continue
... ... """), indent=4))
Module(
body=[
For(
target=Name(id='a', ctx=Store()),
iter=Name(id='b'),
body=[
If(
test=Compare(
left=Name(id='a'),
ops=[
Gt()],
comparators=[
Constant(value=5)]),
... | trusted_official_docs | CPython Docs | .. doctest::
>>> print(ast.dump(ast.parse("""\
... for a in b:
... if a > 5:
... break
... else:
... continue
... ... """), indent=4))
Module(
body=[
For(
target=Name(id='a', ctx=Store()),
iter=Name(id='b'),
body=[
If(
test=Compare(
left=Name(id='a'),
ops=[
Gt()],
comparators=[
Constant(value=5)]),
... | .. doctest::
>>> print(ast.dump(ast.parse("""\
... for a in b:
... if a > 5:
... break
... else:
... continue
... ... """), indent=4))
Module(
body=[
For(
target=Name(id='a', ctx=Store()),
iter=Name(id='b'),
body=[
If(
test=Compare(
left=Name(id='a'),
ops=[
Gt()],
comparators=[
Constant(value=5)]),
... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
74636c46-c25a-4e0b-8883-09f4ced31737 | CPython Docs | file://datasets/cpython/Doc/library/ast.rst | unknown | d088e5d2-01b6-4edf-8f87-f277552a22d9 | 29,323 | supabase-export-v2 | 0e11816a22fb32d3 | for x in y: ... ... ... else: ... ... ... """), indent=4)) Module( body=[ For( target=Name(id='x', ctx=Store()), iter=Name(id='y'), body=[ Expr( value=Constant(value=Ellipsis))], orelse=[ Expr( value=Constant(value=Ellipsis))])])
.. class:: While(test, body, orelse) | trusted_official_docs | CPython Docs | for x in y: ... ... ... else: ... ... ... """), indent=4)) Module( body=[ For( target=Name(id='x', ctx=Store()), iter=Name(id='y'), body=[ Expr( value=Constant(value=Ellipsis))], orelse=[ Expr( value=Constant(value=Ellipsis))])])
.. class:: While(test, body, orelse) | for x in y: ... ... ... else: ... ... ... """), indent=4)) Module( body=[ For( target=Name(id='x', ctx=Store()), iter=Name(id='y'), body=[ Expr( value=Constant(value=Ellipsis))], orelse=[ Expr( value=Constant(value=Ellipsis))])])
.. class:: While(test, body, orelse) | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
767a6a9a-925a-4cf1-8f94-b85ceeb283a8 | CPython Docs | file://datasets/cpython/Doc/library/ast.rst | unknown | d088e5d2-01b6-4edf-8f87-f277552a22d9 | 29,522 | supabase-export-v2 | 4d72b090ba286e47 | Get source code segment of the *source* that generated *node*. If some location information (:attr:`~ast.AST.lineno`, :attr:`~ast.AST.end_lineno`, :attr:`~ast.AST.col_offset`, or :attr:`~ast.AST.end_col_offset`) is missing, return ``None``.
If *padded* is ``True``, the first line of a multi-line statement will
be padd... | trusted_official_docs | CPython Docs | Get source code segment of the *source* that generated *node*. If some location information (:attr:`~ast.AST.lineno`, :attr:`~ast.AST.end_lineno`, :attr:`~ast.AST.col_offset`, or :attr:`~ast.AST.end_col_offset`) is missing, return ``None``.
If *padded* is ``True``, the first line of a multi-line statement will
be padd... | Get source code segment of the *source* that generated *node*. If some location information (:attr:`~ast.AST.lineno`, :attr:`~ast.AST.end_lineno`, :attr:`~ast.AST.col_offset`, or :attr:`~ast.AST.end_col_offset`) is missing, return ``None``.
If *padded* is ``True``, the first line of a multi-line statement will
be padd... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
77652ae6-8db5-457d-af76-b756a02b02c0 | CPython Docs | file://datasets/cpython/Doc/library/ast.rst | unknown | d088e5d2-01b6-4edf-8f87-f277552a22d9 | 29,488 | supabase-export-v2 | e169078fc664c1a0 | for`` loops and ``async with`` context managers. They have the same fields as :class:`For` and :class:`With`, respectively. Only valid in the body of an :class:`AsyncFunctionDef`.
.. note::
When a string is parsed by :func:`ast.parse`, operator nodes (subclasses
of :class:`ast.operator`, :class:`ast.unaryop`, :class:... | trusted_official_docs | CPython Docs | for`` loops and ``async with`` context managers. They have the same fields as :class:`For` and :class:`With`, respectively. Only valid in the body of an :class:`AsyncFunctionDef`.
.. note::
When a string is parsed by :func:`ast.parse`, operator nodes (subclasses
of :class:`ast.operator`, :class:`ast.unaryop`, :class:... | for`` loops and ``async with`` context managers. They have the same fields as :class:`For` and :class:`With`, respectively. Only valid in the body of an :class:`AsyncFunctionDef`.
.. note::
When a string is parsed by :func:`ast.parse`, operator nodes (subclasses
of :class:`ast.operator`, :class:`ast.unaryop`, :class:... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
7a1cee28-10a5-4b02-902b-4c320de9f52a | CPython Docs | file://datasets/cpython/Doc/library/ast.rst | unknown | d088e5d2-01b6-4edf-8f87-f277552a22d9 | 29,314 | supabase-export-v2 | c91974bdf9f89410 | An ``if`` statement. ``test`` holds a single node, such as a :class:`Compare` node. ``body`` and ``orelse`` each hold a list of nodes.
``elif`` clauses don't have a special representation in the AST, but rather
appear as extra :class:`If` nodes within the ``orelse`` section of the
previous one. | trusted_official_docs | CPython Docs | An ``if`` statement. ``test`` holds a single node, such as a :class:`Compare` node. ``body`` and ``orelse`` each hold a list of nodes.
``elif`` clauses don't have a special representation in the AST, but rather
appear as extra :class:`If` nodes within the ``orelse`` section of the
previous one. | An ``if`` statement. ``test`` holds a single node, such as a :class:`Compare` node. ``body`` and ``orelse`` each hold a list of nodes.
``elif`` clauses don't have a special representation in the AST, but rather
appear as extra :class:`If` nodes within the ``orelse`` section of the
previous one. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
7bdb3949-6db5-4fbc-a2be-eced81080d46 | CPython Docs | file://datasets/cpython/Doc/library/ast.rst | unknown | d088e5d2-01b6-4edf-8f87-f277552a22d9 | 29,378 | supabase-export-v2 | 71480a0cedaa8ab9 | .. doctest::
>>> print(ast.dump(ast.parse("""
... match x:
... case [1, 2]:
... ... ... """), indent=4))
Module(
body=[
Match(
subject=Name(id='x'),
cases=[
match_case(
pattern=MatchSequence(
patterns=[
MatchValue(
value=Constant(value=1)),
MatchValue(
value=Constant(value=2))]),
body=[
Expr(
value=Co... | trusted_official_docs | CPython Docs | .. doctest::
>>> print(ast.dump(ast.parse("""
... match x:
... case [1, 2]:
... ... ... """), indent=4))
Module(
body=[
Match(
subject=Name(id='x'),
cases=[
match_case(
pattern=MatchSequence(
patterns=[
MatchValue(
value=Constant(value=1)),
MatchValue(
value=Constant(value=2))]),
body=[
Expr(
value=Co... | .. doctest::
>>> print(ast.dump(ast.parse("""
... match x:
... case [1, 2]:
... ... ... """), indent=4))
Module(
body=[
Match(
subject=Name(id='x'),
cases=[
match_case(
pattern=MatchSequence(
patterns=[
MatchValue(
value=Constant(value=1)),
MatchValue(
value=Constant(value=2))]),
body=[
Expr(
value=Co... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
7c4d1bdb-389f-462a-a2d6-03ae1418e6b7 | CPython Docs | file://datasets/cpython/Doc/library/ast.rst | unknown | d088e5d2-01b6-4edf-8f87-f277552a22d9 | 29,152 | supabase-export-v2 | 3d7568c67fc39f74 | = ast.parse('t"{name} finished {place:ordinal}"', mode='eval') >>> print(ast.dump(expr, indent=4)) Expression( body=TemplateStr( values=[ Interpolation( value=Name(id='name'), str='name', conversion=-1), Constant(value=' finished '), Interpolation( value=Name(id='place'), str='place', conversion=-1, format_spec=JoinedS... | trusted_official_docs | CPython Docs | = ast.parse('t"{name} finished {place:ordinal}"', mode='eval') >>> print(ast.dump(expr, indent=4)) Expression( body=TemplateStr( values=[ Interpolation( value=Name(id='name'), str='name', conversion=-1), Constant(value=' finished '), Interpolation( value=Name(id='place'), str='place', conversion=-1, format_spec=JoinedS... | = ast.parse('t"{name} finished {place:ordinal}"', mode='eval') >>> print(ast.dump(expr, indent=4)) Expression( body=TemplateStr( values=[ Interpolation( value=Name(id='name'), str='name', conversion=-1), Constant(value=' finished '), Interpolation( value=Name(id='place'), str='place', conversion=-1, format_spec=JoinedS... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
7d514381-bf9d-4d55-a46d-c5ac4998e96a | CPython Docs | file://datasets/cpython/Doc/library/ast.rst | unknown | d088e5d2-01b6-4edf-8f87-f277552a22d9 | 29,477 | supabase-export-v2 | 2bf452ccb2c135ea | class Foo(base1, base2, metaclass=meta): ... pass ... """), indent=4)) Module( body=[ ClassDef( name='Foo', bases=[ Name(id='base1'), Name(id='base2')], keywords=[ keyword( arg='metaclass', value=Name(id='meta'))], body=[ Pass()], decorator_list=[ Name(id='decorator1'), Name(id='decorator2')])])
.. versionchanged:: 3.1... | trusted_official_docs | CPython Docs | class Foo(base1, base2, metaclass=meta): ... pass ... """), indent=4)) Module( body=[ ClassDef( name='Foo', bases=[ Name(id='base1'), Name(id='base2')], keywords=[ keyword( arg='metaclass', value=Name(id='meta'))], body=[ Pass()], decorator_list=[ Name(id='decorator1'), Name(id='decorator2')])])
.. versionchanged:: 3.1... | class Foo(base1, base2, metaclass=meta): ... pass ... """), indent=4)) Module( body=[ ClassDef( name='Foo', bases=[ Name(id='base1'), Name(id='base2')], keywords=[ keyword( arg='metaclass', value=Name(id='meta'))], body=[ Pass()], decorator_list=[ Name(id='decorator1'), Name(id='decorator2')])])
.. versionchanged:: 3.1... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
7e5a2a42-1c75-45af-a9b1-27fec37f6a6a | CPython Docs | file://datasets/cpython/Doc/library/ast.rst | unknown | d088e5d2-01b6-4edf-8f87-f277552a22d9 | 29,229 | supabase-export-v2 | 715ef4d352007276 | .. class:: NamedExpr(target, value)
A named expression. This AST node is produced by the assignment expressions
operator (also known as the walrus operator). As opposed to the :class:`Assign`
node in which the first argument can be multiple nodes, in this case both
``target`` and ``value`` must be single nodes. | trusted_official_docs | CPython Docs | .. class:: NamedExpr(target, value)
A named expression. This AST node is produced by the assignment expressions
operator (also known as the walrus operator). As opposed to the :class:`Assign`
node in which the first argument can be multiple nodes, in this case both
``target`` and ``value`` must be single nodes. | .. class:: NamedExpr(target, value)
A named expression. This AST node is produced by the assignment expressions
operator (also known as the walrus operator). As opposed to the :class:`Assign`
node in which the first argument can be multiple nodes, in this case both
``target`` and ``value`` must be single nodes. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
81957d99-7a8a-4c1a-b772-99d200280561 | CPython Docs | file://datasets/cpython/Doc/library/ast.rst | unknown | d088e5d2-01b6-4edf-8f87-f277552a22d9 | 29,393 | supabase-export-v2 | 1328ef4c18755b14 | .. class:: MatchClass(cls, patterns, kwd_attrs, kwd_patterns)
A match class pattern. ``cls`` is an expression giving the nominal class to
be matched. ``patterns`` is a sequence of pattern nodes to be matched against
the class defined sequence of pattern matching attributes. ``kwd_attrs`` is a
sequence of additional ... | trusted_official_docs | CPython Docs | .. class:: MatchClass(cls, patterns, kwd_attrs, kwd_patterns)
A match class pattern. ``cls`` is an expression giving the nominal class to
be matched. ``patterns`` is a sequence of pattern nodes to be matched against
the class defined sequence of pattern matching attributes. ``kwd_attrs`` is a
sequence of additional ... | .. class:: MatchClass(cls, patterns, kwd_attrs, kwd_patterns)
A match class pattern. ``cls`` is an expression giving the nominal class to
be matched. ``patterns`` is a sequence of pattern nodes to be matched against
the class defined sequence of pattern matching attributes. ``kwd_attrs`` is a
sequence of additional ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
81f98a57-b927-4abb-ad3d-bba4328133c8 | CPython Docs | file://datasets/cpython/Doc/library/ast.rst | unknown | d088e5d2-01b6-4edf-8f87-f277552a22d9 | 29,207 | supabase-export-v2 | 58a85892eda95764 | .. class:: Compare(left, ops, comparators)
A comparison of two or more values. ``left`` is the first value in the
comparison, ``ops`` the list of operators, and ``comparators`` the list
of values after the first element in the comparison. | trusted_official_docs | CPython Docs | .. class:: Compare(left, ops, comparators)
A comparison of two or more values. ``left`` is the first value in the
comparison, ``ops`` the list of operators, and ``comparators`` the list
of values after the first element in the comparison. | .. class:: Compare(left, ops, comparators)
A comparison of two or more values. ``left`` is the first value in the
comparison, ``ops`` the list of operators, and ``comparators`` the list
of values after the first element in the comparison. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
840b12bc-0c4f-4146-a61a-1c1e9ef817d1 | CPython Docs | file://datasets/cpython/Doc/library/ast.rst | unknown | d088e5d2-01b6-4edf-8f87-f277552a22d9 | 29,557 | supabase-export-v2 | a7541fc02b1ed595 | a collection of statements (that applies to all statement nodes), the visitor may also return a list of nodes rather than just a single node.
If :class:`NodeTransformer` introduces new nodes (that weren't part of
original tree) without giving them location information (such as
:attr:`~ast.AST.lineno`), :func:`fix_mis... | trusted_official_docs | CPython Docs | a collection of statements (that applies to all statement nodes), the visitor may also return a list of nodes rather than just a single node.
If :class:`NodeTransformer` introduces new nodes (that weren't part of
original tree) without giving them location information (such as
:attr:`~ast.AST.lineno`), :func:`fix_mis... | a collection of statements (that applies to all statement nodes), the visitor may also return a list of nodes rather than just a single node.
If :class:`NodeTransformer` introduces new nodes (that weren't part of
original tree) without giving them location information (such as
:attr:`~ast.AST.lineno`), :func:`fix_mis... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
844f126a-6c43-455d-8f8c-feed60e8f519 | CPython Docs | file://datasets/cpython/Doc/library/ast.rst | unknown | d088e5d2-01b6-4edf-8f87-f277552a22d9 | 29,156 | supabase-export-v2 | 09a10c6e1e05b6d7 | a variable, or a function call). This has the same meaning as ``FormattedValue.value``. * ``str`` is a constant containing the text of the interpolation expression.
If ``str`` is set to ``None``, then ``value`` is used to generate code
when calling :func:`ast.unparse`. This no longer guarantees that the
generated cod... | trusted_official_docs | CPython Docs | a variable, or a function call). This has the same meaning as ``FormattedValue.value``. * ``str`` is a constant containing the text of the interpolation expression.
If ``str`` is set to ``None``, then ``value`` is used to generate code
when calling :func:`ast.unparse`. This no longer guarantees that the
generated cod... | a variable, or a function call). This has the same meaning as ``FormattedValue.value``. * ``str`` is a constant containing the text of the interpolation expression.
If ``str`` is set to ``None``, then ``value`` is used to generate code
when calling :func:`ast.unparse`. This no longer guarantees that the
generated cod... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
86de3f03-69a1-4260-9698-469dc7896fb7 | CPython Docs | file://datasets/cpython/Doc/library/ast.rst | unknown | d088e5d2-01b6-4edf-8f87-f277552a22d9 | 29,371 | supabase-export-v2 | 3c19c562338a56e4 | .. class:: MatchSingleton(value)
A match literal pattern that compares by identity. ``value`` is the
singleton to be compared against: ``None``, ``True``, or ``False``. This
pattern succeeds if the match subject is the given constant. | trusted_official_docs | CPython Docs | .. class:: MatchSingleton(value)
A match literal pattern that compares by identity. ``value`` is the
singleton to be compared against: ``None``, ``True``, or ``False``. This
pattern succeeds if the match subject is the given constant. | .. class:: MatchSingleton(value)
A match literal pattern that compares by identity. ``value`` is the
singleton to be compared against: ``None``, ``True``, or ``False``. This
pattern succeeds if the match subject is the given constant. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
879169cf-706d-4c25-bd26-2c0210a6127d | CPython Docs | file://datasets/cpython/Doc/library/ast.rst | unknown | d088e5d2-01b6-4edf-8f87-f277552a22d9 | 29,401 | supabase-export-v2 | 1bed4203f9e1e2ec | .. class:: MatchAs(pattern, name)
A match "as-pattern", capture pattern or wildcard pattern. ``pattern``
contains the match pattern that the subject will be matched against. If the pattern is ``None``, the node represents a capture pattern (i.e a
bare name) and will always succeed. | trusted_official_docs | CPython Docs | .. class:: MatchAs(pattern, name)
A match "as-pattern", capture pattern or wildcard pattern. ``pattern``
contains the match pattern that the subject will be matched against. If the pattern is ``None``, the node represents a capture pattern (i.e a
bare name) and will always succeed. | .. class:: MatchAs(pattern, name)
A match "as-pattern", capture pattern or wildcard pattern. ``pattern``
contains the match pattern that the subject will be matched against. If the pattern is ``None``, the node represents a capture pattern (i.e a
bare name) and will always succeed. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
885c957e-3423-430a-94c6-16efe49b86c3 | CPython Docs | file://datasets/cpython/Doc/library/ast.rst | unknown | d088e5d2-01b6-4edf-8f87-f277552a22d9 | 29,249 | supabase-export-v2 | 22dd74528ce4b04e | .. class:: comprehension(target, iter, ifs, is_async)
One ``for`` clause in a comprehension. ``target`` is the reference to use for
each element - typically a :class:`Name` or :class:`Tuple` node. ``iter``
is the object to iterate over. ``ifs`` is a list of test expressions: each
``for`` clause can have multiple ``i... | trusted_official_docs | CPython Docs | .. class:: comprehension(target, iter, ifs, is_async)
One ``for`` clause in a comprehension. ``target`` is the reference to use for
each element - typically a :class:`Name` or :class:`Tuple` node. ``iter``
is the object to iterate over. ``ifs`` is a list of test expressions: each
``for`` clause can have multiple ``i... | .. class:: comprehension(target, iter, ifs, is_async)
One ``for`` clause in a comprehension. ``target`` is the reference to use for
each element - typically a :class:`Name` or :class:`Tuple` node. ``iter``
is the object to iterate over. ``ifs`` is a list of test expressions: each
``for`` clause can have multiple ``i... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
8ae2272e-dd50-4dcc-a774-096c4a8b25a4 | CPython Docs | file://datasets/cpython/Doc/library/ast.rst | unknown | d088e5d2-01b6-4edf-8f87-f277552a22d9 | 29,244 | supabase-export-v2 | 476b6c2323ebf060 | comprehensions, generator expressions, and dictionary comprehensions. ``elt`` (or ``key`` and ``value``) is a single node representing the part that will be evaluated for each item.
``generators`` is a list of :class:`comprehension` nodes. | trusted_official_docs | CPython Docs | comprehensions, generator expressions, and dictionary comprehensions. ``elt`` (or ``key`` and ``value``) is a single node representing the part that will be evaluated for each item.
``generators`` is a list of :class:`comprehension` nodes. | comprehensions, generator expressions, and dictionary comprehensions. ``elt`` (or ``key`` and ``value``) is a single node representing the part that will be evaluated for each item.
``generators`` is a list of :class:`comprehension` nodes. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
8b4525d9-19ac-4448-9c54-da144c135c49 | CPython Docs | file://datasets/cpython/Doc/library/ast.rst | unknown | d088e5d2-01b6-4edf-8f87-f277552a22d9 | 29,246 | supabase-export-v2 | 11d5c3726197242e | .. doctest::
>>> print(ast.dump(
... ast.parse('[x for x in numbers]', mode='eval'),
... indent=4,
... ))
Expression(
body=ListComp(
elt=Name(id='x'),
generators=[
comprehension(
target=Name(id='x', ctx=Store()),
iter=Name(id='numbers'),
is_async=0)]))
>>> print(ast.dump(
... ast.parse('{x: x**2 for x in n... | trusted_official_docs | CPython Docs | .. doctest::
>>> print(ast.dump(
... ast.parse('[x for x in numbers]', mode='eval'),
... indent=4,
... ))
Expression(
body=ListComp(
elt=Name(id='x'),
generators=[
comprehension(
target=Name(id='x', ctx=Store()),
iter=Name(id='numbers'),
is_async=0)]))
>>> print(ast.dump(
... ast.parse('{x: x**2 for x in n... | .. doctest::
>>> print(ast.dump(
... ast.parse('[x for x in numbers]', mode='eval'),
... indent=4,
... ))
Expression(
body=ListComp(
elt=Name(id='x'),
generators=[
comprehension(
target=Name(id='x', ctx=Store()),
iter=Name(id='numbers'),
is_async=0)]))
>>> print(ast.dump(
... ast.parse('{x: x**2 for x in n... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
8bf0443a-50ff-4ea1-8dd5-5db0607f735a | CPython Docs | file://datasets/cpython/Doc/library/ast.rst | unknown | d088e5d2-01b6-4edf-8f87-f277552a22d9 | 29,317 | supabase-export-v2 | 3721b79666db6151 | ... ... ... else: ... ... ... """), indent=4)) Module( body=[ If( test=Name(id='x'), body=[ Expr( value=Constant(value=Ellipsis))], orelse=[ If( test=Name(id='y'), body=[ Expr( value=Constant(value=Ellipsis))], orelse=[ Expr( value=Constant(value=Ellipsis))])])])
.. class:: For(target, iter, body, orelse, type_comment) | trusted_official_docs | CPython Docs | ... ... ... else: ... ... ... """), indent=4)) Module( body=[ If( test=Name(id='x'), body=[ Expr( value=Constant(value=Ellipsis))], orelse=[ If( test=Name(id='y'), body=[ Expr( value=Constant(value=Ellipsis))], orelse=[ Expr( value=Constant(value=Ellipsis))])])])
.. class:: For(target, iter, body, orelse, type_comment) | ... ... ... else: ... ... ... """), indent=4)) Module( body=[ If( test=Name(id='x'), body=[ Expr( value=Constant(value=Ellipsis))], orelse=[ If( test=Name(id='y'), body=[ Expr( value=Constant(value=Ellipsis))], orelse=[ Expr( value=Constant(value=Ellipsis))])])])
.. class:: For(target, iter, body, orelse, type_comment) | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
8e1fa0a9-ca74-43f6-a421-a301575cb3a7 | CPython Docs | file://datasets/cpython/Doc/library/ast.rst | unknown | d088e5d2-01b6-4edf-8f87-f277552a22d9 | 29,220 | supabase-export-v2 | 08853d5f81f04832 | keyword argument to a function call or class definition. ``arg`` is a raw string of the parameter name, ``value`` is a node to pass in.
.. class:: IfExp(test, body, orelse) | trusted_official_docs | CPython Docs | keyword argument to a function call or class definition. ``arg`` is a raw string of the parameter name, ``value`` is a node to pass in.
.. class:: IfExp(test, body, orelse) | keyword argument to a function call or class definition. ``arg`` is a raw string of the parameter name, ``value`` is a node to pass in.
.. class:: IfExp(test, body, orelse) | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
8eb3889f-655a-479d-bd41-a4391a834f26 | CPython Docs | file://datasets/cpython/Doc/library/ast.rst | unknown | d088e5d2-01b6-4edf-8f87-f277552a22d9 | 29,380 | supabase-export-v2 | 145d94daf50aeced | .. class:: MatchStar(name)
Matches the rest of the sequence in a variable length match sequence pattern. If ``name`` is not ``None``, a list containing the remaining sequence
elements is bound to that name if the overall sequence pattern is successful. | trusted_official_docs | CPython Docs | .. class:: MatchStar(name)
Matches the rest of the sequence in a variable length match sequence pattern. If ``name`` is not ``None``, a list containing the remaining sequence
elements is bound to that name if the overall sequence pattern is successful. | .. class:: MatchStar(name)
Matches the rest of the sequence in a variable length match sequence pattern. If ``name`` is not ``None``, a list containing the remaining sequence
elements is bound to that name if the overall sequence pattern is successful. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
8f27440b-125f-4d9f-9c38-ebc24fb6a170 | CPython Docs | file://datasets/cpython/Doc/library/ast.rst | unknown | d088e5d2-01b6-4edf-8f87-f277552a22d9 | 29,141 | supabase-export-v2 | e1eb9f13cc9e1be3 | * ``value`` is any expression node (such as a literal, a variable, or a function call). * ``conversion`` is an integer:
* -1: no formatting
* 97 (``ord('a')``): ``!a`` :func:`ASCII <ascii>` formatting
* 114 (``ord('r')``): ``!r`` :func:`repr` formatting
* 115 (``ord('s')``): ``!s`` :func:`string <str>` formatting | trusted_official_docs | CPython Docs | * ``value`` is any expression node (such as a literal, a variable, or a function call). * ``conversion`` is an integer:
* -1: no formatting
* 97 (``ord('a')``): ``!a`` :func:`ASCII <ascii>` formatting
* 114 (``ord('r')``): ``!r`` :func:`repr` formatting
* 115 (``ord('s')``): ``!s`` :func:`string <str>` formatting | * ``value`` is any expression node (such as a literal, a variable, or a function call). * ``conversion`` is an integer:
* -1: no formatting
* 97 (``ord('a')``): ``!a`` :func:`ASCII <ascii>` formatting
* 114 (``ord('r')``): ``!r`` :func:`repr` formatting
* 115 (``ord('s')``): ``!s`` :func:`string <str>` formatting | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
908e7cd6-493d-421a-b06e-72c3c10be386 | CPython Docs | file://datasets/cpython/Doc/library/ast.rst | unknown | d088e5d2-01b6-4edf-8f87-f277552a22d9 | 29,266 | supabase-export-v2 | 406f64e938d3af13 | .. class:: AnnAssign(target, annotation, value, simple)
An assignment with a type annotation. ``target`` is a single node and can
be a :class:`Name`, an :class:`Attribute` or a :class:`Subscript`. ``annotation`` is the annotation, such as a :class:`Constant` or :class:`Name`
node. ``value`` is a single optional node. | trusted_official_docs | CPython Docs | .. class:: AnnAssign(target, annotation, value, simple)
An assignment with a type annotation. ``target`` is a single node and can
be a :class:`Name`, an :class:`Attribute` or a :class:`Subscript`. ``annotation`` is the annotation, such as a :class:`Constant` or :class:`Name`
node. ``value`` is a single optional node. | .. class:: AnnAssign(target, annotation, value, simple)
An assignment with a type annotation. ``target`` is a single node and can
be a :class:`Name`, an :class:`Attribute` or a :class:`Subscript`. ``annotation`` is the annotation, such as a :class:`Constant` or :class:`Name`
node. ``value`` is a single optional node. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
91d05af3-14b7-476d-b027-a51015c1ade8 | CPython Docs | file://datasets/cpython/Doc/library/ast.rst | unknown | d088e5d2-01b6-4edf-8f87-f277552a22d9 | 29,618 | supabase-export-v2 | 75862fa39362fecb | `leoAst.py <https://leo-editor.github.io/leo-editor/appendices.html#leoast-py>`_ unifies the token-based and parse-tree-based views of python programs by inserting two-way links between tokens and ast nodes.
`LibCST <https://libcst.readthedocs.io/>`_ parses code as a Concrete Syntax
Tree that looks like an ast tree an... | trusted_official_docs | CPython Docs | `leoAst.py <https://leo-editor.github.io/leo-editor/appendices.html#leoast-py>`_ unifies the token-based and parse-tree-based views of python programs by inserting two-way links between tokens and ast nodes.
`LibCST <https://libcst.readthedocs.io/>`_ parses code as a Concrete Syntax
Tree that looks like an ast tree an... | `leoAst.py <https://leo-editor.github.io/leo-editor/appendices.html#leoast-py>`_ unifies the token-based and parse-tree-based views of python programs by inserting two-way links between tokens and ast nodes.
`LibCST <https://libcst.readthedocs.io/>`_ parses code as a Concrete Syntax
Tree that looks like an ast tree an... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
96d48509-385e-49cc-9bd8-63c3a3ea1002 | CPython Docs | file://datasets/cpython/Doc/library/ast.rst | unknown | d088e5d2-01b6-4edf-8f87-f277552a22d9 | 29,275 | supabase-export-v2 | 6b5999a6787f9c82 | following example, ``target`` is a :class:`Name` node for ``x`` (with the :class:`Store` context), ``op`` is :class:`Add`, and ``value`` is a :class:`Constant` with value for 1.
The ``target`` attribute cannot be of class :class:`Tuple` or :class:`List`,
unlike the targets of :class:`Assign`. | trusted_official_docs | CPython Docs | following example, ``target`` is a :class:`Name` node for ``x`` (with the :class:`Store` context), ``op`` is :class:`Add`, and ``value`` is a :class:`Constant` with value for 1.
The ``target`` attribute cannot be of class :class:`Tuple` or :class:`List`,
unlike the targets of :class:`Assign`. | following example, ``target`` is a :class:`Name` node for ``x`` (with the :class:`Store` context), ``op`` is :class:`Add`, and ``value`` is a :class:`Constant` with value for 1.
The ``target`` attribute cannot be of class :class:`Tuple` or :class:`List`,
unlike the targets of :class:`Assign`. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
9815635e-55fb-4c69-8711-db45c43e6df3 | CPython Docs | file://datasets/cpython/Doc/library/ast.rst | unknown | d088e5d2-01b6-4edf-8f87-f277552a22d9 | 29,474 | supabase-export-v2 | 779e60061d14bd33 | A class definition.
* ``name`` is a raw string for the class name
* ``bases`` is a list of nodes for explicitly specified base classes. * ``keywords`` is a list of :class:`.keyword` nodes, principally for 'metaclass'. Other keywords will be passed to the metaclass, as per :pep:`3115`. * ``body`` is a list of nodes rep... | trusted_official_docs | CPython Docs | A class definition.
* ``name`` is a raw string for the class name
* ``bases`` is a list of nodes for explicitly specified base classes. * ``keywords`` is a list of :class:`.keyword` nodes, principally for 'metaclass'. Other keywords will be passed to the metaclass, as per :pep:`3115`. * ``body`` is a list of nodes rep... | A class definition.
* ``name`` is a raw string for the class name
* ``bases`` is a list of nodes for explicitly specified base classes. * ``keywords`` is a list of :class:`.keyword` nodes, principally for 'metaclass'. Other keywords will be passed to the metaclass, as per :pep:`3115`. * ``body`` is a list of nodes rep... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
99409b9e-138d-4518-94af-042e71d26ba0 | CPython Docs | file://datasets/cpython/Doc/library/ast.rst | unknown | d088e5d2-01b6-4edf-8f87-f277552a22d9 | 29,527 | supabase-export-v2 | fdf2fc267052f4eb | .. function:: increment_lineno(node, n=1)
Increment the line number and end line number of each node in the tree
starting at *node* by *n*. This is useful to "move code" to a different
location in a file. | trusted_official_docs | CPython Docs | .. function:: increment_lineno(node, n=1)
Increment the line number and end line number of each node in the tree
starting at *node* by *n*. This is useful to "move code" to a different
location in a file. | .. function:: increment_lineno(node, n=1)
Increment the line number and end line number of each node in the tree
starting at *node* by *n*. This is useful to "move code" to a different
location in a file. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
9945e00a-5e67-4090-884a-1265102a8066 | CPython Docs | file://datasets/cpython/Doc/library/ast.rst | unknown | d088e5d2-01b6-4edf-8f87-f277552a22d9 | 29,344 | supabase-export-v2 | a0af495a30124d26 | .. doctest::
>>> print(ast.dump(ast.parse("""\
... try:
... a + 1
... except TypeError:
... pass
... """), indent=4))
Module(
body=[
Try(
body=[
Expr(
value=BinOp(
left=Name(id='a'),
op=Add(),
right=Constant(value=1)))],
handlers=[
ExceptHandler(
type=Name(id='TypeError'),
body=[
Pass()])])]) | trusted_official_docs | CPython Docs | .. doctest::
>>> print(ast.dump(ast.parse("""\
... try:
... a + 1
... except TypeError:
... pass
... """), indent=4))
Module(
body=[
Try(
body=[
Expr(
value=BinOp(
left=Name(id='a'),
op=Add(),
right=Constant(value=1)))],
handlers=[
ExceptHandler(
type=Name(id='TypeError'),
body=[
Pass()])])]) | .. doctest::
>>> print(ast.dump(ast.parse("""\
... try:
... a + 1
... except TypeError:
... pass
... """), indent=4))
Module(
body=[
Try(
body=[
Expr(
value=BinOp(
left=Name(id='a'),
op=Add(),
right=Constant(value=1)))],
handlers=[
ExceptHandler(
type=Name(id='TypeError'),
body=[
Pass()])])]) | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
9ba50b2f-12c8-4996-a9e6-b53f0b58c1bb | CPython Docs | file://datasets/cpython/Doc/library/ast.rst | unknown | d088e5d2-01b6-4edf-8f87-f277552a22d9 | 29,101 | supabase-export-v2 | fd6498bf362b0382 | .. deprecated:: 3.9
Old classes :class:`!ast.Index` and :class:`!ast.ExtSlice` are still
available, but they will be removed in future Python releases. In the meantime, instantiating them will return an instance of
a different class. | trusted_official_docs | CPython Docs | .. deprecated:: 3.9
Old classes :class:`!ast.Index` and :class:`!ast.ExtSlice` are still
available, but they will be removed in future Python releases. In the meantime, instantiating them will return an instance of
a different class. | .. deprecated:: 3.9
Old classes :class:`!ast.Index` and :class:`!ast.ExtSlice` are still
available, but they will be removed in future Python releases. In the meantime, instantiating them will return an instance of
a different class. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
9c70c424-1a55-4bdf-82f8-a9511c879c98 | CPython Docs | file://datasets/cpython/Doc/library/ast.rst | unknown | d088e5d2-01b6-4edf-8f87-f277552a22d9 | 29,505 | supabase-export-v2 | f77872a4afab462b | Unparse an :class:`ast.AST` object and generate a string with code that would produce an equivalent :class:`ast.AST` object if parsed back with :func:`ast.parse`.
.. warning::
The produced code string will not necessarily be equal to the original
code that generated the :class:`ast.AST` object (without any compiler
... | trusted_official_docs | CPython Docs | Unparse an :class:`ast.AST` object and generate a string with code that would produce an equivalent :class:`ast.AST` object if parsed back with :func:`ast.parse`.
.. warning::
The produced code string will not necessarily be equal to the original
code that generated the :class:`ast.AST` object (without any compiler
... | Unparse an :class:`ast.AST` object and generate a string with code that would produce an equivalent :class:`ast.AST` object if parsed back with :func:`ast.parse`.
.. warning::
The produced code string will not necessarily be equal to the original
code that generated the :class:`ast.AST` object (without any compiler
... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
9d9274d5-7159-4bd0-8651-3f1f8afdfdfa | CPython Docs | file://datasets/cpython/Doc/library/ast.rst | unknown | d088e5d2-01b6-4edf-8f87-f277552a22d9 | 29,095 | supabase-export-v2 | 74b6872d524c0b49 | .. versionchanged:: 3.13
AST node constructors were changed to provide sensible defaults for omitted
fields: optional fields now default to ``None``, list fields default to an
empty list, and fields of type :class:`!ast.expr_context` default to
:class:`Load() <ast.Load>`. Previously, omitted attributes would not exi... | trusted_official_docs | CPython Docs | .. versionchanged:: 3.13
AST node constructors were changed to provide sensible defaults for omitted
fields: optional fields now default to ``None``, list fields default to an
empty list, and fields of type :class:`!ast.expr_context` default to
:class:`Load() <ast.Load>`. Previously, omitted attributes would not exi... | .. versionchanged:: 3.13
AST node constructors were changed to provide sensible defaults for omitted
fields: optional fields now default to ``None``, list fields default to an
empty list, and fields of type :class:`!ast.expr_context` default to
:class:`Load() <ast.Load>`. Previously, omitted attributes would not exi... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
9e39082b-a1e1-498b-8edc-7a9d3d4693d3 | CPython Docs | file://datasets/cpython/Doc/library/ast.rst | unknown | d088e5d2-01b6-4edf-8f87-f277552a22d9 | 29,083 | supabase-export-v2 | 8bf3aa45787ed2e0 | .. attribute:: lineno col_offset end_lineno end_col_offset
Instances of :class:`ast.expr` and :class:`ast.stmt` subclasses have
:attr:`lineno`, :attr:`col_offset`, :attr:`end_lineno`, and
:attr:`end_col_offset` attributes. The :attr:`lineno` and :attr:`end_lineno`
are the first and last line numbers of source text s... | trusted_official_docs | CPython Docs | .. attribute:: lineno col_offset end_lineno end_col_offset
Instances of :class:`ast.expr` and :class:`ast.stmt` subclasses have
:attr:`lineno`, :attr:`col_offset`, :attr:`end_lineno`, and
:attr:`end_col_offset` attributes. The :attr:`lineno` and :attr:`end_lineno`
are the first and last line numbers of source text s... | .. attribute:: lineno col_offset end_lineno end_col_offset
Instances of :class:`ast.expr` and :class:`ast.stmt` subclasses have
:attr:`lineno`, :attr:`col_offset`, :attr:`end_lineno`, and
:attr:`end_col_offset` attributes. The :attr:`lineno` and :attr:`end_lineno`
are the first and last line numbers of source text s... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
9f810b67-a68b-4bdd-9dd6-cb030f55ea7b | CPython Docs | file://datasets/cpython/Doc/library/ast.rst | unknown | d088e5d2-01b6-4edf-8f87-f277552a22d9 | 29,075 | supabase-export-v2 | 3850ffffa1c625d3 | Each concrete class has an attribute :attr:`!_fields` which gives the names of all child nodes.
Each instance of a concrete class has one attribute for each child node,
of the type as defined in the grammar. For example, :class:`ast.BinOp`
instances have an attribute :attr:`left` of type :class:`ast.expr`. | trusted_official_docs | CPython Docs | Each concrete class has an attribute :attr:`!_fields` which gives the names of all child nodes.
Each instance of a concrete class has one attribute for each child node,
of the type as defined in the grammar. For example, :class:`ast.BinOp`
instances have an attribute :attr:`left` of type :class:`ast.expr`. | Each concrete class has an attribute :attr:`!_fields` which gives the names of all child nodes.
Each instance of a concrete class has one attribute for each child node,
of the type as defined in the grammar. For example, :class:`ast.BinOp`
instances have an attribute :attr:`left` of type :class:`ast.expr`. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
9fa771e6-cdfd-4e2a-a659-a043788e4c8a | CPython Docs | file://datasets/cpython/Doc/library/ast.rst | unknown | d088e5d2-01b6-4edf-8f87-f277552a22d9 | 29,495 | supabase-export-v2 | 849eba85e7ca953c | In addition, if ``mode`` is ``'func_type'``, the input syntax is modified to correspond to :pep:`484` "signature type comments", e.g. ``(str, int) -> List[str]``.
Setting ``feature_version`` to a tuple ``(major, minor)`` will result in
a "best-effort" attempt to parse using that Python version's grammar. For example, ... | trusted_official_docs | CPython Docs | In addition, if ``mode`` is ``'func_type'``, the input syntax is modified to correspond to :pep:`484` "signature type comments", e.g. ``(str, int) -> List[str]``.
Setting ``feature_version`` to a tuple ``(major, minor)`` will result in
a "best-effort" attempt to parse using that Python version's grammar. For example, ... | In addition, if ``mode`` is ``'func_type'``, the input syntax is modified to correspond to :pep:`484` "signature type comments", e.g. ``(str, int) -> List[str]``.
Setting ``feature_version`` to a tuple ``(major, minor)`` will result in
a "best-effort" attempt to parse using that Python version's grammar. For example, ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
9ff8592e-b4b3-4c1f-8f2e-ff910a6d5c99 | CPython Docs | file://datasets/cpython/Doc/library/ast.rst | unknown | d088e5d2-01b6-4edf-8f87-f277552a22d9 | 29,279 | supabase-export-v2 | 450de42bc73ee446 | .. class:: Raise(exc, cause)
A ``raise`` statement. ``exc`` is the exception object to be raised, normally a
:class:`Call` or :class:`Name`, or ``None`` for a standalone ``raise``. ``cause`` is the optional part for ``y`` in ``raise x from y``. | trusted_official_docs | CPython Docs | .. class:: Raise(exc, cause)
A ``raise`` statement. ``exc`` is the exception object to be raised, normally a
:class:`Call` or :class:`Name`, or ``None`` for a standalone ``raise``. ``cause`` is the optional part for ``y`` in ``raise x from y``. | .. class:: Raise(exc, cause)
A ``raise`` statement. ``exc`` is the exception object to be raised, normally a
:class:`Call` or :class:`Name`, or ``None`` for a standalone ``raise``. ``cause`` is the optional part for ``y`` in ``raise x from y``. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
a2561948-f109-48d5-a135-0755a20f4cda | CPython Docs | file://datasets/cpython/Doc/library/ast.rst | unknown | d088e5d2-01b6-4edf-8f87-f277552a22d9 | 29,510 | supabase-export-v2 | def7c885cc06421f | The string or node provided may only consist of the following Python literal structures: strings, bytes, numbers, tuples, lists, dicts, sets, booleans, ``None`` and ``Ellipsis``.
This can be used for evaluating strings containing Python values without the
need to parse the values oneself. It is not capable of evaluati... | trusted_official_docs | CPython Docs | The string or node provided may only consist of the following Python literal structures: strings, bytes, numbers, tuples, lists, dicts, sets, booleans, ``None`` and ``Ellipsis``.
This can be used for evaluating strings containing Python values without the
need to parse the values oneself. It is not capable of evaluati... | The string or node provided may only consist of the following Python literal structures: strings, bytes, numbers, tuples, lists, dicts, sets, booleans, ``None`` and ``Ellipsis``.
This can be used for evaluating strings containing Python values without the
need to parse the values oneself. It is not capable of evaluati... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
a3a206b9-0c36-4354-8445-a50d5072519c | CPython Docs | file://datasets/cpython/Doc/library/ast.rst | unknown | d088e5d2-01b6-4edf-8f87-f277552a22d9 | 29,430 | supabase-export-v2 | fb057d152c8094c8 | .. doctest::
>>> print(ast.dump(ast.parse("type Alias[**P = [int, str]] = Callable[P, int]"), indent=4))
Module(
body=[
TypeAlias(
name=Name(id='Alias', ctx=Store()),
type_params=[
ParamSpec(
name='P',
default_value=List(
elts=[
Name(id='int'),
Name(id='str')]))],
value=Subscript(
value=Name(id='Callable')... | trusted_official_docs | CPython Docs | .. doctest::
>>> print(ast.dump(ast.parse("type Alias[**P = [int, str]] = Callable[P, int]"), indent=4))
Module(
body=[
TypeAlias(
name=Name(id='Alias', ctx=Store()),
type_params=[
ParamSpec(
name='P',
default_value=List(
elts=[
Name(id='int'),
Name(id='str')]))],
value=Subscript(
value=Name(id='Callable')... | .. doctest::
>>> print(ast.dump(ast.parse("type Alias[**P = [int, str]] = Callable[P, int]"), indent=4))
Module(
body=[
TypeAlias(
name=Name(id='Alias', ctx=Store()),
type_params=[
ParamSpec(
name='P',
default_value=List(
elts=[
Name(id='int'),
Name(id='str')]))],
value=Subscript(
value=Name(id='Callable')... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
a8e7e579-b74d-47e6-ad3f-b72ba5089927 | CPython Docs | file://datasets/cpython/Doc/library/ast.rst | unknown | d088e5d2-01b6-4edf-8f87-f277552a22d9 | 29,511 | supabase-export-v2 | 5d9a649411c28f41 | Python values without the need to parse the values oneself. It is not capable of evaluating arbitrarily complex expressions, for example involving operators or indexing.
This function had been documented as "safe" in the past without defining
what that meant. That was misleading. This is specifically designed not to
... | trusted_official_docs | CPython Docs | Python values without the need to parse the values oneself. It is not capable of evaluating arbitrarily complex expressions, for example involving operators or indexing.
This function had been documented as "safe" in the past without defining
what that meant. That was misleading. This is specifically designed not to
... | Python values without the need to parse the values oneself. It is not capable of evaluating arbitrarily complex expressions, for example involving operators or indexing.
This function had been documented as "safe" in the past without defining
what that meant. That was misleading. This is specifically designed not to
... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
abad66a2-1d4f-4c75-94e4-d44a975243c1 | CPython Docs | file://datasets/cpython/Doc/library/ast.rst | unknown | d088e5d2-01b6-4edf-8f87-f277552a22d9 | 29,106 | supabase-export-v2 | 77bcefc3fc256489 | of Python allowed for the creation of direct instances of these abstract node classes. This behavior is deprecated and will be removed in Python 3.20.
.. note::
The descriptions of the specific node classes displayed here
were initially adapted from the fantastic `Green Tree
Snakes <https://greentreesnakes.readthedo... | trusted_official_docs | CPython Docs | of Python allowed for the creation of direct instances of these abstract node classes. This behavior is deprecated and will be removed in Python 3.20.
.. note::
The descriptions of the specific node classes displayed here
were initially adapted from the fantastic `Green Tree
Snakes <https://greentreesnakes.readthedo... | of Python allowed for the creation of direct instances of these abstract node classes. This behavior is deprecated and will be removed in Python 3.20.
.. note::
The descriptions of the specific node classes displayed here
were initially adapted from the fantastic `Green Tree
Snakes <https://greentreesnakes.readthedo... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
ad1fd80f-e56b-4623-891d-76f6bff326bd | CPython Docs | file://datasets/cpython/Doc/library/ast.rst | unknown | d088e5d2-01b6-4edf-8f87-f277552a22d9 | 29,459 | supabase-export-v2 | 2f8fe4ea8400c063 | >>> print(ast.dump(ast.parse("""\ ... @decorator1 ... @decorator2 ... def f(a: 'annotation', b=1, c=2, *d, e, f=3, **g) -> 'return annotation': ... pass ...
"""), indent=4))
Module(
body=[
FunctionDef(
name='f',
args=arguments(
args=[
arg(
arg='a',
annotation=Constant(value='annotation')),
arg(arg='b'),
arg(... | trusted_official_docs | CPython Docs | >>> print(ast.dump(ast.parse("""\ ... @decorator1 ... @decorator2 ... def f(a: 'annotation', b=1, c=2, *d, e, f=3, **g) -> 'return annotation': ... pass ...
"""), indent=4))
Module(
body=[
FunctionDef(
name='f',
args=arguments(
args=[
arg(
arg='a',
annotation=Constant(value='annotation')),
arg(arg='b'),
arg(... | >>> print(ast.dump(ast.parse("""\ ... @decorator1 ... @decorator2 ... def f(a: 'annotation', b=1, c=2, *d, e, f=3, **g) -> 'return annotation': ... pass ...
"""), indent=4))
Module(
body=[
FunctionDef(
name='f',
args=arguments(
args=[
arg(
arg='a',
annotation=Constant(value='annotation')),
arg(arg='b'),
arg(... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
b0329cdd-40ff-42a3-8608-13bd09e4ad9d | CPython Docs | file://datasets/cpython/Doc/library/ast.rst | unknown | d088e5d2-01b6-4edf-8f87-f277552a22d9 | 29,402 | supabase-export-v2 | 8d9796b12efa5fbf | the subject will be matched against. If the pattern is ``None``, the node represents a capture pattern (i.e a bare name) and will always succeed.
The ``name`` attribute contains the name that will be bound if the pattern
is successful. If ``name`` is ``None``, ``pattern`` must also be ``None``
and the node represents... | trusted_official_docs | CPython Docs | the subject will be matched against. If the pattern is ``None``, the node represents a capture pattern (i.e a bare name) and will always succeed.
The ``name`` attribute contains the name that will be bound if the pattern
is successful. If ``name`` is ``None``, ``pattern`` must also be ``None``
and the node represents... | the subject will be matched against. If the pattern is ``None``, the node represents a capture pattern (i.e a bare name) and will always succeed.
The ``name`` attribute contains the name that will be bound if the pattern
is successful. If ``name`` is ``None``, ``pattern`` must also be ``None``
and the node represents... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
b0b4d7a4-9588-4012-931c-8cf58ef7b33c | CPython Docs | file://datasets/cpython/Doc/library/ast.rst | unknown | d088e5d2-01b6-4edf-8f87-f277552a22d9 | 29,525 | supabase-export-v2 | 7351af0aeb1ad87c | .. function:: fix_missing_locations(node)
When you compile a node tree with :func:`compile`, the compiler expects
:attr:`~ast.AST.lineno` and :attr:`~ast.AST.col_offset` attributes for every node that supports
them. This is rather tedious to fill in for generated nodes, so this helper
adds these attributes recursive... | trusted_official_docs | CPython Docs | .. function:: fix_missing_locations(node)
When you compile a node tree with :func:`compile`, the compiler expects
:attr:`~ast.AST.lineno` and :attr:`~ast.AST.col_offset` attributes for every node that supports
them. This is rather tedious to fill in for generated nodes, so this helper
adds these attributes recursive... | .. function:: fix_missing_locations(node)
When you compile a node tree with :func:`compile`, the compiler expects
:attr:`~ast.AST.lineno` and :attr:`~ast.AST.col_offset` attributes for every node that supports
them. This is rather tedious to fill in for generated nodes, so this helper
adds these attributes recursive... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
b1bfd4ab-30e1-4ded-85ec-b4d9067adffe | CPython Docs | file://datasets/cpython/Doc/library/ast.rst | unknown | d088e5d2-01b6-4edf-8f87-f277552a22d9 | 29,574 | supabase-export-v2 | 78f4d65a68d05b24 | Recursively compares two ASTs.
*compare_attributes* affects whether AST attributes are considered
in the comparison. If *compare_attributes* is ``False`` (default), then
attributes are ignored. Otherwise they must all be equal. This
option is useful to check whether the ASTs are structurally equal but
differ in whi... | trusted_official_docs | CPython Docs | Recursively compares two ASTs.
*compare_attributes* affects whether AST attributes are considered
in the comparison. If *compare_attributes* is ``False`` (default), then
attributes are ignored. Otherwise they must all be equal. This
option is useful to check whether the ASTs are structurally equal but
differ in whi... | Recursively compares two ASTs.
*compare_attributes* affects whether AST attributes are considered
in the comparison. If *compare_attributes* is ``False`` (default), then
attributes are ignored. Otherwise they must all be equal. This
option is useful to check whether the ASTs are structurally equal but
differ in whi... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
b23e3b24-13fa-4d1f-89eb-cf205d211bf6 | CPython Docs | file://datasets/cpython/Doc/library/ast.rst | unknown | d088e5d2-01b6-4edf-8f87-f277552a22d9 | 29,568 | supabase-export-v2 | acdcbd115e0ca800 | >>> tree = ast.parse('print(None)', '?', 'eval') >>> print(ast.dump(tree, indent=4)) Expression( body=Call( func=Name(id='print'), args=[ Constant(value=None)])) >>> print(ast.dump(tree, indent=4, show_empty=True)) Expression( body=Call( func=Name(id='print', ctx=Load()), args=[ Constant(value=None)], keywords=[]))
.. ... | trusted_official_docs | CPython Docs | >>> tree = ast.parse('print(None)', '?', 'eval') >>> print(ast.dump(tree, indent=4)) Expression( body=Call( func=Name(id='print'), args=[ Constant(value=None)])) >>> print(ast.dump(tree, indent=4, show_empty=True)) Expression( body=Call( func=Name(id='print', ctx=Load()), args=[ Constant(value=None)], keywords=[]))
.. ... | >>> tree = ast.parse('print(None)', '?', 'eval') >>> print(ast.dump(tree, indent=4)) Expression( body=Call( func=Name(id='print'), args=[ Constant(value=None)])) >>> print(ast.dump(tree, indent=4, show_empty=True)) Expression( body=Call( func=Name(id='print', ctx=Load()), args=[ Constant(value=None)], keywords=[]))
.. ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
b3092e67-fd1c-4816-8805-a44ab9209e4a | CPython Docs | file://datasets/cpython/Doc/library/ast.rst | unknown | d088e5d2-01b6-4edf-8f87-f277552a22d9 | 29,540 | supabase-export-v2 | e8ec686e6b902d8f | .. method:: visit(node)
Visit a node. The default implementation calls the method called
:samp:`self.visit_{classname}` where *classname* is the name of the node
class, or :meth:`generic_visit` if that method doesn't exist. | trusted_official_docs | CPython Docs | .. method:: visit(node)
Visit a node. The default implementation calls the method called
:samp:`self.visit_{classname}` where *classname* is the name of the node
class, or :meth:`generic_visit` if that method doesn't exist. | .. method:: visit(node)
Visit a node. The default implementation calls the method called
:samp:`self.visit_{classname}` where *classname* is the name of the node
class, or :meth:`generic_visit` if that method doesn't exist. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
b4f219ec-59f8-4a15-8c22-4882d84d3c1d | CPython Docs | file://datasets/cpython/Doc/library/ast.rst | unknown | d088e5d2-01b6-4edf-8f87-f277552a22d9 | 29,519 | supabase-export-v2 | edaf051f7bcc80e8 | a :class:`FunctionDef`, :class:`AsyncFunctionDef`, :class:`ClassDef`, or :class:`Module` node), or ``None`` if it has no docstring. If *clean* is true, clean up the docstring's indentation with :func:`inspect.cleandoc`.
.. versionchanged:: 3.5
:class:`AsyncFunctionDef` is now supported. | trusted_official_docs | CPython Docs | a :class:`FunctionDef`, :class:`AsyncFunctionDef`, :class:`ClassDef`, or :class:`Module` node), or ``None`` if it has no docstring. If *clean* is true, clean up the docstring's indentation with :func:`inspect.cleandoc`.
.. versionchanged:: 3.5
:class:`AsyncFunctionDef` is now supported. | a :class:`FunctionDef`, :class:`AsyncFunctionDef`, :class:`ClassDef`, or :class:`Module` node), or ``None`` if it has no docstring. If *clean* is true, clean up the docstring's indentation with :func:`inspect.cleandoc`.
.. versionchanged:: 3.5
:class:`AsyncFunctionDef` is now supported. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
b6616054-789b-48aa-a373-2ffade57b256 | CPython Docs | file://datasets/cpython/Doc/library/ast.rst | unknown | d088e5d2-01b6-4edf-8f87-f277552a22d9 | 29,492 | supabase-export-v2 | 5c8867c0a0b01361 | .. function:: parse(source, filename='<unknown>', mode='exec', *, type_comments=False, feature_version=None, optimize=-1, module=None)
Parse the source into an AST node. Equivalent to ``compile(source,
filename, mode, flags=FLAGS_VALUE, optimize=optimize, module=module)``,
where ``FLAGS_VALUE`` is ``ast.PyCF_ONLY_AST... | trusted_official_docs | CPython Docs | .. function:: parse(source, filename='<unknown>', mode='exec', *, type_comments=False, feature_version=None, optimize=-1, module=None)
Parse the source into an AST node. Equivalent to ``compile(source,
filename, mode, flags=FLAGS_VALUE, optimize=optimize, module=module)``,
where ``FLAGS_VALUE`` is ``ast.PyCF_ONLY_AST... | .. function:: parse(source, filename='<unknown>', mode='exec', *, type_comments=False, feature_version=None, optimize=-1, module=None)
Parse the source into an AST node. Equivalent to ``compile(source,
filename, mode, flags=FLAGS_VALUE, optimize=optimize, module=module)``,
where ``FLAGS_VALUE`` is ``ast.PyCF_ONLY_AST... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
b6e16b9a-2b51-47c1-a062-d4eef1f1b13f | CPython Docs | file://datasets/cpython/Doc/library/ast.rst | unknown | d088e5d2-01b6-4edf-8f87-f277552a22d9 | 29,543 | supabase-export-v2 | 788bbfb6625d267d | This visitor calls :meth:`visit` on all children of the node.
Note that child nodes of nodes that have a custom visitor method won't be
visited unless the visitor calls :meth:`generic_visit` or visits them
itself. | trusted_official_docs | CPython Docs | This visitor calls :meth:`visit` on all children of the node.
Note that child nodes of nodes that have a custom visitor method won't be
visited unless the visitor calls :meth:`generic_visit` or visits them
itself. | This visitor calls :meth:`visit` on all children of the node.
Note that child nodes of nodes that have a custom visitor method won't be
visited unless the visitor calls :meth:`generic_visit` or visits them
itself. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
b9bb3687-c5b1-4474-ac06-ce4f851260c4 | CPython Docs | file://datasets/cpython/Doc/library/ast.rst | unknown | d088e5d2-01b6-4edf-8f87-f277552a22d9 | 29,185 | supabase-export-v2 | 46ce6fdc7173500d | .. class:: Expr(value)
When an expression, such as a function call, appears as a statement by itself
with its return value not used or stored, it is wrapped in this container. ``value`` holds one of the other nodes in this section, a :class:`Constant`, a
:class:`Name`, a :class:`Lambda`, a :class:`Yield` or :class:`Y... | trusted_official_docs | CPython Docs | .. class:: Expr(value)
When an expression, such as a function call, appears as a statement by itself
with its return value not used or stored, it is wrapped in this container. ``value`` holds one of the other nodes in this section, a :class:`Constant`, a
:class:`Name`, a :class:`Lambda`, a :class:`Yield` or :class:`Y... | .. class:: Expr(value)
When an expression, such as a function call, appears as a statement by itself
with its return value not used or stored, it is wrapped in this container. ``value`` holds one of the other nodes in this section, a :class:`Constant`, a
:class:`Name`, a :class:`Lambda`, a :class:`Yield` or :class:`Y... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
bead438f-c64c-41a0-a11c-975f956fc38b | CPython Docs | file://datasets/cpython/Doc/library/ast.rst | unknown | d088e5d2-01b6-4edf-8f87-f277552a22d9 | 29,303 | supabase-export-v2 | 477a9e7678a7e71f | .. class:: ImportFrom(module, names, level)
Represents ``from x import y``. ``module`` is a raw string of the 'from' name,
without any leading dots, or ``None`` for statements such as ``from . import foo``. ``level`` is an integer holding the level of the relative import (0 means
absolute import). | trusted_official_docs | CPython Docs | .. class:: ImportFrom(module, names, level)
Represents ``from x import y``. ``module`` is a raw string of the 'from' name,
without any leading dots, or ``None`` for statements such as ``from . import foo``. ``level`` is an integer holding the level of the relative import (0 means
absolute import). | .. class:: ImportFrom(module, names, level)
Represents ``from x import y``. ``module`` is a raw string of the 'from' name,
without any leading dots, or ``None`` for statements such as ``from . import foo``. ``level`` is an integer holding the level of the relative import (0 means
absolute import). | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
c079ba90-82ab-4d65-aa75-b5a4e3eae908 | CPython Docs | file://datasets/cpython/Doc/library/ast.rst | unknown | d088e5d2-01b6-4edf-8f87-f277552a22d9 | 29,363 | supabase-export-v2 | 3451c66888fae908 | >>> print(ast.dump(ast.parse(""" ... match x: ... case [x] if x>0: ... ... ... case tuple(): ... ... ...
"""), indent=4))
Module(
body=[
Match(
subject=Name(id='x'),
cases=[
match_case(
pattern=MatchSequence(
patterns=[
MatchAs(name='x')]),
guard=Compare(
left=Name(id='x'),
ops=[
Gt()],
comparators=[
Con... | trusted_official_docs | CPython Docs | >>> print(ast.dump(ast.parse(""" ... match x: ... case [x] if x>0: ... ... ... case tuple(): ... ... ...
"""), indent=4))
Module(
body=[
Match(
subject=Name(id='x'),
cases=[
match_case(
pattern=MatchSequence(
patterns=[
MatchAs(name='x')]),
guard=Compare(
left=Name(id='x'),
ops=[
Gt()],
comparators=[
Con... | >>> print(ast.dump(ast.parse(""" ... match x: ... case [x] if x>0: ... ... ... case tuple(): ... ... ...
"""), indent=4))
Module(
body=[
Match(
subject=Name(id='x'),
cases=[
match_case(
pattern=MatchSequence(
patterns=[
MatchAs(name='x')]),
guard=Compare(
left=Name(id='x'),
ops=[
Gt()],
comparators=[
Con... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
c0e2dfb0-e976-4fd4-8292-5a5e30035243 | CPython Docs | file://datasets/cpython/Doc/library/ast.rst | unknown | d088e5d2-01b6-4edf-8f87-f277552a22d9 | 29,513 | supabase-export-v2 | dcf5074f8b0e2e87 | .. warning:: It is possible to crash the Python interpreter due to stack depth limitations in Python's AST compiler.
It can raise :exc:`ValueError`, :exc:`TypeError`, :exc:`SyntaxError`,
:exc:`MemoryError` and :exc:`RecursionError` depending on the malformed
input. | trusted_official_docs | CPython Docs | .. warning:: It is possible to crash the Python interpreter due to stack depth limitations in Python's AST compiler.
It can raise :exc:`ValueError`, :exc:`TypeError`, :exc:`SyntaxError`,
:exc:`MemoryError` and :exc:`RecursionError` depending on the malformed
input. | .. warning:: It is possible to crash the Python interpreter due to stack depth limitations in Python's AST compiler.
It can raise :exc:`ValueError`, :exc:`TypeError`, :exc:`SyntaxError`,
:exc:`MemoryError` and :exc:`RecursionError` depending on the malformed
input. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
c26622e2-6779-407c-bbee-e274ff99c0e4 | CPython Docs | file://datasets/cpython/Doc/library/ast.rst | unknown | d088e5d2-01b6-4edf-8f87-f277552a22d9 | 29,350 | supabase-export-v2 | ef3b4c5a5dfafa7d | .. class:: withitem(context_expr, optional_vars)
A single context manager in a ``with`` block. ``context_expr`` is the context
manager, often a :class:`Call` node. ``optional_vars`` is a :class:`Name`,
:class:`Tuple` or :class:`List` for the ``as foo`` part, or ``None`` if that
isn't used. | trusted_official_docs | CPython Docs | .. class:: withitem(context_expr, optional_vars)
A single context manager in a ``with`` block. ``context_expr`` is the context
manager, often a :class:`Call` node. ``optional_vars`` is a :class:`Name`,
:class:`Tuple` or :class:`List` for the ``as foo`` part, or ``None`` if that
isn't used. | .. class:: withitem(context_expr, optional_vars)
A single context manager in a ``with`` block. ``context_expr`` is the context
manager, often a :class:`Call` node. ``optional_vars`` is a :class:`Name`,
:class:`Tuple` or :class:`List` for the ``as foo`` part, or ``None`` if that
isn't used. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
c3f8bfca-ccb6-45e2-8282-135c0f405478 | CPython Docs | file://datasets/cpython/Doc/library/ast.rst | unknown | d088e5d2-01b6-4edf-8f87-f277552a22d9 | 29,105 | supabase-export-v2 | fe06358bef21a002 | .. deprecated-removed:: next 3.20
In the :ref:`grammar above <abstract-grammar>`, the AST node classes that
correspond to production rules with variants (aka "sums") are abstract
classes. Previous versions of Python allowed for the creation of direct
instances of these abstract node classes. This behavior is depreca... | trusted_official_docs | CPython Docs | .. deprecated-removed:: next 3.20
In the :ref:`grammar above <abstract-grammar>`, the AST node classes that
correspond to production rules with variants (aka "sums") are abstract
classes. Previous versions of Python allowed for the creation of direct
instances of these abstract node classes. This behavior is depreca... | .. deprecated-removed:: next 3.20
In the :ref:`grammar above <abstract-grammar>`, the AST node classes that
correspond to production rules with variants (aka "sums") are abstract
classes. Previous versions of Python allowed for the creation of direct
instances of these abstract node classes. This behavior is depreca... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
c54ce321-ac07-4940-8a99-dbd8e7d464ac | CPython Docs | file://datasets/cpython/Doc/library/ast.rst | unknown | d088e5d2-01b6-4edf-8f87-f277552a22d9 | 29,070 | supabase-export-v2 | 399b11ae67d7b2e1 | .. class:: AST
This is the abstract base of all AST node classes. The actual node classes are
derived from the :file:`Parser/Python.asdl` file, which is reproduced
:ref:`above <abstract-grammar>`. They are defined in the :mod:`!_ast` C
module and re-exported in :mod:`!ast`. | trusted_official_docs | CPython Docs | .. class:: AST
This is the abstract base of all AST node classes. The actual node classes are
derived from the :file:`Parser/Python.asdl` file, which is reproduced
:ref:`above <abstract-grammar>`. They are defined in the :mod:`!_ast` C
module and re-exported in :mod:`!ast`. | .. class:: AST
This is the abstract base of all AST node classes. The actual node classes are
derived from the :file:`Parser/Python.asdl` file, which is reproduced
:ref:`above <abstract-grammar>`. They are defined in the :mod:`!_ast` C
module and re-exported in :mod:`!ast`. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
c9859af7-643f-4049-9652-ceb2da7d207f | CPython Docs | file://datasets/cpython/Doc/library/ast.rst | unknown | d088e5d2-01b6-4edf-8f87-f277552a22d9 | 29,159 | supabase-export-v2 | 10991b1e3a30c92f | or ``None`` if no format was specified. Both ``conversion`` and ``format_spec`` can be set at the same time. This has the same meaning as ``FormattedValue.format_spec``.
.. class:: List(elts, ctx)
Tuple(elts, ctx) | trusted_official_docs | CPython Docs | or ``None`` if no format was specified. Both ``conversion`` and ``format_spec`` can be set at the same time. This has the same meaning as ``FormattedValue.format_spec``.
.. class:: List(elts, ctx)
Tuple(elts, ctx) | or ``None`` if no format was specified. Both ``conversion`` and ``format_spec`` can be set at the same time. This has the same meaning as ``FormattedValue.format_spec``.
.. class:: List(elts, ctx)
Tuple(elts, ctx) | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
cbadb200-2c5b-411e-a251-196f3b09a7a3 | CPython Docs | file://datasets/cpython/Doc/library/ast.rst | unknown | d088e5d2-01b6-4edf-8f87-f277552a22d9 | 29,250 | supabase-export-v2 | bbec1fba01a29ac8 | :class:`Name` or :class:`Tuple` node. ``iter`` is the object to iterate over. ``ifs`` is a list of test expressions: each ``for`` clause can have multiple ``ifs``.
``is_async`` indicates a comprehension is asynchronous (using an
``async for`` instead of ``for``). The value is an integer (0 or 1). | trusted_official_docs | CPython Docs | :class:`Name` or :class:`Tuple` node. ``iter`` is the object to iterate over. ``ifs`` is a list of test expressions: each ``for`` clause can have multiple ``ifs``.
``is_async`` indicates a comprehension is asynchronous (using an
``async for`` instead of ``for``). The value is an integer (0 or 1). | :class:`Name` or :class:`Tuple` node. ``iter`` is the object to iterate over. ``ifs`` is a list of test expressions: each ``for`` clause can have multiple ``ifs``.
``is_async`` indicates a comprehension is asynchronous (using an
``async for`` instead of ``for``). The value is an integer (0 or 1). | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
cdf31a32-f462-4a8a-9911-d2b4f70b0318 | CPython Docs | file://datasets/cpython/Doc/library/ast.rst | unknown | d088e5d2-01b6-4edf-8f87-f277552a22d9 | 29,221 | supabase-export-v2 | 96df765e0948a4e9 | .. class:: IfExp(test, body, orelse)
An expression such as ``a if b else c``. Each field holds a single node, so
in the following example, all three are :class:`Name` nodes. | trusted_official_docs | CPython Docs | .. class:: IfExp(test, body, orelse)
An expression such as ``a if b else c``. Each field holds a single node, so
in the following example, all three are :class:`Name` nodes. | .. class:: IfExp(test, body, orelse)
An expression such as ``a if b else c``. Each field holds a single node, so
in the following example, all three are :class:`Name` nodes. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
cf788848-7fbd-458c-9d8f-f1d939982bcd | CPython Docs | file://datasets/cpython/Doc/library/ast.rst | unknown | d088e5d2-01b6-4edf-8f87-f277552a22d9 | 29,442 | supabase-export-v2 | 186b0974e327cd4b | A function definition.
* ``name`` is a raw string of the function name. * ``args`` is an :class:`arguments` node. * ``body`` is the list of nodes inside the function. * ``decorator_list`` is the list of decorators to be applied, stored outermost
first (i.e. the first in the list will be applied last). * ``returns`` is... | trusted_official_docs | CPython Docs | A function definition.
* ``name`` is a raw string of the function name. * ``args`` is an :class:`arguments` node. * ``body`` is the list of nodes inside the function. * ``decorator_list`` is the list of decorators to be applied, stored outermost
first (i.e. the first in the list will be applied last). * ``returns`` is... | A function definition.
* ``name`` is a raw string of the function name. * ``args`` is an :class:`arguments` node. * ``body`` is the list of nodes inside the function. * ``decorator_list`` is the list of decorators to be applied, stored outermost
first (i.e. the first in the list will be applied last). * ``returns`` is... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
d24f52cc-a476-4d9a-8b2b-39e76ff196d4 | CPython Docs | file://datasets/cpython/Doc/library/ast.rst | unknown | d088e5d2-01b6-4edf-8f87-f277552a22d9 | 29,149 | supabase-export-v2 | 27ae1e8bf04af533 | .. versionadded:: 3.14
Node representing a template string literal, comprising a series of
:class:`Interpolation` and :class:`Constant` nodes. These nodes may be any order, and do not need to be interleaved. | trusted_official_docs | CPython Docs | .. versionadded:: 3.14
Node representing a template string literal, comprising a series of
:class:`Interpolation` and :class:`Constant` nodes. These nodes may be any order, and do not need to be interleaved. | .. versionadded:: 3.14
Node representing a template string literal, comprising a series of
:class:`Interpolation` and :class:`Constant` nodes. These nodes may be any order, and do not need to be interleaved. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
d38948c6-38e6-4a92-874a-f5460e451cc1 | CPython Docs | file://datasets/cpython/Doc/library/ast.rst | unknown | d088e5d2-01b6-4edf-8f87-f277552a22d9 | 29,234 | supabase-export-v2 | bdd295189b3be7f3 | .. class:: Subscript(value, slice, ctx)
A subscript, such as ``l[1]``. ``value`` is the subscripted object
(usually sequence or mapping). ``slice`` is an index, slice or key. It can be a :class:`Tuple` and contain a :class:`Slice`. ``ctx`` is :class:`Load`, :class:`Store` or :class:`Del`
according to the action perfo... | trusted_official_docs | CPython Docs | .. class:: Subscript(value, slice, ctx)
A subscript, such as ``l[1]``. ``value`` is the subscripted object
(usually sequence or mapping). ``slice`` is an index, slice or key. It can be a :class:`Tuple` and contain a :class:`Slice`. ``ctx`` is :class:`Load`, :class:`Store` or :class:`Del`
according to the action perfo... | .. class:: Subscript(value, slice, ctx)
A subscript, such as ``l[1]``. ``value`` is the subscripted object
(usually sequence or mapping). ``slice`` is an index, slice or key. It can be a :class:`Tuple` and contain a :class:`Slice`. ``ctx`` is :class:`Load`, :class:`Store` or :class:`Del`
according to the action perfo... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
d48aac9e-f368-42a9-847e-2213a4a47ed5 | CPython Docs | file://datasets/cpython/Doc/library/ast.rst | unknown | d088e5d2-01b6-4edf-8f87-f277552a22d9 | 29,619 | supabase-export-v2 | bea63a8160b6d9a8 | a Concrete Syntax Tree that looks like an ast tree and keeps all formatting details. It's useful for building automated refactoring (codemod) applications and linters.
`Parso <https://parso.readthedocs.io>`_ is a Python parser that supports
error recovery and round-trip parsing for different Python versions (in
multi... | trusted_official_docs | CPython Docs | a Concrete Syntax Tree that looks like an ast tree and keeps all formatting details. It's useful for building automated refactoring (codemod) applications and linters.
`Parso <https://parso.readthedocs.io>`_ is a Python parser that supports
error recovery and round-trip parsing for different Python versions (in
multi... | a Concrete Syntax Tree that looks like an ast tree and keeps all formatting details. It's useful for building automated refactoring (codemod) applications and linters.
`Parso <https://parso.readthedocs.io>`_ is a Python parser that supports
error recovery and round-trip parsing for different Python versions (in
multi... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
d4e6fc11-1b25-452c-8a73-5d74a64ed045 | CPython Docs | file://datasets/cpython/Doc/library/ast.rst | unknown | d088e5d2-01b6-4edf-8f87-f277552a22d9 | 29,565 | supabase-export-v2 | b91714c314e43cc7 | positive integer indent indents that many spaces per level. If *indent* is a string (such as ``"\t"``), that string is used to indent each level.
If *show_empty* is false (the default), optional empty lists and
``Load()`` values will be omitted from the output. Optional ``None`` values are always omitted. | trusted_official_docs | CPython Docs | positive integer indent indents that many spaces per level. If *indent* is a string (such as ``"\t"``), that string is used to indent each level.
If *show_empty* is false (the default), optional empty lists and
``Load()`` values will be omitted from the output. Optional ``None`` values are always omitted. | positive integer indent indents that many spaces per level. If *indent* is a string (such as ``"\t"``), that string is used to indent each level.
If *show_empty* is false (the default), optional empty lists and
``Load()`` values will be omitted from the output. Optional ``None`` values are always omitted. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
d8720926-fd38-4bc4-8a14-b9471485eae7 | CPython Docs | file://datasets/cpython/Doc/library/ast.rst | unknown | d088e5d2-01b6-4edf-8f87-f277552a22d9 | 29,086 | supabase-export-v2 | 21bd9433620c0b5b | The constructor of a class :class:`ast.T` parses its arguments as follows:
* If there are positional arguments, there must be as many as there are items
in :attr:`T._fields`; they will be assigned as attributes of these names. * If there are keyword arguments, they will set the attributes of the same
names to the giv... | trusted_official_docs | CPython Docs | The constructor of a class :class:`ast.T` parses its arguments as follows:
* If there are positional arguments, there must be as many as there are items
in :attr:`T._fields`; they will be assigned as attributes of these names. * If there are keyword arguments, they will set the attributes of the same
names to the giv... | The constructor of a class :class:`ast.T` parses its arguments as follows:
* If there are positional arguments, there must be as many as there are items
in :attr:`T._fields`; they will be assigned as attributes of these names. * If there are keyword arguments, they will set the attributes of the same
names to the giv... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
d98e8c32-4243-43ac-9cd7-5c515fa29af0 | CPython Docs | file://datasets/cpython/Doc/library/ast.rst | unknown | d088e5d2-01b6-4edf-8f87-f277552a22d9 | 29,453 | supabase-export-v2 | af9e41d45d461b92 | is a list of default values for arguments that can be passed positionally. If there are fewer defaults, they correspond to the last n arguments.
.. class:: arg(arg, annotation, type_comment) | trusted_official_docs | CPython Docs | is a list of default values for arguments that can be passed positionally. If there are fewer defaults, they correspond to the last n arguments.
.. class:: arg(arg, annotation, type_comment) | is a list of default values for arguments that can be passed positionally. If there are fewer defaults, they correspond to the last n arguments.
.. class:: arg(arg, annotation, type_comment) | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
da86cfff-f50f-466f-b143-a19baecd1680 | CPython Docs | file://datasets/cpython/Doc/library/ast.rst | unknown | d088e5d2-01b6-4edf-8f87-f277552a22d9 | 29,355 | supabase-export-v2 | 3a2224c7ef2f2a69 | .. class:: Match(subject, cases)
A ``match`` statement. ``subject`` holds the subject of the match (the object
that is being matched against the cases) and ``cases`` contains an iterable of
:class:`match_case` nodes with the different cases. | trusted_official_docs | CPython Docs | .. class:: Match(subject, cases)
A ``match`` statement. ``subject`` holds the subject of the match (the object
that is being matched against the cases) and ``cases`` contains an iterable of
:class:`match_case` nodes with the different cases. | .. class:: Match(subject, cases)
A ``match`` statement. ``subject`` holds the subject of the match (the object
that is being matched against the cases) and ``cases`` contains an iterable of
:class:`match_case` nodes with the different cases. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
dcdb7de2-992b-465d-9047-a9f8886ea094 | CPython Docs | file://datasets/cpython/Doc/library/ast.rst | unknown | d088e5d2-01b6-4edf-8f87-f277552a22d9 | 29,359 | supabase-export-v2 | 533826e9e09131c9 | will be matched against. Note that the :class:`AST` nodes produced for patterns differ from those produced for expressions, even when they share the same syntax.
The ``guard`` attribute contains an expression that will be evaluated if
the pattern matches the subject. | trusted_official_docs | CPython Docs | will be matched against. Note that the :class:`AST` nodes produced for patterns differ from those produced for expressions, even when they share the same syntax.
The ``guard`` attribute contains an expression that will be evaluated if
the pattern matches the subject. | will be matched against. Note that the :class:`AST` nodes produced for patterns differ from those produced for expressions, even when they share the same syntax.
The ``guard`` attribute contains an expression that will be evaluated if
the pattern matches the subject. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
ddd127cb-d2f0-40c2-b58f-7c8f8e435cb4 | CPython Docs | file://datasets/cpython/Doc/library/ast.rst | unknown | d088e5d2-01b6-4edf-8f87-f277552a22d9 | 29,139 | supabase-export-v2 | 7fbabd35593719d8 | .. class:: FormattedValue(value, conversion, format_spec)
Node representing a single formatting field in an f-string. If the string
contains a single formatting field and nothing else the node can be
isolated otherwise it appears in :class:`JoinedStr`. | trusted_official_docs | CPython Docs | .. class:: FormattedValue(value, conversion, format_spec)
Node representing a single formatting field in an f-string. If the string
contains a single formatting field and nothing else the node can be
isolated otherwise it appears in :class:`JoinedStr`. | .. class:: FormattedValue(value, conversion, format_spec)
Node representing a single formatting field in an f-string. If the string
contains a single formatting field and nothing else the node can be
isolated otherwise it appears in :class:`JoinedStr`. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
e099de4f-87ad-4716-ae04-ea463dbc5047 | CPython Docs | file://datasets/cpython/Doc/library/ast.rst | unknown | d088e5d2-01b6-4edf-8f87-f277552a22d9 | 29,202 | supabase-export-v2 | 1943b31cec9fd739 | are the values involved. Consecutive operations with the same operator, such as ``a or b or c``, are collapsed into one node with several values.
This doesn't include ``not``, which is a :class:`UnaryOp`. | trusted_official_docs | CPython Docs | are the values involved. Consecutive operations with the same operator, such as ``a or b or c``, are collapsed into one node with several values.
This doesn't include ``not``, which is a :class:`UnaryOp`. | are the values involved. Consecutive operations with the same operator, such as ``a or b or c``, are collapsed into one node with several values.
This doesn't include ``not``, which is a :class:`UnaryOp`. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
e0ccfed9-7dd7-4bdb-8738-ff1c138c71d0 | CPython Docs | file://datasets/cpython/Doc/library/ast.rst | unknown | d088e5d2-01b6-4edf-8f87-f277552a22d9 | 29,558 | supabase-export-v2 | 2ec028d662099e1a | part of original tree) without giving them location information (such as :attr:`~ast.AST.lineno`), :func:`fix_missing_locations` should be called with the new sub-tree to recalculate the location information::
tree = ast.parse('foo', mode='eval')
new_tree = fix_missing_locations(RewriteName().visit(tree)) | trusted_official_docs | CPython Docs | part of original tree) without giving them location information (such as :attr:`~ast.AST.lineno`), :func:`fix_missing_locations` should be called with the new sub-tree to recalculate the location information::
tree = ast.parse('foo', mode='eval')
new_tree = fix_missing_locations(RewriteName().visit(tree)) | part of original tree) without giving them location information (such as :attr:`~ast.AST.lineno`), :func:`fix_missing_locations` should be called with the new sub-tree to recalculate the location information::
tree = ast.parse('foo', mode='eval')
new_tree = fix_missing_locations(RewriteName().visit(tree)) | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
e2b5d765-db9f-4f17-8da1-8d50f4544dc7 | CPython Docs | file://datasets/cpython/Doc/library/ast.rst | unknown | d088e5d2-01b6-4edf-8f87-f277552a22d9 | 29,259 | supabase-export-v2 | 5450eca3489eae78 | An assignment. ``targets`` is a list of nodes, and ``value`` is a single node.
Multiple nodes in ``targets`` represents assigning the same value to each. Unpacking is represented by putting a :class:`Tuple` or :class:`List`
within ``targets``. | trusted_official_docs | CPython Docs | An assignment. ``targets`` is a list of nodes, and ``value`` is a single node.
Multiple nodes in ``targets`` represents assigning the same value to each. Unpacking is represented by putting a :class:`Tuple` or :class:`List`
within ``targets``. | An assignment. ``targets`` is a list of nodes, and ``value`` is a single node.
Multiple nodes in ``targets`` represents assigning the same value to each. Unpacking is represented by putting a :class:`Tuple` or :class:`List`
within ``targets``. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
e2c3b798-12d1-46b1-87ff-756672e73df3 | CPython Docs | file://datasets/cpython/Doc/library/ast.rst | unknown | d088e5d2-01b6-4edf-8f87-f277552a22d9 | 29,142 | supabase-export-v2 | d8cdb87f71a4da46 | * -1: no formatting * 97 (``ord('a')``): ``!a`` :func:`ASCII <ascii>` formatting * 114 (``ord('r')``): ``!r`` :func:`repr` formatting * 115 (``ord('s')``): ``!s`` :func:`string <str>` formatting
* ``format_spec`` is a :class:`JoinedStr` node representing the formatting
of the value, or ``None`` if no format was specif... | trusted_official_docs | CPython Docs | * -1: no formatting * 97 (``ord('a')``): ``!a`` :func:`ASCII <ascii>` formatting * 114 (``ord('r')``): ``!r`` :func:`repr` formatting * 115 (``ord('s')``): ``!s`` :func:`string <str>` formatting
* ``format_spec`` is a :class:`JoinedStr` node representing the formatting
of the value, or ``None`` if no format was specif... | * -1: no formatting * 97 (``ord('a')``): ``!a`` :func:`ASCII <ascii>` formatting * 114 (``ord('r')``): ``!r`` :func:`repr` formatting * 115 (``ord('s')``): ``!s`` :func:`string <str>` formatting
* ``format_spec`` is a :class:`JoinedStr` node representing the formatting
of the value, or ``None`` if no format was specif... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
e2c4fb52-2313-414d-a8f9-7af97a9bed92 | CPython Docs | file://datasets/cpython/Doc/library/ast.rst | unknown | d088e5d2-01b6-4edf-8f87-f277552a22d9 | 29,512 | supabase-export-v2 | dcfc9389a940b755 | process. There is also the possibility for excessive CPU consumption denial of service on some inputs. Calling it on untrusted data is thus not recommended.
.. warning::
It is possible to crash the Python interpreter due to stack depth
limitations in Python's AST compiler. | trusted_official_docs | CPython Docs | process. There is also the possibility for excessive CPU consumption denial of service on some inputs. Calling it on untrusted data is thus not recommended.
.. warning::
It is possible to crash the Python interpreter due to stack depth
limitations in Python's AST compiler. | process. There is also the possibility for excessive CPU consumption denial of service on some inputs. Calling it on untrusted data is thus not recommended.
.. warning::
It is possible to crash the Python interpreter due to stack depth
limitations in Python's AST compiler. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
e36a0b9d-10bf-4b58-b7aa-3b6e12354e91 | CPython Docs | file://datasets/cpython/Doc/library/ast.rst | unknown | d088e5d2-01b6-4edf-8f87-f277552a22d9 | 29,538 | supabase-export-v2 | 127cbc4eb1e389dc | abstract syntax tree and calls a visitor function for every node found. This function may return a value which is forwarded by the :meth:`visit` method.
This class is meant to be subclassed, with the subclass adding visitor
methods. | trusted_official_docs | CPython Docs | abstract syntax tree and calls a visitor function for every node found. This function may return a value which is forwarded by the :meth:`visit` method.
This class is meant to be subclassed, with the subclass adding visitor
methods. | abstract syntax tree and calls a visitor function for every node found. This function may return a value which is forwarded by the :meth:`visit` method.
This class is meant to be subclassed, with the subclass adding visitor
methods. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
e3bc36f4-e7d7-4f5a-8867-1b84f80bfeee | CPython Docs | file://datasets/cpython/Doc/library/ast.rst | unknown | d088e5d2-01b6-4edf-8f87-f277552a22d9 | 29,556 | supabase-export-v2 | ad9ca3f8d1c6a638 | the node you're operating on has child nodes you must either transform the child nodes yourself or call the :meth:`~ast.NodeVisitor.generic_visit` method for the node first.
For nodes that were part of a collection of statements (that applies to all
statement nodes), the visitor may also return a list of nodes rather ... | trusted_official_docs | CPython Docs | the node you're operating on has child nodes you must either transform the child nodes yourself or call the :meth:`~ast.NodeVisitor.generic_visit` method for the node first.
For nodes that were part of a collection of statements (that applies to all
statement nodes), the visitor may also return a list of nodes rather ... | the node you're operating on has child nodes you must either transform the child nodes yourself or call the :meth:`~ast.NodeVisitor.generic_visit` method for the node first.
For nodes that were part of a collection of statements (that applies to all
statement nodes), the visitor may also return a list of nodes rather ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
e48b7aa3-66be-4a10-8961-95a2736ed9c2 | CPython Docs | file://datasets/cpython/Doc/library/ast.rst | unknown | d088e5d2-01b6-4edf-8f87-f277552a22d9 | 29,497 | supabase-export-v2 | 93e21276c7594912 | If source contains a null character (``\0``), :exc:`ValueError` is raised.
.. warning::
Note that successfully parsing source code into an AST object doesn't
guarantee that the source code provided is valid Python code that can
be executed as the compilation step can raise further :exc:`SyntaxError`
exceptions. For... | trusted_official_docs | CPython Docs | If source contains a null character (``\0``), :exc:`ValueError` is raised.
.. warning::
Note that successfully parsing source code into an AST object doesn't
guarantee that the source code provided is valid Python code that can
be executed as the compilation step can raise further :exc:`SyntaxError`
exceptions. For... | If source contains a null character (``\0``), :exc:`ValueError` is raised.
.. warning::
Note that successfully parsing source code into an AST object doesn't
guarantee that the source code provided is valid Python code that can
be executed as the compilation step can raise further :exc:`SyntaxError`
exceptions. For... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
e7aa2231-24e3-407a-af6d-46f5d90d3892 | CPython Docs | file://datasets/cpython/Doc/library/ast.rst | unknown | d088e5d2-01b6-4edf-8f87-f277552a22d9 | 29,509 | supabase-export-v2 | 36839b017980e5d7 | .. function:: literal_eval(node_or_string)
Evaluate an expression node or a string containing only a Python literal or
container display. The string or node provided may only consist of the
following Python literal structures: strings, bytes, numbers, tuples, lists,
dicts, sets, booleans, ``None`` and ``Ellipsis``. | trusted_official_docs | CPython Docs | .. function:: literal_eval(node_or_string)
Evaluate an expression node or a string containing only a Python literal or
container display. The string or node provided may only consist of the
following Python literal structures: strings, bytes, numbers, tuples, lists,
dicts, sets, booleans, ``None`` and ``Ellipsis``. | .. function:: literal_eval(node_or_string)
Evaluate an expression node or a string containing only a Python literal or
container display. The string or node provided may only consist of the
following Python literal structures: strings, bytes, numbers, tuples, lists,
dicts, sets, booleans, ``None`` and ``Ellipsis``. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
e9ba2159-5188-47fb-9ccb-35ea62cb4f5d | CPython Docs | file://datasets/cpython/Doc/library/ast.rst | unknown | d088e5d2-01b6-4edf-8f87-f277552a22d9 | 29,335 | supabase-export-v2 | 6c50882b36d9a5b8 | ... try: ... ... ... except Exception: ... ... ... except OtherException as e: ... ... ... else: ... ... ... finally: ... ... ...
"""), indent=4))
Module(
body=[
Try(
body=[
Expr(
value=Constant(value=Ellipsis))],
handlers=[
ExceptHandler(
type=Name(id='Exception'),
body=[
Expr(
value=Constant(value=Ellipsi... | trusted_official_docs | CPython Docs | ... try: ... ... ... except Exception: ... ... ... except OtherException as e: ... ... ... else: ... ... ... finally: ... ... ...
"""), indent=4))
Module(
body=[
Try(
body=[
Expr(
value=Constant(value=Ellipsis))],
handlers=[
ExceptHandler(
type=Name(id='Exception'),
body=[
Expr(
value=Constant(value=Ellipsi... | ... try: ... ... ... except Exception: ... ... ... except OtherException as e: ... ... ... else: ... ... ... finally: ... ... ...
"""), indent=4))
Module(
body=[
Try(
body=[
Expr(
value=Constant(value=Ellipsis))],
handlers=[
ExceptHandler(
type=Name(id='Exception'),
body=[
Expr(
value=Constant(value=Ellipsi... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
ea4357ed-5efd-4c9c-a6f4-1926372c0e45 | CPython Docs | file://datasets/cpython/Doc/library/ast.rst | unknown | d088e5d2-01b6-4edf-8f87-f277552a22d9 | 29,089 | supabase-export-v2 | be1350bbf517440b | node = ast.UnaryOp(ast.USub(), ast.Constant(5, lineno=0, col_offset=0), lineno=0, col_offset=0)
If a field that is optional in the grammar is omitted from the constructor,
it defaults to ``None``. If a list field is omitted, it defaults to the empty
list. If a field of type :class:`!ast.expr_context` is omitted, it d... | trusted_official_docs | CPython Docs | node = ast.UnaryOp(ast.USub(), ast.Constant(5, lineno=0, col_offset=0), lineno=0, col_offset=0)
If a field that is optional in the grammar is omitted from the constructor,
it defaults to ``None``. If a list field is omitted, it defaults to the empty
list. If a field of type :class:`!ast.expr_context` is omitted, it d... | node = ast.UnaryOp(ast.USub(), ast.Constant(5, lineno=0, col_offset=0), lineno=0, col_offset=0)
If a field that is optional in the grammar is omitted from the constructor,
it defaults to ``None``. If a list field is omitted, it defaults to the empty
list. If a field of type :class:`!ast.expr_context` is omitted, it d... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
eb14f7fd-54c8-46f8-b6e8-eb9146dbfd02 | CPython Docs | file://datasets/cpython/Doc/library/ast.rst | unknown | d088e5d2-01b6-4edf-8f87-f277552a22d9 | 29,238 | supabase-export-v2 | 79af391527e944cb | .. class:: Slice(lower, upper, step)
Regular slicing (on the form ``lower:upper`` or ``lower:upper:step``). Can occur only inside the *slice* field of :class:`Subscript`, either
directly or as an element of :class:`Tuple`. | trusted_official_docs | CPython Docs | .. class:: Slice(lower, upper, step)
Regular slicing (on the form ``lower:upper`` or ``lower:upper:step``). Can occur only inside the *slice* field of :class:`Subscript`, either
directly or as an element of :class:`Tuple`. | .. class:: Slice(lower, upper, step)
Regular slicing (on the form ``lower:upper`` or ``lower:upper:step``). Can occur only inside the *slice* field of :class:`Subscript`, either
directly or as an element of :class:`Tuple`. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
ec4f7bdc-453f-4bf7-a3d8-2d224a1f8646 | CPython Docs | file://datasets/cpython/Doc/library/ast.rst | unknown | d088e5d2-01b6-4edf-8f87-f277552a22d9 | 29,099 | supabase-export-v2 | be2913b460ea01ea | .. deprecated-removed:: 3.8 3.14
Previous versions of Python provided the AST classes :class:`!ast.Num`,
:class:`!ast.Str`, :class:`!ast.Bytes`, :class:`!ast.NameConstant` and
:class:`!ast.Ellipsis`, which were deprecated in Python 3.8. These classes
were removed in Python 3.14, and their functionality has been repl... | trusted_official_docs | CPython Docs | .. deprecated-removed:: 3.8 3.14
Previous versions of Python provided the AST classes :class:`!ast.Num`,
:class:`!ast.Str`, :class:`!ast.Bytes`, :class:`!ast.NameConstant` and
:class:`!ast.Ellipsis`, which were deprecated in Python 3.8. These classes
were removed in Python 3.14, and their functionality has been repl... | .. deprecated-removed:: 3.8 3.14
Previous versions of Python provided the AST classes :class:`!ast.Num`,
:class:`!ast.Str`, :class:`!ast.Bytes`, :class:`!ast.NameConstant` and
:class:`!ast.Ellipsis`, which were deprecated in Python 3.8. These classes
were removed in Python 3.14, and their functionality has been repl... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
ed5417ba-56d9-49f7-9d0e-c04d955c9d26 | CPython Docs | file://datasets/cpython/Doc/library/ast.rst | unknown | d088e5d2-01b6-4edf-8f87-f277552a22d9 | 29,417 | supabase-export-v2 | 32102fa324cf7029 | value=Constant(value=1))], type_ignores=[ TypeIgnore(lineno=1, tag='')]) >>> print(ast.dump(ast.parse('x: bool = 1 # type: ignore[assignment]', type_comments=True), indent=4)) Module( body=[ AnnAssign( target=Name(id='x', ctx=Store()), annotation=Name(id='bool'), value=Constant(value=1), simple=1)], type_ignores=[ Type... | trusted_official_docs | CPython Docs | value=Constant(value=1))], type_ignores=[ TypeIgnore(lineno=1, tag='')]) >>> print(ast.dump(ast.parse('x: bool = 1 # type: ignore[assignment]', type_comments=True), indent=4)) Module( body=[ AnnAssign( target=Name(id='x', ctx=Store()), annotation=Name(id='bool'), value=Constant(value=1), simple=1)], type_ignores=[ Type... | value=Constant(value=1))], type_ignores=[ TypeIgnore(lineno=1, tag='')]) >>> print(ast.dump(ast.parse('x: bool = 1 # type: ignore[assignment]', type_comments=True), indent=4)) Module( body=[ AnnAssign( target=Name(id='x', ctx=Store()), annotation=Name(id='bool'), value=Constant(value=1), simple=1)], type_ignores=[ Type... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
eda3a0a7-bdef-4c4d-a817-2b5eea1ce674 | CPython Docs | file://datasets/cpython/Doc/library/ast.rst | unknown | d088e5d2-01b6-4edf-8f87-f277552a22d9 | 29,072 | supabase-export-v2 | 957b0e6ac9072a06 | inherits from :class:`ast.expr`. For production rules with alternatives (aka "sums"), the left-hand side class is abstract: only instances of specific constructor nodes are ever created.
.. index:: single: ? (question mark); in AST grammar
.. index:: single: * (asterisk); in AST grammar | trusted_official_docs | CPython Docs | inherits from :class:`ast.expr`. For production rules with alternatives (aka "sums"), the left-hand side class is abstract: only instances of specific constructor nodes are ever created.
.. index:: single: ? (question mark); in AST grammar
.. index:: single: * (asterisk); in AST grammar | inherits from :class:`ast.expr`. For production rules with alternatives (aka "sums"), the left-hand side class is abstract: only instances of specific constructor nodes are ever created.
.. index:: single: ? (question mark); in AST grammar
.. index:: single: * (asterisk); in AST grammar | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
f045c395-f139-4641-9f67-384921753cb5 | CPython Docs | file://datasets/cpython/Doc/library/ast.rst | unknown | d088e5d2-01b6-4edf-8f87-f277552a22d9 | 29,452 | supabase-export-v2 | ce97dd240d17540a | The arguments for a function.
* ``posonlyargs``, ``args`` and ``kwonlyargs`` are lists of :class:`arg` nodes. * ``vararg`` and ``kwarg`` are single :class:`arg` nodes, referring to the
``*args, **kwargs`` parameters. * ``kw_defaults`` is a list of default values for keyword-only arguments. If
one is ``None``, the cor... | trusted_official_docs | CPython Docs | The arguments for a function.
* ``posonlyargs``, ``args`` and ``kwonlyargs`` are lists of :class:`arg` nodes. * ``vararg`` and ``kwarg`` are single :class:`arg` nodes, referring to the
``*args, **kwargs`` parameters. * ``kw_defaults`` is a list of default values for keyword-only arguments. If
one is ``None``, the cor... | The arguments for a function.
* ``posonlyargs``, ``args`` and ``kwonlyargs`` are lists of :class:`arg` nodes. * ``vararg`` and ``kwarg`` are single :class:`arg` nodes, referring to the
``*args, **kwargs`` parameters. * ``kw_defaults`` is a list of default values for keyword-only arguments. If
one is ``None``, the cor... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
f1c6d5db-b075-4b1a-8356-cbfbe83a58f5 | CPython Docs | file://datasets/cpython/Doc/library/ast.rst | unknown | d088e5d2-01b6-4edf-8f87-f277552a22d9 | 29,337 | supabase-export-v2 | a0f6002a9b91ab49 | .. class:: TryStar(body, handlers, orelse, finalbody)
``try`` blocks which are followed by ``except*`` clauses. The attributes are the
same as for :class:`Try` but the :class:`ExceptHandler` nodes in ``handlers``
are interpreted as ``except*`` blocks rather then ``except``. | trusted_official_docs | CPython Docs | .. class:: TryStar(body, handlers, orelse, finalbody)
``try`` blocks which are followed by ``except*`` clauses. The attributes are the
same as for :class:`Try` but the :class:`ExceptHandler` nodes in ``handlers``
are interpreted as ``except*`` blocks rather then ``except``. | .. class:: TryStar(body, handlers, orelse, finalbody)
``try`` blocks which are followed by ``except*`` clauses. The attributes are the
same as for :class:`Try` but the :class:`ExceptHandler` nodes in ``handlers``
are interpreted as ``except*`` blocks rather then ``except``. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
f4d7a164-5931-4941-954a-3f739df62a28 | CPython Docs | file://datasets/cpython/Doc/library/ast.rst | unknown | d088e5d2-01b6-4edf-8f87-f277552a22d9 | 29,463 | supabase-export-v2 | 155ecaef5df6c669 | .. class:: Yield(value) YieldFrom(value)
A ``yield`` or ``yield from`` expression. Because these are expressions, they
must be wrapped in an :class:`Expr` node if the value sent back is not used. | trusted_official_docs | CPython Docs | .. class:: Yield(value) YieldFrom(value)
A ``yield`` or ``yield from`` expression. Because these are expressions, they
must be wrapped in an :class:`Expr` node if the value sent back is not used. | .. class:: Yield(value) YieldFrom(value)
A ``yield`` or ``yield from`` expression. Because these are expressions, they
must be wrapped in an :class:`Expr` node if the value sent back is not used. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
f56a95a3-554c-42dd-8d69-8359c52aa919 | CPython Docs | file://datasets/cpython/Doc/library/ast.rst | unknown | d088e5d2-01b6-4edf-8f87-f277552a22d9 | 29,085 | supabase-export-v2 | 1882ac7cfabfc966 | The end offset is *after* the last symbol, for example one can get the source segment of a one-line expression node using ``source_line[node.col_offset : node.end_col_offset]``.
The constructor of a class :class:`ast.T` parses its arguments as follows: | trusted_official_docs | CPython Docs | The end offset is *after* the last symbol, for example one can get the source segment of a one-line expression node using ``source_line[node.col_offset : node.end_col_offset]``.
The constructor of a class :class:`ast.T` parses its arguments as follows: | The end offset is *after* the last symbol, for example one can get the source segment of a one-line expression node using ``source_line[node.col_offset : node.end_col_offset]``.
The constructor of a class :class:`ast.T` parses its arguments as follows: | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
f6f8d060-d9e1-48c6-9c92-eb4f4f85cacd | CPython Docs | file://datasets/cpython/Doc/library/ast.rst | unknown | d088e5d2-01b6-4edf-8f87-f277552a22d9 | 29,390 | supabase-export-v2 | e79318f54f6d47b5 | >>> print(ast.dump(ast.parse(""" ... match x: ... case {1: _, 2: _}: ... ... ... case {**rest}: ... ... ...
"""), indent=4))
Module(
body=[
Match(
subject=Name(id='x'),
cases=[
match_case(
pattern=MatchMapping(
keys=[
Constant(value=1),
Constant(value=2)],
patterns=[
MatchAs(),
MatchAs()]),
body=[
Expr(
... | trusted_official_docs | CPython Docs | >>> print(ast.dump(ast.parse(""" ... match x: ... case {1: _, 2: _}: ... ... ... case {**rest}: ... ... ...
"""), indent=4))
Module(
body=[
Match(
subject=Name(id='x'),
cases=[
match_case(
pattern=MatchMapping(
keys=[
Constant(value=1),
Constant(value=2)],
patterns=[
MatchAs(),
MatchAs()]),
body=[
Expr(
... | >>> print(ast.dump(ast.parse(""" ... match x: ... case {1: _, 2: _}: ... ... ... case {**rest}: ... ... ...
"""), indent=4))
Module(
body=[
Match(
subject=Name(id='x'),
cases=[
match_case(
pattern=MatchMapping(
keys=[
Constant(value=1),
Constant(value=2)],
patterns=[
MatchAs(),
MatchAs()]),
body=[
Expr(
... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
f86a52f0-6c5a-413c-ba9a-937247d58a3a | CPython Docs | file://datasets/cpython/Doc/library/ast.rst | unknown | d088e5d2-01b6-4edf-8f87-f277552a22d9 | 29,134 | supabase-export-v2 | 74a8556e1f3336d8 | .. class:: Constant(value, kind)
A constant value. The ``value`` attribute of the ``Constant`` literal contains the
Python object it represents. The values represented can be instances of :class:`str`,
:class:`bytes`, :class:`int`, :class:`float`, :class:`complex`, and :class:`bool`,
and the constants :data:`None` a... | trusted_official_docs | CPython Docs | .. class:: Constant(value, kind)
A constant value. The ``value`` attribute of the ``Constant`` literal contains the
Python object it represents. The values represented can be instances of :class:`str`,
:class:`bytes`, :class:`int`, :class:`float`, :class:`complex`, and :class:`bool`,
and the constants :data:`None` a... | .. class:: Constant(value, kind)
A constant value. The ``value`` attribute of the ``Constant`` literal contains the
Python object it represents. The values represented can be instances of :class:`str`,
:class:`bytes`, :class:`int`, :class:`float`, :class:`complex`, and :class:`bool`,
and the constants :data:`None` a... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
f8de32d4-3a01-4703-8ddf-2d714a0f21e0 | CPython Docs | file://datasets/cpython/Doc/library/ast.rst | unknown | d088e5d2-01b6-4edf-8f87-f277552a22d9 | 29,494 | supabase-export-v2 | 4959fb7ba2ab604a | In addition, the locations of ``# type: ignore`` comments will be returned as the ``type_ignores`` attribute of :class:`Module` (otherwise it is always an empty list).
In addition, if ``mode`` is ``'func_type'``, the input syntax is
modified to correspond to :pep:`484` "signature type comments",
e.g. ``(str, int) -> ... | trusted_official_docs | CPython Docs | In addition, the locations of ``# type: ignore`` comments will be returned as the ``type_ignores`` attribute of :class:`Module` (otherwise it is always an empty list).
In addition, if ``mode`` is ``'func_type'``, the input syntax is
modified to correspond to :pep:`484` "signature type comments",
e.g. ``(str, int) -> ... | In addition, the locations of ``# type: ignore`` comments will be returned as the ``type_ignores`` attribute of :class:`Module` (otherwise it is always an empty list).
In addition, if ``mode`` is ``'func_type'``, the input syntax is
modified to correspond to :pep:`484` "signature type comments",
e.g. ``(str, int) -> ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
fd0b52bb-75c0-4a62-be2c-abc497107839 | CPython Docs | file://datasets/cpython/Doc/library/ast.rst | unknown | d088e5d2-01b6-4edf-8f87-f277552a22d9 | 29,535 | supabase-export-v2 | 6fea4855b069898a | .. function:: walk(node)
Recursively yield all descendant nodes in the tree starting at *node*
(including *node* itself), in no specified order. This is useful if you only
want to modify nodes in place and don't care about the context. | trusted_official_docs | CPython Docs | .. function:: walk(node)
Recursively yield all descendant nodes in the tree starting at *node*
(including *node* itself), in no specified order. This is useful if you only
want to modify nodes in place and don't care about the context. | .. function:: walk(node)
Recursively yield all descendant nodes in the tree starting at *node*
(including *node* itself), in no specified order. This is useful if you only
want to modify nodes in place and don't care about the context. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
fd116c87-0237-48e5-81a6-825a7f08f816 | CPython Docs | file://datasets/cpython/Doc/library/ast.rst | unknown | d088e5d2-01b6-4edf-8f87-f277552a22d9 | 29,175 | supabase-export-v2 | 5a4e60c80a4cdee0 | .. class:: Load() Store() Del()
Variable references can be used to load the value of a variable, to assign
a new value to it, or to delete it. Variable references are given a context
to distinguish these cases. | trusted_official_docs | CPython Docs | .. class:: Load() Store() Del()
Variable references can be used to load the value of a variable, to assign
a new value to it, or to delete it. Variable references are given a context
to distinguish these cases. | .. class:: Load() Store() Del()
Variable references can be used to load the value of a variable, to assign
a new value to it, or to delete it. Variable references are given a context
to distinguish these cases. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
fd2f5554-a128-45c8-a301-78aa3d8d3f5d | CPython Docs | file://datasets/cpython/Doc/library/ast.rst | unknown | d088e5d2-01b6-4edf-8f87-f277552a22d9 | 29,168 | supabase-export-v2 | 16c8b752b0808e9d | .. class:: Dict(keys, values)
A dictionary. ``keys`` and ``values`` hold lists of nodes representing the
keys and the values respectively, in matching order (what would be returned
when calling :code:`dictionary.keys()` and :code:`dictionary.values()`). | trusted_official_docs | CPython Docs | .. class:: Dict(keys, values)
A dictionary. ``keys`` and ``values`` hold lists of nodes representing the
keys and the values respectively, in matching order (what would be returned
when calling :code:`dictionary.keys()` and :code:`dictionary.values()`). | .. class:: Dict(keys, values)
A dictionary. ``keys`` and ``values`` hold lists of nodes representing the
keys and the values respectively, in matching order (what would be returned
when calling :code:`dictionary.keys()` and :code:`dictionary.values()`). | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
ffa45dae-d583-4940-9e17-e53e3dc7d106 | CPython Docs | file://datasets/cpython/Doc/library/ast.rst | unknown | d088e5d2-01b6-4edf-8f87-f277552a22d9 | 29,493 | supabase-export-v2 | cd32c2d2989ca893 | the source into an AST node. Equivalent to ``compile(source, filename, mode, flags=FLAGS_VALUE, optimize=optimize, module=module)``, where ``FLAGS_VALUE`` is ``ast.PyCF_ONLY_AST`` if ``optimize <= 0`` and ``ast.PyCF_OPTIMIZED_AST`` otherwise.
If ``type_comments=True`` is given, the parser is modified to check
and retu... | trusted_official_docs | CPython Docs | the source into an AST node. Equivalent to ``compile(source, filename, mode, flags=FLAGS_VALUE, optimize=optimize, module=module)``, where ``FLAGS_VALUE`` is ``ast.PyCF_ONLY_AST`` if ``optimize <= 0`` and ``ast.PyCF_OPTIMIZED_AST`` otherwise.
If ``type_comments=True`` is given, the parser is modified to check
and retu... | the source into an AST node. Equivalent to ``compile(source, filename, mode, flags=FLAGS_VALUE, optimize=optimize, module=module)``, where ``FLAGS_VALUE`` is ``ast.PyCF_ONLY_AST`` if ``optimize <= 0`` and ``ast.PyCF_OPTIMIZED_AST`` otherwise.
If ``type_comments=True`` is given, the parser is modified to check
and retu... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
173b376c-b0da-4cb7-a452-bbb759496a92 | CPython Docs | file://datasets/cpython/Doc/library/xml.sax.utils.rst | unknown | 779de2a6-9f51-492c-bdc8-d0ddc3cef40f | 29,643 | supabase-export-v2 | e45de9a36556262a | .. function:: prepare_input_source(source, base='')
This function takes an input source and an optional base URL and returns a
fully resolved :class:`~xml.sax.xmlreader.InputSource` object ready for
reading. The input source can be given as a string, a file-like object, or
an :class:`~xml.sax.xmlreader.InputSource` ... | trusted_official_docs | CPython Docs | .. function:: prepare_input_source(source, base='')
This function takes an input source and an optional base URL and returns a
fully resolved :class:`~xml.sax.xmlreader.InputSource` object ready for
reading. The input source can be given as a string, a file-like object, or
an :class:`~xml.sax.xmlreader.InputSource` ... | .. function:: prepare_input_source(source, base='')
This function takes an input source and an optional base URL and returns a
fully resolved :class:`~xml.sax.xmlreader.InputSource` object ready for
reading. The input source can be given as a string, a file-like object, or
an :class:`~xml.sax.xmlreader.InputSource` ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
2a601b8b-f7cd-40fe-8c84-fb08c43242b4 | CPython Docs | file://datasets/cpython/Doc/library/xml.sax.utils.rst | unknown | 779de2a6-9f51-492c-bdc8-d0ddc3cef40f | 29,641 | supabase-export-v2 | a57b7c702a1e4d96 | .. class:: XMLFilterBase(base)
This class is designed to sit between an
:class:`~xml.sax.xmlreader.XMLReader` and the client
application's event handlers. By default, it does nothing but pass requests up
to the reader and events on to the handlers unmodified, but subclasses can
override specific methods to modify t... | trusted_official_docs | CPython Docs | .. class:: XMLFilterBase(base)
This class is designed to sit between an
:class:`~xml.sax.xmlreader.XMLReader` and the client
application's event handlers. By default, it does nothing but pass requests up
to the reader and events on to the handlers unmodified, but subclasses can
override specific methods to modify t... | .. class:: XMLFilterBase(base)
This class is designed to sit between an
:class:`~xml.sax.xmlreader.XMLReader` and the client
application's event handlers. By default, it does nothing but pass requests up
to the reader and events on to the handlers unmodified, but subclasses can
override specific methods to modify t... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
69a604a8-fbf5-4239-9119-955a9e21ce37 | CPython Docs | file://datasets/cpython/Doc/library/xml.sax.utils.rst | unknown | 779de2a6-9f51-492c-bdc8-d0ddc3cef40f | 29,635 | supabase-export-v2 | 9f8eb176031e8701 | *data*, the double-quote characters will be encoded and *data* will be wrapped in double-quotes. The resulting string can be used directly as an attribute value::
>>> print("<element attr=%s>" % quoteattr("ab ' cd \" ef"))
<element attr="ab ' cd " ef"> | trusted_official_docs | CPython Docs | *data*, the double-quote characters will be encoded and *data* will be wrapped in double-quotes. The resulting string can be used directly as an attribute value::
>>> print("<element attr=%s>" % quoteattr("ab ' cd \" ef"))
<element attr="ab ' cd " ef"> | *data*, the double-quote characters will be encoded and *data* will be wrapped in double-quotes. The resulting string can be used directly as an attribute value::
>>> print("<element attr=%s>" % quoteattr("ab ' cd \" ef"))
<element attr="ab ' cd " ef"> | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
c4a3df08-6ae8-41d4-904e-0c6d72294e03 | CPython Docs | file://datasets/cpython/Doc/library/xml.sax.utils.rst | unknown | 779de2a6-9f51-492c-bdc8-d0ddc3cef40f | 29,638 | supabase-export-v2 | c2d4af2c0c82ca26 | .. class:: XMLGenerator(out=None, encoding='iso-8859-1', short_empty_elements=False)
This class implements the :class:`~xml.sax.handler.ContentHandler` interface
by writing SAX
events back into an XML document. In other words, using an :class:`XMLGenerator`
as the content handler will reproduce the original document... | trusted_official_docs | CPython Docs | .. class:: XMLGenerator(out=None, encoding='iso-8859-1', short_empty_elements=False)
This class implements the :class:`~xml.sax.handler.ContentHandler` interface
by writing SAX
events back into an XML document. In other words, using an :class:`XMLGenerator`
as the content handler will reproduce the original document... | .. class:: XMLGenerator(out=None, encoding='iso-8859-1', short_empty_elements=False)
This class implements the :class:`~xml.sax.handler.ContentHandler` interface
by writing SAX
events back into an XML document. In other words, using an :class:`XMLGenerator`
as the content handler will reproduce the original document... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
db9f3321-027a-4297-a95e-cd3d7e8d4a35 | CPython Docs | file://datasets/cpython/Doc/library/xml.sax.utils.rst | unknown | 779de2a6-9f51-492c-bdc8-d0ddc3cef40f | 29,627 | supabase-export-v2 | e598edab9b8857ae | Escape ``'&'``, ``'<'``, and ``'>'`` in a string of data.
You can escape other strings of data by passing a dictionary as the optional
*entities* parameter. The keys and values must all be strings; each key will be
replaced with its corresponding value. The characters ``'&'``, ``'<'`` and
``'>'`` are always escaped,... | trusted_official_docs | CPython Docs | Escape ``'&'``, ``'<'``, and ``'>'`` in a string of data.
You can escape other strings of data by passing a dictionary as the optional
*entities* parameter. The keys and values must all be strings; each key will be
replaced with its corresponding value. The characters ``'&'``, ``'<'`` and
``'>'`` are always escaped,... | Escape ``'&'``, ``'<'``, and ``'>'`` in a string of data.
You can escape other strings of data by passing a dictionary as the optional
*entities* parameter. The keys and values must all be strings; each key will be
replaced with its corresponding value. The characters ``'&'``, ``'<'`` and
``'>'`` are always escaped,... | python, official-docs, cpython, P0 | Local_Trusted_Corpus |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.