[Cython] [Bug] Coercion of struct constructor nodes

Stefan Behnel stefan_ml at behnel.de
Mon Apr 6 09:30:43 CEST 2015


Carlos Pita schrieb am 06.04.2015 um 00:49:
> f and g below should behave identically, shouldn't them?
> 
> import cython
> 
> cdef struct Point:
>     int x
>     int y
> 
> def f():
>     return Point(x=10, y=10)
> 
> def g():
>     cdef Point p = Point(x=10, y=10)
>     return p

Yes, they should.

https://github.com/cython/cython/commit/c25a6167fbc839f2af4e0a01e40792d827492450

Stefan



More information about the cython-devel mailing list