Reputation: 32670
I'm relatively new to Python and working on a Pylons app.
Consider the following controller:
class FooController(BaseController):
def doFoo(self, fooArg):
#do stuff
#return stuff
def doBar(self, barArg):
self.doFoo(barArg) #call A
FooController.doFoo(self, barArg) #call B
What (if anything) is the difference between call A and call B here?
Upvotes: 0
Views: 585
Reputation: 82470
For your use case, nothing. Because when you do self.<method_call>
, self is implicitly passed as the first parameter to FooContoller.doFoo(<self>, arg)
.
Upvotes: 1