Peter Otten <__pete...@web.de> added the comment:

A possible workaround is to use create_function():

>>> import sqlite3, math
>>> db = sqlite3.connect(":memory:")
>>> db.execute("select sin(?);", (math.pi,)).fetchone()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
sqlite3.OperationalError: no such function: sin
>>> db.create_function("sin", 1, math.sin)
>>> db.execute("select sin(?);", (math.pi,)).fetchone()
(1.2246467991473532e-16,)

----------
nosy: +peter.otten

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue30952>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to