Is it possible to break a long function name across multiple lines?

后端 未结 7 1127
南旧
南旧 2021-02-04 23:02

Our development team uses a PEP8 linter which requires a maximum line length of 80 characters.

When I\'m writing unit tests in python, I like to have

7条回答
  •  粉色の甜心
    2021-02-04 23:33

    No, this is not possible.

    In most cases such a long name would be undesirable from the standpoint of readability and usability of the function, though your use case for test names seems pretty reasonable.

    The lexical rules of Python do not allow a single token (in this case an identifier) to be split across multiple lines. The logical line continuation character (\ at the end of a line) can join multiple physical lines into a single logical line, but cannot join a single token across multiple lines.

提交回复
热议问题