On 02 February 2000, Guido van Rossum said: > 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 :-). I agree at a language level; the current way to "overload" 'in' is... ummm... weird. It seems like there's a a simple and natural "magic method" corresponding to almost every operator, so any operators that *don't* get that treatment are second-class citizens. As for the implementation of __contains__, I'm just not familiar enough with Python internals to comment. I'll let the rest of you argue over that. Greg
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