Re: Markov Analysis Help

2008-05-22 Thread Andrew Lee
dave wrote: Hi Guys, I've written a Markov analysis program and would like to get your comments on the code As it stands now the final input comes out as a tuple, then list, then tuple. Something like ('the', 'water') ['us'] ('we', 'took')..etc... I'm still learning so I don't know any ad

Re: Markov Analysis Help

2008-05-17 Thread bearophileHUGS
dave: >Can you have doctests on random functions? Yes, you can add doctests to methods, functions, classes, module docstrings, and in external text files. Bye, bearophile -- http://mail.python.org/mailman/listinfo/python-list

Re: Markov Analysis Help

2008-05-17 Thread Terry Reedy
"dave" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | bear, | thanks for the suggestions. I use IDLE to write the code and when it's | working I paste it over into a new window. Or you can just save code you want to keep to a new name. | To add doctests would I need to use a cer

Re: Markov Analysis Help

2008-05-17 Thread dave
On 2008-05-17 06:01:01 -0600, [EMAIL PROTECTED] said: dave, few general comments to your code: - Instead of using a comment that explains the meaning of a function, add such things into docstrings. - Your names can be improved, instead of f you can use file_name or something like that, instead o

Re: Markov Analysis Help

2008-05-17 Thread bearophileHUGS
dave, few general comments to your code: - Instead of using a comment that explains the meaning of a function, add such things into docstrings. - Your names can be improved, instead of f you can use file_name or something like that, instead of convert_file you can use a name that denotes that the c