• Property attribute.




    class property(object):
    """
    Property attribute.

    fget
    function to be used for getting an attribute value
    fset
    function to be used for setting an attribute value
    fdel
    function to be used for del'ing an attribute
    doc
    docstring

    Typical use is to define a managed attribute x:

    class C(object):
    def getx(self): return self._x
    def setx(self, value): self._x = value
    def delx(self): del self._x
    x = property(getx, setx, delx, "I'm the 'x' property.")

    Decorators make defining new properties or modifying existing ones easy:

    class C(object):
    @property
    def x(self):
    "I am the 'x' property."
    return self._x
    @x.setter
    def x(self, value):
    self._x = value
    @x.deleter
    def x(self):
    del self._x
    """
    def deleter(self, *args, **kwargs): # real signature unknown
    """ Descriptor to change the deleter on a property. """
    pass

    def getter(self, *args, **kwargs): # real signature unknown
    """ Descriptor to change the getter on a property. """
    pass

    def setter(self, *args, **kwargs): # real signature unknown
    """ Descriptor to change the setter on a property. """
    pass

    def __delete__(self, *args, **kwargs): # real signature unknown
    """ Delete an attribute of instance. """
    pass

    def __getattribute__(self, *args, **kwargs): # real signature unknown
    """ Return getattr(self, name). """
    pass

    def __get__(self, *args, **kwargs): # real signature unknown
    """ Return an attribute of instance, which is of type owner. """
    pass

    def __init__(self, fget=None, fset=None, fdel=None, doc=None): # known special case of property.__init__
    """
    Property attribute.

    fget
    function to be used for getting an attribute value
    fset
    function to be used for setting an attribute value
    fdel
    function to be used for del'ing an attribute
    doc
    docstring

    Typical use is to define a managed attribute x:

    class C(object):
    def getx(self): return self._x
    def setx(self, value): self._x = value
    def delx(self): del self._x
    x = property(getx, setx, delx, "I'm the 'x' property.")

    Decorators make defining new properties or modifying existing ones easy:

    class C(object):
    @property
    def x(self):
    "I am the 'x' property."
    return self._x
    @x.setter
    def x(self, value):
    self._x = value
    @x.deleter
    def x(self):
    del self._x
    # (copied from class doc)
    """
    pass

    @staticmethod # known case of __new__
    def __new__(*args, **kwargs): # real signature unknown
    """ Create and return a new object. See help(type) for accurate signature. """
    pass

    def __set__(self, *args, **kwargs): # real signature unknown
    """ Set an attribute of instance to value. """
    pass

    fdel = property(lambda self: object(), lambda self, v: None, lambda self: None) # default

    fget = property(lambda self: object(), lambda self, v: None, lambda self: None) # default

    fset = property(lambda self: object(), lambda self, v: None, lambda self: None) # default

    __isabstractmethod__ = property(lambda self: object(), lambda self, v: None, lambda self: None) # default



    class property(object):
    """
    Property attribute.

    fget
    function to be used for getting an attribute value
    fset
    function to be used for setting an attribute value
    fdel
    function to be used for del'ing an attribute
    doc
    docstring

    Typical use is to define a managed attribute x:

    class C(object):
    def getx(self): return self._x
    def setx(self, value): self._x = value
    def delx(self): del self._x
    x = property(getx, setx, delx, "I'm the 'x' property.")

    Decorators make defining new properties or modifying existing ones easy:

    class C(object):
    @property
    def x(self):
    "I am the 'x' property."
    return self._x
    @x.setter
    def x(self, value):
    self._x = value
    @x.deleter
    def x(self):
    del self._x
    """
    def deleter(self, *args, **kwargs): # real signature unknown
    """ Descriptor to change the deleter on a property. """
    pass

    def getter(self, *args, **kwargs): # real signature unknown
    """ Descriptor to change the getter on a property. """
    pass

    def setter(self, *args, **kwargs): # real signature unknown
    """ Descriptor to change the setter on a property. """
    pass

    def __delete__(self, *args, **kwargs): # real signature unknown
    """ Delete an attribute of instance. """
    pass

    def __getattribute__(self, *args, **kwargs): # real signature unknown
    """ Return getattr(self, name). """
    pass

    def __get__(self, *args, **kwargs): # real signature unknown
    """ Return an attribute of instance, which is of type owner. """
    pass

    def __init__(self, fget=None, fset=None, fdel=None, doc=None): # known special case of property.__init__
    """
    Property attribute.

    fget
    function to be used for getting an attribute value
    fset
    function to be used for setting an attribute value
    fdel
    function to be used for del'ing an attribute
    doc
    docstring

    Typical use is to define a managed attribute x:

    class C(object):
    def getx(self): return self._x
    def setx(self, value): self._x = value
    def delx(self): del self._x
    x = property(getx, setx, delx, "I'm the 'x' property.")

    Decorators make defining new properties or modifying existing ones easy:

    class C(object):
    @property
    def x(self):
    "I am the 'x' property."
    return self._x
    @x.setter
    def x(self, value):
    self._x = value
    @x.deleter
    def x(self):
    del self._x
    # (copied from class doc)
    """
    pass

    @staticmethod # known case of __new__
    def __new__(*args, **kwargs): # real signature unknown
    """ Create and return a new object. See help(type) for accurate signature. """
    pass

    def __set__(self, *args, **kwargs): # real signature unknown
    """ Set an attribute of instance to value. """
    pass

    fdel = property(lambda self: object(), lambda self, v: None, lambda self: None) # default

    fget = property(lambda self: object(), lambda self, v: None, lambda self: None) # default

    fset = property(lambda self: object(), lambda self, v: None, lambda self: None) # default

    __isabstractmethod__ = property(lambda self: object(), lambda self, v: None, lambda self: None) # default

  • 相关阅读:
    18.12.30 【sssx】Trie图
    18.12.30 【sssx】线段树
    18.12.25 POJ 1039 Pipe
    18.12.25 POJ 3525 Most Distant Point from the Sea(半平面+二分)
    18.12.25 POJ 1228 Grandpa's Estate
    18.12.22 luogu P3047 [USACO12FEB]附近的牛Nearby Cows
    18.12.21 DSA 中缀表达式的值
    18.12.21 luogu P3650 [USACO1.3]滑雪课程设计Ski Course Design
    18.12.21 【USACO】Times17
    18.12.20 DSA Full Tank?(DP+BFS)
  • 原文地址:https://www.cnblogs.com/rsapaper/p/13433634.html
Copyright © 2020-2023  润新知