Python naming conventions in decorators

后端 未结 2 1534
情歌与酒
情歌与酒 2021-02-05 04:37

Are there any \"accepted\" naming conventions for the innards of Python decorators?

The style guide doesn\'t mention it, and this awesome entry about decorators is prett

2条回答
  •  情歌与酒
    2021-02-05 04:56

    By definition, a decorator in Python could be a function or a class, so the type of implementation (class or function), is the factor deciding which naming convention to use. a common mistake is to prefix the name of the function with the keyword decorator. for more information about decorators see link

提交回复
热议问题