Re: [Cython] Recent bugs in generators

2011-04-17 Thread Stefan Behnel
Vitja Makarov, 18.04.2011 06:38: 2011/4/18 Stefan Behnel: Vitja Makarov, 17.04.2011 17:57: 3. check_yield_in_exception() I added this because I found a failing pyregr test that uses it (testing the @contextmanager decorator). Cython calls __Pyx_ExceptionReset when except block is done, so

Re: [Cython] Recent bugs in generators

2011-04-17 Thread Vitja Makarov
2011/4/18 Stefan Behnel : > Vitja Makarov, 17.04.2011 17:57: >> >> 3. check_yield_in_exception() > > I added this because I found a failing pyregr test that uses it (testing the > @contextmanager decorator). > > >> Cython calls __Pyx_ExceptionReset when except block is done, so when >> yield is the

Re: [Cython] Recent bugs in generators

2011-04-17 Thread Stefan Behnel
Vitja Makarov, 17.04.2011 17:57: 3. check_yield_in_exception() I added this because I found a failing pyregr test that uses it (testing the @contextmanager decorator). Cython calls __Pyx_ExceptionReset when except block is done, so when yield is there no exception reset is called. I'm not

Re: [Cython] GSoC Proposal - Reimplement C modules in CPython's standard library in Cython.

2011-04-17 Thread Stefan Behnel
Arthur de Souza Ribeiro, 17.04.2011 20:07: Hi Stefan, about your first comment : "And it's better to let Cython know that this name refers to a function." in line 69 of encoder.pyx file I didn't understand well what does that mean, can you explain more this comment? Hmm, sorry, I think that wa

Re: [Cython] GSoC Proposal - Reimplement C modules in CPython's standard library in Cython.

2011-04-17 Thread Sturla Molden
Den 17.04.2011 21:16, skrev Stefan Behnel: However, the different number of functions calls also makes the profiling results less comparable, since there are fewer calls into the profiler. This leads to a lower performance penalty for Cython in the absolute timings, and consequently to an unf

Re: [Cython] GSoC Proposal - Reimplement C modules in CPython's standard library in Cython.

2011-04-17 Thread Stefan Behnel
Sturla Molden, 17.04.2011 20:24: Den 17.04.2011 20:07, skrev Arthur de Souza Ribeiro: I've profilled the module I created and the module that is in Python 3.2, the result is that the cython module spent about 73% less time then python's one, the output to the module was like this (blue for cytho

Re: [Cython] GSoC Proposal - Reimplement C modules in CPython's standard library in Cython.

2011-04-17 Thread Sturla Molden
Den 17.04.2011 20:07, skrev Arthur de Souza Ribeiro: I've profilled the module I created and the module that is in Python 3.2, the result is that the cython module spent about 73% less time then python's one, the output to the module was like this (blue for cython, red for python): The n

Re: [Cython] GSoC Proposal - Reimplement C modules in CPython's standard library in Cython.

2011-04-17 Thread Arthur de Souza Ribeiro
2011/4/15 Stefan Behnel > [please avoid top-posting] > > Arthur de Souza Ribeiro, 15.04.2011 04:31: > > I've created the .pyx files and it passed in all python tests. >> > > Fine. > > As far as I can see, you only added static types in some places. Did you test if they are actually required (ma

[Cython] Recent bugs in generators

2011-04-17 Thread Vitja Makarov
Hi! 1. Lambda-generator: Previous implementation was inspired by Python2.6: >>> list((lambda:((yield 1), (yield 2)))()) [1, 2, (None, None)] things changed in python2.7: >>> list((lambda:((yield 1), (yield 2)))()) [1, 2] 2. GeneratorExit is initialized to StopIteration when running generators_p