This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: Argument Clinic generates wrong keyword parameter name for "default"
Type: behavior Stage: resolved
Components: Build Versions: Python 3.4
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: larry Nosy List: larry, python-dev, serhiy.storchaka
Priority: normal Keywords:

Created on 2014-01-07 09:08 by serhiy.storchaka, last changed 2022-04-11 14:57 by admin. This issue is now closed.

File name Uploaded Description Edit
spammodule.c serhiy.storchaka, 2014-01-07 09:08 larry, 2014-01-07 16:52 review
Messages (4)
msg207513 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2014-01-07 09:08
For the "default" keyword parameter Argument Clinic generates wrong name "default_value" in the _keywords array.

module spam

    default: int = 1



static PyObject *
spam_ham(PyModuleDef *module, PyObject *args, PyObject *kwargs)
    PyObject *return_value = NULL;
    static char *_keywords[] = {"default_value", NULL};
    int default_value = 1;

    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
        "|i:ham", _keywords,
        goto exit;
msg207517 - (view) Author: Larry Hastings (larry) * (Python committer) Date: 2014-01-07 09:27
I'll fix this but it's low priority for today.

It's not a release blocker; we could release Python 3.4 with this bug.
msg207561 - (view) Author: Larry Hastings (larry) * (Python committer) Date: 2014-01-07 16:52
The problem was an easy fix.  However, while fixing it I discovered another problem (if "[clinic]*/" was the last line, and it didn't have an eol, Clinic would append another "[clinic]*/").  I fixed that too and added a regression test.

msg207589 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2014-01-07 20:21
New changeset f61c63ec4e70 by Larry Hastings in branch 'default':
Issue #20157: When Argument Clinic renames a parameter because its name
Date User Action Args
2022-04-11 14:57:56adminsetgithub: 64356
2014-01-07 20:22:10larrysetstatus: open -> closed
resolution: fixed
stage: needs patch -> resolved
2014-01-07 20:21:45python-devsetnosy: + python-dev
messages: + msg207589
2014-01-07 16:52:21larrysetfiles: +

messages: + msg207561
2014-01-07 09:29:52serhiy.storchakalinkissue20159 dependencies
2014-01-07 09:27:18larrysetpriority: release blocker -> normal
assignee: larry
messages: + msg207517
2014-01-07 09:08:52serhiy.storchakacreate