[Python Wpg] Newbie question

Mike Pfaiffer mpfaiffer at callapple.org
Fri Feb 24 16:42:15 EST 2006


 I'm redoing an old public domain Apple// BASIC (text) game in Python and 
submitting it as an article to the magazine in the .signature. I've been 
working on it for a couple of weeks an hour at a time (it's a simple game). 
It's a good way to learn the language. I've been following the tutorial and 
for the most part I can get by experimenting with the examples. I'll admit my 
technique leaves a lot to be desired (it's my first Python program - I'll 
clean it up when it's working). With expectations suitably lowered, here is 
my question...

 I have a large list (2D array of single character strings) I want duplicated. 
Assignment (a = b) copies the pointers and not the values. Rather than copy 
the list item by item (which isn't out of the question), is there a simple 
way I haven't seen yet to make a separate copy of the list? I'd like to 
change one list but not the other.

 FYI, I haven't quite got my head around the OO style of programming yet. 
Hopefully this year I'll try something which gives me the spark of insight I 
haven't got yet.

    Later
    Mike


-- 
+----------------------------------------------------------------------+
|Call-A.P.P.L.E. and the Digital Civilization http://www.callapple.org |
|   http://members.shaw.ca/pfaiffer = Mike Pfaiffer (B.A., B.Sc.)      |
+----------------------------------------------------------------------+
----- BEGIN GEEK CODE BLOCK -----
Version: 3.12
GCS/G/IT/PA/SS d s+:- a? C++ UL L++ W++ N++ o+ K- w(---) O+@ M++@ V PS+
PE !PGP t+ 5+ X R tv b+ DI+++ D++ G e++* h! r-- !y-- UF++
------ END GEEK CODE BLOCK ------



More information about the Winnipeg mailing list