I just checked a preliminary implementation into CVS HEAD
(which will become 3.2). This feature is implemented
primarily in files typeconv_fixed_decimal.py and
typeconv_24plus.py, though it also touches __init__.py,
setup.py, and MANIFEST.in.
I don't know how familiar you are with CVS, but remember
that you don't need any special switches to check out HEAD
(HEAD is the default). This change doesn't affect any of
the C source code, so you don't even need to recompile if
you don't want to.
In addition to the actual translator implementation (in
typeconv_fixed_decimal.py), I added to __init__.py a
kinterbasdb.init(type_conv=200) code that sets up
translators in the same way code 100 did, except that it
uses Python 2.4's decimal module instead of the fixedpoint
module.
I wrote this implementation on my laptop late at night while
waiting for a ride. I had no previous experience with the
decimal module, and this implementation has been tested
hardly at all. Of course I'll see that it receives proper
test coverage before 3.2_pre1.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Logged In: YES
user_id=414645
This will be at the top of my agenda for 3.2_pre1, but I'm
not going to include any more features in 3.1.
Logged In: YES
user_id=414645
I just checked a preliminary implementation into CVS HEAD
(which will become 3.2). This feature is implemented
primarily in files typeconv_fixed_decimal.py and
typeconv_24plus.py, though it also touches __init__.py,
setup.py, and MANIFEST.in.
I don't know how familiar you are with CVS, but remember
that you don't need any special switches to check out HEAD
(HEAD is the default). This change doesn't affect any of
the C source code, so you don't even need to recompile if
you don't want to.
In addition to the actual translator implementation (in
typeconv_fixed_decimal.py), I added to __init__.py a
kinterbasdb.init(type_conv=200) code that sets up
translators in the same way code 100 did, except that it
uses Python 2.4's decimal module instead of the fixedpoint
module.
I wrote this implementation on my laptop late at night while
waiting for a ride. I had no previous experience with the
decimal module, and this implementation has been tested
hardly at all. Of course I'll see that it receives proper
test coverage before 3.2_pre1.
Logged In: YES
user_id=281684
Thank you very much!
I will try to test it as soon as possible.
Logged In: YES
user_id=281684
At last I have tried to use it in my application. And it
works at first glance.
I just had to comment out line 180 from __init__.py (from
CVS) as there was exception:
File "kinterbasdb\__init__.pyo", line 180, in ?
AttributeError: 'module' object has no attribute
'isc_info_isc_version'
Logged In: YES
user_id=414645
Now available in a public release (3.2a1).