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/2006-February/060707.html below:

[Python-Dev] Baffled by PyArg_ParseTupleAndKeywords modification

[Python-Dev] Baffled by PyArg_ParseTupleAndKeywords modification [Python-Dev] Baffled by PyArg_ParseTupleAndKeywords modificationJeremy Hylton jeremy at alum.mit.edu
Fri Feb 10 19:32:51 CET 2006
On 2/10/06, Guido van Rossum <guido at python.org> wrote:
> On 2/10/06, Tim Peters <tim.peters at gmail.com> wrote:
> >     [Jeremy]
> >     I added some const to several API functions that take char* but
> >     typically called by passing string literals.
> >
> > If he had _stuck_ to that, we wouldn't be having this discussion :-)
> > (that is, nobody passes string literals to
> > PyArg_ParseTupleAndKeywords's kws argument).
>
> Is it too late to revert this one?

The change is still beneficial to C++ programmers, so my initial
preference is to keep it.  There are still some benefits to the other
changes, so it's isn't a complete loss if we revert it.

> Is there another way to make C++ programmers happy (e.g. my having a
> macro that expands to const when compiled with C++ but vanishes when
> compiled with C?)

Sounds icky.  Are we pretty sure there is no way to do the right thing
in plain C?  That is, declare the argument as taking a set of const
strings and still allow non-const strings to be passed without
warning.

Jeremy
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