On Apr 12, 6:36 pm, Jonathan Lundell <jlund...@pobox.com> wrote: > On Apr 12, 2010, at 4:25 PM, Yarko Tymciurak wrote: > > > Ok - not sure why I was not able to reproduce before: I put a > > breakpoint on line 179 of restricted, and sure enough code, when it > > had no ending newline, would cause an error. > > > This seems like it is a bug with the builtin, compile() ... > > It's documented (and presumably deliberate) behavior.
Massimo - Yes, Jonathan is right: this is a bug in web2py (strictly speaking); see http://docs.python.org/library/functions.html I suggest either take the simple change I posted, or a test to see if end of code[-1]=='\n'.... (The latter seems a waste of logic, since newline - extra or not - is cheap). Regards, Yarko -- To unsubscribe, reply using "remove me" as the subject.