What is a function parameter =[] for?
BartC
bc at freeuk.com
Sun Nov 22 19:37:32 EST 2015
On 23/11/2015 00:04, Mark Lawrence wrote:
> On 22/11/2015 23:44, Steven D'Aprano wrote:
>> On Mon, 23 Nov 2015 12:21 am, BartC wrote:
>>
>>> But if it's used for static storage, then why not just use static
>>> storage? That's a simpler and more general concept than memoisation.
>>
>> /head-desk
>>
>> "But if it's used for cooking, why not just cook? That's a simpler and
>> more
>> general concept than roasting."
With 'it' being a washing machine perhaps? But I'll let this other chap
have the last word as he puts it across better:
> Steven D'Aprano wrote:
>> Memoisation isn't "esoteric", it is a simple, basic and widely-used
>> technique used to improve performance of otherwise expensive functions.
On 22/11/2015 23:43, Gregory Ewing wrote:
> That may be true, but I don't think it's a good example
> of a use for a shared, mutable default value, because
> it's arguably an *abuse* of the default value mechanism.
> What happened to "Please do not feed the trolls"?
You mean, people with different opinions?
I think I'm done here.
--
Bartc
More information about the Python-list
mailing list