Content-Length: 292361 | pFad | https://github.com/python/cpython/issues/125028

ad Prohibit placeholders in `partial` keywords · Issue #125028 · python/cpython · GitHub
Skip to content

Prohibit placeholders in partial keywords #125028

Description

@dg-pb

Feature or enhancement

Proposal:

This has already been pointed out to me, but I could not see possible use cases at a time and they came with a slight delay.

There is a possibility for functionality that makes use of keyword Placeholders to be needed in the future.

Realistic use case is the ability to use map with keyword arguments. See: #119793 (comment)

import functools
functools.partial(lambda a: None, a=functools.Placeholder)
# TypeError("keyword Placeholders are not allowed")

Has this already been discussed elsewhere?

No response given

Links to previous discussion of this feature:

#119127 (comment)

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    extension-modulesC modules in the Modules dirstdlibStandard Library Python modules in the Lib/ directorytype-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/125028

    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy