[issue36203] PyWeakref_NewRef docs are misleading

Windson Yang <wiwindson@outlook.com> added the comment: It looks to me the fix is easy, we just will return NULL and raise TypeError when the callback is not callable, None, or NULL. I'm not an expert in C, but I would love to create a PR for it if you don't have time. ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue36203> _______________________________________

Maxwell Bernstein <tekk.nolagi@gmail.com> added the comment: I can likely do it tomorrow. If not I'll update this. On Thu, Mar 7, 2019, 00:20 Windson Yang <report@bugs.python.org> wrote:
Windson Yang <wiwindson@outlook.com> added the comment:
It looks to me the fix is easy, we just will return NULL and raise TypeError when the callback is not callable, None, or NULL. I'm not an expert in C, but I would love to create a PR for it if you don't have time.
----------
_______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue36203> _______________________________________
---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue36203> _______________________________________
participants (2)
-
Maxwell Bernstein
-
Windson Yang