Why does Pylint object to single-character variable names?

后端 未结 5 1794
我寻月下人不归
我寻月下人不归 2021-01-30 12:08

I\'m still getting used to Python conventions and using Pylint to make my code more Pythonic, but I\'m puzzled by the fact that Pylint doesn\'t like single character variable na

5条回答
  •  我在风中等你
    2021-01-30 12:58

    Pylint checks not only PEP8 recommendations. It has also its own recommendations, one of which is that a variable name should be descriptive and not too short.

    You can use this to avoid such short names:

    my_list.extend(x_values)
    

    Or tweak Pylint's configuration to tell Pylint what variable name are good.

提交回复
热议问题