Skip to content

expose CELL status of a symbol in symtable #143504

@iritkatriel

Description

@iritkatriel

Feature or enhancement

Proposal:

symtable symbols have the following predicates, but for some reason no is_cell. Is there a reason for this, or should we expose is_cell as well?

'is_annotated', 'is_assigned', 'is_declared_global', 'is_free', 'is_global', 'is_imported', 'is_local', 'is_namespace', 'is_nonlocal', 'is_parameter', 'is_referenced'

The symbol obviously knows whether it's a cell:

>>> st.get_children()[0].get_symbols()[0]._scope_str
<bound method Symbol._scope_str of <symbol 'x': CELL, USE|DEF_LOCAL>>

Has this already been discussed elsewhere?

No response given

Links to previous discussion of this feature:

No response

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions