[sugar] [PATCH] Browse "autocompletion"
Michael Stone
michael
Fri Jun 13 09:27:04 EDT 2008
On Fri, Jun 13, 2008 at 01:37:33PM +0200, Tomeu Vizoso wrote:
> + cur = self._con.cursor()
> ...
> + cur.close()
>
> Should we use try...finally blocks so we don't leak open cursors?
> Also, we could use the with statement from future.
The "with" statement (and the contextlib's @contextmanager decorator)
have worked out really well for me so far. I'd be happy to see it used
more widely throughout Sugar.
Michael
More information about the Sugar-devel
mailing list