[IronPython] IronPython and polymorphism? Help with interfaces

Dino Viehland dinov at exchange.microsoft.com
Wed Jan 23 21:21:21 CET 2008


It's a feature, explicit interfaces require an explicit call  :).

From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Miha Valencic
Sent: Wednesday, January 23, 2008 12:18 PM
To: Discussion of IronPython
Subject: Re: [IronPython] IronPython and polymorphism? Help with interfaces

Thanks for help, everybody!

Both methods work:
print IPerson.Name.GetValue(Env);
print IPerson.Name.__get__(Env, None);

The downside of this approach is that one has to import the interface in question into Python explicitly.

Is this a bug or a feature? (meaning that Env.Name does not work and IPerson.Name.__get__(Env, None) works)

Thanks,
  Miha.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20080123/1b6aad74/attachment.html>


More information about the Ironpython-users mailing list