Hello Ryan,

On 2014-05-12 5:00 AM, RjOllos wrote:
> I've been wondering if we had a consensus, or could reach one on the
> following very minor coding style issue. When a tuple is returned in a
> "return" or "yield" statement, the parenthesis are optional. In the Trac
> codebase there isn't a consistent pattern of choosing one pattern. I
> tend to prefer the minimal approach of omitting the parenthesis.
> 

Same for me. The valid use for using parentheses in return statements
would be for dealing with line continuations, but other than that for
multiple return values I prefer to be concise and omit them, it simply
looks nicer and more idiomatic.

You also wouldn't use an explicit tuple here:

  a, b, c = c, b, a

or here:

  z = [x + y for x, y in pairs]

And though we're not consistent in the Trac code base, I counted 171
"return ...,"  vs. 64 "return (...,". And below my Python/Lib/ the ratio
was even more pronounced towards that style (4/1).

-- Christian

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/trac-dev.
For more options, visit https://groups.google.com/d/optout.

Reply via email to