[Python-Dev] PySet_Next (Was: PySet API) (original) (raw)

Barry Warsaw barry at python.org
Mon Mar 27 16:11:04 CEST 2006


On Sun, 2006-03-26 at 19:59 +0200, "Martin v. Löwis" wrote:

If it is similar to PyDictNext, it will have PyObject** /input/ variables, which are really meant as PyObject* /output/ variables.

Yep, that's exactly what my posted patch does.

For the caller, a clear usage strategy follows from this: either discard the references before making a potentially-mutating call, or PyINCREF the set element before making that mutating call.

Yep. Nice and simple. And if you're not making a potentially-mutating call, you don't have to worry about even that. These /are/ valid use cases.

-Barry

-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 309 bytes Desc: This is a digitally signed message part Url : http://mail.python.org/pipermail/python-dev/attachments/20060327/df3d2da2/attachment.pgp



More information about the Python-Dev mailing list