You can do this with a metaclass. For example:
class MyMeta(type):
def __new__(mcls, name, bases, members):
cls = type.__new__(mcls, name, bases, members)
for m in members.values():
if isinstance(m, SomeAttribute):
m.bound_cls = cls
return cls
Now of course one downside is this functionality is tied to the class rather than the attribute, so every class you need this functionality with has to use the metaclass:
class SomeClass(object):
__metaclass__ = MyMeta
attribute = SomeAttribute()