You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reversed() does not alter an object's state, expose hidden attributes (__globals__, __subclasses__), or inherently cause a sandbox breakout, its exclusion from RestrictedPython.Guards.safe_builtins is likely an oversight.
This suggestion will not be implemented: See #336 (comment) for details.
If you think for your application reversed() is a must and you think it is okay that it does unrestricted enumeration, you can in your code create a copy of safe_builtins and add it there.
Activity
[-]Please support reverse()[/-][+]Please support reversed()[/+]icemac commentedon Nov 2, 2026
This suggestion will not be implemented: See #336 (comment) for details.
If you think for your application
reversed()is a must and you think it is okay that it does unrestricted enumeration, you can in your code create a copy ofsafe_builtinsand add it there.Remove builtins which iterate without calling `_getiter_` (#337)
build-accesscontrol: pin RestrictedPython<9.0 for tests