#
Class MyClass:
def function(self):
self.driver = webdriver.Firefox()
What is the purpose of SELF here:
"
self
is an object reference to the object itself, therefore, they are same. Python methods are not called in the context of the object itself. self
in Python may be used to deal with custom object models or something."
"
The
self
variable refers to the object itself."
Source:
http://stackoverflow.com/questions/2709821/what-is-the-purpose-of-self-in-python
No comments:
Post a Comment