Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
Closed
Description
Bug report
_PyFunction_FromConstructor creates aPyFunctionObject, populating its fields by pulling them from aPyFrameConstructor object. But it ignores thefc_closure field, which means it always creates a function that has no closure. Creating functions with closures is a totally legitimate use case and this is just a bug.
Your environment
- CPython versions tested on: main
- Operating system and architecture: linux