← Back to team overview

savoirfairelinux-openerp team mailing list archive

Re: [Merge] lp:~savoirfairelinux-openerp/openerp-hr/department_sequence_concatination_NoneType into lp:openerp-hr

 

>> How about this?
>>   args = args or []
> 
> With this one, you will build a new list when args is an empty list, which is unnecessary.

Indeed, but personally I appreciate it's brevity, compared with a 2-line 'if' statement.

Just occurred to me this one line alternative, but it's still not as neat:
args  = [] if args is None else args
-- 
https://code.launchpad.net/~savoirfairelinux-openerp/openerp-hr/department_sequence_concatination_NoneType/+merge/212436
Your team Savoir-faire Linux' OpenERP is subscribed to branch lp:~savoirfairelinux-openerp/openerp-hr/department_sequence_concatination_NoneType.


References