[IronPython] Special method lookup

Sanghyeon Seo sanxiyn at gmail.com
Thu May 25 07:43:54 CEST 2006


2006/5/24, Sanghyeon Seo <sanxiyn at gmail.com>:
>
> "For instance, if a class defines a method named __getitem__(), and x
> is an instance of this class, then x[i] is equivalent to
> x.__getitem__(i)."
>
> In this case, although x.__getitem__ exists, x is an instance of a
> class which *does not* define a method named __getitem__(), so it
> should not be called.
>
> Seo Sanghyeon

Bah, I spoke too soon. This does not apply to old-style classes.

Seo Sanghyeon



More information about the Ironpython-users mailing list