 # obj1.  For each property P of obj2 not specified in obj1, the
 # corresponding value obj1[P] is set (all in a new copy of obj1) to
 # be obj2[P].
+DEBUG = false
 exports.defaults = (obj1, obj2, allow_extra) ->
     if not obj1?
         obj1 = {}

                err = "misc.defaults -- TypeError: got an unexpected argument '#{prop}' #{error()}"
                console.log(err)
                console.trace()
                throw err
    return r

# WARNING -- don't accidentally use this as a default:

        err = "misc.defaults -- TypeError: function takes inputs as an object #{error()}"
        console.log(err)
        console.trace()
        if DEBUG
            throw err
        else
            return obj2
    r = {}
    for prop, val of obj2
        if obj1.hasOwnProperty(prop) and obj1[prop]?
