Popular recipes by Jose Sebrosa http://code.activestate.com/recipes/users/98132/2001-03-29T16:32:40-08:00ActiveState Code Recipes__getattr__: handle with care (Python) 2001-03-12T10:05:37-08:00Jose Sebrosahttp://code.activestate.com/recipes/users/98132/http://code.activestate.com/recipes/52238-__getattr__-handle-with-care/ <p style="color: grey"> Python recipe 52238 by <a href="/recipes/users/98132/">Jose Sebrosa</a> (<a href="/recipes/tags/oop/">oop</a>). </p> <p>__getattr__ is a very nice and powerful method that must be handled with care, otherwise you can discover that it has more power than you expected...</p> Dialect for sort by... then by... (Python) 2001-03-29T16:32:40-08:00Jose Sebrosahttp://code.activestate.com/recipes/users/98132/http://code.activestate.com/recipes/52316-dialect-for-sort-by-then-by/ <p style="color: grey"> Python recipe 52316 by <a href="/recipes/users/98132/">Jose Sebrosa</a> (<a href="/recipes/tags/search/">search</a>). </p> <p>Here we use the properties of "cmp()" and "or" to produce a compact dialect for sorting a list.</p>