Menu

#5 python 2.4 decimal support

closed
nobody
None
5
2005-12-15
2004-10-31
No

As there is new decimal type in python 2.4 - is it
possible to use it instead of fixedpoint?

Discussion

  • David S. Rushby

    David S. Rushby - 2004-11-10

    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.

     
  • David S. Rushby

    David S. Rushby - 2004-11-11

    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.

     
  • Oleg Deribas

    Oleg Deribas - 2004-11-12

    Logged In: YES
    user_id=281684

    Thank you very much!
    I will try to test it as soon as possible.

     
  • Oleg Deribas

    Oleg Deribas - 2005-05-06

    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'

     
  • David S. Rushby

    David S. Rushby - 2005-12-15

    Logged In: YES
    user_id=414645

    Now available in a public release (3.2a1).

     
  • David S. Rushby

    David S. Rushby - 2005-12-15
    • status: open --> closed
     

Log in to post a comment.

Auth0 Logo