[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Default parameter values
- From: Grey Knight <tinyplasticgreyknight@...>
- Date: Thu, 30 Nov 2017 19:25:38 +0000 (UTC)
The equivalent to this one in Python regularly trips people up because it reuses the same object (i.e. the expression is evaluated once), whereas people often expect it will create new objects.
Something to think about!
--
Grey Knight
On Thursday, November 30, 2017, 6:28:59 PM GMT, Egor Skriptunoff <egor.skriptunoff@gmail.com> wrote:
> One more example:
>
> function Class:new(obj={})
>