i want to use exponential format in a texfield validated but i found an
issue:
>>> from turbogears import validators as v
>>> v.Int().to_python('12')
12
>>> v.Int().to_python(1e6)
1000000
>>>
OK, validator can handle exponential format, but i think that TG
transform all in string so internally he don's see the exponential
format of integer but an incorrect string:
>>> v.Int().to_python('1e6')
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/lib/python2.4/site-packages/formencode/api.py", line 368,
in to_python
value = tp(value, state)
File "/usr/lib/python2.4/site-packages/formencode/validators.py", line
924, in _to_python
raise Invalid(self.message('integer', state),
File "/usr/lib/python2.4/site-packages/formencode/api.py", line 194,
in message
return trans(self._messages[msgName], **self.gettextargs) % kw
TypeError: ugettext() got an unexpected keyword argument 'domain'
>>>
must i do my validator or this is considerable a bug ?
Glauco
--
+------------------------------------------------------------+
Glauco Uri
glauco(at)sferacarta.com
Sfera Carta Software® info(at)sferacarta.com
Via Bazzanese,69 Casalecchio di Reno(BO) - Tel. 051591054
+------------------------------------------------------------+
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" 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/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---