mirror of
https://github.com/python/cpython.git
synced 2025-07-29 06:05:00 +00:00
restricted environments are no more
This commit is contained in:
parent
7a7739d75e
commit
f6348f4589
2 changed files with 2 additions and 10 deletions
|
@ -42,11 +42,7 @@ DictType = DictionaryType = dict
|
|||
def _f(): pass
|
||||
FunctionType = type(_f)
|
||||
LambdaType = type(lambda: None) # Same as FunctionType
|
||||
try:
|
||||
CodeType = type(_f.func_code)
|
||||
except RuntimeError:
|
||||
# Execution in restricted environment
|
||||
pass
|
||||
CodeType = type(_f.func_code)
|
||||
|
||||
def _g():
|
||||
yield 1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue