Does Python really follow its philosophy of "Readability counts"?

Carl Banks pavlovevidence at gmail.com
Wed Jan 14 05:17:08 CET 2009


On Jan 13, 9:50 pm, Carl Banks <pavlovevide... at gmail.com> wrote:
> The cultural impact that would have on the
> community is far worse, IMHO, than any short-sighted benefits like
> being able to catch an accidental usage of an internal variable.
> Trust would be replaced by mistrust, and programming in Python would
> go from a pleasant experience to constant antagonism.

And I'll give you a perfect example:

XML-DOM versus ElementTree

XML-DOM is the sort of standard that is borne of a culture that values
encapsulation, strict type safety, and so on.  It's the way it is
because designers were allowed to distrust the user, and the culture
said that it was good to distrust the user.  Consequently, the
interface is a pain to use, with all kinds of boilerplate and iterator
types and such.

ElementTree was borne out of an environment where implementors are
forced to trust the user.  As a consequence it was free to create an
interface that was natural and straightforward and pleasant to use,
without having to be guarded.


Carl Banks



More information about the Python-list mailing list