I have a class like this:
class Foo(object): def __init__(self): self.bar = property(self.get_bar) def get_bar(self): return "bar" print Foo().bar #this prints <property object at 0x0051CB40> I've seen How do Python properties work?, How to set a python property in __init__, but they all use the decorator method, which i don't because i want a different name. And I need access to self
How do i get the property to behave?
__get__onbarexplicitly:f = Foo();f.bar.__get__(f, type(f))