One downside of using exec is, theoretically, performance penalty since code has to be interpreted at every request. In practice we have not seen a measurable performance penalty because the time to interpret the code is less than the time to execute it.
On Sep 16, 1:36 am, Anthony <[email protected]> wrote: > Nice. This is very helpful. How do we find this again (without digging > up this message) -- I don't think I see this posting in the AlterEgo > listing (http://web2py.com/AlterEgo)? > > I think the stuff about exec probably belongs in the book. My > understanding is that exec also enables all of the web2py globals to > be available everywhere without requiring lots of imports and object > passing. If that's the case, maybe point that out too (is that the > "ease of use" reference?). > > Also, a lot of web2py detractors complain about exec/eval being "bad," > but they never say why. Is the main concern the possible security risk > of executing user input (which wouldn't apply to web2py since it only > uses exec in the framework layer)? Are there any other reasons exec > would be bad (Armin expressed some concerns a while back > --http://groups.google.com/group/web2py/msg/1771226ba4a72cc0)? > > Anthony > > On Sep 16, 1:11 am, mdipierro <[email protected]> wrote: > > >http://web2py.com/AlterEgo/default/show/271 > >

