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

Argument Clinic docs do not list support for the 'l' format #64531

Closed
brettcannon opened this issue Jan 21, 2014 · 4 comments
Closed

Argument Clinic docs do not list support for the 'l' format #64531

brettcannon opened this issue Jan 21, 2014 · 4 comments
Assignees
Labels
docs Documentation in the Doc dir

Comments

@brettcannon
Copy link
Member

BPO 20332
Nosy @brettcannon, @taleinat, @larryhastings
Superseder
  • bpo-20346: Argument Clinic: missing entry in table mapping legacy convertors to real AC converters
  • 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/larryhastings'
    closed_at = <Date 2014-01-22.21:25:39.466>
    created_at = <Date 2014-01-21.16:32:04.490>
    labels = ['docs']
    title = "Argument Clinic docs do not list support for the 'l' format"
    updated_at = <Date 2014-01-22.21:26:04.778>
    user = 'https://github.com/brettcannon'

    bugs.python.org fields:

    activity = <Date 2014-01-22.21:26:04.778>
    actor = 'brett.cannon'
    assignee = 'larry'
    closed = True
    closed_date = <Date 2014-01-22.21:25:39.466>
    closer = 'brett.cannon'
    components = ['Documentation']
    creation = <Date 2014-01-21.16:32:04.490>
    creator = 'brett.cannon'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 20332
    keywords = []
    message_count = 4.0
    messages = ['208667', '208729', '208823', '208845']
    nosy_count = 3.0
    nosy_names = ['brett.cannon', 'taleinat', 'larry']
    pr_nums = []
    priority = 'normal'
    resolution = 'duplicate'
    stage = 'needs patch'
    status = 'closed'
    superseder = '20346'
    type = None
    url = 'https://bugs.python.org/issue20332'
    versions = ['Python 3.4']

    @brettcannon
    Copy link
    Member Author

    'l' is long for PyArg_ParseTuple().

    @brettcannon brettcannon added the build The build process and cross-build label Jan 21, 2014
    @larryhastings
    Copy link
    Contributor

    /*[clinic input]
    brett_is_stinky_and_wrong

    l: long
    

    [clinic start generated code]*/

    PyDoc_STRVAR(brett_is_stinky_and_wrong__doc__,
    "brett_is_stinky_and_wrong(l)");

    #define BRETT_IS_STINKY_AND_WRONG_METHODDEF    \
        {"brett_is_stinky_and_wrong", (PyCFunction)brett_is_stinky_and_wrong, METH_VARARGS|METH_KEYWORDS, brett_is_stinky_and_wrong__doc__},
    
    static PyObject *
    brett_is_stinky_and_wrong_impl(PyModuleDef *module, long l);
    
    static PyObject *
    brett_is_stinky_and_wrong(PyModuleDef *module, PyObject *args, PyObject *kwargs)
    {
        PyObject *return_value = NULL;
        static char *_keywords[] = {"l", NULL};
        long l;
        if (!PyArg_ParseTupleAndKeywords(args, kwargs,
            "l:brett_is_stinky_and_wrong", _keywords,
            &l))
            goto exit;
        return_value = brett_is_stinky_and_wrong_impl(module, l);
    exit:
        return return_value;
    }

    static PyObject *
    brett_is_stinky_and_wrong_impl(PyModuleDef *module, long l)
    /[clinic end generated code: checksum=d16330187341a0ecea0bf7ab70ba5551200ceb3c]/

    @larryhastings larryhastings added type-bug An unexpected behavior, bug, or error invalid labels Jan 22, 2014
    @brettcannon
    Copy link
    Member Author

    So the docs don't mention this support anywhere. The 'l' format isn't listed in the table of legacy to Argument Clinic converters, nor is there a list of converters that only exist in Argument Clinic. So unless I read the section on return converters and inferred that if a return converter exists for long it exists as a argument converter I had no way of knowing the existence of long as a converter without reading the code.

    So this is at least a doc bug.

    @brettcannon brettcannon added docs Documentation in the Doc dir and removed build The build process and cross-build labels Jan 22, 2014
    @brettcannon brettcannon reopened this Jan 22, 2014
    @brettcannon brettcannon changed the title Argument Clinic does not support the 'l' format Argument Clinic docs do not list support for the 'l' format Jan 22, 2014
    @brettcannon brettcannon removed the type-bug An unexpected behavior, bug, or error label Jan 22, 2014
    @taleinat
    Copy link
    Contributor

    See documentation patch for this issue attached to bpo-20346 (a duplicate of this).

    @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
    docs Documentation in the Doc dir
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants