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

Property attribute.的更多相关文章

  1. XSS && CRLF && property&attribute

    XSS cross-site scripting 跨站点脚本,为了避免与css冲突,命名为XSS.它是将恶意代码作为一个网页内容,这些恶意代码会注入到用户的浏览器中并执行,从而使用户受到攻击,常见的有 ...

  2. ! Unknown property attribute "class"

    当时是在用Xcode 7进行编译ASDK的代码发现报错了 当时就蒙圈了,@property(class)--这是啥呀,太久没看过object-c了,但是不至于@property是没有class属性的, ...

  3. property attribute: assign, strong, weak, unsafe_unretain and copy

    assign:用于“纯量类型”(如CGFloat 或 NSInteger等): strong:用于“对象类型”,定义了一种“拥有关系”(owning relationship),为这种属性设置新值时, ...

  4. Python:Selenium Chrome无弹窗+property/attribute/text

    我们在用Selenium写自动化程序时候,并不希望程序在实际运行过程中一直弹Chrome窗口,这个时候就需要让Chrome默默打开,自动读取数据,然后默默关闭掉就好. 以下是让chrome用无界面形式 ...

  5. Attribute和自定义Property

    property(属性) attribute(特性) property和attribute的同步 id href value class/className 旧IE的趣事 attribute作为DOM ...

  6. 有关attribute和property,以及各自对select中option的影响

    这个问题老生常谈,但是直到现在我依旧时常会把它搞混.下面列一些各自的特性.   attribute property 设置方法 option.setAttribute('selected', true ...

  7. jQuery的attr与prop,attribute和property区别

    jQuery1.6中新添加了一个prop方法,看起来和用起来都和attr方法一样,这两个方法有什么区别呢?这要从HTMl 的attribute与property区别说起,attr与prop正是这两个东 ...

  8. DOM 中 Property 和 Attribute 的区别

    原文地址:http://web.jobbole.com/83129/ property 和 attribute非常容易混淆,两个单词的中文翻译也都非常相近(property:属性,attribute: ...

  9. Property 和 Attribute 的区别(转)

    property 和 attribute非常容易混淆,两个单词的中文翻译也都非常相近(property:属性,attribute:特性),但实际上,二者是不同的东西,属于不同的范畴. property ...

随机推荐

  1. easyui中连接按钮样式

    方法1. <a href="otherpage.php" class="easyui-linkbutton" data-options="ico ...

  2. Java虚拟机详解04----GC算法和种类

    [声明] 欢迎转载,但请保留文章原始出处→_→ 生命壹号:http://www.cnblogs.com/smyhvae/ 文章来源:http://www.cnblogs.com/smyhvae/p/4 ...

  3. java: Compilation failed: internal java compiler error

    IDEA 编译项目出现java: Compilation failed: internal java compiler error 原因:  项目Java版本不一致 解决办法:  点击FIle> ...

  4. harbor安装实操笔记

    纸上得来终觉浅,实操一遍吧! 把所有开发的后端服务先在打成镜像,传到私有镜像仓库: 然后在任意的远程机器拉取镜像,然后可采用docker或者docker-compose的方式运行,本节先按照docke ...

  5. 深入理解Redis系列之持久化

    redis持久化配置 redis.conf // RDB配置 save 900 1 save 300 10 save 60 10000 // AOF配置 appendonly yes //AOF三种同 ...

  6. 数据库零基础之---了解数据库的事务[ACID]

    事务指逻辑上的一组操作,组成这组操作的各个单元,要不全部成功,要不全部不成功. 我们先举一个例子来描述一下事务: 假设要张三通过银行给李四进行转账1000元钱,张三原有余额10000元整,李四有人民币 ...

  7. 线程方法wait()和notify()的使用

    实现需求: 开启2个线程,1个线程对某个int类型成员变量加1,另外1个减1,但是要次序执行,即如果int型的成员变量是0,则输出01010101这样的结果 代码如下 1 package test; ...

  8. 关于echarts中的noDataLoadingOption——loading动画的问题

    在最近的一个项目中用到echarts这个插件,其中关于noDataLoadingOption配置项的问题让我困惑了好长时间.经过蛋疼的查找下,终于搞明白是版本的原因. 且看官网的介绍:ECharts, ...

  9. 原生redis命令

    一. redis-cli 连接 redis 进入redis安装目录 cd /usr/local/bin 进入redis客户端 ./redis-cli -p 6379 -h 用于指定 ip -p 用于指 ...

  10. 笔记:学习go语言的网络基础库,并尝试搭一个简易Web框架

    在日常的 web 开发中,后端人员常基于现有的 web 框架进行开发.但单纯会用框架总感觉不太踏实,所以有空的时候还是看看这些框架是怎么实现的会比较好,万一要排查问题也快一些. 最近在学习 go 语言 ...