这是因为在 class 中调用了带双下划线 "__" 的函数对象,例如:

def __fun():

  pass

class A():

  def __init__(self):

    __fun()  #会报错,不要调用外部带 __ 的函数

相关文章:

  • 2022-12-23
  • 2021-08-26
  • 2021-09-24
  • 2021-10-14
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-06-21
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-30
相关资源
相似解决方案