On Jan 15, 2009, at 3:46 AM, mk wrote:
from helloworld.lib.base import BaseControllerimport pylons.decorators class JsonIt(BaseController): @pylons.decorators.jsonify def __init__(self, objtojsonify): return objtojsonify
As I explained in the other thread on where _py_object comes from, this obviously won't work. __init__ is called when an instance of the class is created, and it's return value isn't even used by anything, which makes it even more puzzling why you'd even jsonify a response from it? That's an improper use of Python itself, in addition to Pylons.
Perhaps you should explain exactly what you *want* to do, as I get the distinct feeling you're engineering a very bad hack to do what is likely much easier than the mess it seems to be becoming.
Cheers, Ben
smime.p7s
Description: S/MIME cryptographic signature
