Re: [Cython] Issue with function annotations

2017-09-28 Thread Lisandro Dalcin
On 27 September 2017 at 17:18, Stefan Behnel wrote: > Lisandro Dalcin schrieb am 27.09.2017 um 15:53: >> Annotations can be used for >> type hinting, but they are not required to do that. > > Well, they sort of are, according to PEP 484. > I gently disagree. Third paragraph of PEP 484: """ Note

Re: [Cython] Issue with function annotations

2017-09-27 Thread Stefan Behnel
Lisandro Dalcin schrieb am 27.09.2017 um 15:53: > Annotations can be used for > type hinting, but they are not required to do that. Well, they sort of are, according to PEP 484. > For example, in my > own use case, I'm just using it to get better docstrings. Then you can set the directive "anno

Re: [Cython] Issue with function annotations

2017-09-27 Thread Lisandro Dalcin
On 27 September 2017 at 15:54, Stefan Behnel wrote: > Hi Lisandro, > > Lisandro Dalcin schrieb am 27.09.2017 um 14:42: >> $ cython --version >> Cython version 0.27 >> >> $ cat tmp.pyx >> def f() -> (list, list): >> return [], [] >> >> $ cython tmp.pyx >> >> Error compiling Cython file: >>

Re: [Cython] Issue with function annotations

2017-09-27 Thread Stefan Behnel
Hi Lisandro, Lisandro Dalcin schrieb am 27.09.2017 um 14:42: > $ cython --version > Cython version 0.27 > > $ cat tmp.pyx > def f() -> (list, list): > return [], [] > > $ cython tmp.pyx > > Error compiling Cython file: > > ... > d

[Cython] Issue with function annotations

2017-09-27 Thread Lisandro Dalcin
$ cython --version Cython version 0.27 $ cat tmp.pyx def f() -> (list, list): return [], [] $ cython tmp.pyx Error compiling Cython file: ... def f() -> (list, list): ^ ---