This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author peter.otten
Recipients Big Stone, paul.moore, peter.otten, steve.dower, tim.golden, vstinner, zach.ware
Date 2017-11-06.23:27:12
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1510010832.4.0.213398074469.issue30952@psf.upfronthosting.co.za>
In-reply-to
Content
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,)
History
Date User Action Args
2017-11-06 23:27:12peter.ottensetrecipients: + peter.otten, paul.moore, vstinner, tim.golden, zach.ware, steve.dower, Big Stone
2017-11-06 23:27:12peter.ottensetmessageid: <1510010832.4.0.213398074469.issue30952@psf.upfronthosting.co.za>
2017-11-06 23:27:12peter.ottenlinkissue30952 messages
2017-11-06 23:27:12peter.ottencreate