In Ruby, objects have a handy method called method_missing which allows one to handle method calls for methods that have not even been (explicitly) defined:
method_missing
Some use cases of method_missing can be implemented in Python using __getattr__ e.g.
__getattr__
class Roman(object): def roman_to_int(self, roman): # implementation here def __getattr__(self, name): return self.roman_to_int(name)
Then you can do:
>>> r = Roman() >>> r.iv 4