[orm-devel] The NUMERIC problem float-ing around (no more!)
Sat, 7 Dec 2002 07:39:05 +0100
>Hey, that sounds like a nice solution. If I understand you correctly, I
>can choose to use the new numeric/Column type (and install and use
>FixedPoint) or I can choose to use customType and handle any needed
>conversions myself? I don't care to use FixedPoint ( I don't know
>anything about it, and I may change my mind later, but for now I crave
Not quite. You'd have to write your own datatype/column pair, which
probably isn't worth the effort.
>Is FixedPoint now a requirement of orm?
No it isn't. The import statement in orm.adapters.pgsql.datasource is
in a try: block and the except: will define a minimal class
FixedPoint which is a wraper around a Python string, really.
If you only want the NUMERIC data as a string and simply use float()
on it you can skip installing FixedPoint and use it this way. You
might want to take a look, though, doesn't seem too bad.
Perhaps I should have integrated the simple string functionality in
CustomType as a default behaviour.
_..._ Diedrich Vorberg
/ _ _ \ http://www.tux4web.de
| (o)_(o) | email@example.com
\( ) / .---.
//'._.'\ \ / \ Internet Dienstleistungen
// . \ \ \.@-@./ und 'Consulting'.
|| . \ \ /`\_/`\
|\ : / | // _ \\ Linux Rules!
\ `) ' (` /_ | \ )|_
_)``".____,.'"` (_ /`\_`> <_/ \
) )'--'( ( \__/'---'\__/