On Sat, 2006-03-18 at 19:22 -0500, Raymond Hettinger wrote: > > [Barry Warsaw] > >> Oh, also, we have a couple of additions to the PySet C API. > >> I'll work on putting together an SF patch for them over the weekend. > > What are you proposing to add to the PySet API?
PySet_Clear(), PySet_Next(), PySet_Update(), and PySet_AsList(). > I designed an API that was both minimal and complete. The idea was to > provide > direct access to fined grained functions and access the rest through the > existing abstract API for PyObject and PyNumber as detailed in the Set API > docs. We use the above functions quite a bit in our embedded app, so we want them to be as efficient as possible. They should also be obvious to C programmers (e.g. using PyNumber_InPlaceSubtract() is much less obvious than PySet_Clear()). > I tried out the API to translate a number of set algorithms and found that > the > API was easy-to-use and sufficient as-is. There may be room for variants of > the > type checking macros, but I would like the rest of the C API to remain as-is > unless some compelling deficiency can be shown. It is easy to expand the API > later but almost impossible to take anything back once in the field. The above mirrors what's available for dict objects, and if you are using sets for collections of objects, I believe they make the most sense. > IOW, if I have I still have a say in the matter, the patch will most likely > not > be accepted. Can you explain why the additions above would not be obvious improvements? -Barry
signature.asc
Description: This is a digitally signed message part
_______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com