Code Monkey home page Code Monkey logo

Comments (1)

danthedeckie avatar danthedeckie commented on June 27, 2024

Including functions is trivial.

SimpleEval is designed as a library to do all the parsing and evaluating - but you as the library user still need to think about what functionality you want to give access to.

Say you did want to include-by-default some basic functions:

Where would you draw the borders or what's allowed or not?

Presumably all the type functions, str, int, etc. Then I guess you'd have to include list and the other composite type functions but only in the evaluator with composite types.

if range or xrange also everything secure in __builtins__, and maybe also some modules such as math?

Speaking of range- you'd need to include your own safe version of it that respected the MAX_ values...

I'd much rather keep SimpleEval simple - without any builtins, and let people include what they think is appropriate for their specific application.

from simpleeval.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.