Hi,

Dag Sverre Seljebotn wrote:
> Declaring types on arguments are then simply a short-hand for "always run
> argument through the given factory/type constructor", and can be
> implemented for Python types as well, so
> 
> def foo(a : unicode):
> 
> would make sure int and str params are converted to unicode.

No way. Converting a byte string to unicode is something that has to be done
explicitly. How could you know the input encoding that is used for the byte
sequence?

And while automatic conversion of numbers to strings is less problematic, I
would not expect my language to do that for me (except for printing, maybe).

Stefan
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to