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: Advertise underscore_separation for function names #265

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions ch05construction/02conventions.ipynb.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def add_to_reaction(a_name,
# ## Naming Conventions

# %% [markdown]
# [Camel case](https://en.wikipedia.org/wiki/Camel_case) is used in the following example, where class name is in UpperCamel, functions in lowerCamel and underscore_separation for variables names. This convention is used broadly in the python community.
# [Camel case](https://en.wikipedia.org/wiki/Camel_case) is used in the following example, where class name is in UpperCamel, functions in lowerCamel and underscore_separation for variable names.

# %%
class ClassName:
Expand All @@ -133,14 +133,12 @@ def methodName(variable_name):


# %% [markdown]
# This other example uses underscore_separation for all the names.
# This other example uses underscore_separation for variable and function names, and CamelCase for class names. This convention is used broadly in the python community.

# %%
class class_name:
class ClassName:
def method_name(a_variable):
m_instance_variable = a_variable


# %% [markdown]
# ## Hungarian Notation

Expand Down