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

Using "import ___ as __" in later lessons #338

kkiesling opened this Issue Dec 19, 2016 · 1 comment


None yet
4 participants

kkiesling commented Dec 19, 2016

At the end of the first Python lesson, there is mention of when actually using numpy, scientists using use it as import numpy as np. Similarly, it is common to use import matplotlib.plyplot as plt to save on typing. Since it is mentioned at the end of the first lesson that it is common practice to use import ___ as __, I think it is a good idea to change all the following lessons that use in particular numpy and matplotlib to be written using import as. These two libraries get used throughout the rest of the lessons and by reminding them at the beginning of the lesson that we can write it this way is a good way to teach them that this can be done. And there would still be lessons that use just simply import which should remind them that it can be used either way.

The only reason I did not go ahead and change this and make a PR is because I am wondering if this topic has been addressed before. Is this seen as a cognitive overload when teaching the lessons? Has there been any historic discussion on this topic?


This comment has been minimized.


tbekolay commented Dec 29, 2016

Hi @kkiesling, thanks for checking first! We have indeed debated this topic before; we used to use the import ... as ... syntax but dropped it in #61, which is where the bulk of the debate happened. We also added a note about the syntax to our frequently argued issues section. The issues in that section are unlikely to be revisited since there was significant debate about it.

rgaiacs pushed a commit to rgaiacs/swc-python-novice-inflammation that referenced this issue May 6, 2017

Merge pull request swcarpentry#338 from gvwilson/expiry-message
Message to send out when training sessions time out

maxim-belkin pushed a commit that referenced this issue Aug 22, 2018

Merge pull request #338 from rgaiacs/336
Fix to initialize new lessons
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment