Lino Website

surf notes

a clever solution

Wednesday, 22. March 2006 10:39.

Wow, I'm proud: Frederik Lundh called one of my postings to comp.lang.python a «clever solution».

Olivier Langlois had asked how to test whether two strings are equal «without regarding the number of spaces and newlines between the words». I told them how I do it in my TestCase.assertEquivalent().

Besides the compliment from Frederik, my code got improved because they explained me that the .strip() is not necessary.

Copyright 2001-2007 Luc Saffre.
Generated 2007-06-07 16:22:40