[issue24000] More fixes for the Clinic mapping of converters to format units

Larry Hastings report at bugs.python.org
Mon May 4 21:44:31 CEST 2015


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 <report at bugs.python.org>
<http://bugs.python.org/issue24000>
_______________________________________


More information about the Python-bugs-list mailing list