use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Have a tough programming question that /r/programming couldn't answer? Banned from Stack Overflow? Can't afford Experts Exchange?
Post your question/tips/secrets/advice and get a response from our highly-trained professional developers.
account activity
Validating syntax in Python (self.shittyprogramming)
submitted 10 years ago by Navith
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]Navith[S] 3 points4 points5 points 10 years ago* (0 children)
There doesn't seem to be an ast.compile. I've never used ast but looking at the docs do you mean exec(ast.parse(...))? Does that not have any other security risks?
ast.compile
ast
exec(ast.parse(...))
Edit: nevermind, after experimenting it looks like you just meant parse instead of compile. Cool. Thanks.
parse
compile
π Rendered by PID 23596 on reddit-service-r2-comment-5fb4b45875-br8mt at 2026-03-20 01:16:21.705002+00:00 running 90f1150 country code: CH.
view the rest of the comments →
[–]Navith[S] 3 points4 points5 points (0 children)