On Mon, 2007-02-26 at 00:00 -0600, Jacob Kaplan-Moss wrote:
> On 2/25/07, Chris Moffitt <[EMAIL PROTECTED]> wrote:
> > Also, I'd like to see some of the decimal related tickets worked on but
> > this may have to wait until 1.0.
> > http://code.djangoproject.com/wiki/VersionOneFeatures#DecimalField
> 
> Did anyone ever figure out if we can (legally/morally) include
> decimal.py as django.utils.decimal (for 2.3 support)?

I have concerns about this solution (dropping in the decimal module),
regardless of legal status. It just feels icky. The problem is that,
even if you are using a nice modern Python, you will need to continually
import Django's version of decimal.

Although we say that Django runs on Python 2.3, do we have to say it has
all the features that later Python versions do? I mean, if you are using
Python 2.3, you are not using decimal types in any of your code (except
in a near-future version of Django).

This would be analogous to the fact that whilst all of our database
backends support the basic functionality, some of them have extra
features and some of them are lacking certain things (e.g. referential
integrity in SQLite). We could say that FloatField converts to floats in
Python 2.3 -- with the acknowledged loss of precision -- and the
built-in decimal type in 2.4 and later. That only leaves the slightly
odd name for later versions (because it's not a float field, it's a
fixed-point field).

This isn't a showstopper or anything, but if every package went down
this road, you'd end up importing 47 different decimal modules. If
people want the decimal type, upgrading to Python 2.4 or 2.5 is the
solution. Otherwise, living without is something you already know how to
do if you are using Python 2.3 (and I say this as somebody who's written
a lot of financial code in earlier Python versions, so using floats was
not an option).

Cheers,
Malcolm



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to