object_oriented.py 244 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
# -*- coding: utf-8 -*-
__author__='Daniel Scheffler'


def alias_property(key):
    return property(
        lambda self:      getattr(self, key),
        lambda self, val: setattr(self, key, val),
        lambda self:      delattr(self, key))