[Python-Dev] frozenset C API? (original) (raw)

Guido van Rossum guido at python.org
Tue Sep 4 20:37:58 CEST 2007


I guess nobody has tried to create frozenset instances from C code before. Almost everyone uses set anyway. What are you trying to do?

On 9/4/07, Bill Janssen <janssen at parc.com> wrote:

I'm looking at building a "frozenset" instance as a return value from a C function, and the C API seems ridiculously clumsy. Maybe I'm misunderstanding it. Apparently, I need to create a list object, then pass that to PyFrozenSetNew(), then decref the list object.

Is that correct? What I'd like is something more like PyFrozenSetNEW(int) => PySetObject * PyFrozenSetSETITEM(s, i, v) Any idea why these aren't part of the API? Bill


Python-Dev mailing list Python-Dev at python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/guido%40python.org

-- --Guido van Rossum (home page: http://www.python.org/~guido/)



More information about the Python-Dev mailing list