Access to static members from inside a method decorator?

Peter Otten __peter__ at web.de
Mon Oct 9 02:53:31 EDT 2006


glen.coates.bigworld at gmail.com wrote:

> Thanks Peter.  Yeah I had thought of that earlier, but wasn't sure if
> this is a standard design pattern for what I'm trying to achieve.  It
> seems ugly to me to use 2 classes when you are essentially describing a
> single type.  

To me both Exposed and ExposedType look more idiomatic than your combined
approach.

> Is the Splat/SplatType pairing really a common design 
> pattern when trying to use metaclasses in this way?

I think so, but look for yourself:

http://www.google.com/codesearch?q=lang%3Apython+__metaclass__&btnG=Search+Code

Refinements to that query welcome...

Peter



More information about the Python-list mailing list