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:

  1. it customary use import matplotlib.pyplot plt , suggested in matplotlib documentation (see http://matplotlib.org/users/pyplot_tutorial.html etc...) more familiar readers.

  2. import matplotlib.pyplot plt shorter no less clear.

  3. import matplotlib.pyplot plt gives unfamiliar reader hint pyplot module, rather function incorrectly assumed first form.


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -