On Fri, Feb 08, 2008 at 12:41:54PM -0600, Christopher Singley wrote:
> I guess the mapping Decimal <-> str ought to be pretty easy, since it's 
> supported by Python's decimal module.

   I don't remember Decimal can do conversion to string and back from
string preserving precision. Are you talking about converting to
floating-point string? str(Decimal("1.1")) => '1.1'? I don't know if the
conversion preserves all digits. But if it does - that's the way to go, of
course.

> Are we talking about modifying sqlobject.sqlite.sqliteconnection.__init__() 
> to 
> define adapter/converter function and register them with pysqlite?

   Yes.

> Wouldn't 
> that just be about 4 lines of code?

   Plus tests, plus at least a line in News.txt, plus thinking if it breaks
something for those who now use floats with DecimalCol.

> You'll have to pardon me.  I don't mind doing work, but looking at the 
> SQLObject source code makes my head spin a little bit.

   Is it really that bad?

Oleg.
-- 
     Oleg Broytmann            http://phd.pp.ru/            [EMAIL PROTECTED]
           Programmers don't die, they just GOSUB without RETURN.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
sqlobject-discuss mailing list
sqlobject-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to