3 ms·
I think people take the "one way to do it" tenet a little too seriously. It comes from PEP20 [1], which to me seems to have a more jestful than dogmatic tone:
by davidcuddeback 9y ago
I think people take the "one way to do it" tenet a little too seriously. It comes from PEP20 [1], which to me seems to have a more jestful than dogmatic tone:
> There should be one-- and preferably only one --obvious way to do it.
> Although that way may not be obvious at first unless you're Dutch.
If I remember my history correctly, this was poking fun as Perl's "TIMTOWTDI" [2].
It also says one obvious way to do it. It doesn't preclude there being more than one way.
[1] https://www.python.org/dev/peps/pep-0020/ https://www.python.org/dev/peps/pep-0020/
[2] https://en.wikipedia.org/wiki/There%27s_more_than_one_way_to_do_it https://en.wikipedia.org/wiki/There%27s_more_than_one_way_to...
- jerf 9y agoIn 2004, "There should be only one way to do it" was a more realistic goal. 2004 puts us at Python 2.4 or so, but I think that's just when it got formalized into a PEP, it was around for a while before then. If we step back two years to 2002, we get to Python 2.1. We are now pre-generators, pre-with statement, pre-itertools, pre-decorators, and a lot of other things (useful itertools, etc.). There more often was only one sensible way to do a thing. Python evolved, but PEP20 didn't.
- davidcuddeback 9y ago> 2004 puts us at Python 2.4 or so, but I think that's just when it got formalized into a PEP I didn't notice the date on the PEP, but I think you're right. I remember reading it when I learned Python circa 2002. Found this (from 1999): https://mail.python.org/pipermail/python-list/1999-June/001951.html https://mail.python.org/pipermail/python-list/1999-June/0019....