Re: Generators through the C API

2009-08-06 Thread Stefan Behnel
Duncan Booth schrieb: > Lucas P Melo wrote: > >> Hello, I'm a total noob about the C API. Is there any way to create a >> generator function using the C API? I couldn't find anything like the >> 'yield' keyword in it. >> >> Thanks in advance. > > You define a new type with tp_flags including P

Re: Generators through the C API

2009-07-31 Thread Duncan Booth
Lucas P Melo wrote: > Hello, I'm a total noob about the C API. Is there any way to create a > generator function using the C API? I couldn't find anything like the > 'yield' keyword in it. > > Thanks in advance. You define a new type with tp_flags including Py_TPFLAGS_HAVE_ITER. Anything tha

Generators through the C API

2009-07-30 Thread Lucas P Melo
Hello, I'm a total noob about the C API. Is there any way to create a generator function using the C API? I couldn't find anything like the 'yield' keyword in it. Thanks in advance. -- http://mail.python.org/mailman/listinfo/python-list