Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return immediately #235

Merged
merged 1 commit into from
Dec 17, 2017
Merged

Return immediately #235

merged 1 commit into from
Dec 17, 2017

Conversation

Stranger6667
Copy link
Contributor

Trivial changes, without extra variables

@albertyw
Copy link
Member

I personally prefer the style of only returning singular variables instead of expressions. Returning a singular variable makes functions easier to debug because one can insert a single print/log line without splitting the return and the expression that generates the returned value. It also more explicitly declares the meaning of the value returned rather than having to guess the value only based on the return expression and function name.

The change of selfs -> self is good.

@albertyw albertyw self-requested a review December 17, 2017 03:18
@avelis
Copy link
Collaborator

avelis commented Dec 17, 2017

@Stranger6667 I am fine with the consolidation effort here to reduce trivial execution lines. It does come at the cost of some readability but I think it's minor.

@avelis avelis merged commit 21e31ee into jazzband:master Dec 17, 2017
@avelis
Copy link
Collaborator

avelis commented Dec 17, 2017

@Stranger6667 Thanks for your contribution to the library. Much appreciated!

@Stranger6667 Stranger6667 deleted the return-immediately branch December 17, 2017 22:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants