On Wed, Dec 22, 2004 at 03:27:53PM +1300, Peter Butler wrote:
> Thanks very much for the advice, I thought there must be a nicer way to
> do it. I ended up using apply() with the class name and the keyword
> dictionary.
You only need apply() for very old Python versions. In newer Python
(and SQLObject requires such a new Python) you can just use the
following simple syntax:
args = [...]
keywords = {...}
function(*args, **keywords)
> I tried _lazyUpdate = True and it does half of what I need (i.e. defers
> updates to the database until syncUpdate() is called). Is there a
> similar mechanism for deferring inserts?
There is no, because when you create an object, it have to know its
id, so SQLOBject does INSERT and asks for new id.
Oleg.
--
Oleg Broytmann http://phd.pp.ru/ ph...@ph...
Programmers don't die, they just GOSUB without RETURN.
|