Apr-04-2021, 07:39 AM
(Apr-04-2021, 07:05 AM)Gribouillis Wrote: The call tst.fun(3, 5) is incorrect here because fun() needs an instance to workYet the code gives no error:
Output:8
8
I believe Mim has a point.Also a class does not need an instance to work as we can read in 9.3.2. Class Objects:
Class objects support two kinds of operations: attribute references and instantiation
. As a method is also an attribute it can be called.