Modifying func_closure

  • Thread starter Jacek Generowicz
  • Start date
J

Jacek Generowicz

Python's closures are read-only. But is there a way of hacking one's
way around this restriction?

The funct_closure attribute is read-only, so I can't rebind it. It's a
tuple, so I can't mutate it. Even if I could, I can't instantiate cell
ojects. The cell objects don't seem to have any interesting attributes
that one might use to mutate the contents.

Looks hopeless, but maybe someone knows better.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top