[Bf-python] integrating lib iter types
Joe Eagar
joeedh at gmail.com
Mon Feb 26 22:43:24 CET 2007
Ed Blake wrote:
> Maybe put the __iter__ method in the submodules?
>
> Ex.
> obj = Blender.Object.New('Empty', 'test')
> # or
> for obj in Blender.Object:print obj.name
>
> Modules are (seem like?) just objects, no reason (in theory) they can't have
> an __iter__ method right?
>
>
I don't think you can add an iteration protocol handler to a module.
The point of the new iterators is basically to replace the modules with
iterator objects, though so it's really the same thing (just different
names).
Joe
More information about the Bf-python
mailing list