Method Chaining or Cascading in Python Posted on 2019-01-23 | Visitors: 12345678910111213141516class Person: def name(self, name): self.name = name return self def age(self, age): self.age = age return self def show(self): print "My name is", self.name, "and I am", self.age, "years old."if __name__ == "__main__": p = Person() p.name("Li Xiang").age(18).show() 1My name is Li Xiang and I am 18 years old.