Which is more fundamental between Python functions and Python object-methods?
Answers
Answered by
0
Answer:
Python Method
Method is called by its name, but it is associated to an object (dependent).
A method is implicitly passed the object on which it is invoked.
It may or may not return any data.
A method can operate on the data (instance variables) that is contained by the corresponding class
Functions
Function is block of code that is also called by its name. (independent)
The function can have different parameters or may not have any at all. If any data (parameters) are passed, they are passed explicitly.
It may or may not return any data.
Function does not deal with Class and its instance concept.
Explanation:
Similar questions
Biology,
7 months ago
Economy,
7 months ago
English,
7 months ago
Social Sciences,
1 year ago
Biology,
1 year ago