python - Is "from matplotlib import pyplot as plt" == "import matplotlib.pyplot as plt"? -
from matplotlib import pyplot plt  import matplotlib.pyplot plt    are above statements equivalent? more readable/better form?
even though equivalent, think there pretty argument second form import matplotlib.pyplot plt objectively more readable:
it customary use
import matplotlib.pyplot plt, suggested in matplotlib documentation (see http://matplotlib.org/users/pyplot_tutorial.html etc...) more familiar readers.import matplotlib.pyplot pltshorter no less clear.import matplotlib.pyplot pltgives unfamiliar reader hint pyplot module, rather function incorrectly assumed first form.
Comments
Post a Comment