Most viewed recipes tagged "finder"http://code.activestate.com/recipes/tags/finder/views/2014-04-17T22:33:39-07:00ActiveState Code RecipesPython Multidimensional List Searcher (Python) 2011-10-29T22:21:39-07:00Alexander James Wallarhttp://code.activestate.com/recipes/users/4179768/http://code.activestate.com/recipes/577929-python-multidimensional-list-searcher/ <p style="color: grey"> Python recipe 577929 by <a href="/recipes/users/4179768/">Alexander James Wallar</a> (<a href="/recipes/tags/element/">element</a>, <a href="/recipes/tags/elements/">elements</a>, <a href="/recipes/tags/find/">find</a>, <a href="/recipes/tags/finder/">finder</a>, <a href="/recipes/tags/list/">list</a>, <a href="/recipes/tags/python/">python</a>, <a href="/recipes/tags/search/">search</a>). </p> <p>This module/function lets you find a 2 dimensional list of indices for elements you are looking for in a super list. Example:</p> <p>find([1,1,1,2,1,2,3,3],[1,2,3])</p> <p>returns: [[0, 1, 2, 4], [3, 5], [6, 7]]</p> search file extensions in directory (Python) 2014-04-17T22:33:39-07:00Keisuke URAGOhttp://code.activestate.com/recipes/users/668964/http://code.activestate.com/recipes/578862-search-file-extensions-in-directory/ <p style="color: grey"> Python recipe 578862 by <a href="/recipes/users/668964/">Keisuke URAGO</a> (<a href="/recipes/tags/files/">files</a>, <a href="/recipes/tags/finder/">finder</a>). </p> <p>This code is find and print file extensions from directory.</p> Concrete Class Finder (Python) 2011-08-24T05:29:15-07:00Lucio Santihttp://code.activestate.com/recipes/users/4178886/http://code.activestate.com/recipes/577858-concrete-class-finder/ <p style="color: grey"> Python recipe 577858 by <a href="/recipes/users/4178886/">Lucio Santi</a> (<a href="/recipes/tags/case/">case</a>, <a href="/recipes/tags/class/">class</a>, <a href="/recipes/tags/design/">design</a>, <a href="/recipes/tags/finder/">finder</a>, <a href="/recipes/tags/match/">match</a>, <a href="/recipes/tags/oop/">oop</a>, <a href="/recipes/tags/pattern/">pattern</a>, <a href="/recipes/tags/suitable/">suitable</a>, <a href="/recipes/tags/switch/">switch</a>). </p> <p>This recipe implements a design pattern useful for performing an object-oriented case analysis for a particular object (or a collection of objects as well). Essentially, it is an alternative to complex if-then-else or switches. Modelling each case with a particular class, the Concrete Class Finder searches for an appropriate case/class that applies to the given object/s. Once found, this class can be used in an homogeneous way, independently of the object/s previously considered.</p>