'Set all field attributes at once (with slot defaults).'

def set_all_attrs(self, attrs):

    assign = object.__setattr__
    for (key, val) in self._slots.iteritems():
        assign(self, key, attrs.pop(key, val))
    if attrs:
        assign(self, '_attrs', attrs)
