Guest User

Untitled

a guest
Jun 25th, 2018
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. class Foo(object):
  2. a = 3
  3. def bar(self, x): return x + a
  4.  
  5. >>> eval("open('/tmp/tst', 'w')", {}, {})
  6. <open file '/tmp/tst', mode 'w' at 0x7fe8703ce198>
  7.  
  8. >>> eval("open('/tmp/tst', 'w')", {'__builtins__':[]}, {})
  9. Traceback (most recent call last):
  10. File "<stdin>", line 1, in <module>
  11. File "<string>", line 1, in <module>
  12. NameError: name 'open' is not defined
Add Comment
Please, Sign In to add comment