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?
The text was updated successfully, but these errors were encountered:
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
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 useimport 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 useimport ___ as __
, I think it is a good idea to change all the following lessons that use in particular numpy and matplotlib to be written usingimport 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 simplyimport
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?
The text was updated successfully, but these errors were encountered: