[Edu-sig] Fw: Python sequences by reference - how to make

Kirby Urner urnerk@qwest.net
Sat, 21 Sep 2002 08:43:59 -0700


At 11:42 AM 9/20/2002 -0400, Art wrote:

>My only counter argument is that this decision was made when Python had
>much, much fewer very,very specialized libraries. The expectation/perception
>of what it means to import a library module has evolved to the point to
>where it is counter-intututive to expect to need to import functionality
>like that added by copy - IMO.

I dunno about this argument.  Even 'math' (sin, cos etc.) is an import.

>But my argument is circular in some sense - because I am contending that
>copy represents core functionality, or more accurately, a core conceptual
>idea.

I think if the decision is to go with 'from copy import copy, deepcopy'
then the workaround is to address copying for centrally in the tutorials.

Copying might be a good segue into a subject heading like "...indeed, a
lot of Python's functionality is tucked away in libraries, for example...".

Python inherits from C in this respect, wherein even such basic stuff
as file i/o is in libraries.  Python is being 'liberal' vis-a-vis
C in allowing 'open' as a built-in.

Kirby