[Python-3000] Fwd: [Python-Dev] misbehaving __contains__
Nicko van Someren
nicko at nicko.org
Tue Jan 22 21:48:25 CET 2008
On 22 Jan 2008, at 20:36, tomer filiba wrote:
> i can work on a patch, but before i start, i want to make sure it's
> accepted. the change will require sq_contains to return a PyObject,
> as well as some minor tweaks to cmp_outcome().
I don't know if your patch will be accepted but two salient questions
you should address are:
a) Will the change break much existing code?
b) Will the change substantially impact performance?
It seems to me that the answer should be 'no' to both questions, which
is a good start!
Nicko
> ---------- Forwarded message ----------
> From: Guido van Rossum <guido at python.org>
> Date: Jan 22, 2008 9:55 PM
> Subject: Re: [Python-Dev] misbehaving __contains__
> To: tomer filiba <tomerfiliba at gmail.com>
> Cc: python-dev at python.org
>
>
> The issue is that the sq_contains slot is defined as returning an int,
> while the tp_richcompare slot is defined as returning a PyObject *.
>
> Your first opportunity for changing this will be Py3k. Please submit
> a patch!
More information about the Python-3000
mailing list