Latest recipes tagged "alias"http://code.activestate.com/recipes/tags/alias/new/2011-04-16T19:29:35-07:00ActiveState Code RecipesDecorators for adding aliases to methods in a class (Python)
2011-04-16T19:29:35-07:00José Nahuel Cuesta Luengohttp://code.activestate.com/recipes/users/4177689/http://code.activestate.com/recipes/577659-decorators-for-adding-aliases-to-methods-in-a-clas/
<p style="color: grey">
Python
recipe 577659
by <a href="/recipes/users/4177689/">José Nahuel Cuesta Luengo</a>
(<a href="/recipes/tags/alias/">alias</a>, <a href="/recipes/tags/decorator/">decorator</a>).
</p>
<p>The following recipe can be used as a means to adding aliases to methods in a class.</p>
Alias 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>