Function defined outside the class : Class Method : Class PYTHON examples


PYTHON examples » Class » Class Method »

 

Function defined outside the class


 


def f1(self, x, y):
    return min(x, x+y)

class C:
    f = f1
    def g(self):
        return 'hello world'
    h = g

a = C
a.g

           
         
  



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON examples

 Navioo Class
» Class Method