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

Daniel Dalton d.dalton at iinet.net.au
Tue Mar 24 12:26:52 CET 2009


On Mon, Mar 23, 2009 at 03:12:19PM -0700, grocery_stocker wrote:
> So what's the difference between generating a value and returning a
> value?

Well when you return, you would use the "return" keyword, I would
imagine... I guess generating could mean many things, you can generate a
value by operating on something, but I guess this does imply returning a
value, because the function returning the value is generating a new
value... But, I know for sure that when you return a value it is the
information the function returns to the caller after operating on either
no, or some arguments.

Daniel.



More information about the Python-list mailing list