Code review comment for lp:~savoirfairelinux-openerp/openerp-hr/department_sequence_concatination_NoneType

Revision history for this message
Daniel Reis (dreis-pt) wrote :

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

« Back to merge proposal