Commit 749484d9 authored by Aurel's avatar Aurel

override the default next guard

parent 4efadad0
......@@ -78,8 +78,10 @@ del safe_builtins['list']
add_builtins(Ellipsis=Ellipsis, NotImplemented=NotImplemented,
dict=dict, list=list)
BBB_ACCESS_CONTROL = False
if "set" not in safe_builtins: # BBB
add_builtins(set=set, frozenset=frozenset, slice=slice)
BBB_ACCESS_CONTROL = True
add_builtins(bin=bin, classmethod=classmethod, format=format, object=object,
property=property, staticmethod=staticmethod,
......@@ -106,10 +108,10 @@ def guarded_next(iterator, default=_marker):
if default is _marker:
raise
return default
BBB_ACCESS_CONTROL = False
if "next" not in safe_builtins: # BBB
add_builtins(next=guarded_next)
BBB_ACCESS_CONTROL = True
#if "next" not in safe_builtins: # BBB
# override the default next if exists
safe_builtins.update(next=guarded_next)
# add_builtins()
_safe_class_attribute_dict = {}
import inspect
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment