#7777: DecimalField validation ignores infinity and nan
---------------------------------------------+------------------------------
Reporter: thebitguru | Owner: nobody
Status: new | Milestone:
Component: Core framework | Version: SVN
Resolution: | Keywords:
Stage: Design decision needed | Has_patch: 0
Needs_docs: 0 | Needs_tests: 0
Needs_better_patch: 0 |
---------------------------------------------+------------------------------
Comment (by thebitguru):
Replying to [comment:4 kratorius]:
> In most common cases, a user expects DecimalField to validate against
"real numbers", not including inf and nan. What's about adding some
optional parameter to DecimalField? Something like allow_inf and allow_nan
should cover special needs and doesn't break backwards compatibility.
From your reply it isn't clear whether the default for allow_{inf,nan}
should be True or False, so I would like to clarify. For backwards
compatibility, these would have to be True (i.e. ''allow'' inf and nan),
but I think this is a case where it is probably OK to break backwards
compatibility and default to False (i.e. ''don't'' allow inf and nan)
since, like you said, that is probably what most people are expecting
anyways.
--
Ticket URL: <http://code.djangoproject.com/ticket/7777#comment:5>
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
-~----------~----~----~----~------~----~------~--~---