Popular recipes by Euan Goddard http://code.activestate.com/recipes/users/4170559/2009-06-01T01:19:55-07:00ActiveState Code RecipesAlias class attributes (Python)
2009-06-01T01:19:55-07:00Euan Goddardhttp://code.activestate.com/recipes/users/4170559/http://code.activestate.com/recipes/576787-alias-class-attributes/
<p style="color: grey">
Python
recipe 576787
by <a href="/recipes/users/4170559/">Euan Goddard</a>
(<a href="/recipes/tags/alias/">alias</a>, <a href="/recipes/tags/attribute/">attribute</a>, <a href="/recipes/tags/class/">class</a>, <a href="/recipes/tags/descriptor/">descriptor</a>, <a href="/recipes/tags/metaclass/">metaclass</a>).
</p>
<p>The alias metaclass allows a declarative way of creating aliases to attributes on a class. The main purpose of which is to adapt classes for duck-typing (see doc-string for me detail).</p>