Refactor the autoprop decorator as a class.
Refactor the autoprop decorator as a class.

I was having some issues with attaching attributes to the autoprop
function in python2.  Specifically, the following would return None:

    def foo():
        return foo.bar
    foo.bar = 'hello world'

I decided to get around this by rewriting autoprop as a class.  I had to
implement __new__ in order to be able to return the original class
object.  Most decorators would use __init__, but then you can't choose
what to return.

kalekundert/autoprop