Strange Behavior with Old-Style classes and implicit __contains__

Steven D'Aprano steve at
Thu Apr 12 06:23:08 CEST 2007

On Thu, 12 Apr 2007 00:32:32 -0300, Gabriel Genellina wrote:

> First I want to say that __getitem__ should raise IndexError, not  
> KeyError, to indicate "not found"

How do you know the Original Poster's class was meant to be a sequence
rather than a mapping?


More information about the Python-list mailing list