A suggestion for a possible Python module

Max M maxm at mxm.dk
Tue Mar 4 14:01:46 CET 2003

Alex Martelli wrote:
> Max M wrote:
> As we are being pedantic, I would suggest two more things:

I was being pedantic you think? He asked for comments on a piece of code 
that he suggest is being included in the standard library. I assume that 
a certain level of pedantry is required then.

> 1. a clearer docstring,
> it's only a small extra effort to SAY exactly what you mean, e.g.
> "Returns a string with the same characters as the argument string,
> in reverse order".

+1 on that one.

 > 2. no mixing of tabs with spaces (the docstring is aligned with a
 >    tab while the other lines are aligned with spaces).

Ahh  naturally. This is what I get for coding in an email client ... I 
normally only use spaces, and I am so used to my editor doing it right 
that i didn't check what mozilla does. Bugger! Well it looked right when 
I sent it :-s

> Using "characters" rather than "letters" is also advisable in the
> variable name, but even more important in the docstrings -- not all
> characters are letters.

As Python has no char(acter) datatype, and many other languages does, I 
used "letter" to try and be as clear as possible. But probably you are 
right. "Characters" would have been a better description. I think it 
might have been a blind spot caused by english not being my first language.


hilsen/regards Max M Rasmussen, Denmark

Fremtiden, videnskab, skeptiscisme og transhumanisme

More information about the Python-list mailing list