lua-users home
lua-l archive

Re: Default parameter values

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


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={})
> 

AltStyle によって変換されたページ (->オリジナル) /