Why does this python method gives an error saying global name not defined?

前端 未结 3 1140
时光取名叫无心
时光取名叫无心 2021-01-27 13:00

I have a single code file for my Google App Engine project. This simple file has one class, and inside it a few methods. Why does this python method gives an error saying global

3条回答
  •  既然无缘
    2021-01-27 13:59

    You have to use it like this:

    self.gen_groups(input)
    

    There is not implicit "self" in Python.

提交回复
热议问题