[Python-ideas] Non-boolean return from __contains__

Nick Coghlan ncoghlan at gmail.com
Sun Jul 25 23:28:19 CEST 2010


On Mon, Jul 26, 2010 at 7:20 AM, Bruce Leban <bruce at leapyear.org> wrote:
> Let me see if I understand this:
>
> False in [False]
>
> Returns True now but would return False with your change.

No, that would be unaffected, since builtin containers would retain
their current semantics.

Raymond's objections apply though - using syntax rather than a method
makes the language noticeably more complicated for minimal gain.

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia



More information about the Python-ideas mailing list