package python; import python.HaxeIterable; import python.NativeIterator; abstract NativeIterable (NativeIterableRaw) to NativeIterableRaw from NativeIterableRaw { @:to public inline function toHaxeIterable():HaxeIterable return new HaxeIterable(this); public inline function iterator():HaxeIterator return toHaxeIterable().iterator(); public inline function getNativeIterable():NativeIterableRaw return this; public inline function getNativeIterator():NativeIteratorRaw return this.__iter__(); } typedef NativeIterableRaw = { function __iter__():NativeIterator; }