Re: [Cython] DEF converts byte strings to unicode

2015-09-12 Thread Jakub Wilk
I think something is still not quite right in Cython 0.23.2. Consider this code: DEF FOO = 'foo' print type('foo') print type(FOO) In Python 3, I get: -- Jakub Wilk ___ cython-devel mailing list cython-devel@python.org https://mail.python.org/mail

Re: [Cython] DEF converts byte strings to unicode

2015-09-12 Thread Stefan Behnel
Jakub Wilk schrieb am 12.09.2015 um 14:59: > I think something is still not quite right in Cython 0.23.2. > > Consider this code: > > DEF FOO = 'foo' > print type('foo') > print type(FOO) > > In Python 3, I get: > > > Remember that DEF uses compile time evaluation in *Python*. Python does no

Re: [Cython] DEF converts byte strings to unicode

2015-09-12 Thread Stefan Behnel
Stefan Behnel schrieb am 12.09.2015 um 18:14: > Jakub Wilk schrieb am 12.09.2015 um 14:59: >> I think something is still not quite right in Cython 0.23.2. >> >> Consider this code: >> >> DEF FOO = 'foo' >> print type('foo') >> print type(FOO) >> >> In Python 3, I get: >> >> >> > > Remember that

Re: [Cython] DEF converts byte strings to unicode

2015-09-12 Thread Jakub Wilk
* Stefan Behnel , 2015-09-12, 18:14: My general recommendation is to a) avoid DEF, b) avoid DEF for string values, and c) avoid DEF for unprefixed string values, in that order. But b) and c) are only for advanced users. Fair enough. NB, there are examples that use DEFs with string values in t