Skip to main content

All Questions

0 votes
2 answers
1k views

How can Python, a language that supports Object Oriented Programming, be implemented in C, which is not an Object Oriented Programming language?

To my understanding, C does not have the concept of objects, then how can Python be implemented in C to support something that C can not? How is the concept of "Object" modeled in C? What is ...
Alice's user avatar
  • 39
21 votes
3 answers
24k views

Why do you need "self." in Python to refer to instance variables?

I have been programming into a number of languages like Java, Ruby, Haskell and Python. I have to switch between many languages per day due to different projects I work on. Now, the issue is I often ...
vivek's user avatar
  • 473
0 votes
2 answers
512 views

Does Python have any features which can be used for encapsulating private data?

Usually in OOP world we are told that modularity is a good practice and keeping loose coupling between module is a great thing. Encapsulation helps us achieve this loose coupling. In Java ...
CodeYogi's user avatar
  • 2,186