On Thu, 2 Apr 2020 at 04:59, Steven D'Aprano <st...@pearwood.info> wrote:
>
> On Wed, Apr 01, 2020 at 09:25:46PM -0400, Kyle Stanley wrote:
>
> > While I agree that it's sometimes okay to go outside the strict bounds of
> > "only one way to do it"
>
> The Zen of Python was invented as a joke, not holy writ, and as a series
> of koans intended to guide thought, not shut it down. Unfortunately, and
> with the greatest respect to Tim Peters, in practice that's not how it
> is used, *particularly* the "One Way" kaon, which is almost invariably
> used as a thought-terminating cliche.

As the person whose comment triggered this sub-thread, can I just
point out that I was *not* making a "One True Way" argunemt, as Paul,
and the people following up to him, seem to have thought. I was rather
saying that when explaining to beginners why repeated string
concatenation is bad, it's much easier to follow up with "... and the
way you address this in Python is to build a list than join it at the
end", than "... and the way you address this is either to build a list
and join it at the end, or use StringIO ..." and then digress into a
discussion of the relative merits of the two approaches. (And in
reality, people often don't learn from teachers explaining clearly,
but from Google, Reddit and Stack Exchange, where the second variant
would probably end up in raging debates and flamewars ;-))

I was suggesting that having a common *idiom* is better than having
lots of variations with subtle trade-offs, all being presented as the
best *general* solution. Maybe that's Steven's "option 2", and I'm
expecting more confusion than would actually be the case. Like
veryone, I'm only guessing (based on experience, I hope, but even so).

I remain -0.5, and repeat that this just means "mild preference
against". I'm clarifying above because I don't want to be
misinterpreted, not to try harder to persuade people of my previous
arguments.

Paul
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/RDBPYERVJQEFZVAPCYNMF4LKC6T7J3T5/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to