1 Jun 02:55
Re: Namespaces in documentation (was: ANN: NumPy/SciPy Documentation Marathon 2008)
Pauli Virtanen <pav <at> iki.fi>
2008-06-01 00:55:01 GMT
2008-06-01 00:55:01 GMT
ma, 2008-05-19 kello 19:20 +0200, Stéfan van der Walt kirjoitti: > Hi Johann > > 2008/5/19 Johann Cohen-Tanugi <cohen <at> slac.stanford.edu>: > > yesterday when I started to modify the doctest I used import numpy. It > > is easy enough to change to import numpy as np, but please let's get > > that out of the way once and for all. I have no preference between the 2. > > Keep using numpy.func for now. When this thread comes to a > conclusion, I shall do a search and replace if necessary. I took the liberty of changing this in http://projects.scipy.org/scipy/numpy/wiki/CodingStyleGuidelines as I think this issue should be settled sometime soon as changing the examples later is not very productive work. It now says: - Docstring examples may assume ``import numpy`` in numpy and ``import scipy`` in scipy. - ``See Also`` sections should use the full namespaced name. For targets in the same module as the documented one, omitting all namespace prefixes is OK, though. These choices seemed simple, understandable without knowing the consensus about "good import abbreviations", and avoiding the "from foo import *" practice. If you have objections, let's restart the discussion.(Continue reading)
RSS Feed