A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2011-November/114360.html below:

[Python-Dev] [Python-checkins] cpython: Fix #13327. Remove the need for an explicit None as the second argument to

[Python-Dev] [Python-checkins] cpython: Fix #13327. Remove the need for an explicit None as the second argument toBrian Curtin brian.curtin at gmail.com
Sun Nov 6 20:54:11 CET 2011
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 (!PyArg_ParseTuple(args, "O&O:utime",
>> +    PyObject* arg = NULL;
>
> You could set arg = Py_None here.
>> +
>> +    if (!PyArg_ParseTuple(args, "O&|O:utime",
>>                           PyUnicode_FSConverter, &opath, &arg))
>>         return NULL;
>>     path = PyBytes_AsString(opath);
>> -    if (arg == Py_None) {
>> +    if (!arg || (arg == Py_None)) {
>
> 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.
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4