List replication operator
Steven D'Aprano
steve+comp.lang.python at pearwood.info
Fri May 25 07:53:54 EDT 2018
On Fri, 25 May 2018 09:28:01 +0200, Peter Otten wrote:
> Yet another arcanum to learn for beginners with little return. If you
> cannot refrain from tinkering with the language at least concentrate on
> the features with broad application. Thank you.
Broader than multi-dimensional arrays? There are a bazillion uses for
them. How many do you need before it is "broad application"?
https://www.google.com/search?q=multidimensional+arrays
https://www.google.com/search?q=what+are+some+uses+for+multidimensional
+arrays
"My programming language doesn't support arithmetic, because I only
provide features with broad application. Arithmetic is only useful for
manipulating numbers."
Beginners already learn list * operator, and get *extremely emotional*
when it doesn't copy lists like they expect:
https://bugs.python.org/issue33636
This is a frequent, recurring pain point. Experienced programmers forget
how confusing the behaviour of * is because they're so used to the
execution model. They forget that writing a list comp is not even close
to obvious, not only for beginners but even some experienced Python
programmers.
--
Steve
More information about the Python-list
mailing list