Python Question about a function call with multiple arguments

10,686
4,243
Yes, it has, but I believe Python is not quite built for the same purpose as java or c++. While learning from online tutorials, I found it is customary to put a reference to the currently called object in a function definition, through the keyword self. I don't remember doing this in java (except maybe in a few cases). I believe Python might be good for scientific computing, but not suitable for application development.
Java has self embedded as the this pointer which is optionally used when a naming conflict occurs between function args and instance attributrs
 
10,686
4,243
Java has self embedded as the this pointer which is optionally used when a naming conflict occurs between function args and instance attributrs
For python oo is kind of tacked on to the language hence you need to use self in methods as a placeholder argument but not when you call the method.
 

Want to reply to this thread?

"Question about a function call with multiple arguments" You must log in or register to reply here.

Related Threads for: Question about a function call with multiple arguments

Replies
4
Views
3K
Replies
2
Views
1K
Replies
2
Views
2K
  • Posted
Replies
7
Views
3K

Physics Forums Values

We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving
Top