[Cython] PEPs 263 and 3120
Stefan Behnel
stefan_ml at behnel.de
Mon Apr 21 18:16:39 CEST 2008
Hi,
Stefan Behnel wrote:
> just a quick note that I started working on PEP 263 (source code encoding
> declaration) and PEP 3120 (UTF-8 as default source encoding).
One problem I noticed: doc-strings are currently handled as part of the parent
node (class/property/function) and not as normal StringNodes. So the
information if it is supposed to be a unicode string or a byte string is lost.
Before I start hacking into this, is there any reason why doc-strings should
not just *all* be unicode? Because this would be really simple to implement,
and I don't think we would loose anything, except for a certain level of
compatibility to Python 2. In Python 3, doc-strings are unicode by default
anyway, and you would have to make them byte strings explicitly. I think the
cases where you would not want unicode here are really rare, if any...
Stefan
More information about the Cython-dev
mailing list