[Python-ideas] PEP 8 update on line length

Chris Angelico rosuav at gmail.com
Tue Feb 19 09:41:27 EST 2019


On Tue, Feb 19, 2019 at 9:38 PM Nicolas Rolin <nicolas.rolin at tiime.fr> wrote:
> I understand that the writer wants to have shorter names, but why would I want more ambigious names as a reader ?
> How would you rename number_of_pages_in_current_section such that the reader is not left wondering what does this variable represents ?

page_count will usually be unambiguous. You might need total_pages to
mean "not the current section", thus leaving the shorter one available
for the narrower use. Obviously questions like this can't be answered
without context, but at an absolute minimum, "number_of" can almost
*always* be omitted.

ChrisA


More information about the Python-ideas mailing list