You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 17, 2021. It is now read-only.
It looks like white spaces are interpreted as multiplication sign when editing the value.
To reproduce simply run the default sample code:
(e.g.) python ~/workspace/taurus/lib/taurus/qt/qtgui/input/tauruslineedit.py
and type "2 3" (withouth the quotes) and then enter. You will see that the write value of "sys/tg_test/1/double_scalar" has been change to 6 (2*3)
The text was updated successfully, but these errors were encountered:
Confirmed. It comes from the parsing done by pint:
In [1]: frompintimportUnitRegistryIn [2]: UR=UnitRegistry()
In [3]: UR.parse_expression('2 3')
Out[3]: 6In [4]: UR.parse_expression('2 3 m 4 s**-1')
Out[4]: <Quantity(24.0, 'meter / second')>
It seems to me that this is considered a feature, not a bug in pint (see hgrecco/pint#226 and hgrecco/pint#34).
I personally prefer not to implement/maintain/document a custom parser , and so I propose to close this as "wontfix"
I see your point, but I think that the confusion would be mitigated if we prominently document that the TaurusValueLineEdit will parse its contents using pint's parser (when dealing with numerical models).
S, instead of closing, I'll keep this issue open as a reminder for documenting (I'll change the title accordingly)
cpascual
changed the title
TaurusValueLineEdit: white space interpreted as multiplication
(doc) document how TaurusValueLineEdit parses quantities
Jan 31, 2018
cpascual
pushed a commit
to cpascual/taurus
that referenced
this issue
Jul 2, 2018
It looks like white spaces are interpreted as multiplication sign when editing the value.
To reproduce simply run the default sample code:
(e.g.) python ~/workspace/taurus/lib/taurus/qt/qtgui/input/tauruslineedit.py
and type "2 3" (withouth the quotes) and then enter. You will see that the write value of "sys/tg_test/1/double_scalar" has been change to 6 (2*3)
The text was updated successfully, but these errors were encountered: