def as_declarative(**kw):
 def decorate(cls):
  kw['cls'] = cls
  kw['name'] = cls.__name__
  return declarative_base(**kw)
 return decorate

def as_declarative ( ** kw ) : def decorate ( cls ) : kw [ 'cls' ] = cls kw [ 'name' ] = cls . __name__ return declarative_base ( ** kw ) return decorate
class decorator for :func: .