On 7/19/2014 11:24 AM, Mark Lawrence wrote:
Besides that I wouldn't write the function on one line, the first.

I've seen code samples for simple functions with the definition and return statements written on one line.

Once you return your data you can do what you want with it.

Returning data from a function is probably the part I'm overlooking.

The third is really horrible in my book, YMMV.

That if/else version was something I've been thinking about doing and didn't it put it together until I wrote my email. If I couldn't write a better version, I wouldn't keep it myself.

Chris Reimer
--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to