What's the proper style for a library string function?
C.D. Reimer
chris at cdreimer.com
Sat Jul 19 14:52:49 EDT 2014
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
More information about the Python-list
mailing list