Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Foo(object):
- a = 3
- def bar(self, x): return x + a
- >>> eval("open('/tmp/tst', 'w')", {}, {})
- <open file '/tmp/tst', mode 'w' at 0x7fe8703ce198>
- >>> eval("open('/tmp/tst', 'w')", {'__builtins__':[]}, {})
- Traceback (most recent call last):
- File "<stdin>", line 1, in <module>
- File "<string>", line 1, in <module>
- NameError: name 'open' is not defined
Add Comment
Please, Sign In to add comment