Skip to content

Commit 04107d3

Browse files
committed
Remove note from docs about 3.8 and deterministic, closes #646
1 parent c544f75 commit 04107d3

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

docs/python-api.rst

+1-3
Original file line numberDiff line numberDiff line change
@@ -2711,16 +2711,14 @@ By default, the name of the Python function will be used as the name of the SQL
27112711
27122712
print(db.execute('select rev("hello")').fetchone()[0])
27132713
2714-
Python 3.8 added the ability to register `deterministic SQLite functions <https://sqlite.org/deterministic.html>`__, allowing you to indicate that a function will return the exact same result for any given inputs and hence allowing SQLite to apply some performance optimizations. You can mark a function as deterministic using ``deterministic=True``, like this:
2714+
If a function will return the exact same result for any given inputs you can register it as a `deterministic SQLite function <https://sqlite.org/deterministic.html>`__ allowing SQLite to apply some performance optimizations:
27152715
27162716
.. code-block:: python
27172717
27182718
@db.register_function(deterministic=True)
27192719
def reverse_string(s):
27202720
return "".join(reversed(list(s)))
27212721
2722-
If you run this on a version of Python prior to 3.8 your code will still work, but the ``deterministic=True`` parameter will be ignored.
2723-
27242722
By default registering a function with the same name and number of arguments will have no effect - the ``Database`` instance keeps track of functions that have already been registered and skips registering them if ``@db.register_function`` is called a second time.
27252723
27262724
If you want to deliberately replace the registered function with a new implementation, use the ``replace=True`` argument:

0 commit comments

Comments
 (0)