New submission from Nikita Sobolev <m...@sobolevn.me>:

After looking at 
https://github.com/python/cpython/blame/8fb36494501aad5b0c1d34311c9743c60bb9926c/Lib/ctypes/test/test_python_api.py#L5-L10
 in https://bugs.python.org/issue46584

it seems that we should address this comment:

```
# This section should be moved into ctypes\__init__.py, when it's ready.

from _ctypes import PyObj_FromPtr
```

by either:
1. Making `PyObj_FromPtr` public by re-exporting it from `ctypes`
2. Removing this comment

Arguments for `(1)`:
- It is quite widely used and there are a lot of articles mentioning it: 
https://www.programcreek.com/python/example/77012/_ctypes.PyObj_FromPtr and 
https://programtalk.com/python-examples/_ctypes.PyObj_FromPtr/ Basically, 
Google is filled with results.
- It looks useful for educational purposes.

I don't think that I am familiar with `ctypes`'s history well enough to make an 
educated dicision here.

But, I would love to work on this after this decision is made :)

----------
components: ctypes
messages: 412155
nosy: amaury.forgeotdarc, belopolsky, meador.inge, sobolevn, zach.ware
priority: normal
severity: normal
status: open
title: Should we re-export `PyObj_FromPtr` in `ctypes`?
type: behavior
versions: Python 3.11

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue46585>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to