Re: [Cython] Bug with inlined functions that access globals

2017-11-24 Thread Robert Bradshaw
On Fri, Nov 24, 2017 at 5:48 AM, Erik Bray wrote: > On Fri, Nov 24, 2017 at 2:16 PM, Stefan Behnel wrote: >> Erik Bray schrieb am 24.11.2017 um 13:44: >>> I think maybe I've seen this brought up once or twice before in the >>> past, but with no real discussion. There is a slightly unpythonic >>>

Re: [Cython] Bug with inlined functions that access globals

2017-11-24 Thread Erik Bray
On Fri, Nov 24, 2017 at 2:16 PM, Stefan Behnel wrote: > Erik Bray schrieb am 24.11.2017 um 13:44: >> I think maybe I've seen this brought up once or twice before in the >> past, but with no real discussion. There is a slightly unpythonic >> problem with using cpdef inline functions defined in a .

Re: [Cython] Bug with inlined functions that access globals

2017-11-24 Thread Stefan Behnel
Erik Bray schrieb am 24.11.2017 um 13:44: > I think maybe I've seen this brought up once or twice before in the > past, but with no real discussion. There is a slightly unpythonic > problem with using cpdef inline functions defined in a .pxd file that > happen to access global variables. For exam

[Cython] Bug with inlined functions that access globals

2017-11-24 Thread Erik Bray
Hi, I think maybe I've seen this brought up once or twice before in the past, but with no real discussion. There is a slightly unpythonic problem with using cpdef inline functions defined in a .pxd file that happen to access global variables. For example: $ cat foo.pxd FOO_A = 1 cpdef inline f