New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected behaviour in casacore.util.substitute.py #87

Closed
shibasisp opened this Issue May 16, 2017 · 2 comments

Comments

Projects
None yet
2 participants
@shibasisp
Contributor

shibasisp commented May 16, 2017

According to the casacore docs, I should get

a=2
b=3
substitute('$(a+b)+$a')              # results in '5+2' (not '7')
substitute('$((a+b)*(a+b))')         # results in '25'
substitute('$(len("ab cd( de"))')    # results in '9'

But I am getting

In [24]: a=2

In [25]: b=3

In [26]: substitute('$(a+b)+$a')
Out[26]: '$(a+b)+2'

In [27]: substitute('$((a+b)*(a+b))')
Out[27]: '$((a+b)*(a+b))'

In [28]: substitute('$(len("ab cd( de"))')
Out[28]: '9'
@shibasisp

This comment has been minimized.

Contributor

shibasisp commented May 16, 2017

I think, substitute isn't able to parse parenthesis.

@gervandiepen

This comment has been minimized.

Contributor

gervandiepen commented May 16, 2017

gervandiepen added a commit that referenced this issue May 18, 2017

@tammojan tammojan closed this in #88 May 18, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment