[Tutor] generator object
monikajg at netzero.net
monikajg at netzero.net
Wed Aug 31 00:12:24 EDT 2016
So generator function returns generator object according to Aaron Maxwell. But does this mean that each time yields "returns" it is a generator object? So if there are 5 yield "returns" there are 5 generator objects? Or is there always only one generator object returned by the generator functions?
Can somebody please explain?
Thank you
Monika
---------- Original Message ----------
From: Alan Gauld via Tutor <tutor at python.org>
To: "monikajg at netzero.net" <monikajg at netzero.net>
Cc: tutor at python.org
Subject: Re: [Tutor] __init__
Date: Wed, 31 Aug 2016 00:25:42 +0100
On 30/08/16 22:08, monikajg at netzero.net wrote:
> OK so somebodys remark that there is a default __init__ provided was not correct.
It depends on how you interpret default.
In so far as object is the default superclass (in v3)
and it provides an init then there is a default, but
its not part of the language per se but of the standard
object model.
> What about old style classes?
That's a very good question and I don't know the answer.
Hopefully someone else does!
Alan G
_______________________________________________
Tutor maillist - Tutor at python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
____________________________________________________________
Health News 24 (Sponsored by Content.Ad)
Granny Reveals Her Method: Don't Use Botox, Do This Instead
http://thirdpartyoffers.netzero.net/TGL3241/57c65972bb39559723662st04duc
More information about the Tutor
mailing list