Re: [sage-devel] Possible Cython bug

2017-08-10 Thread Travis Scrimshaw
On Monday, August 7, 2017 at 7:19:48 AM UTC-5, Jeroen Demeyer wrote: > > See https://github.com/cython/cython/issues/1807 > Thank you for filing the Cython bug report. Best, Travis -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To

Re: [sage-devel] Possible Cython bug

2017-08-07 Thread Jeroen Demeyer
The simplest workaround is to use F[i] instead of F[i] -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this

Re: [sage-devel] Possible Cython bug

2017-08-07 Thread Jeroen Demeyer
See https://github.com/cython/cython/issues/1807 -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group,

Re: [sage-devel] Possible Cython bug

2017-08-07 Thread Jeroen Demeyer
It is a Cython bug. Most simple example: sage: %%cython : def get(obj, int i): : return obj[i] sage: class D(dict): pass sage: d = D([(-1, "hello")]); d {-1: 'hello'} sage: get(d, -1) ... KeyError: 0 sage: d[-1] 'hello' -- You received this message because you are subscribed to

[sage-devel] Possible Cython bug

2017-08-03 Thread Travis Scrimshaw
Hey all, I think I have come across a possible Cython bug, but I am not sure. I am using 8.1beta0. Here is as small of a working example as I can currently get. sage: %%cython : def foo(F, int i): : return F[i] : def foo2(F, int i): : return F._dictionary[i] :