overloading *something
James Stroud
jstroud at mbi.ucla.edu
Mon Nov 7 23:14:52 EST 2005
Hello All,
How does one make an arbitrary class (e.g. class myclass(object)) behave like
a list in method calls with the "*something" operator? What I mean is:
myobj = myclass()
doit(*myobj)
I've looked at getitem, getslice, and iter. What is it if not one of these?
And, how about the "**something" operator?
James
--
James Stroud
UCLA-DOE Institute for Genomics and Proteomics
Box 951570
Los Angeles, CA 90095
http://www.jamesstroud.com/
More information about the Python-list
mailing list