Re: [Tutor] Instantiating a list of strings into a list of classes

2010-03-06 Thread Alan Gauld
"Daryl V" wrote What I want to do is use the first entry in that row (row[0]) as the variable name for the instantiated class. Thats usually a very bad idea. Not least because all the code that comes after it would somehow, magically, have to know about this brand new variable that has appear

Re: [Tutor] Instantiating a list of strings into a list of classes

2010-03-06 Thread spir
On Fri, 5 Mar 2010 17:38:08 -0800 Daryl V wrote: > I have a csv list of data, of the form: > plot, utmN83_X, utmN83_Y, plot_radius_m > Spring1,348545,3589235,13.2 > etc. [...] > What I want to do is use the first entry in that row (row[0]) as the > variable name for the instantiated class. Ther

Re: [Tutor] Instantiating a list of strings into a list of classes

2010-03-05 Thread Benno Lang
On 6 March 2010 10:38, Daryl V wrote: > I have a csv list of data, of the form: > plot, utmN83_X, utmN83_Y, plot_radius_m > Spring1,348545,3589235,13.2 > etc. > I built a nifty ClassGPSPoint(Xpos,Ypos,plotRadius,workPaths) that eats the > X&Y positions, the plot radius, and previously instantiated

[Tutor] Instantiating a list of strings into a list of classes

2010-03-05 Thread Daryl V
Hello All- I cut my teeth of Fortran95, and in the distant past rode the turtle, and while I enjoy the mind-bendy feeling of shifting my programming paradigm (and LOVE LOVE LOVE Python), I get sheepish when I feel I'm missing something basic. So: I have a csv list of data, of the form: plot, utmN