Skip to main content

python_is_bare_statement_value

Function python_is_bare_statement_value 

Source
pub fn python_is_bare_statement_value(
    node: &Node<'_>,
    ancestors: Ancestors<'_, '_>,
) -> bool
Expand description

Whether node, past any parentheses around it, is the sole child of an expression_statement: the discarded-value shape a docstring takes. CPython drops the parentheses, so ("""doc""") is a docstring (#1610). "a", "b" has two children, so it is a discarded tuple, not documentation.