Re: "unqualified exec is not allowed" error w/custom tag lib

"Jonathan Ellis" <[email protected]>
Newsgroups gmane.comp.python.spyce.general
Message-ID <[email protected]>
Well, the long explanation is, I was pretty new to the whole "write a
compiler in Python" thing when I released Spyce 2.0, and I made a couple
mistakes.  Placing some unnecessary unqualified execs in the generated
code was one of them.  (See
http://spyced.blogspot.com/2005/04/how-well-do-you-know-python-part-4.html
for what this means.)

This is fixed in the subversion 2.1 code, but in 2.0, you can work
around it by pushing your function up to the class level, i.e., instead
of 

[[\
def trouble():
...
]]

use

[[!
def trouble(self):
...
]]

and then call self.trouble().

-Jonathan
-- 
C++ is history repeated as tragedy. Java is history repeated as farce.  --Scott McKay



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.