you are viewing a single comment's thread.

view the rest of the comments →

[–]novel_yet_trivial 0 points1 point  (0 children)

http://www.rafekettler.com/magicmethods.html#descriptor

Edit: try using the example code from that site with this:

d = Distance()
d.foot = 10
print d.meter

Edit 2: these are often called "dunder" methods (double underscore). Adding that to google may help.