[IronPython] Special method lookup

Dino Viehland dinov at exchange.microsoft.com
Wed May 24 17:27:16 CEST 2006


Thanks for the bug report - we're actually aware of this issue.  I made some small fixes while fixing other bugs that corrected this in some spots, but not all...  I've gone ahead and opened a bug to track it (we didn't have one before) so we'll get it entirely cleaned up for the next release.

Do you want to help develop Dynamic languages on CLR? (http://members.microsoft.com/careers/search/details.aspx?JobID=6D4754DE-11F0-45DF-8B78-DC1B43134038)

-----Original Message-----
From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Sanghyeon Seo
Sent: Wednesday, May 24, 2006 3:12 AM
To: Discussion of IronPython
Subject: Re: [IronPython] Special method lookup

2006/5/24, Sanghyeon Seo <sanxiyn at gmail.com>:
> Obscure. The issue is that special method lookup should only happen on
> the type, not the instance. I am not sure whether this is clearly
> specified...

Python Reference Manual 3.3. The wording is not the best. Should file a doc bug.

"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
_______________________________________________
users mailing list
users at lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com



More information about the Ironpython-users mailing list