[Tutor] Option of passing sequences are arguments

Phil Bertram phil.bertram@clear.net.nz
Sat, 16 Jun 2001 10:53:24 +1200


Is it possible to unpack a sequence to fill arguments.
I have been playing around with *args type aruments but can't seem to get it
to work.

Eg

I would like to define a class so that it can be called as follows

m = MyObject(arg1,arg2,arg3)

or

args=(arg1,arg2,arg3)
x=MyObject(args)

Phil B