[Erp5-dev] Default parameter (list) [eg] in OrderBuilder - which way is better?
Jérome Perrin
jerome at nexedi.com
Fri Jul 18 14:11:58 CEST 2008
Le lundi 16 juin 2008 à 09:55 +0200, Łukasz Nowak a écrit :
> Hello,
>
> On 2008-06-12, 11:35:13
> Mikolaj Antoszkiewicz <mikolaj at erp5.pl> wrote:
>
> (...)
> > Arghh, sorry, sorry, my bad! Of course I meant MUTABLES and list
> is
> > of course mutable.
>
> Having in mind what you said, I've created another patch, which is
> initialising list in case of parameter passed as None.
Yes, this is the right way of doing.
Then question is: is this code just looking wrong or there's actually a
case where None is passed as movement_list ? in this case, the caller
might be wrong.
Jérome
More information about the Erp5-dev
mailing list