Question: Lets say I have a method which I decorate with `@property`.

Is there a way to get the underlying name of the decorated method?

How could I for instance print the name of the property when it does not have a `__name__` attribute?

I'm trying to do a RPC call and everything works for methods and static functions but not this.

Answer: 
A property has the following attributes: *fget*, *fset* and *fdel*, which are references to the getter/setter/deleter functions.

So, you can get the `__name__` of each of this functions (if not `None`)

Demo:

```
class Thing(object):
    @property
    def foo(self):
        return "foo"

    def get_baz(self):
        return "baz"

    bar = property(get_baz)

>>> Thing.foo.fget.__name__
'foo'
>>> Thing.bar.fget.__name__
'get_baz'

```
If you use [`functools.wraps()`](https://docs.python.org/3/library/functools.html#functools.wraps) in your decorator, the decorated function *will* have the `__name__` of the wrapped function.

IF you had some sample code for the decorator in your question, I could show more precisely how to do this...