Decorators: an outsider's perspective

Paul Morrow pm_mon at
Sun Aug 15 15:44:25 EDT 2004

Bengt Richter wrote:

> I think I pretty much agree with you (Paul), except that I think the test for
> 'self' (and analogously 'cls') should be a name.startswith(...) test.
> There are a few nested-scope cases where it is necessary to distinguish
> two simultaneous and distinct 'self'-parameter bindings, and you need distinct
> names to avoid shadowing the outer with the inner. No time to look for the example
> I'm thinking of, but I'm sure you can create one (if Peter Otten doesn't beat you to it ;-)

Ok, I spent 10 minutes thinking about the situation you describe and 
can't come up with anything.  I'd love to see the example you're 
referring to.  I'm even more curious how you would document such a class :-)

More information about the Python-list mailing list