# You can use local variables as the dictionary title="..." isbn="...." cursor.execute(sql, locals())
class Spam: def __init__(a=1, b=2, c=3, d="four", .. lots args ..): self.__dict__.update(locals()) del self.self