On Fri, Apr 3, 2009 at 12:21 PM, Anand Chitipothu <anandol...@gmail.com>wrote:
> > I have a basic doubt - why do you want to set a module as core > > as __builtins__ to {} in your code ? If you can answer that > > reasonably, it makes sense to investigate this or raise a bug. > > Otherwise, I don't think it is good coding. > > It is used in web.py templating engine to restrict the available > builtins to templates. web.py is a great framework, but this is bad coding for sure. I guess you need to do some hack like, oldbuiltins=__builtins__ __builtins__ = {} Then before calling code that breaks, __builtins__ = oldbuiltins <call breaking code here> But this is damn ugly and if it were me, I would investigate other options whch doesn't force me to put __builtins__ to {} in my code. I don't know details enough to advise you on this specifically in this case. > > _______________________________________________ > BangPypers mailing list > BangPypers@python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- -Anand
_______________________________________________ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers