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

Style + version conventions #6

Open
timql opened this issue Oct 4, 2016 · 1 comment
Open

Style + version conventions #6

timql opened this issue Oct 4, 2016 · 1 comment

Comments

@timql
Copy link
Contributor

timql commented Oct 4, 2016

Just to make everything more consistent as we start to push out more code, could we settle on some style conventions? Some things come to mind:

  • 4 spaces for indentation
  • 80 character line limit
  • camel case for classes (e.g., MyClass), snake case for everything else (e.g., my_variable, my_function) (and I suppose dashes for file/directory names, like policy-smoothing).
  • docstring for every function explaining at a minimum what it does, and preferably what inputs are expected, and what it returns and possibly what exceptions it raises.

Are these ok with everyone, and does anyone have any to add? We could/should eventually put these into a readme.

Also, we should also settle on what versions of things we're using. In particular, @benlawson 's amazon pricing script uses Python 3, but @ch3njust1n 's code uses Python 2. Is there a reason not to use Python 3 for everything?

@ch3njust1n
Copy link

Ok. Sounds good. No particular reason why I'm using Python 2. It's just what's on my machine. Python 3 is fine.

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