Cython version 0.29.21
def f() -> str:
return repr('')
with cython -3 -o foo.c foo.py
results in an error:
Error compiling Cython file:
------------------------------------------------------------
...
def f() -> str:
return repr('')
^
------------------------------------------------------------
foo.py:2:15: str objects do not support coercion to unicode, use a unicode string literal instead (u'')
As far as I'm aware, repr() returns a string, so there shouldn't be any issue here? Wrapping it str(repr('')) works fine.
Cython version 0.29.21
with
cython -3 -o foo.c foo.pyresults in an error:
As far as I'm aware, repr() returns a string, so there shouldn't be any issue here? Wrapping it
str(repr(''))works fine.