[SciPy-User] adding linear fitting routine

Alan G Isaac alan.isaac at gmail.com
Wed Dec 4 19:25:14 EST 2013


> On 05/12/2013 00:21, David J Pine wrote:
>> Of course, that's the point of designing for backwards
>> compatibility--you don't see the need for more information when you
>> write the code, otherwise you would include it.  But as code gets used,
>> you sometimes see things you didn't see before.  So it's good to write
>> code that allows for unforeseen changes.


On 12/4/2013 6:58 PM, Daniele Nicolodi wrote:
> If this is the reasoning, all functions or methods should return
> dictionaries.


Indeed, we have just seen (in this thread, if I recall
correctly) a lament that some optimization functions were
not written initially to return dictionaries.

It seems to me that the case for a named tuple will rely
primarily on its being "lightweight".  The case for
a dictionary will rely on its flexibility.  In most settings
that I imagine, flexibility will be the greater concern.
But not all.  So for a specific function or method,
it seems useful to explain why the trade-offs favor one or the
other.

fwiw,
Alan Isaac




More information about the SciPy-User mailing list