Question: For example:

```
name | startyear | endyear 
jon    2003       2005
jake   1999       2002
blake  1997       1998
jake   1995       1996
jason  1993       1994

```

Is there a way to return blake?

I want to know who was treasurer between the two terms of jake.

Answer: 
Don't declare the same name as a slot and as an instance method. Use different names, and access the slot as an attribute, not via `__dict__`.

```
class MyDescriptor(object):
    __slots__ = ['name']
    def __init__(self, name_):
        self.name = name_
    def __get__(self, instance, owner):
        return getattr(instance, self.name)
    def __set__(self, instance, value):
        setattr(instance, self.name, value)

class C(object):
    __slots__ = ['_a']
    a = MyDescriptor('_a')
    def __init__(self, val):
        self.a = val

foo = C(1)
print foo.a
foo.a = 2
print foo.a

```
The @Glenn Maynard's answer is the good one.

But I would like to point at a problem in the OP's question (I can't add a comment to his question since I havn't enough reputation yet):

The following test is raising an error when the instance hasn't a `__dict__` variable:

```
        if self.name not in instance.__dict__:

```

So, here is an a generic solution that tries to acces to the `__dict__` variable first (which is the default anyway) and, if it fails, use `getattr` and `setattr`:

```
class WorksWithDictAndSlotsDescriptor:

    def __init__(self, attr_name):
        self.attr_name = attr_name

    def __get__(self, instance, owner):
        try:
            return instance.__dict__[self.attr_name]
        except AttributeError:
            return getattr(instance, self.attr_name)

    def __set__(self, instance, value):
        try:
            instance.__dict__[self.attr_name] = value
        except AttributeError:
            setattr(instance, self.attr_name, value)

```

(Works only if the `attr_name` is not the same as the real instance variable's name, or you will have a `RecursionError` as pointed to in the accepted answer)

(Won't work as expected if there is both `__slots__` AND `__dict__`)

Hope this helps.