Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I like how delegates are easy in Python.

  del1 = someobject.some_method_without_parentheses
  del2 = someotherobject.other_method

  del2()
  del1()
And the other way

  del1 = class1.method
  del2 = class2.other_method
  del1(obj_of_class1)
  del2(obj_of_class2)


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: