[issue43803] ctypes string_at/wstring_at - bad argument name used in docs and in docstring

2021-06-14 Thread Irit Katriel
Change by Irit Katriel : -- versions: +Python 3.11 -Python 3.8 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue43803] ctypes string_at/wstring_at - bad argument name used in docs and in docstring

2021-04-26 Thread Shreyan Avigyan
Shreyan Avigyan added the comment: Ping -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43803] ctypes string_at/wstring_at - bad argument name used in docs and in docstring

2021-04-19 Thread Shreyan Avigyan
Change by Shreyan Avigyan : -- nosy: +amaury.forgeotdarc, belopolsky, meador.inge ___ Python tracker ___ ___ Python-bugs-list

[issue43803] ctypes string_at/wstring_at - bad argument name used in docs and in docstring

2021-04-16 Thread Terry J. Reedy
Change by Terry J. Reedy : -- versions: -Python 3.6, Python 3.7 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue43803] ctypes string_at/wstring_at - bad argument name used in docs and in docstring

2021-04-13 Thread Shreyan Avigyan
Shreyan Avigyan added the comment: PR opened for this issue. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue43803] ctypes string_at/wstring_at - bad argument name used in docs and in docstring

2021-04-13 Thread Shreyan Avigyan
Change by Shreyan Avigyan : -- keywords: +patch pull_requests: +24116 stage: -> patch review pull_request: https://github.com/python/cpython/pull/25384 ___ Python tracker ___

[issue43803] ctypes string_at/wstring_at - bad argument name used in docs and in docstring

2021-04-13 Thread Shreyan Avigyan
Shreyan Avigyan added the comment: Ok..then submitting the PR in 10 minutes. -- ___ Python tracker ___ ___ Python-bugs-list

[issue43803] ctypes string_at/wstring_at - bad argument name used in docs and in docstring

2021-04-13 Thread Eryk Sun
Eryk Sun added the comment: > So are you telling that we should change the name to "ptr" to > avoid a breaking change? The function parameter name is "ptr". Changing that name could break existing code. I don't think it's likely, but it's not worth breaking even one script just for this.

[issue43803] ctypes string_at/wstring_at - bad argument name used in docs and in docstring

2021-04-13 Thread Shreyan Avigyan
Shreyan Avigyan added the comment: Ok...let me review again. Having different names for the same argument can cause confusion, right? So are you telling that we should change the name to "ptr" to avoid a breaking change? If this issue is confirmed, I'm ready to submit a PR to make this

[issue43803] ctypes string_at/wstring_at - bad argument name used in docs and in docstring

2021-04-12 Thread Eryk Sun
Eryk Sun added the comment: > If that's the problem then why not change all of them to use the > name "address" or "addr" to avoid confusion and make it clear > simple. What is your view? Change them all to refer to `ptr`. It's not worth introducing a breaking change: >>>

[issue43803] ctypes string_at/wstring_at - bad argument name used in docs and in docstring

2021-04-12 Thread Shreyan Avigyan
Shreyan Avigyan added the comment: Yeah, you're right and also it is true that changing the docstring to "ptr" can succinctly say "Return the byte string at void *ptr." But it's a kind of problem if different argument names are used for the same argument in docstring, argument list and

[issue43803] ctypes string_at/wstring_at - bad argument name used in docs and in docstring

2021-04-11 Thread Eryk Sun
Eryk Sun added the comment: > the name "address" and "addr" respectively which are misleading > because it is asking for ctypes.c_char_p or ctypes.c_wchar_p which > are C pointer types string_at() and wstring_at() take a c_void_p value. This can be initialized by an integer (i.e. an

[issue43803] ctypes string_at/wstring_at - bad argument name used in docs and in docstring

2021-04-11 Thread Shreyan Avigyan
Shreyan Avigyan added the comment: > I'd favor updating them all to say "ptr", because changing the name of the > runtime parameter would risk breaking users' code. I also certainly agree with that. Moreover, the documentation and docstring uses the name "address" and "addr" respectively

[issue43803] ctypes string_at/wstring_at bad argument name

2021-04-10 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: It's a bit worse: the actual name is "ptr", the function docstrings say "addr", and the documentation (https://docs.python.org/3.9/library/ctypes.html#ctypes.string_at) has "address". I'd favor updating them all to say "ptr", because changing the name of

[issue43803] ctypes string_at/wstring_at bad argument name

2021-04-10 Thread Tal Hayon
Change by Tal Hayon : -- title: ctypes string_at/wstring_at -> ctypes string_at/wstring_at bad argument name ___ Python tracker ___