Robert Bradshaw, 25.11.2009 04:24:
> On Nov 24, 2009, at 4:25 PM, Lisandro Dalcin wrote:
>> On Tue, Nov 24, 2009 at 7:47 PM, Joachim Saul wrote:
>>> Anyway, what I have done is
>>>
>>> def foo(bytes bar=bytes("")):
>>> c_foo(bar)
>>>
>> Can you try this: ?
>>
>> def foo(bytes bar=b""):
>> c_foo(bar)
>
> I could be wrong, but I don't think Pyrex supports the b prefix on
> strings.
>
> BTW, it be easier to just do
>
> def foo(bar=""):
> c_foo(bar)
This is not portable to Py3. This may not be an issue, given that the OP
aims for compatibility with Pyrex, which generates code that won't work in
Py3 anyway. But I would assume that writing broken code is not the
intention of the OP.
Stefan
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev