[Python-ideas] string codes & substring equality

spir denis.spir at gmail.com
Thu Nov 28 12:43:05 CET 2013


All right, thank you all for the exchange, the issue of substring comparison for 
equality is solved, with either .startswith(substr, i) or .find(substr, i,j). 
But there remain the problem of getting codes (unicodes code point) at arbitrary 
indexes in a string?

Is it weird to consider a .code(i) string method? What would be its 
implementation cost? I would really have good usage for it, and certainly 
numerous other use cases exist.

PS: I would be ready to implement it myself, with the help of some dev to guide 
me through the code base. But it's stupid, since the method is so tiny & simple 
it would be far less time for such a dev to implement it directly himself.

denis


More information about the Python-ideas mailing list