unparsed sequence args

Chak Tan (tan@tesla.ee.rochester.edu)
6 Apr 1995 15:35:19 -0400

Hi, I was wondering if there's a way to passed unparsed arguments to
sequence like methods. For instance, for sq_ass_slice methods,
instead of

static int something_ass_slice(self, ilow, ihigh, v)
somethingobject *self;
int ilow, ihigh;
PyObject *v;
{ ...
}

I rather have

static int set_something_with_unparsed_index(self, index, v)
somethingobject *self;
PyObject *index, *v;
{...
}

and have this called from Python with a syntax like:

>>> a.[1,2,3] or
>>> a.{1,2,3} or
>>> a.<1,2,3> or

something like this where Python passes the arguments within the
brackets to my methods for somethingobject.

Is this where tp_call comes into play?

Thanks

Chak Tan