Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Bugs

[issue14705] Add 'bool' format character to PyArg_ParseTuple*

 

 

First page Previous page 1 2 Next page Last page  View All Python bugs RSS feed   Index | Next | Previous | View Threaded


report at bugs

May 5, 2012, 11:17 AM

Post #26 of 36 (118 views)
Permalink
[issue14705] Add 'bool' format character to PyArg_ParseTuple* [In reply to]

Larry Hastings <larry [at] hastings> 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 [at] bugs>
<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


report at bugs

May 5, 2012, 12:00 PM

Post #27 of 36 (115 views)
Permalink
[issue14705] Add 'bool' format character to PyArg_ParseTuple* [In reply to]

Mark Dickinson <dickinsm [at] gmail> added the comment:

Latest patch looks good to me.

----------

_______________________________________
Python tracker <report [at] bugs>
<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


report at bugs

May 5, 2012, 4:55 PM

Post #28 of 36 (116 views)
Permalink
[issue14705] Add 'bool' format character to PyArg_ParseTuple* [In reply to]

Roundup Robot <devnull [at] psf> 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 [at] bugs>
<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


report at bugs

May 5, 2012, 4:56 PM

Post #29 of 36 (115 views)
Permalink
[issue14705] Add 'bool' format character to PyArg_ParseTuple* [In reply to]

Larry Hastings <larry [at] hastings> added the comment:

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

----------

_______________________________________
Python tracker <report [at] bugs>
<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


report at bugs

May 5, 2012, 5:15 PM

Post #30 of 36 (117 views)
Permalink
[issue14705] Add 'bool' format character to PyArg_ParseTuple* [In reply to]

Raymond Hettinger <raymond.hettinger [at] gmail> 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 [at] bugs>
<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


report at bugs

May 5, 2012, 5:21 PM

Post #31 of 36 (118 views)
Permalink
[issue14705] Add 'bool' format character to PyArg_ParseTuple* [In reply to]

Larry Hastings <larry [at] hastings> 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 [at] bugs>
<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


report at bugs

May 5, 2012, 5:40 PM

Post #32 of 36 (118 views)
Permalink
[issue14705] Add 'bool' format character to PyArg_ParseTuple* [In reply to]

Roundup Robot <devnull [at] psf> 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 [at] bugs>
<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


report at bugs

May 5, 2012, 6:09 PM

Post #33 of 36 (118 views)
Permalink
[issue14705] Add 'bool' format character to PyArg_ParseTuple* [In reply to]

Changes by Larry Hastings <larry [at] hastings>:


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

_______________________________________
Python tracker <report [at] bugs>
<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


report at bugs

May 5, 2012, 9:58 PM

Post #34 of 36 (119 views)
Permalink
[issue14705] Add 'bool' format character to PyArg_ParseTuple* [In reply to]

Roundup Robot <devnull [at] psf> 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 [at] bugs>
<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


report at bugs

May 5, 2012, 11:03 PM

Post #35 of 36 (115 views)
Permalink
[issue14705] Add 'bool' format character to PyArg_ParseTuple* [In reply to]

Changes by Larry Hastings <larry [at] hastings>:


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

_______________________________________
Python tracker <report [at] bugs>
<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


report at bugs

May 7, 2012, 2:45 AM

Post #36 of 36 (117 views)
Permalink
[issue14705] Add 'bool' format character to PyArg_ParseTuple* [In reply to]

Roundup Robot <devnull [at] psf> 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 [at] bugs>
<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

First page Previous page 1 2 Next page Last page  View All Python bugs RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.