[Python-Dev] Tutorial: Brief Introduction to the Standard Libary

Arthur ajsiegel at optonline.net
Tue Dec 2 23:21:42 EST 2003


No mention of the copy module.  Is this open for discussion?

Raymond had written:

>My first draft included:
>    copy, glob, shelve, pickle, os, re, math/cmath, urllib, smtplib

>Guido's thoughts:
>- copy tends to be overused by beginners

While Guido offers no evidence, I have no evidence to dispute him.  Let's
accept it as true.

[Snip]

>While I think of copy() and deepcopy() as builtins that got tucked away 
>in module, Guido is right about their rarity in well-crafted code.

Accepting Guido is right and you are right in acknowledging that, why is it
that you, nonetheless, think of copy()/deepcopy() as displaced built-ins. 

I would argue because you acknowledge they are conceptually core - though
(we are accepting) not functionally core.  

OTOH, functionally, haven't some built-ins been growing copy methods? Could
be wrong about that - seem to get that idea somewhere.

Is it unreasonable to argue that hiding - isn't that is what is being
advocated, in essence - something that is arguably conceptually important,
cannot properly be considered to be a service to beginners?

Is it totally out-of-left field to argue that confronting "copy" forces a
confrontation with the fundamentals of assignment - perhaps the most subtle
concept faced in approaching Python.  Particularly difficult because the
beginner does not know to expect subtleties.  I would argue that these
subtleties are *always* surprising - particularly and importantly because of
an important missing clue.  That clue, specifically, the existence of copy. 

I had always assumed that the absence of copy()/deepcopy() from built-ins
was for 'big boy' reasons.  And accepted it as that - feeling, in general,
that the big boy issues should override the 'good for beginners' issue.  And
only take up the cause of copy() to the extent that - on better evidence -
it appears to be being handled as it is for paternalistic reasons. I am
closer to being a beginner than most.  And nonetheless have in all debates
concluded with some confidence that what makes sense for Python, independent
of any focus on the needs of beginners, is in fact what makes sense for
beginners. 

I believe that - at core - that is a position respectful of Python and its
BDFL, though it seems to put me consistently in conflict with it and him.

Art   




More information about the Python-Dev mailing list