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

Class **kwds broken (PEP 3115) #46581

Closed
jackdied opened this issue Mar 17, 2008 · 2 comments
Closed

Class **kwds broken (PEP 3115) #46581

jackdied opened this issue Mar 17, 2008 · 2 comments
Assignees
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error

Comments

@jackdied
Copy link
Contributor

BPO 2328
Nosy @jackdied

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = 'https://github.com/jackdied'
closed_at = <Date 2008-03-17.19:33:11.535>
created_at = <Date 2008-03-17.17:24:19.836>
labels = ['interpreter-core', 'type-bug', 'invalid']
title = 'Class **kwds broken (PEP 3115)'
updated_at = <Date 2008-03-17.19:33:11.534>
user = 'https://github.com/jackdied'

bugs.python.org fields:

activity = <Date 2008-03-17.19:33:11.534>
actor = 'jackdied'
assignee = 'jackdied'
closed = True
closed_date = <Date 2008-03-17.19:33:11.535>
closer = 'jackdied'
components = ['Interpreter Core']
creation = <Date 2008-03-17.17:24:19.836>
creator = 'jackdied'
dependencies = []
files = []
hgrepos = []
issue_num = 2328
keywords = []
message_count = 2.0
messages = ['63681', '63727']
nosy_count = 1.0
nosy_names = ['jackdied']
pr_nums = []
priority = 'normal'
resolution = 'not a bug'
stage = None
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue2328'
versions = ['Python 3.0']

@jackdied
Copy link
Contributor Author

typeobject.c:type_new only allows 0 or 1 keyword arg in class creation
instead of an arbitrary number as per PEP-3115.

I'm working on a patch.

@jackdied jackdied self-assigned this Mar 17, 2008
@jackdied jackdied added interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error labels Mar 17, 2008
@jackdied
Copy link
Contributor Author

Not a bug.

If you pass arbitrary keywords in class construction you have to define
__new__ and __init__ on the metaclass to handle them.

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

1 participant