Re: [IronPython] Overriding __iter__ in dict subclass

2008-02-19 Thread Dino Viehland
This one's interesting. I've got a fix for this for 2.0 on my machine - I've been looking at some other tweaks to dictionaries so we can cleanup our type system (funny how those two are related) and this fits in nicely with that. So it should be in the next release. Thanks for the report! --

[IronPython] Overriding __iter__ in dict subclass

2008-02-19 Thread Michael Foord
Bug in IronPython 1 and 2. IronPython 2.0 Alpha (2.0.0.800) on .NET 2.0.50727.832 Copyright (c) Microsoft Corporation. All rights reserved. >>> class X(dict): ... __iter__ = lambda s: s.itervalues() ... >>> a = X([(1, 'a'), (2, 'b'), (3, 'c')]) >>> for e in a: ... print e ... 1 2 3 >>> Ir