On Sun, Feb 13, 2011 at 9:55 PM, Vitja Makarov <vitja.maka...@gmail.com>wrote:
> 2011/2/14 Dan Stromberg <strom...@gmail.com>: > > > > On Sun, Feb 13, 2011 at 5:17 PM, Dan Stromberg <strom...@gmail.com> > wrote: > >> > >> On Sun, Feb 6, 2011 at 3:38 AM, Vitja Makarov <vitja.maka...@gmail.com> > >> wrote: > >>> > >>> 2011/2/6 Dan Stromberg <strom...@gmail.com>: > >>> > > >>> > On Sat, Feb 5, 2011 at 3:10 PM, Vitja Makarov < > vitja.maka...@gmail.com> > >>> > wrote: > >>> >> > >>> >> 2011/2/6 Vitja Makarov <vitja.maka...@gmail.com>: > >>> >> > 2011/2/6 Dan Stromberg <strom...@gmail.com>: > >>> >> >> > >>> >> >> Just a quick note to let you know I'm very eager to have working > >>> >> >> generators > >>> >> >> (yield) in Cython... ^_^ It's frequently the main thing that > >>> >> >> complicates > >>> >> >> moving my critical sections to Cython. > >>> >> >> -- > >>> >> >> Dan Stromberg > >>> >> >> > >>> >> > > >>> >> > Ok, you will see generators soon in cython))) the most important > >>> >> > part > >>> >> > is already implemented, but I'm not sure that's the importetant > >>> >> > one;) > >>> >> > > >>> >> > >>> >> now you can use my github repo at https://github.com/vitek/cython > >>> > > >>> > Hey, that's great. > >>> > I tried a little test program with it, and it worked great. I'll > >>> > likely > >>> > give it a try with a more real-world workload before long. > >>> > Does it pass all the tests you've thrown at it yet? > >>> > Thanks! > >>> > > >>> > >>> Hmm now it work as excepted. If you will find a case when it doesn't > >>> work, report it. > >>> See also tests at tests/run/generators.pyx > >>> > >>> -- > >>> vitja. > >> > >> Do you want e-mail, or a formal bug tracking entry? > >> In case you want e-mail: > >> + /usr/local/cpython-2.5/bin/python /usr/local/cpython-2.5/bin/cython > >> rolling_checksum_pyx_mod.pyx > >> Error compiling Cython file: > >> ------------------------------------------------------------ > >> ... > >> import os > >> import sys > >> #mport comma_mod > >> def min_max_chunker(file_handle): > >> ^ > >> ------------------------------------------------------------ > >> rolling_checksum_pyx_mod.pyx:9:0: Compiler crash in MarkClosureVisitor > >> ModuleNode.body = StatListNode(rolling_checksum_pyx_mod.pyx:4:0) > >> StatListNode.stats[2] = StatListNode(rolling_checksum_pyx_mod.pyx:9:0) > >> StatListNode.stats[0] = DefNode(rolling_checksum_pyx_mod.pyx:9:0, > >> doc = u'Make sure chunk sizes are above and below a pair of > >> thresholds', > >> modifiers = [...]/0, > >> name = u'min_max_chunker', > >> num_required_args = 1, > >> reqd_kw_flags_cname = '0') > >> Compiler crash traceback from this point on: > >> File "Visitor.py", line 173, in > >> Cython.Compiler.Visitor.TreeVisitor._visitchild > >> (Cython/Compiler/Visitor.c:3508) > >> File > >> > "/usr/local/cpython-2.5/lib/python2.5/site-packages/Cython/Compiler/ParseTreeTransforms.py", > >> line 1380, in visit_FuncDefNode > >> for i, yield_expr in enumerate(collector.yields, 1): > >> TypeError: enumerate() takes exactly 1 argument (2 given) > >> make: *** [rcms] Error 1 > >> > >> > >> The code that produced this is > >> at http://stromberg.dnsalias.org/svn/backshift/trunk/ - with make > target > >> "rcms". It expects to find a variety of cpython's at > >> /usr/local/cpython-x.y/bin/python . > > > > > > Oh, and of course, to eliminate some details for you, here's the > > (automatically generated via m4) file that's giving the compiler error > > (attached). > > I suspect this issue may just be because a 2.x-ism (x>5) with how > enumerate > > is used has crept into cython. > > Thanks! > > > Hi! > > It seems that you have old python version, 2.4? > It's 2.5. > Here is a fix: > > https://github.com/vitek/cython/commit/bb8cd8275bf910117750356845814d4d9d998d6e Thanks, but... How do I apply this? I tried git pull and git clone, but neither worked for me. I know SVN pretty well, but I haven't used git much yet. -- Dan Stromberg
_______________________________________________ cython-devel mailing list cython-devel@python.org http://mail.python.org/mailman/listinfo/cython-devel