[issue34280] METH_NOARGS: no longer require that second arg is NULL

2018-07-31 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: OK, I closed this without applying the change. It means one extra special case in PEP 580, but it's not a big deal. -- ___ Python tracker

[issue34280] METH_NOARGS: no longer require that second arg is NULL

2018-07-31 Thread Jeroen Demeyer
Change by Jeroen Demeyer : -- stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list

[issue34280] METH_NOARGS: no longer require that second arg is NULL

2018-07-30 Thread Stefan Behnel
Stefan Behnel added the comment: Agree with Raymond. If the goal is to pass something else, then functions that want to make use of that "something else" have to be modified anyway, in which case also changing the call type wouldn't hurt (assuming the new value still fits into the flag

[issue34280] METH_NOARGS: no longer require that second arg is NULL

2018-07-30 Thread Raymond Hettinger
Raymond Hettinger added the comment: ISTM it would be better to keep METH_NOARGS as-is and if you need another argument, then use a different calling pattern. The METH_NOARGS flag is very old and widely adopted -- it is unknowable how changing the assumptions will affect deployed code.

[issue34280] METH_NOARGS: no longer require that second arg is NULL

2018-07-30 Thread Jeroen Demeyer
Change by Jeroen Demeyer : -- keywords: +patch pull_requests: +8077 stage: -> patch review ___ Python tracker ___ ___

[issue34280] METH_NOARGS: no longer require that second arg is NULL

2018-07-30 Thread Jeroen Demeyer
New submission from Jeroen Demeyer : A C function with signature METH_NOARGS takes two arguments where the first is "self" and the second is guaranteed to be NULL. Given that this second argument really should never be used, I would like to drop the guarantee that the argument is NULL.