#4807: Decimal regex doesn't support a case where no leading numbers are used
---------------------------------------+------------------------------------
   Reporter:  [EMAIL PROTECTED]  |                Owner:  adrian    
     Status:  new                      |            Component:  Validators
    Version:  SVN                      |           Resolution:            
   Keywords:                           |                Stage:  Accepted  
  Has_patch:  1                        |           Needs_docs:  0         
Needs_tests:  0                        |   Needs_better_patch:  1         
---------------------------------------+------------------------------------
Comment (by mtredinnick):

 I think Chris Moffit's idea in the last comment is the right one. Let
 Python do all the work, since it's got it right already (and we should
 always strive to be compatible with Python's idea of the datatype in any
 case). It simplifies the code a lot, too, since we'll be able to tell what
 the code is doing with just a glance instead of having to always decode
 the reg-exp.
 
 The test changes aren't quite correct. If somebody enters 1.0, it should
 be cleaned to {{{Decimal('1.0')}}}, not {{{Decimal('1')}}}. They have
 different precision, as noted above.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/4807#comment:13>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to