A
Alan Franzoni
Hello,
I was looking for an ABC for generators in python. While there's a
types.GeneratorType type object - which can't be used directly and it's
not an abc - and many collections-related ABCs in the collections
module, there's no way to say a user-defined class as a generator, even
though it could expose the very same interface as a builtin, yield-based
generator.
I think it would be pretty useful.
comments?
I was looking for an ABC for generators in python. While there's a
types.GeneratorType type object - which can't be used directly and it's
not an abc - and many collections-related ABCs in the collections
module, there's no way to say a user-defined class as a generator, even
though it could expose the very same interface as a builtin, yield-based
generator.
I think it would be pretty useful.
comments?