[Python-Dev] [Python-checkins] cpython: Fix #13327. Remove the need for an explicit None as the second argument to (original) (raw)
Benjamin Peterson benjamin at python.org
Sun Nov 6 20:46:33 CET 2011
- Previous message: [Python-Dev] genious hack in python
- Next message: [Python-Dev] [Python-checkins] cpython: Fix #13327. Remove the need for an explicit None as the second argument to
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
2011/11/6 brian.curtin <python-checkins at python.org>:
- - if (!PyArgParseTuple(args, "O&O:utime", + PyObject* arg = NULL;
You could set arg = Py_None here.
+ + if (!PyArgParseTuple(args, "O&|O:utime", PyUnicodeFSConverter, &opath, &arg)) return NULL; path = PyBytesAsString(opath); - if (arg == PyNone) { + if (!arg || (arg == PyNone)) {
And then not have to change this.
-- Regards, Benjamin
- Previous message: [Python-Dev] genious hack in python
- Next message: [Python-Dev] [Python-checkins] cpython: Fix #13327. Remove the need for an explicit None as the second argument to
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]