[SciPy-dev] Namespaces in documentation (was: ANN: NumPy/SciPy Documentation Marathon 2008)

Pauli Virtanen pav@iki...
Sat May 31 19:55:01 CDT 2008


ma, 2008-05-19 kello 19:20 +0200, Stéfan van der Walt kirjoitti:
> Hi Johann
> 
> 2008/5/19 Johann Cohen-Tanugi <cohen@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.

	Pauli

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digitaalisesti allekirjoitettu viestin osa
Url : http://projects.scipy.org/pipermail/scipy-dev/attachments/20080601/903acf93/attachment-0001.bin 


More information about the Scipy-dev mailing list