creating new objects with references to them

Diez B. Roggisch deets at nospam.web.de
Thu Nov 2 12:02:59 EST 2006


> 
>> Anyway, a simple list of Researchers should suffice for any of these
>> purposes, and assuming you want to commit them all in one hit, you have
>> a list of objects ready to iterate over.
> 
> Ok, so in making a list does this mean that I won't have a name for
> each instance? I just have to iterate over the list when I need them?
> I'm not sure how I would do this if the user chooses just to save a
> single record and not all of them.

It means exactly that, and where is the problem? If the user choses to 
save just one record, she has to somehow select the one in question, 
hasn't she? So, she selects it from the list. And then you _know_ the 
index or even the record itself.

If it helps you, think of the index of the list as the name of the record...


Diez




More information about the Python-list mailing list