This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from RestrictedPython import compile_restricted | |
| from RestrictedPython.PrintCollector import PrintCollector | |
| from RestrictedPython.Guards import safe_builtins, full_write_guard | |
| def getitem(obj, index): | |
| if obj is not None and type(obj) in (list, tuple, dict): | |
| return obj[index] | |
| raise Exception() |
NewerOlder