[triangle-zpug] how to match strings in python

Paul Bugni pbugni at u.washington.edu
Thu Apr 2 18:12:17 UTC 2009


On Apr 2, 2009, at 10:52 AM, Chris Rossi wrote:
>
> On Thu, Apr 2, 2009 at 11:49 AM, Stephan Altmueller  
> <stephan_altmueller at unc.edu> wrote:
> Hi,
>
> http://en.wikibooks.org/wiki/Algorithm_implementation/Strings/ 
> Longest_common_substring#Python
>
> Wow, clearly implemented by a C programmer translating C directly  
> to Python.  Love the opaque identifiers and the convoluted code.   
> Looks like he's creating a creating a 2 dimensional matrix of size  
> len(string1) x len(string2)?!?!
>
> Is mine the shortest?  ;)
>
> Chris

Chris, I think you should update the wikipedia example - it's just  
not {right,pythonic} seeing the Ruby, VB.NET and even Java  
implementations done in fewer lines of code :)

Paul


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://starship.python.net/pipermail/triangle-zpug/attachments/20090402/9d6933ac/attachment.htm>


More information about the triangle-zpug mailing list