Stupid Python Tricks: Abusing Explicit Self
Hillel Wayne
355

I think an interesting addition to the article would be to show what you can still do with`def plus` function (not the instance method, so keeping the original indentation):

  1. Turn it into an instance method by `Number.plus = plus` which will bound the method for all instance (existing or future of class Number)
  2. Attach it to a single instance of the Number class by using `types` module. Such as:
One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.