How to access `this` in python member function?


#1
entity type Car {
  speed: double

  @py(env="xxx")
  func: member function()
}
def func():
  print(this.speed) //?? 

#2

In python implementation of member function, you need to specify a this argument in first position:

def function(this):
    print(this.speed)

However, do not specify it in the declaration (i.e in the c3typ file).