array of objects

a_olme at a_olme at
Sun Dec 31 11:30:31 CET 2000


How do I create a array of object from my own classes?

If I have a class like this:

class test:
	def dosomething(self):
		return 1234

obj= test()

obj= [test(),test()]

The last line works but is there a more elegant way?

//Anders Olme

Sent via

More information about the Python-list mailing list