Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prohibit placeholders in partial keywords #125028

Open
dg-pb opened this issue Oct 6, 2024 · 2 comments
Open

Prohibit placeholders in partial keywords #125028

dg-pb opened this issue Oct 6, 2024 · 2 comments
Labels
extension-modules C modules in the Modules dir stdlib Python modules in the Lib dir type-feature A feature request or enhancement

Comments

@dg-pb
Copy link
Contributor

dg-pb commented Oct 6, 2024

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

@dg-pb dg-pb added the type-feature A feature request or enhancement label Oct 6, 2024
dg-pb added a commit to dg-pb/cpython that referenced this issue Oct 17, 2024
@dg-pb dg-pb closed this as completed Oct 26, 2024
@picnixz picnixz closed this as not planned Won't fix, can't repro, duplicate, stale Oct 26, 2024
dg-pb added a commit to dg-pb/cpython that referenced this issue Oct 28, 2024
@picnixz
Copy link
Member

picnixz commented Oct 28, 2024

Re-opening since the OP contacted me to re-open the issue.

@picnixz picnixz reopened this Oct 28, 2024
@picnixz picnixz added stdlib Python modules in the Lib dir extension-modules C modules in the Modules dir labels Oct 28, 2024
@dg-pb
Copy link
Contributor Author

dg-pb commented Oct 28, 2024

I panicked and closed this prematurely. Apologies for the mess.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
extension-modules C modules in the Modules dir stdlib Python modules in the Lib dir type-feature A feature request or enhancement
Projects
None yet
Development

No branches or pull requests

2 participants