server.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:Pyro5 作者: irmen 项目源码 文件源码
def get_exposed_property_value(obj, propname, only_exposed=True):
    """
    Return the value of an @exposed @property.
    If the requested property is not a @property or not exposed,
    an AttributeError is raised instead.
    """
    v = getattr(obj.__class__, propname)
    if inspect.isdatadescriptor(v):
        if v.fget and getattr(v.fget, "_pyroExposed", not only_exposed):
            return v.fget(obj)
    raise AttributeError("attempt to access unexposed or unknown remote attribute '%s'" % propname)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号