-
Notifications
You must be signed in to change notification settings - Fork 914
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
added math symbols and some standard data types for python evaluation #793
added math symbols and some standard data types for python evaluation #793
Conversation
@@ -279,8 +280,11 @@ def _arg(resolved, a, args, context): | |||
# context. We disable all the builtins, then add back True and False, and also | |||
# add true and false for convenience (because we accept those lower-case strings | |||
# as boolean values in XML). | |||
_eval_dict={'true': True, 'false': False, 'True': True, 'False': False, '__builtins__': {}, | |||
_eval_dict={'true': True, 'false': False, 'True': True, 'False': False, | |||
'__builtins__': {k: __builtins__[k] for k in ['list', 'dict', 'map', 'str', 'float', 'int']}, | |||
'env': _eval_env, 'optenv': _eval_optenv, 'find': _eval_find} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This block becomes more difficult to read as it grows. Can you update it to:
eval_dict = {
'true': True, 'false': False,
'True': True, 'False': False,
'__builtins__': {k: __builtins__[k] for k in ['dict', 'float', 'int', 'list', 'map', 'str']},
'env': _eval_env, 'optenv': _eval_optenv,
'find': _eval_find
}
One test failed. |
The failed tests are unrelated to roslaunch:
|
I was referring to the other one: http://build.ros.org/job/Kpr__ros_comm__ubuntu_xenial_amd64/61/testReport/junit/unit/test_substitution_args/test_resolve_args/ |
... and added appropriate unittests
fc3dec2
to
9888616
Compare
Oops. I missed that one. Hopefully fixed now. And squashed ;-) |
Thank you! |
added math symbols and some standard data types for python evaluation
... as discussed in #784 (comment)