fork download
  1. def echo(x):
  2. return x
  3.  
  4. def foo(s):
  5. d = {}
  6. exec(s, {}, d)
  7. return dict((x,y) for x,y in d.items())
  8.  
  9. def bar(s):
  10. d = {}
  11. exec(s, {}, d)
  12. return dict((x, echo(y)) for x,y in d.items()) # comment this to compile
  13.  
  14. s = 'a=1'
  15. foo(s)
  16.  
Success #stdin #stdout 0.02s 5852KB
stdin
Standard input is empty
stdout
Standard output is empty