I would suggest both theoretical and practical reasons why the approach you use (reorganizing the general code into a separate method and calling it from the post and get methods) is superior to a seemingly simpler alternative to just have one of these two methods called another.
" A B" "" "" - , , , , B, , , ; A B ( / B), . , . A B C, .
: , . , : A, B C ( / C) , , A B. , , , .
( ): , , :
def amethod(self):
return cmethod(self)
()
amethod = cmethod
( , ). , :
class ListSubs(webapp.RequestHandler):
def _run(self):
self.response.out.write("This works even better!")
get = post = _run
, "" , ( get _run ..) (, post, get ..), , .