Mailing List Archive

1 2  View All
[issue14705] Add 'bool' format character to PyArg_ParseTuple* [ In reply to ]
Larry Hastings <larry@hastings.org> added the comment:

> I hope I haven't made a lot of mistakes in the previous sentence.

It depends, do you consider three "a lot"? ;-)


Attached is a new patch removing 'P'. (The regrtest is still running but I don't expect any failures.) I'm guessing I won't get any further feedback. So unless I hear otherwise I'll check it in tomorrow.

----------
Added file: http://bugs.python.org/file25468/larry.parse.tuple.p.4.diff

_______________________________________
Python tracker <report@bugs.python.org>
<http://bugs.python.org/issue14705>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue14705] Add 'bool' format character to PyArg_ParseTuple* [ In reply to ]
Mark Dickinson <dickinsm@gmail.com> added the comment:

Latest patch looks good to me.

----------

_______________________________________
Python tracker <report@bugs.python.org>
<http://bugs.python.org/issue14705>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue14705] Add 'bool' format character to PyArg_ParseTuple* [ In reply to ]
Roundup Robot <devnull@psf.upfronthosting.co.za> added the comment:

New changeset bc6d28e726d8 by Larry Hastings in branch 'default':
Issue #14705: Add 'p' format character to PyArg_ParseTuple* for bool support.
http://hg.python.org/cpython/rev/bc6d28e726d8

----------
nosy: +python-dev

_______________________________________
Python tracker <report@bugs.python.org>
<http://bugs.python.org/issue14705>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue14705] Add 'bool' format character to PyArg_ParseTuple* [ In reply to ]
Larry Hastings <larry@hastings.org> added the comment:

Eh, it was ready, why wait? Thanks everybody for your feedback!

----------

_______________________________________
Python tracker <report@bugs.python.org>
<http://bugs.python.org/issue14705>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue14705] Add 'bool' format character to PyArg_ParseTuple* [ In reply to ]
Raymond Hettinger <raymond.hettinger@gmail.com> added the comment:

I would have expected a bool parse code to insist on a boolean, so that:

int x;
PyArg_ParseTupleAndKeywords(args, kwds, "p:func", &x);

would behave the same as:

PyObject *o;
int x;
PyArg_ParseTupleAndKeywords(args, kwds, "O!:func", &PyBool_Type, &o);
x = o == Py_True;

----------
nosy: +rhettinger

_______________________________________
Python tracker <report@bugs.python.org>
<http://bugs.python.org/issue14705>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue14705] Add 'bool' format character to PyArg_ParseTuple* [ In reply to ]
Larry Hastings <larry@hastings.org> added the comment:

> I would have expected a bool parse code to insist on a boolean,

I originally had a second form ('P') that insisted on a boolean as you suggest. But nobody could come up with a use case. So I removed it in the final patch. Please see this issue for the discussion.

If you have a use case for it I'd be happy to revive it and check it in.

----------

_______________________________________
Python tracker <report@bugs.python.org>
<http://bugs.python.org/issue14705>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue14705] Add 'bool' format character to PyArg_ParseTuple* [ In reply to ]
Roundup Robot <devnull@psf.upfronthosting.co.za> added the comment:

New changeset 709850f1ec67 by Larry Hastings in branch 'default':
Update Misc/NEWS for issues #14127 and #14705. (And, technically, #10148.)
http://hg.python.org/cpython/rev/709850f1ec67

----------

_______________________________________
Python tracker <report@bugs.python.org>
<http://bugs.python.org/issue14705>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue14705] Add 'bool' format character to PyArg_ParseTuple* [ In reply to ]
Changes by Larry Hastings <larry@hastings.org>:


----------
resolution: -> fixed
stage: patch review -> committed/rejected

_______________________________________
Python tracker <report@bugs.python.org>
<http://bugs.python.org/issue14705>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue14705] Add 'bool' format character to PyArg_ParseTuple* [ In reply to ]
Roundup Robot <devnull@psf.upfronthosting.co.za> added the comment:

New changeset 05274ab06182 by Larry Hastings in branch 'default':
Update Misc/NEWS for issues #14127 and #14705. (And, technically, #10148.)
http://hg.python.org/cpython/rev/05274ab06182

----------

_______________________________________
Python tracker <report@bugs.python.org>
<http://bugs.python.org/issue14705>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue14705] Add 'bool' format character to PyArg_ParseTuple* [ In reply to ]
Changes by Larry Hastings <larry@hastings.org>:


----------
status: open -> closed

_______________________________________
Python tracker <report@bugs.python.org>
<http://bugs.python.org/issue14705>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue14705] Add 'bool' format character to PyArg_ParseTuple* [ In reply to ]
Roundup Robot <devnull@psf.upfronthosting.co.za> added the comment:

New changeset e4617650f006 by Larry Hastings in branch 'default':
Issue #14705: Added support for the new 'p' format unit to skipitem().
http://hg.python.org/cpython/rev/e4617650f006

----------

_______________________________________
Python tracker <report@bugs.python.org>
<http://bugs.python.org/issue14705>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com

1 2  View All