On Feb 1, 10:16 pm, Massimo Di Pierro <[email protected]> wrote: > From the usual source: > http://lucumr.pocoo.org/2011/2/1/exec-in-python/
His post is pretty good and informative. > What would really be useful to us is an example of how to overcome > that problem by showing how to break those implicit self references. "Now now we know the cause, why doesn't it happen if you have a module? The reason for that is that Python will do a trick when it shuts down modules. It will override all global values that do not begin with an underscore with None" Is quite an interesting point. Is there a way we can do this during the exec cycle, or is too low a level necessary? Furthermore, this: "With that I encourage the web2py developers to reconsider their decision on the use of the exec statement and using regular Python modules." is never going to happen because we're fully backward-compatible. And besides, he and JKM are entitled to their opinion, but that doesn't mean they are right. I have used Django before. I intend one day using Flask. I know what's out there. I think the bottom line is that one should always understand what you're doing, and why you're doing it. I could care less about some python developer being confused with different semantics. I mean, heck, just moving between a few different languages already have huge semantic differences. That's really a non-argument. I *like* the fact that we use exec. In one of my applications, I even call exec inside a controller on another piece of dynamically-uploaded code. Implementation details must be managed, obviously (the memory leak issue comes to mind), but the execution scheme is clearly viable. I also *like* the fact that lotsa fanboys are going to listen to negative posts like these about web2py and stay away. We do not need to grow bigger simply for the sake of growing. The only direction that matters is quality, not quantity. We need only focus on how to make awesome web applications. I could care less about "joining the world of python web frameworks", or whatever condescending drivel JKM said in his last web2py reddit post.

