Em Ter, 2006-04-11 às 18:55 +0200, "Martin v. Löwis" escreveu: > Dave Opstad wrote: > > If I want to handle sets should I just use a dictionary's keys and > > ignore the values, or is there some more explicit set support somewhere > > I'm not seeing? > > Indeed, there is. To create a new set, do > > PyObject_Call(PySet_Type, ""); > > To, say, invoke the add method, do > > PyObject_CallMethod(s, "add", "O", o);
I don't know much about the C API, but I'll ask anyway: the methods, say, PySet, would be included for clarity/brevity or for performance reasons? -- Felipe. -- http://mail.python.org/mailman/listinfo/python-list