Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #74828 > unrolled thread

Re: What's the proper style for a library string function?

Started by"C.D. Reimer" <chris@cdreimer.com>
First post2014-07-19 11:52 -0700
Last post2014-07-19 11:52 -0700
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: What's the proper style for a library string function? "C.D. Reimer" <chris@cdreimer.com> - 2014-07-19 11:52 -0700

#74828 — Re: What's the proper style for a library string function?

From"C.D. Reimer" <chris@cdreimer.com>
Date2014-07-19 11:52 -0700
SubjectRe: What's the proper style for a library string function?
Message-ID<mailman.12056.1405796016.18130.python-list@python.org>
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

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web