Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bytearray support? #274

Open
jsmith173 opened this issue Mar 17, 2024 · 1 comment
Open

bytearray support? #274

jsmith173 opened this issue Mar 17, 2024 · 1 comment
Labels

Comments

@jsmith173
Copy link

It seems bytearray is not supported. How can I fix it myself?

image

@loechel
Copy link
Member

loechel commented Mar 18, 2024

@jsmith173 RestrictedPython itself offers several sets of builtins to use with, but you can always add additional elements for your specific use-case. Details: https://github.com/zopefoundation/RestrictedPython/blob/master/src/RestrictedPython/Guards.py#L14-L16

Just extend your globals to use it, if you use the safe_builtins from Guards, add it as another element (extend safe_names and add it to the used builtins: see: https://github.com/zopefoundation/RestrictedPython/blob/master/src/RestrictedPython/Guards.py#L111-L112).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants