News for hackers. Stuff that matters.
Re:Show HN: Pydb – a lightweight database with Python syntax... by emehrkay on Saturday January 28, 2017 @04:56PM (#13509659)
I typically do, but i don't know if it is the most "pythonic"

   def func(list_arg=None, dict_arg=None):
       list_arg = list_arg or []
       dict_arg = dict_arg or {}
Re:Show HN: Pydb – a lightweight database with Python syntax... by moreati on Saturday January 28, 2017 @06:26PM (#13510274)
It's not ideal. For instance if I as the caller wished to provide an empty dict-like object (e.g. dict_arg=collections.OrderedDict()), then your code would silently ignore it, and use a new dict.

Instead of checking for any object that evaluates to False, you should explicitly check for None, e.g.

   def func(list_arg=None, dict_arg=None):
       if list_arg is None:
           list_arg = []
       ...