[Tutor] Correct style of line break when chaining methods
Mark Lawrence
breamoreboy at gmail.com
Sat Jul 10 12:18:09 EDT 2021
On 10/07/2021 17:03, Manprit Singh wrote:
> Dear sir,
>
> See in this particular example, the length of the line is 75 characters ,
> and according to PEP 8, in Python a line must not exceed 69 characters.
> So I divided this line .
> And Secondarily when doing work with Numpy arrays and Pandas we are mostly
> working with chained methods, and at that time, what i feel is a line break
> can increase readability also .
> Need further comments and guidance.
>
> Regards
> Manprit Singh
>
PEP 8 quite clearly states "This document gives coding conventions for
the Python code comprising the standard library in the main Python
distribution". It also has a section titled "A Foolish Consistency is
the Hobgoblin of Little Minds". I'll leave you to draw your own
conclusions :)
--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.
Mark Lawrence
More information about the Tutor
mailing list