Python for non-programmers

Kragen Sitaker kragen at dnaco.net
Mon Mar 6 12:37:16 EST 2000


In article <3prrbskd8a3tmhmr8a4bnrcf2ft8k52k29 at 4ax.com>,
Dennis Lee Bieber  <wlfraed at ix.netcom.com> wrote:
>Python=>find the box with the "B" post-it note stuck to the front,
>create a copy of the contents in some empty box, add three to the
>contents of the (formerly) empty box, create a post-it note with "A" on
>it, and stick the post-it note to the box

The whole point of garbage collection is that you don't have to think
about the boxes --- just variables that are associated with values.

Of course, when you have a list, the list becomes a box (or a row of
boxes) that you can put things in, but you still don't have to worry
about what box or boxes the list is in.

You do have to understand that many names can reference a single value
(because of mutation, and also because it's important to know that
assigning a huge list to a variable is O(1).)

The Scheme-as-CS-101 crowd seems to think that it's a good idea to put
off the whole mutability thing until later --- just have names and
values, and don't worry about mutation until later.
-- 
<kragen at pobox.com>       Kragen Sitaker     <http://www.pobox.com/~kragen/>
The Internet stock bubble didn't burst on 1999-11-08.  Hurrah!
<URL:http://www.pobox.com/~kragen/bubble.html>
The power didn't go out on 2000-01-01 either.  :)



More information about the Python-list mailing list