[Python-Dev] Remove METH_OLDARGS? (original) (raw)
"Martin v. Löwis" martin at v.loewis.de
Tue May 30 07:45:02 CEST 2006
- Previous message: [Python-Dev] Remove METH_OLDARGS?
- Next message: [Python-Dev] Remove METH_OLDARGS?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Neal Norwitz wrote:
How can users find the implicit use of METHOLDARGS in code like this:
static struct PyMethodDef gestaltmethods[] = { {"gestalt", gestaltgestalt}, {NULL, NULL} /* Sentinel */ }; static PyMethodDef SwiMethods[]= { { "swi", swiswi,0}, { NULL, NULL} };
They can't know they do. Of course, if they do, they likely also use PyArg_Parse to process the arguments.
OTOH, perhaps a deprecation warning on PyArgsParse() is sufficient? What about that? It doesn't address other cases where OLDARGS are used without PyArgsParse though.
What other cases remain? People might have complex argument processing procedure not involving PyArg_Parse, these would just break with a runtime error in Py3k. If the module is maintained, it should be easy to fix it. If the module is unmaintained, producing a warning now might not help, either.
Regards, Martin
- Previous message: [Python-Dev] Remove METH_OLDARGS?
- Next message: [Python-Dev] Remove METH_OLDARGS?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]