Skip to content

Please support reversed() #335

Closed as not planned
Closed as not planned

Description

@divinity76

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.

Activity

  1. changed the title [-]Please support reverse()[/-] [+]Please support reversed()[/+] on Nov 1, 2026
  2. icemac commented on Nov 2, 2026

    @icemac
    Member

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions