Ian Bicking: the old part of his blog

Re: Another plan: SQLObject 0.7

Maybe it's a bit late, but you already don't need to use eval for the dynamically generated lambdas.

e.g. this:

getter = eval('lambda self: self._SO_loadValue(%s)' % repr(instanceName(name)))

could be done like this:

getter = lambda self: self._SO_loadValue(repr(instanceName(name)))

or even done without using nested_scopes at all:

getter = lambda self, name=repr(instanceName(name)): self._SO_loadValue(name)
Comment on Another plan: SQLObject 0.7
by Andrew