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
Blank lines in Multiple Files lesson break indentation (with fix) #68
Comments
Can you be a bit more specific about what breaks in IPython? I feel that these blank lines are important for readability. It's true that they make it a bit more difficult to copy/paste, but I'm not sure if we want to encourage copy/pasting anyhow. At least, when I teach these lessons I have students type the lines in, to get the muscle memory of writing Python code. For those reading this online after the fact, there is a |
The blank line resets the indentation, so the "data = ..." line isn't part of the loop. I agree that spaces make it more readable. The tradeoff is branching into a discussion about indentation or %paste, which is important but not part of the current topic. Also, anyone working through the material on their own won't see why it's broken. |
Yes to add it to the instructor guide. It would be nice including also other shortcuts/magics for the notebook (I learnt in my last workshop how to indent a block of code, but I forgot the trick already...) |
I'm -1 on putting more about the notebook in the core lessons, since
many people teach Python without using the Notebook. Instead, can it go
in `discussion.md` for now?
|
In "Analyzing Data from Multiple Files" python-novice-inflammation/04-files.md line 52 there's a long script for looping through files and showing three plots.
The script includes blank lines for readability. The blanks mess up the indentation when the script is run in ipython. The for loop prints three filenames, then executes subsequent lines once.
Please see my pull request.
The text was updated successfully, but these errors were encountered: