From 32f1badfec7302dd4b1fd2a60be8af40a990c30d Mon Sep 17 00:00:00 2001 From: Simon Willison Date: Tue, 8 Sep 2020 16:27:55 -0700 Subject: [PATCH] Tracer example using print, refs #150 --- docs/python-api.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/python-api.rst b/docs/python-api.rst index 9404c78..d070b86 100644 --- a/docs/python-api.rst +++ b/docs/python-api.rst @@ -67,10 +67,10 @@ You can also turn on a tracer function temporarily for a block of code using the db = Database(memory=True) # ... later - with db.tracer(tracer): + with db.tracer(print): db["dogs"].insert({"name": "Cleo"}) -Queries will be passed to your ``tracer()`` function only for the duration of the ``with`` block. +This example will print queries only for the duration of the ``with`` block. .. _python_api_execute: