Author v+python
Recipients Arfrever, ezio.melotti, jkloth, lemburg, mrabarnett, pitrou, r.david.murray, tchrist, terry.reedy, v+python, vstinner
Date 2011-08-24.07:04:53
SpamBayes Score 0.000578224
Marked as misclassified No
Message-id <>
In msg142098  Ezio said:
> Keep in mind that we should be able to access and use lone surrogates too, therefore:
> s = '\ud800'  # should be valid
> len(s)  # should this raise an error? (or return 0.5 ;)?

I say:
For streams and data types in which lone surrogates are permitted, a lone surrogate should be treated as and counted as a character (codepoint).

For streams and data types in which lone surrogates are not permitted, the assigned should be invalid, and raise an error; len would then never see it, and has no quandary.
Date User Action Args
2011-08-24 07:04:54v+pythonsetrecipients: + v+python, lemburg, terry.reedy, pitrou, vstinner, jkloth, ezio.melotti, mrabarnett, Arfrever, r.david.murray, tchrist
2011-08-24 07:04:54v+pythonsetmessageid: <>
2011-08-24 07:04:53v+pythonlinkissue12729 messages
2011-08-24 07:04:53v+pythoncreate