def getter(attr):
    """Getter closure, used to simply return the inner variable"""
    def getter_real(self):
        if not hasattr(self, attr): return None
        return getattr(self, attr)
    return getter_real