On 2016-07-22 16:41, D'Arcy J.M. Cain wrote:
If you're checking that it's a dict, there's no need to check whether it's None, because None isn't a dict either!On Fri, 22 Jul 2016 08:21:17 -0700 justin walters <walters.justi...@gmail.com> wrote:You could also replace that line with:if stock is None or type(stock) != dict:Use isinstance(). That handles classes that subclass dict as well.
-- https://mail.python.org/mailman/listinfo/python-list