On 15 April 2012 18:13, Raymond Hettinger <raymond.hettin...@gmail.com> wrote:
> We should publish some advice on creating content managers.
>
> Context managers are a general purpose tool but have a primary
> use case of creating and releasing resources.  This creates an
> expectation that that is what the context managers are doing unless
> they explicitly say otherwise.

I'd have said this was unnecessary, but the sqlite example shows it
isn't, so +1 from me.

As a database specialist, the sqlite behaviour you show is completely
non-intuitive :-(

Paul.
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to