try pattern for database connection with the close method

Mario Figueiredo marfig at gmail.com
Sun Feb 22 18:35:41 EST 2015


On Sat, 21 Feb 2015 16:22:36 +0100, Peter Otten <__peter__ at web.de>
wrote:

>
>Why would you care about a few lines? You don't repeat them, do you? Put the 
>code into a function or a context manager and invoke it with

Thanks for the suggestions that followed.



More information about the Python-list mailing list