]> git.ipfire.org Git - thirdparty/psycopg.git/commitdiff
Fix typo in pool with usage
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>
Fri, 12 Mar 2021 17:43:12 +0000 (18:43 +0100)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Fri, 12 Mar 2021 17:43:12 +0000 (18:43 +0100)
docs/advanced/pool.rst

index 953f04244eac34406c6b78957af2458081881d79..3ab526f5ea9e5034e9a020b5cc95032f2748b19f 100644 (file)
@@ -27,7 +27,7 @@ however, and not the necessary one; in particular the connection pool acts as
 a context manager and can be closed automatically at the end of its ``with``
 block::
 
-    with my_pool as ConnectionPool(conninfo, **kwargs):
+    with ConnectionPool(conninfo, **kwargs) as my_pool:
         run_app(my_pool)
 
     # the pool is now closed