Re: [Tutor] Prescriptive vs descriptive docstring

2012-05-11 Thread Alan Gauld
On 11/05/12 04:41, Kal Sze wrote: PEP 257 says that docstrings should be written in a prescriptive way (i.e. using the imperative mood) instead of a descriptive way (indicative mood). This seems like a rather odd recommendation. Since the docstring is supposed to tell the programmer *how* to use

[Tutor] pip errors for numpy, scipy matplotlib

2012-05-11 Thread Bjorn Madsen
Hi, when attempting to use pip to install numpy, scipy matplotlib I get a mile of errors. There is simply too much information printed - so it must be a systematic error (http://paste.ubuntu.com/982180/). What am I missing/doing wrong? Kind Regards, Bjorn __

Re: [Tutor] pip errors for numpy, scipy matplotlib

2012-05-11 Thread Jerry Hill
On Fri, May 11, 2012 at 2:42 PM, Bjorn Madsen wrote: > Hi, > when attempting to use pip to install numpy, scipy matplotlib I get a mile > of errors. There is simply too much information printed - so it must be a > systematic error (http://paste.ubuntu.com/982180/). What am I missing/doing > wrong?

Re: [Tutor] Prescriptive vs descriptive docstring

2012-05-11 Thread Steven D'Aprano
Kal Sze wrote: Hello, PEP 257 says that docstrings should be written in a prescriptive way (i.e. using the imperative mood) instead of a descriptive way (indicative mood). PEP 257: http://www.python.org/dev/peps/pep-0257/ For those who don't know English grammatical terms, here are some examp

Re: [Tutor] Sorting the Parts of a Dictionary into a List

2012-05-11 Thread Steven D'Aprano
Jacob Bender wrote: The total function works when it returns the strength of a neuron, but I don't think the "sorted" function is the best because, with its current configuration, it returns a type error. I have been doing python for several years now. I don't know EVERYTHING there is to know, b