GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — expose CELL status of a symbol in symtable · Issue #143504 · python/cpython

expose CELL status of a symbol in symtable #143504

New issue
Copy link
New issue
Copy link
Closed
Closed
expose CELL status of a symbol in symtable#143504
Copy link
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancementA feature request or enhancement

Description

@iritkatriel
iritkatriel
opened on Jan 6, 2026
Issue body actions

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

  • gh-143504: Expose CELL status of a symbol in symtable #143549

Activity

  1. iritkatriel
    added
    type-featureA feature request or enhancementA feature request or enhancement
    on Jan 6, 2026
  2. johnslavik
    added
    stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directory
    on Jan 7, 2026
  3. Yashp002 commented on Jan 7, 2026

    @Yashp002
    Yashp002
    on Jan 7, 2026
    Contributor
    More actions

    I did look this up in the issue tracker, python-dev/python-ideas archives, and discuss.python.org for symtable is_cell and it doesn't seem have to been discussed elsewhere.

  4. picnixz commented on Jan 7, 2026

    @picnixz
    picnixz
    on Jan 7, 2026
    Member
    More actions

    @Yashp002 Core developers usually don't need to discuss some features. We appreciate your dedication to contribute but please let triagers or core devs decide whether an issue should be kept open or not. In this case, it's not even about exposing it but rather asking for something.

    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?

    I'm pretty sure I asked this question myself when I worked on #120029 but I didn't follow up. I think we can add it for completeness as it's not really costly and that's the only way to know whether something is in a CELL scope or not (scope being private and scope_str being a string, hence unstable).

  5. Yashp002 commented on Jan 7, 2026

    @Yashp002
    Yashp002
    on Jan 7, 2026
    Contributor
    More actions

    I can put together a PR to add is_cell to symtable then, since it sounds like a straightforward addition for completeness.
    Also was not my intention to be prying into a core dev's authority, that's my bad.

  6. iritkatriel commented on Jan 7, 2026

    @iritkatriel
    iritkatriel
    on Jan 7, 2026
    MemberAuthor
    More actions

    Thanks. Also maybe a get_cells to go with the existing get_frees.

  7. Yashp002 commented on Jan 21, 2026

    @Yashp002
    Yashp002
    on Jan 21, 2026
    Contributor
    More actions

    @iritkatriel Could you verify my PR, I've added get_cells, is_cell and also the test_cells in test_symtable.py for the build.
    Please let me know If I have to further fix anything:D

    Reacted by Irit Katriel
  8. iritkatriel
    added a commit that references this issue on Jan 25, 2026

    gh-143504: Expose CELL status of a symbol in symtable (#143549)

    a51bf70
  9. thunder-coding
    added a commit that references this issue on Feb 15, 2026

    pythongh-143504: Expose CELL status of a symbol in symtable (python#1…

    f3c5bfb
  10. serhiy-storchaka
    added this to Inspect issues 🔍on Jul 3, 2026
  11. hugovk
    closed this as completedon Oct 23, 2026
  12. github-project-automation
    moved this to Done in Inspect issues 🔍on Oct 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

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

    Projects

    • Inspect issues 🔍
      Status
      Done
      Show more project fields

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402503 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.