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

incorrect signature in doc for PyByteArray_Resize #51130

Closed
drukker mannequin opened this issue Sep 11, 2009 · 4 comments
Closed

incorrect signature in doc for PyByteArray_Resize #51130

drukker mannequin opened this issue Sep 11, 2009 · 4 comments
Assignees
Labels
docs Documentation in the Doc dir

Comments

@drukker
Copy link
Mannequin

drukker mannequin commented Sep 11, 2009

BPO 6881
Nosy @birkenfeld, @ezio-melotti

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/ezio-melotti'
closed_at = <Date 2009-09-20.07:24:44.568>
created_at = <Date 2009-09-11.09:24:43.008>
labels = ['docs']
title = 'incorrect signature in doc for PyByteArray_Resize'
updated_at = <Date 2009-09-20.07:24:44.567>
user = 'https://bugs.python.org/drukker'

bugs.python.org fields:

activity = <Date 2009-09-20.07:24:44.567>
actor = 'ezio.melotti'
assignee = 'ezio.melotti'
closed = True
closed_date = <Date 2009-09-20.07:24:44.568>
closer = 'ezio.melotti'
components = ['Documentation']
creation = <Date 2009-09-11.09:24:43.008>
creator = 'drukker'
dependencies = []
files = []
hgrepos = []
issue_num = 6881
keywords = []
message_count = 4.0
messages = ['92506', '92661', '92672', '92882']
nosy_count = 3.0
nosy_names = ['georg.brandl', 'ezio.melotti', 'drukker']
pr_nums = []
priority = 'low'
resolution = 'fixed'
stage = 'resolved'
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue6881'
versions = ['Python 3.1', 'Python 2.7']

@drukker
Copy link
Mannequin Author

drukker mannequin commented Sep 11, 2009

in Doc/c-api/bytearray.rst:

    PyObject* PyByteArray_Resize(PyObject *bytearray, Py_ssize_t len)

should be:

    int PyByteArray_Resize(PyObject *bytearray, Py_ssize_t len)

as per Include/bytearrayobject.h

@drukker drukker mannequin assigned birkenfeld Sep 11, 2009
@drukker drukker mannequin added the docs Documentation in the Doc dir label Sep 11, 2009
@ezio-melotti
Copy link
Member

The PyByteArrayIter_Type is also missing, and the arg names of several
functions don't match the ones in the C source in Objects/bytesobject.c .
It might also be a good idea to add sub-headers in the doc to group
these functions in the same way they are grouped in the .h file (i.e.
Type Object, Type check macros, Direct API functions, Macros).

@birkenfeld
Copy link
Member

I don't think the iterator type needs to be documented; many other such
iter types aren't.

Also, the argument names needn't match (since C doesn't have the notion
of keyword arguments). They can be changed in the docs to be more
obvious than what the programmer chose :)

Would you like to fix the rest?

@ezio-melotti
Copy link
Member

Fixed in r74958 (trunk), r74959 (release26-maint), r74960 (py3k) and
r74961 (release31-maint).

@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

2 participants