[issue29526] Documenting format() function

R. David Murray report at bugs.python.org
Fri Feb 10 09:59:35 EST 2017


R. David Murray added the comment:

Thanks for wanting to help improve python.

I'm not entirely clear on what you are proposing.  I *think* you want to add something to the 'format' docstring?  As Eric mentioned the 'mini language' depends on the datatype, so it is going to be hard to cram accurate information into a docstring, where the full context of the documentation explanation of how format interacts with data types is missing.  We try to keep docstrings as short reminders.  In that regard, the format docstring *is* perhaps a bit lacking :)  A reminder of the BNF of the minilanguage would also be helpful if we could cram that in somehow.  It may just be too complex a topic for a docstring, though.

I'm also not clear why you are referring to strftime and numbers in the same sentence.  strftime is for date formatting.  I certainly don't think it is appropriate to try to jam that complex subtopic into the format docstring :)  Maybe you meant 'printf', which % formatting followed fairly closely?

----------
nosy: +r.david.murray

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue29526>
_______________________________________


More information about the Python-bugs-list mailing list