ML icon indicating copy to clipboard operation
ML copied to clipboard

Properties don't appear in the call graph

Open khatchad opened this issue 2 years ago • 0 comments

Consider the following example:

class Test:
    def __init__(self, value):
        self.__value = value

    @property
    def value(self):
        return self.__value

    @value.setter
    def name(self, number):
        self.__value = number


if __name__ == "__main__":
    k = Test(1)
    print(k.value)  # using getter
    k.name = 2  # using setter
    print(k.value)  # using getter

There is no CG node for Test.value(), which means that print(k.value) is not dispatching to the property definition.

khatchad avatar Dec 07 '23 20:12 khatchad