Why does python use two underscores for certain things?
I'm fairly new to actual programming languages, and Python is my first one. I know my way around Linux a bit, enough to get a summer job with it (I'm still in high school), and on the job, I have a lot of free time which I'm using to learn Python. One thing's been getting me though. What exactly is different in Python when you have expressions such as x.__add__(y) <==> x+y x.__getattribute__('foo') <==> x.foo I know what methods do and stuff, and I get what they do, but my question is: How are those double underscore methods above different from their simpler looking equivalents? P.S., I don't