On Mon, 2006-03-27 at 23:53 -0800, Raymond Hettinger wrote: > While I don't favor the proposed API, I think is essential that > you not be left hanging without good options.
Thank you. So where does this leave us? BTW, Guido made a suggestion in private email (which he okayed to mention publicly). Quoting: "OTOH, our experience with dicts have shown that the C dict API causes major constraints on dict subclassing (since the C APIs mostly ignore overridden methods) and the proliferation of their use makes it hard to implement features like allowing arbitrary mappings as globals/locals for exec/eval." "Perhaps the PySet API can raise an error if it's ever called on something that's not *exactly* a set? No subclassing allowed. Shouldn't affect you, and should be an effective deterrent against abuse of the kind that made the PyDict API an albatross." This would involve changing the type test in PySet_Next() from a PyAnySet_Check() to a PyAnySet_CheckExact() so that it only works for sets and frozen sets. Guido's exactly right, it wouldn't affect us so it seems like it would be fine. I'm not sure if this directly addresses your concerns though, since they seem mostly centered around the safety (or lack thereof) of PySet_Next(). -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