Skip to content

Commit

Permalink
Merge pull request #41 from zopefoundation/revert-11-master
Browse files Browse the repository at this point in the history
Revert "Add built-in function 'set'"
  • Loading branch information
tseaver committed Mar 2, 2017
2 parents b62759a + c24724f commit da3c2f1
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 10 deletions.
2 changes: 1 addition & 1 deletion src/RestrictedPython/Guards.py
Expand Up @@ -23,7 +23,7 @@
for name in ['False', 'None', 'True', 'abs', 'basestring', 'bool', 'callable',
'chr', 'cmp', 'complex', 'divmod', 'float', 'hash',
'hex', 'id', 'int', 'isinstance', 'issubclass', 'len',
'long', 'oct', 'ord', 'pow', 'range', 'repr', 'round', 'set',
'long', 'oct', 'ord', 'pow', 'range', 'repr', 'round',
'str', 'tuple', 'unichr', 'unicode', 'xrange', 'zip']:

safe_builtins[name] = __builtins__[name]
Expand Down
5 changes: 0 additions & 5 deletions src/RestrictedPython/tests/restricted_module.py
Expand Up @@ -33,11 +33,6 @@ def try_map():
print map(inc, x),
return printed

def try_set():
x = [1, 1, 2, 3]
print set(x)
return printed

def try_apply():
def f(x, y, z):
return x + y + z
Expand Down
4 changes: 0 additions & 4 deletions src/RestrictedPython/tests/testRestrictions.py
Expand Up @@ -251,10 +251,6 @@ def checkTryMap(self):
res = self.execFunc('try_map')
self.assertEqual(res, "[2, 3, 4]")

def checkTrySet(self):
res = self.execFunc('try_set')
self.assertEqual(res, "set([1, 2, 3])")

def checkApply(self):
del apply_wrapper_called[:]
res = self.execFunc('try_apply')
Expand Down

0 comments on commit da3c2f1

Please sign in to comment.