[Cubicweb] A small feedback for the float format in rql

mr.li.jinpeng at gmail.com mr.li.jinpeng at gmail.com
Tue Apr 1 11:51:56 CEST 2014


Thank you for your emails. Here you are the ticket.

https://www.logilab.org/ticket/232974

To Dimitri,

You are right. In real code, I should not use equal for floats. In fact, 
I didn't notice that I already used "equal" in my code for float 
comparison, X value '1.3e-05'. Thank you for the remind.

Best,
Jinpeng


On 04/01/2014 11:25 AM, Sylvain Thénault wrote:
> On 01 avril 11:12, Dimitri Papadopoulos Orfanos wrote:
>> Hi Jinpeng,
>>
>> Unlike SQL, RQL does not support exponents.
>>
>> This is documented here:
>>    http://docs.cubicweb.org/annexes/rql/implementation.html#bnf-grammar
>>    FLOAT    ::= '\d+\.\d*'
>>
>> This is implemented in /usr/share/pyshared/rql/parser.py:
>>    ('FLOAT', re.compile('-?\\d+\\.\\d*')),
>>
>>
>> Indeed this should be fixed. I suggest you open a ticket to report this
>> issue:
>>     http://www.cubicweb.org/project/cubicweb
> I agree an issue should be open, though rather on the RQL project :
> https://www.logilab.org/project/rql




More information about the Cubicweb mailing list