[Python-Dev] [Python-checkins] cpython: Fix #13327. Remove the need for an explicit None as the second argument to (original) (raw)
Brian Curtin brian.curtin at gmail.com
Sun Nov 6 20:54:11 CET 2011
- Previous message: [Python-Dev] [Python-checkins] cpython: Fix #13327. Remove the need for an explicit None as the second argument to
- Next message: [Python-Dev] Failed issue tracker submission
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Sun, Nov 6, 2011 at 13:46, Benjamin Peterson <benjamin at python.org> wrote:
2011/11/6 brian.curtin <python-checkins at python.org>:
- - if (!PyArgParseTuple(args, "O&O:utime", + PyObject* arg = NULL; You could set arg = PyNone 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.
Ah, good point. I'm going to be making this same change to the other functions in utime family, so I'll look at updating this one and change the others accordingly.
- Previous message: [Python-Dev] [Python-checkins] cpython: Fix #13327. Remove the need for an explicit None as the second argument to
- Next message: [Python-Dev] Failed issue tracker submission
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]