> > > All this weird behaviour is needed to make Unicode objects > > > behave well together with s#. > > > > I don't believe this. Why would the implementation of u# have any > > effect on making s# work? [...] > u# is simply a copy&paste implementation of s# interpreting the > results of the read buffer interface as Py_UNICODE array. Ok. That explains its history, but it also clarifies that changing the u# implementation has *no* effect whatsoever proper operation of s#. Therefore, I still think that u# should reject string objects, instead of silently doing the wrong thing. > As I menioned in another mail, we should probably let u# pass > through Unicode objects as-is without going through the read buffer > interface. Yes, that would be nice. The only use of u# I can see is that it gives you the number of Py_UNICODE characters, so that the caller doesn't have to look for the terminating NUL. Regards, Martin
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4