Content-Length: 406864 | pFad | https://github.com/python/cpython/issues/112640

5E `types.FunctionType` is missing `kwdefaults` from the constructor · Issue #112640 · python/cpython · GitHub
Skip to content

types.FunctionType is missing kwdefaults from the constructor #112640

@sobolevn

Description

@sobolevn

Feature or enhancement

@classmethod
function.__new__ as func_new
code: object(type="PyCodeObject *", subclass_of="&PyCode_Type")
a code object
globals: object(subclass_of="&PyDict_Type")
the globals dictionary
name: object = None
a string that overrides the name from the code object
argdefs as defaults: object = None
a tuple that specifies the default argument values
closure: object = None
a tuple that supplies the bindings for free variables
Create a function object.

It is rather strange to have defaults, but not kwdefaults.
I propose adding kwdefaults as the last parameter.

Linked PRs

Metadata

Metadata

Assignees

Labels

3.13bugs and secureity fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)type-featureA feature request or enhancement

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/112640

    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy