• David Warde-Farley's avatar
    Fix mutable default arguments (config.foo values). · fbfb0081
    David Warde-Farley 提交于
    config.blah should not be used as a default argument as the values can
    change during execution, but default arguments are only evaluated at
    function definition time. The correct idiom is to use a sentinel value
    such as None and then check for it, and read out the config value in the
    function body.
    fbfb0081
basic.py 217.6 KB