Re: decorators - would be nice if...

2009-07-14 Thread Jack Diederich
On Tue, Jul 14, 2009 at 5:44 PM, Ken Seehart wrote: > Almost every time I use decorators, I find myself wishing I had access > to the local namespace of the context from which the decorator is > executed.  In practice, decorator is being applied to a method, so the > namespace in question would be

Re: decorators - would be nice if...

2009-07-14 Thread Carl Banks
On Jul 14, 2:44 pm, Ken Seehart wrote: [snip] (e.g. there does not > seem to be a good way to use multiple metaclasses in a class hierarchy, > and more generally you can't stack them on top of each other (you can > only have one metaclass per class)). > > Thoughts? If "stacking" metaclasses (what

Re: decorators - would be nice if...

2009-07-14 Thread Diez B. Roggisch
Ken Seehart schrieb: Almost every time I use decorators, I find myself wishing I had access to the local namespace of the context from which the decorator is executed. In practice, decorator is being applied to a method, so the namespace in question would be the dictionary of the class being cre

decorators - would be nice if...

2009-07-14 Thread Ken Seehart
Almost every time I use decorators, I find myself wishing I had access to the local namespace of the context from which the decorator is executed. In practice, decorator is being applied to a method, so the namespace in question would be the dictionary of the class being created. Similarly, befo