[Edu-sig] Python sequences by reference - how to make clear
Arthur
ajs@ix.netcom.com
Sat, 21 Sep 2002 20:03:10 -0400
Kirby writes -
>I understand your side of it though: having them be there would
>encourage earlier, deeper investigation of the whole
>topic, and remind the user that a=b does *not*
>necessarily get that job done.
Actually my point is slightly, but importantly, different than that. The
investigation will help the user understand what a=b means. By helping them
undertand what a=b doesn't mean. One can argue whether facility with copy is
or is not a core concept. I don't think one can argue the same as to a=b.
>Guido's school of thought says 'these are power tools
>that need to be on a higher shelf, so the casual tinkerer
>won't abuse them if you're not ready to tackle importing,
>you're not ready to start copying, let alone >deepcopying.'
Guido's express it exactly as
"copy() nor deepcopy() is a built-in, because it is a potentially expensive
operation, and I feel that its presence as a built-in would cause beginning
and intermediate programmers to overuse it."
Premature optimization, perhaps?
Art