(While not directly related to Quixote, I hope this is of interest to some list readers) I ran into a bug involving persistent ZODB variables and SimpleTAL 3.7 and thought I should pass along a description (and a solution). The long and the short of it is that the python function callable returns true for *all* ZODB persistent variables. This means trying to do things likesomeone@somewhere.com
will fail if user is a persistent variable. There is a thread about callable and persistent variables here: http://mail.zope.org/pipermail/zodb-dev/2003-October/006076.html The suggested replacement for callable (when placed in simpleTALES.py) seems to do the trick. Here it is: def callable(thing): import ExtensionClass, __builtin__ if hasattr(thing, '__basicnew__'): # __basicnew__ is a sign of ExtensionClass; nothing in the # Python core, or any other known extension module, has it. return (isinstance(thing, ExtensionClass.ExtensionClass) or hasattr(thing, "__call__")) else: # Under the theory that only ExtensionClass sets tp_call # even when instances aren't intended to be callable. return __builtin__.callable(thing) Below is an example trace of the error: File "/home/dpotter/localpy/rssdemo/ui/gotham/simpletal/simpleTAL.py", line 608, in expand self.expandInline (context, encodingFile, interpreter) File "/home/dpotter/localpy/rssdemo/ui/gotham/simpletal/simpleTAL.py", line 536, in expandInline ourInterpreter.execute (self) File "/home/dpotter/localpy/rssdemo/ui/gotham/simpletal/simpleTAL.py", line 199, in execute self.commandHandler[cmnd[0]] (cmnd[0], cmnd[1]) File "/home/dpotter/localpy/rssdemo/ui/gotham/simpletal/simpleTAL.py", line 287, in cmdContent result = self.context.evaluate (args[2], self.originalAttributes) File "/home/dpotter/localpy/rssdemo/ui/gotham/simpletal/simpleTALES.py", line 388, in evaluate return self.evaluatePath (expr) File "/home/dpotter/localpy/rssdemo/ui/gotham/simpletal/simpleTALES.py", line 430, in evaluatePath return self.traversePath (allPaths[0]) File "/home/dpotter/localpy/rssdemo/ui/gotham/simpletal/simpleTALES.py", line 577, in traversePath temp = val.value((index,pathList)) File "/home/dpotter/localpy/rssdemo/ui/gotham/simpletal/simpleTALES.py", line 99, in value return apply (self.ourValue, ()) AttributeError: __call__ Regards, Dan