Question
Evgeny Shvarov · Oct 2

How to refer to a Classmethod of the same Class using Embedded Python?

Hi folks!

How can I refer to a classmethod of the same class while coding another classmethod with Embedded python?

I know that I can call it with iris.cls(classname).MethodName(), but it's more cumbersome even comparing with ObjectScript, where I can call ..MethodName().

Compare ObjectScript:

do ..SetupGame()

and the same call in EmbeddedPython:

    iris.cls('eshvarov.sample.SeaBattle.GamePython').SetupGame()

 

Thoughts?

Product version: IRIS 2022.1
0
0 98
Discussion (5)1
Log in or sign up to continue

Unfortunately no. self is for the object instance I guess

Maybe it makes sense to add something like cself or Self to refer to a class inside classmethods. @Bob Kuszewski ?

I use and just verifiied 

iris.cls(__name__).SetupGame()