From 33109a142b1c94753b29eff6efe14c1538234bcb Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Fri, 28 May 2010 21:55:10 +0000 Subject: [PATCH] Issue #8837: Remove "O?" format of PyArg_Parse*() functions. The format is no used anymore and it was never documented. --- Misc/NEWS | 3 +++ Python/getargs.c | 11 ----------- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/Misc/NEWS b/Misc/NEWS index 9a8da70003b..2ab9640764e 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -12,6 +12,9 @@ What's New in Python 3.2 Alpha 1? Core and Builtins ----------------- +- Issue #8837: Remove "O?" format of PyArg_Parse*() functions. The format is no + used anymore and it was never documented. + - Issue #2844: Make int('42', n) consistently raise ValueError for invalid integers n (including n = -909). diff --git a/Python/getargs.c b/Python/getargs.c index e8efb3c2793..ce9f152c9fe 100644 --- a/Python/getargs.c +++ b/Python/getargs.c @@ -1292,17 +1292,6 @@ convertsimple(PyObject *arg, const char **p_format, va_list *p_va, int flags, else return converterr(type->tp_name, arg, msgbuf, bufsize); - } - else if (*format == '?') { - inquiry pred = va_arg(*p_va, inquiry); - p = va_arg(*p_va, PyObject **); - format++; - if ((*pred)(arg)) - *p = arg; - else - return converterr("(unspecified)", - arg, msgbuf, bufsize); - } else if (*format == '&') { typedef int (*converter)(PyObject *, void *);