Copy operator (was list.remove for Noivces)

Delaney, Timothy tdelaney at avaya.com
Tue Nov 27 21:37:51 EST 2001


> From: Arthur Siegel [mailto:ajs at ix.netcom.com]
> Jeff Shannon wrote:
>
> But if  I could find some way to demonstrate (not  saying that I
> necessarily could find a way to do so convincingly) that it would
> indeed make Python better equipped for beginners/learners -
> is there a shot it would find acceptance by the community?

Probably not, since the only thing it would be doing would be introducing
syntactic sugar for something which Python already has.

Most importantly however, beginners rarely have any idea of the difference
between a deep and a shallow copy. It is important to keep these two
concepts separate (though closely related). Python already has the
difference well disambiguated (copy.copy vs copy.deepcopy). Adding line
noise is more likely to confuse beginners than having the copy operations in
a separate module.

In addition, there is already standard syntactic sugar for performing a
shallow copy of a sequence (slicing notation) - this can be abused, but it
is usually safe to rely on it (and if not, it should be in the docs).

I've noticed most of your recent posts concern things which are either
possible flaws in the documentation, or are in the FAQ list, or should be in
the FAQ list. I think a well-maintained FAQ list is much more important than
making changes to Python to make it "more friendly" to beginners. In
addition, the FAQ list must be very readily available i.e. it should be part
of the standard docs, with (of course) links to the online FAQ list (and
preferably, the option to update the local copy from the online copy) and
IMO should be part of the tutorial. That is, the tutorial should have a link
to the FAQ list prominently on its contents page, and each section should
contain links to the relevant sections in the FAQ.

This would of course be a very large job.

Tim Delaney




More information about the Python-list mailing list