[Tutor] generator object
Alan Gauld
alan.gauld at yahoo.co.uk
Wed Aug 31 03:56:21 EDT 2016
On 31/08/16 05:12, monikajg at netzero.net wrote:
>
> So generator function returns generator object according to Aaron Maxwell.
I don't believe that's correct.
A generator function can return any kind of object including
basic types like numbers, bool etc.In addition, a generator
function yields values which can also be of any type.
It might be valid to say that a generator function *is* a generator
object, but I'll leave that distinction to the language lawyers
to debate.
Alan G
More information about the Tutor
mailing list