[SciPy-Dev] Design of scipy.stats

Ralf Gommers ralf.gommers at googlemail.com
Tue May 25 11:54:00 EDT 2010


On Tue, May 25, 2010 at 8:34 AM, David Goldsmith <d.l.goldsmith at gmail.com>wrote:

> On Mon, May 24, 2010 at 5:26 PM, Ralf Gommers <ralf.gommers at googlemail.com
> > wrote:
>
>>
>>
>> On Tue, May 25, 2010 at 8:13 AM, David Goldsmith <d.l.goldsmith at gmail.com
>> > wrote:
>>
>>> On Mon, May 24, 2010 at 4:58 PM, David Goldsmith <
>>> d.l.goldsmith at gmail.com> wrote:
>>>
>>>> OK, having looked at the source code (duh), I have a better idea what's
>>>> going on; correct me if I'm wrong: the idea was to make each distribution
>>>> generic up to its specification parameters, and immediately available upon
>>>> importing scipy.stats (i.e., no need to explicitly import distributions, no
>>>> need for the user to create an instance of the desired distribution).  The
>>>> former suggested the object model (i.e., classes) be used, the latter
>>>> required such classes to be instantiated at module scope on import of
>>>> distributions (which import scipy.stats does).  With this in mind, I'm
>>>> comfortable w/ the status quo as far as the code is concerned, supplemented
>>>> w/ an explanation of this (which I'll write, unless someone feels I won't do
>>>> it justice - don't be shy about telling me so, I won't take it personally)
>>>> in (module) distribution's docstring.  I do feel, however, that it would be
>>>> best if the Wiki didn't think that the instances required/possessed
>>>> docstrings, or at least warned unsuspecting editors that editing those
>>>> objects' docstrings is a waste of time; accordingly, I'll be filing a
>>>> ticket...
>>>>
>>>> DG
>>>
>>>
>>> Duh (again) I'll just change the status of each instance object to
>>> Unimportant.
>>>
>>> That doesn't fix everything, the x_gen classes should also not be edited
>> right now.
>>
>
> Why?
>

Because the patch generation doesn't work. Just last week we had the same
discussion about the Polynomial docstrings.

>
>
>> Plus they're not really unimportant.
>>
>
> Why not?  They're not returned by Python's help system.  (See earlier this
> same thread.)
>

Compare "help(alpha)" with "print alpha.__doc__" - help() is broken imho.

Cheers,
Ralf
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20100525/ef549c40/attachment.html>


More information about the SciPy-Dev mailing list