In python, what the underline parameter mean in function

前端 未结 3 1264
长发绾君心
长发绾君心 2020-12-30 05:12

For example, I read a code:

def parse_doc(self, _, doc):

What does the underline \"_\" mean?

3条回答
  •  伪装坚强ぢ
    2020-12-30 05:52

    _ is a valid variable name in python. But it is mostly used in i18n, so it's better to not to use it for other purposes.

提交回复
热议问题