[issue2408] types should expose cell object

Amaury Forgeot d'Arc report at bugs.python.org
Tue Mar 18 23:23:50 CET 2008


Amaury Forgeot d'Arc <amauryfa at gmail.com> added the comment:

The following python code retrieves the cell type, and could be added to
types.py:

def _f(x=None):
   def g():
      x
   return g

CellType = type(_f().func_closure[0])

OTOH, you are unlikely to need it. Do you have a use case, or is it just
to have the full list of types?

----------
nosy: +amaury.forgeotdarc

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue2408>
__________________________________


More information about the Python-bugs-list mailing list