What is (self) in the python code? (OOP question)
Posted
by alex
on Stack Overflow
See other posts from Stack Overflow
or by alex
Published on 2010-06-02T19:19:55Z
Indexed on
2010/06/02
19:24 UTC
Read the original article
Hit count: 124
class MyController(BaseController):
def index(self):
# Return a rendered template
#return render('/test.mako')
# or, return a response
return ''
Why does the function "index" have "self"?
I got this code from Pylons controller
© Stack Overflow or respective owner