Skip to content

Commit

Permalink
Add built-in function 'set'
Browse files Browse the repository at this point in the history
Adding built-in function 'set' to `safe_builtins`. Sets can be created with the {x, y} notation, but there's no way to create an empty set.
  • Loading branch information
ehfeng committed Dec 12, 2016
1 parent 2d15393 commit 092328a
Showing 1 changed file with 1 addition and 1 deletion.
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',
'long', 'oct', 'ord', 'pow', 'range', 'repr', 'round', 'set',
'str', 'tuple', 'unichr', 'unicode', 'xrange', 'zip']:

safe_builtins[name] = __builtins__[name]
Expand Down

0 comments on commit 092328a

Please sign in to comment.