Larry Hastings added the comment: As for "why not length instead of zeroes": Because the primary reason for the parameter is specifying that the string can contain embedded zeroes. Returning the length is a side-effect of this, not the main point. If the string didn't have embedded zeroes, we wouldn't need the length.
The only reason the code didn't have "zeroes=True" everywhere was because I screwed up and didn't realize all those mappings *should* have specified it. The documentation is very consistent about calling it a NUL. I don't think "NUL=True" or "allow_NUL=true" is particularly attractive; we never (almost never?) use capital letters in parameter names. So any other name is going to be a compromise. "allow_null" and "allow_nul" are misspellings, and don't convey the idea any better; they can confuse the reader with the related concept of NULL or None. At least "zeroes" has the benefit of being an actual word, representing a related concept. Will you be done bikeshedding soon? ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue24000> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com