STINNER Victor added the comment:

Avoid scanning a substring to compute the maximum character is a good thing, so 
+1 for the idea. Instead of modifying an existing function, it might be safer 
to rename it. Even if it is private, a third party module *can* use it outside 
Python. It is also surprising that you have to specifiy a "maxchar" argument 
whereas the purpose of the function is to compute the maximum character.

Ex: rename _PyUnicode_FindMaxChar() to _PyUnicode_FindMaxChar2(), and add 
_PyUnicode_FindMaxChar() as the macro:

#define _PyUnicode_FindMaxChar(str, start, length) _PyUnicode_FindMaxChar2(str, 
start, length, 127)

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue16757>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to