Re: [ANN] pysqlite 2.1.0 released
- From: Gerhard Häring <gh@xxxxxxxxxxx>
- Date: Mon, 16 Jan 2006 11:19:28 +0100
Alex Martelli wrote:
Gerhard Häring <gh@xxxxxxxxxxx> wrote: ...
An optimized shortcut has been enabled to retrieve Unicode strings for non-ASCII data, but bytestrings for non-ASCII text:
con.text_factory = sqlite.OptimizedUnicode
I assume you mean "ASCII text" rather than "non-ASCII text" here?
You're right. I stole this idea from APSW, another SQLite wrapper, which does this by default in order to reduce memory usage and increase performance a little bit for the common use case of ASCII text.
You might argue that that this is premature optimization, but things like this do make a difference if you process a lot of text.
Using this feature should be pretty compatible to the default of always using Unicode, because `unicode` and `str` have pretty much the same interface. But I wasn't 100 % sure, so I kept the old pysqlite default of Unicode only and made the optimized case using OptimizedUnicode an option.
At any rate, my compliments for a new release (which looks great!) of a most excellent module!
Thanks :-)
-- Gerhard .
- References:
- [ANN] pysqlite 2.1.0 released
- From: Gerhard Häring
- Re: [ANN] pysqlite 2.1.0 released
- From: Alex Martelli
- [ANN] pysqlite 2.1.0 released
- Prev by Date: Re: instance attributes not inherited?
- Next by Date: Class __init__ trouble
- Previous by thread: Re: [ANN] pysqlite 2.1.0 released
- Next by thread: Clear Thinking Power for Comp Developers
- Index(es):
Relevant Pages
|