[Cython] Bug: C++ strings defined in a PXD file are empty
Yury V. Zaytsev
yury at shurup.com
Wed Jul 17 13:59:48 CEST 2013
Hi,
Please find a minimal reproducer attached:
In [1]: import pxdbug
This should show 'bad value':
This should show 'good value': good value
Is this a real bug or I'm missing something fundamental about the PXD
files? If it's the former, shall I create an issue on the Trac or
GitHub?
Thanks!
--
Sincerely yours,
Yury V. Zaytsev
-------------- next part --------------
from libcpp.string cimport string
cdef string STR_BAD = "bad value"
-------------- next part --------------
# distutils: language = c++
from libcpp.string cimport string
cdef string STR_GOOD = "good value"
print("This should show 'bad value': {0}".format(STR_BAD))
print("This should show 'good value': {0}".format(STR_GOOD))
More information about the cython-devel
mailing list