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

Make Variable Naming Consistent #203

Open
jdeisenberg opened this issue Nov 30, 2021 · 1 comment
Open

Make Variable Naming Consistent #203

jdeisenberg opened this issue Nov 30, 2021 · 1 comment

Comments

@jdeisenberg
Copy link
Contributor

Section 2.5 (Variable Names and Keywords) suggests using snake_case for variable names. This is done in CodeLens 2.7.5 and section 2.8 (Input).

However, once the book reaches section 6.2 (Functions that Return Values), the variables become camelCase and appear to stay that way throughout most of the remainder of the material, with exceptions such as 9.16 (Looping and Counting), which has the variable lettercount all run together.

Sections 13.6 (Principles for using Exceptions) and 13.8 (The finally clause of the try statement) return to snake_case. Parenthetically, the examples in section 13.6 are centered, which is definitely not good Python style.

Chapter 15 also uses snake_case, but returns to camelCase for chapter 17.

(Note: the PDF for Think Python at https://greenteapress.com/thinkpython2/thinkpython2.pdf appears to use snake_case consistently.)

@bnmnetp
Copy link
Member

bnmnetp commented Dec 1, 2021

Thanks @jdeisenberg for this issue and for your past contributions to the project!

We definitely should be consistent. But our version of the book has diverged so far from the original that it is hard to keep everything from the original in sync. git is good but only so good.

By now, the Runestone Version, has many many additional authors who have contributed whole chapters to the book. We need someone other than me to be the owner and keep things consistent. There are only so many hours in a day.

PRs to fix any of this are certainly welcome!

Brad

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

No branches or pull requests

2 participants