Re: [Cython] Is it easy to do an "AST grep" of Cython code?

2015-09-14 Thread Jelle Zijlstra
This seems doable in principle by using the Cython.Compiler.Visitor.TreeVisitor class. You'll have to figure out what Cython AST nodes the things you're looking for correspond to. As a simple example, this will find all non-def functions in a Cython file: from Cython.Compiler import TreeFragment,

[Cython] CPython incompatibility in string literal concatenation

2015-09-13 Thread Jelle Zijlstra
While implementing PEP 498 I found a minor incompatibility between CPython and Cython: CPython lets you concatenate u-prefixed and non-prefixed string literals, while Cython throws an error. jelle@devjelle:~/cython$ cat concat.py print(u'foo' 'bar') jelle@devjelle:~/cython$ python concat.py fooba

Re: [Cython] [cython-users] call for contribution: PEP 498 - Literal String Interpolation

2015-09-09 Thread Jelle Zijlstra
I would be interested in doing this, although I haven't previously worked on Cython itself. I'll start looking into it over the weekend. 2015-09-09 7:35 GMT-07:00 Jelle Zijlstra : > I would be interested in doing this, although I haven't previously worked > on Cython itsel