Popular recipes by David Weil http://code.activestate.com/recipes/users/1296670/2014-07-02T20:54:01-07:00ActiveState Code RecipesName a lambda (Python)
2014-07-02T20:54:01-07:00David Weilhttp://code.activestate.com/recipes/users/1296670/http://code.activestate.com/recipes/578902-name-a-lambda/
<p style="color: grey">
Python
recipe 578902
by <a href="/recipes/users/1296670/">David Weil</a>
(<a href="/recipes/tags/func_name/">func_name</a>, <a href="/recipes/tags/introspection/">introspection</a>, <a href="/recipes/tags/lambda/">lambda</a>, <a href="/recipes/tags/name/">name</a>, <a href="/recipes/tags/naming/">naming</a>).
</p>
<p>A very simple recipe to allow you <em>easily</em> name lambda-objects (or other kind of objects, callable, for example, partial objects) you create, with little overhead and friendly syntax.</p>
Switch-like statement construction.. (Python)
2007-06-17T22:15:45-07:00David Weilhttp://code.activestate.com/recipes/users/1296670/http://code.activestate.com/recipes/521914-switch-like-statement-construction/
<p style="color: grey">
Python
recipe 521914
by <a href="/recipes/users/1296670/">David Weil</a>
.
Revision 3.
</p>
<p>This doesn't not intent to be nor became a standard.
Instead it's thought to be a proof of concept for a construction which mimics switch/case statements.
I think it's funny, so, i'll hope you enjoy it as I do.</p>