-
-
Notifications
You must be signed in to change notification settings - Fork 307
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
Semicolons are not typically used in Python code and may cause confusion #604
Comments
To the best of my knowledge, the purpose in this case is just to suppress arcane output about memory space from the figure that is generated. If removing them means regenerating all those screenshots to match, then I would prefer explaining how they can be used and how they are being used here. Do you know specifically if that suppression of output is an anomaly in in Juptyer that we are taking advantage of? Like would it only output that memory address information for the last item and by using a semi-colon we are tricking it into thinking our figure is not that last item in the cell? |
I don't know why semicolons are used here. I don't have a preference about removing them or adding an explanation about them. |
For later reference. It does seem to be a trick to assign None to the last item in the cell to suppress the printing of it.
https://stackoverflow.com/questions/8236380/why-is-semicolon-allowed-in-this-python-snippet |
What is the problem?
Semicolons aren't wrong but are not commonly used in Python code and have not been introduced in this lesson. Line breaks and indents are more critical to properly formatted Python code. Consider either explaining why semicolons are used here and no where else, or remove the semicolons.
Location of problem (optional)
https://datacarpentry.org/python-ecology-lesson/02-starting-with-data.html#quick-easy-plotting-data-using-pandas
The text was updated successfully, but these errors were encountered: