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

Document PyCFunction_New and PyCFunction_NewEx functions #60980

Closed
asvetlov opened this issue Dec 25, 2012 · 7 comments
Closed

Document PyCFunction_New and PyCFunction_NewEx functions #60980

asvetlov opened this issue Dec 25, 2012 · 7 comments
Labels
docs Documentation in the Doc dir easy type-feature A feature request or enhancement

Comments

@asvetlov
Copy link
Contributor

BPO 16776
Nosy @gvanrossum, @vstinner, @encukou, @asvetlov, @vadmium, @rogerhurwitz
Files
  • 16776.txt
  • 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 = None
    closed_at = <Date 2020-02-10.20:37:46.481>
    created_at = <Date 2012-12-25.11:15:54.089>
    labels = ['easy', 'type-feature', 'invalid', 'docs']
    title = 'Document PyCFunction_New and PyCFunction_NewEx functions'
    updated_at = <Date 2020-02-10.20:37:46.477>
    user = 'https://github.com/asvetlov'

    bugs.python.org fields:

    activity = <Date 2020-02-10.20:37:46.477>
    actor = 'gvanrossum'
    assignee = 'docs@python'
    closed = True
    closed_date = <Date 2020-02-10.20:37:46.481>
    closer = 'gvanrossum'
    components = ['Documentation']
    creation = <Date 2012-12-25.11:15:54.089>
    creator = 'asvetlov'
    dependencies = []
    files = ['32578']
    hgrepos = []
    issue_num = 16776
    keywords = ['easy']
    message_count = 7.0
    messages = ['178115', '202651', '202652', '232788', '361346', '361708', '361720']
    nosy_count = 7.0
    nosy_names = ['gvanrossum', 'vstinner', 'petr.viktorin', 'asvetlov', 'docs@python', 'martin.panter', 'rogerhurwitz']
    pr_nums = []
    priority = 'normal'
    resolution = 'not a bug'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue16776'
    versions = ['Python 2.7', 'Python 3.2', 'Python 3.3', 'Python 3.4']

    @asvetlov
    Copy link
    Contributor Author

    c-api docs has no documentation for those public API functions.

    @asvetlov asvetlov added docs Documentation in the Doc dir easy type-feature A feature request or enhancement labels Dec 25, 2012
    @akuchling
    Copy link
    Member

    Here's a patch that contains text for a description of these two functions. However, I can't figure out what section they would belong in. They don't really belong in http://docs.python.org/3.4/c-api/structures.html, which is for the C structures.

    Also note that PyCFunctionObject isn't described anywhere. Should it be?

    @akuchling
    Copy link
    Member

    Mis-clicked and forgot to attach the patch.

    @vadmium
    Copy link
    Member

    vadmium commented Dec 17, 2014

    I’m far from an expert on the C API, but I was looking for a way to inspect a “builtin_function_or_method” a.k.a. PyCFunction_Type a.k.a. types.BuiltinMethodType, and ended up looking at the “Instance Method Objects” section. So maybe your functions should go near there, or perhaps the nearby “Function Objects” section.

    @encukou
    Copy link
    Member

    encukou commented Feb 4, 2020

    IMO, PyCFunction* should be a CPython-specific implementation detail: alternate implementations of the C-API don't need to support them, and extension authors should be fine without using them. (And if not, more efforts like PEP-590 Vectorcall should make it so.)

    The functions are public in the sense that they don't have underscored names, but I wouldn't rush to make them documented.

    @rogerhurwitz
    Copy link
    Mannequin

    rogerhurwitz mannequin commented Feb 10, 2020

    I am at PyCascades at the CPython sprint, and I will work on this issue to the best of my ability.

    @gvanrossum
    Copy link
    Member

    I'm sprinting with Roger. Based on Petr's comment I am closing this issue -- if we should not draw attention to this function let's not document it.

    @svetlov if you still think it should be documented, can you suggest where the documentation should go? The best place we could come up with is in the file where Andrew put it.

    @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 easy type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    5 participants