O'Reilly logo
  • Pedro Salgado thinks this is interesting:

args = [] if args is None else args.copy()

From

Cover of Odoo Development Cookbook

Note

if this gives you an error like: args = [] if args is None else args.copy() AttributeError: 'list' object has no attribute 'copy'

you need to do this: import copy (...) args = [] if args is None else copy.copy(args)