[Python-Dev] ConfigParser changes
Guido van Rossum
guido@python.org
Tue, 31 Dec 2002 12:13:56 -0500
> Cleanliness. I believe in invertible representations. Whenever I
> write a class, I like to have its str() or repr() emit something
> parseable. If nothing else, this is useful for debugging. This is
> just general principles, I don't (unlike my other changes) have a
> use case for it.
I don't like classes whose str() or repr() can be many lines in a
typical case. Since this is read from a file, there should be (and
is) a method to write it to a file; if there's no use case for
converting the whole shebang to a string, don't provide that, and
especially not as str() or repr().
--Guido van Rossum (home page: http://www.python.org/~guido/)