On 19/12/2007, John Fouhy <[EMAIL PROTECTED]> wrote: > > On 19/12/2007, Adam Bark <[EMAIL PROTECTED]> wrote: > > I want to be able to get the values for my vector class but I don't know > > what method you need to get the * thing to work ie how to make it a > sequence > > i think. Anybody know how to do this? > > Thanks in advance. > > If you're confused about python's *args / **kwargs syntax, this post I > wrote a while ago might help: > http://mail.python.org/pipermail/tutor/2007-April/053725.html > > Otherwise, as Kent says, we need more information. > > -- > John. >
Sorry I wasn't quite sure how to explain it it's a vector class i've written myself. I've worked it out now, I was using a vector as part of a quaternion and wanted to be able to pass a vector or individual numbers so it seemed the easiest way to be able to use the *sequence syntax. Apparently you have to have to have a __getitem__ method for it to work.
_______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor