Despite being a core tenet of the language, Python is _really, really_ bad at following that rule. I agree with everything else you're saying, though. Those are still Python idioms even if they originated elsewhere.
Despite being a core tenet of the language, Python is _really, really_ bad at following that rule. I agree with everything else you're saying, though. Those are still Python idioms even if they originated elsewhere.
> 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/
[2] https://en.wikipedia.org/wiki/There%27s_more_than_one_way_to...
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/0019....
'foo ' + bar
'foo {}'.format(bar)
'foo %s' % bar
f'foo {bar}' Template('$foo bar').substitute(foo='foo')