What's the difference between generating a value and returning a value?

John Yeung gallium.arsenide at gmail.com
Tue Mar 24 06:10:25 CET 2009


On Mar 23, 6:12 pm, grocery_stocker <cdal... at gmail.com> wrote:
> So what's the difference between generating a value and returning a
> value?

I agree with Alan's first thought, which is that no distinction was
intended.  In my opinion, it's especially poor form to use the term
"generate" in that context when the language you are using to explain
these concepts has very specific things called "generators".

(Until I followed the link, I thought the person was talking about the
difference between functions with "return" and functions with
"yield".)

John



More information about the Python-list mailing list