Skip to content

Commit 6bf76fd

Browse files
Merge branch 'main' into patch-3
2 parents f25bbdd + 6e55337 commit 6bf76fd

File tree

16 files changed

+1200
-1023
lines changed

16 files changed

+1200
-1023
lines changed

Doc/library/symtable.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,12 @@ Examining Symbol Tables
180180
Return a tuple containing names of :term:`free (closure) variables <closure variable>`
181181
in this function.
182182

183+
.. method:: get_cells()
184+
185+
Return a tuple containing names of :term:`cell variables <closure variable>` in this table.
186+
187+
.. versionadded:: next
188+
183189

184190
.. class:: Class
185191

@@ -291,6 +297,12 @@ Examining Symbol Tables
291297
Return ``True`` if the symbol is referenced in its block, but not assigned
292298
to.
293299

300+
.. method:: is_cell()
301+
302+
Return ``True`` if the symbol is referenced but not assigned in a nested block.
303+
304+
.. versionadded:: next
305+
294306
.. method:: is_free_class()
295307

296308
Return *True* if a class-scoped symbol is free from

Doc/whatsnew/3.15.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -738,6 +738,13 @@ ssl
738738
(Contributed by Ron Frederick in :gh:`138252`.)
739739

740740

741+
symtable
742+
--------
743+
744+
* Add :meth:`symtable.Function.get_cells` and :meth:`symtable.Symbol.is_cell` methods.
745+
(Contributed by Yashp002 in :gh:`143504`.)
746+
747+
741748
sys
742749
---
743750

Include/internal/pycore_opcode_metadata.h

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)