Testing for changes on a web page (was: how to find difference in number of characters)

Seebs usenet-nospam at seebs.net
Sat Oct 9 13:47:56 EDT 2010


On 2010-10-09, harryos <oswald.harry at gmail.com> wrote:
> What I meant by number of characters was the number of edits happened
> between the two versions..

Consider two strings:

Hello, world!

Yo, there.

What is the "number of edits happened between the two versions"?  It could
be:

* Zero.  I just typed them both from scratch, no editing occurred between
  them.
* Two.  Two words are different.
* Ten or so -- counting changed characters.
* Three.  Two words and a punctuation mark are different.

In other words, your problem here is that you haven't actually described
what you want.  Slow down.  Think!  Describe what you want clearly enough
that any other person who reads your description can always come up with
the same answer you would for a given set of inputs.

-s
-- 
Copyright 2010, all wrongs reversed.  Peter Seebach / usenet-nospam at seebs.net
http://www.seebs.net/log/ <-- lawsuits, religion, and funny pictures
http://en.wikipedia.org/wiki/Fair_Game_(Scientology) <-- get educated!
I am not speaking for my employer, although they do rent some of my opinions.



More information about the Python-list mailing list