Content-Length: 278890 | pFad | https://github.com/python/cpython/issues/92173

ad _PyFunction_FromConstructor doesn't support closures · Issue #92173 · python/cpython · GitHub
Skip to content

_PyFunction_FromConstructor doesn't support closures #92173

Description

@larryhastings

Bug report

_PyFunction_FromConstructor creates a PyFunctionObject, populating its fields by pulling them from a PyFrameConstructor object. But it ignores the fc_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

Metadata

Metadata

Assignees

Labels

type-bugAn unexpected behavior, bug, or error

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions









ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/python/cpython/issues/92173

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy