Markov.py

Raymond Hettinger othello at javanet.com
Tue Jan 23 14:37:36 EST 2001


cpsoct at my-deja.com wrote:

> I found the following script in the mac standard distribution (see path
> below). It seems to be Guido's, i am not sure however, i am at a loss
> as to how to use this. I was unable to run it and there is not
> documentation. In otherwords, i put on my detective hat but was still
> unable to get the thing to run. Anyone use this and can explain to me
> how? The script is a bit to big and complex for my level of python kno-
> how, but how sweet would it be to be able to make a markov chain in
> python without having to re-invent the wheel. Particularly since i
> wouldn't be able to in this case!

In chapter 3 of their book, The Practice of Programming, Brian Kernighan and
Rob Pike compared six versions of the Markov program written with different
languages or language features.  They compared speed, lines of source, and
style.

Markov.py gives comparative results for Python. The book includes a  program
spec, algorithm analysis, sample inputs and outputs, and some testing ideas.

G'luck,

Raymond Hettinger
othello at javanet.com





More information about the Python-list mailing list