[IronPython] __delattr__ in .NET class

Slide slide.o.mix at gmail.com
Fri Dec 3 13:47:52 CET 2010

On Thu, Dec 2, 2010 at 11:35 PM, Dino Viehland <dinov at microsoft.com> wrote:
> Slide wrote:
>> I am currently implementing a module in C#. I need to be able to override the
>> __delattr__ method for one of my objects. I've put in a __delattr__ method
>> that takes a string, but it never gets called. I also tried DeleteMember
>> because I saw that around too. Is there a way to do this?
> Did DeleteMember have [SpecialName] attribute on it?  It should work if it's got
> that attribute.  The ideal way to do this is to implement IDynamicMetaObjectProvider
> so that it'll work from all languages (DeleteMember is more of a IronPython-ism).

No, it did not have [SpecialName], it works great now.




More information about the Ironpython-users mailing list