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/2000-February/001954.html below:

[Python-Dev] __contains__ hook

[Python-Dev] __contains__ hook [Python-Dev] __contains__ hookMoshe Zadka Moshe Zadka <mzadka@geocities.com>
Wed, 2 Feb 2000 20:37:15 +0200 (IST)
On Wed, 2 Feb 2000, Guido van Rossum wrote:

> I like the idea of overloading 'in' (and 'not in') with __contains__.
> There are several issues with this patch though (apart from the fact
> that he left out the disclaimer from
> http://www.python.org/1.5/bugrelease.html :-).

Sorry: I'd d/l it and mail it later...

> Micro-nit: I want a space between 'if' and '('.  It just looks better.

Sorry: old habits die hard. Change as you will.

> But the real issue is what Moshe himself already brings up: contains
> should have a slot in the type struct, so extension types can also
> define this.
> 
> Moshe, do you feel like doing this right?

Yes, but not in the near future. Wouldn't adding a new slot break old
extension types? I'm a bit ignorant on the subject


--
Moshe Zadka <mzadka@geocities.com>. 
INTERNET: Learn what you know.
Share what you don't.




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