Skip to content

Conversation

@Yashp002
Copy link
Contributor

@Yashp002 Yashp002 commented Jan 8, 2026

Expose cell status in symtable.Symbol via new is_cell() predicate and add get_cells() method to SymbolTable.

Changes

  • Added Symbol.is_cell() method that returns True if the symbol has the CELL flag.
  • Added SymbolTable.get_cells() method that returns an iterable of cell variable names.
  • Added test_cells to Lib/test/test_symtable.py to verify the new API.

Tests

  • Added test_cells test using a closure pattern (outer -> inner accessing x).

@Yashp002 Yashp002 changed the title bpo-143504: Expose CELL status of a symbol in symtable (GH-143504) gh-143504: Expose CELL status of a symbol in symtable (GH-143504) Jan 8, 2026
Yashp002 and others added 2 commits January 8, 2026 16:17
Co-authored-by: AN Long <aisk@users.noreply.github.com>
@Yashp002
Copy link
Contributor Author

Yashp002 commented Jan 8, 2026

I'll fix this in a while, my apologies for quite a big fault in the code actually

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants