>> 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.

-- 
Mailing list: https://launchpad.net/~savoirfairelinux-openerp
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~savoirfairelinux-openerp
More help   : https://help.launchpad.net/ListHelp

Reply via email to