On Dec 17, 2009, at 12:20 AM, Stefan Behnel wrote:

> Greg Ewing, 17.12.2009 00:14:
>>>> Will there be a different
>>>> handling for function signatures, or will it work the same  
>>>> everywhere? I.e.
>>>> will a "def func(bytes b)" function always accept unicode,
>>
>> Not under my version of the proposal -- there is only
>> automatic conversion between unicode and a bytes type
>> with a declared encoding. Unicode and plain bytes are
>> still incompatible.
>
> That's my preference, too. And I think having a special unicode type  
> that
> coerces to and from a specifically encoded Python byte string makes  
> sense.

I actually think unicode -> bytes is weirder than unicode -> char*  
(because the latter is the best C has to offer for strings), though  
it's messier from a null-bytes and memory-management perspective.

- Robert

_______________________________________________
Cython-dev mailing list
Cython-dev@codespeak.net
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to