Diez B. Roggisch wrote:
>
> Sounds like a metaclass problem to me - create a metaclass that will  take all
> (or some specially decorated) methods of a class and add a jsonified version,
> under a special name like <methodname>_json.
>
> Diez

As a hack, you could use:

def base_method(decorated_method):
    """Returns the undecorated original method.

    This is useful for overriding exposed methods to get the dictionary
of
    return values.

    """
    return decorated_method.__dict__['__composition__'][0]

which "un-decorates" a method or function.

But the metaclass idea is better, though.

Just a thought.
Krys


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/turbogears
-~----------~----~----~----~------~----~------~--~---

Reply via email to