how to create multiple instances for a class

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

how to create multiple instances for a class

lambda
I want to create multiple isntances for same class, for example:
myDrug= Drug('drug1')
myDrug2= Drug('drug2')
>>>
myDrug10= Drug('drug10')

Is there a simple way to do this ?
Reply | Threaded
Open this post in threaded view
|

Re: how to create multiple instances for a class

Jiba
Administrator
Hello,

You can create multiple instances, as you did in your example.

You may omit the instance name ('drug1', etc), in this case a new name will be automatically generated.

Jiba