I was just being cute; looking to reduce this to a single line; as it appears in almost everything I write:
live = False
try: end = info.end
except: live = True
exec("live=False \n try: end=info.end \n except: live=True")
systems blocked this backtest for security reasons. Your code contains
one or more keywords that are often used in attempts to break out of the
sandbox. If you think that this is incorrect, please contact us.
exec is definitely a restricted keyword. Anyway you can work around that.
yeah no worries...
I'm trying to better understand python though... why is exec() not allowed in this environment? I mean... I could see how you wouldn't want something that was exposed to the public; a web form for example... and allowed string input to be plugged into an exec() as a bad thing... but not sure how exec() is a security risk here.
eval are perfectly fine for trusted code. Since the nature of our platform is to execute external untrusted code, we restrict usage of those terms.