Why is class decorator on method loosing self?
c james
cjames at callone.net
Tue Nov 21 14:42:55 EST 2006
If I am reading this correctly you, are rebinding min_max in
CustomizeMeta using '__customize' as the attribute to identify the
member to work on.
Thank you. I think you are right, this is probably the best way to
implement what I intend for caching resource intensive processing.
to George Sakkis wrote:
>
> I don't think you can make it work without resorting to metaclass
> magic. At the point of decoration min_max is still a function, not a
> method, because class Foo has not been created yet. Here's a way to do
> it with a custom metaclass; whether you really want to do it is a
> different matter:
>
> George
>
More information about the Python-list
mailing list