[C++-sig] Some thoughts on py3k support
Stefan Seefeld
seefeld at sympatico.ca
Wed Mar 18 18:52:11 CET 2009
Ralf W. Grosse-Kunstleve wrote:
> C++ has wchar_t and std::wstring. Could these be leveraged to avoid ambiguities?
> E.g. char, std::string are mapped to py3 byte objects, wchar_t and std::wstring
> to py3 str objects.
>
I don't quite agree with that suggestion. First, wchar_t doesn't imply
Unicode (and char doesn't exclude it !). Second, I do want my existing
string functions (whether they use 'std::string' or 'char const *') to
keep operating on strings, not byte buffers.
I believe the only way to avoid ambiguities is by allowing / requesting
users to explicitly set a policy.
Thanks,
Stefan
--
...ich hab' noch einen Koffer in Berlin...
More information about the Cplusplus-sig
mailing list