Amaury Forgeot d'Arc <amaur...@gmail.com> added the comment:

This is normal behavior: the property is created with the functions
created just above, even before they belong to any class.

To make the property search the class hierarchy, you could write: 
  foo = property(lambda x: x.get_foo(), lambda x, v: x.set_foo(v))

or make it a function:
  def polymorphic_property(getter, setter):
      return property(lambda x  : getattr(x, getter)(),
                      lambda x,v: getattr(x, setter)(v))
  [...]
  foo = polymorphic_property('get_foo', 'set_foo')

----------
nosy: +amaury.forgeotdarc
resolution:  -> works for me
status: open -> closed

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue1388872>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to