> Although I have never done so, I believe you can also
> store/manipulate objects in a database.
You can but its a lot slower than memory - but a lot more
scaleale too!
> Has anyone ever worked this option?
Yes, lots of times. In fact most large scale projects will
need to save objects to so
> I've written a class, with some methods. I then want to be able to
call
> the class repeatedly, to create some objects. The number of objects,
and
> some of their initialisation parameters need to be specified later
(i.e.
> at run-time).
Not quite sure what you mean by the last bit but I'll com
: [EMAIL PROTECTED]
Linux User Number: #201204
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Kent Johnson
Sent: Friday, December 03, 2004 7:42 AM
To: Python Tutor
Subject: Re: [Tutor] Creating & Handling lots of objects
If you want to be able to access
If you want to be able to access the objects by name, you can put them in a
dict. For example,
MyObjects={}
l=["a","b","c"]
for i in l:
MyObjects[i] = MyClass(i)
Then you can refer to MyObjects["a"]
If all the operations on the objects are done to all objects in a batch, putting them in a
Dear Tutor-list,
I'm sorry for this appallingly dumb question, but I'm having a little
problem with objects.
I've written a class, with some methods. I then want to be able to call
the class repeatedly, to create some objects. The number of objects, and
some of their initialisation parameters nee