python __builtins__ frozenset类 (27)
27、'frozenset', 返回一个冻结的集合,冻结后集合不能再添加或删除任何元素。
- class frozenset(object)
- | frozenset() -> empty frozenset object
- | frozenset(iterable) -> frozenset object
- |
- | Build an immutable unordered collection of unique elements.
# 创建一个不可变得,无序的,元素唯一的集合- |
- | Methods defined here:
- |
- | __and__(self, value, /)
- | Return self&value.
- |
- | __contains__(...)
- | x.__contains__(y) <==> y in x.
- |
- | __eq__(self, value, /)
- | Return self==value.
- |
- | __ge__(self, value, /)
- | Return self>=value.
- |
- | __getattribute__(self, name, /)
- | Return getattr(self, name).
- |
- | __gt__(self, value, /)
- | Return self>value.
- |
- | __hash__(self, /)
- | Return hash(self).
- |
- | __iter__(self, /)
- | Implement iter(self).
- |
- | __le__(self, value, /)
- | Return self<=value.
- |
- | __len__(self, /)
- | Return len(self).
- |
- | __lt__(self, value, /)
- | Return self<value.
- |
- | __ne__(self, value, /)
- | Return self!=value.
- |
- | __new__(*args, **kwargs) from builtins.type
- | Create and return a new object. See help(type) for accurate signature.
- |
- | __or__(self, value, /)
- | Return self|value.
- |
- | __rand__(self, value, /)
- | Return value&self.
- |
- | __reduce__(...)
- | Return state information for pickling.
- |
- | __repr__(self, /)
- | Return repr(self).
- |
- | __ror__(self, value, /)
- | Return value|self.
- |
- | __rsub__(self, value, /)
- | Return value-self.
- |
- | __rxor__(self, value, /)
- | Return value^self.
- |
- | __sizeof__(...)
- | S.__sizeof__() -> size of S in memory, in bytes
- |
- | __sub__(self, value, /)
- | Return self-value.
- |
- | __xor__(self, value, /)
- | Return self^value.
- |
- | copy(...)
- | Return a shallow copy of a set.
- |
- | difference(...)
- | Return the difference of two or more sets as a new set.
- |
- | (i.e. all elements that are in this set but not the others.)
- |
- | intersection(...)
- | Return the intersection of two sets as a new set.
- |
- | (i.e. all elements that are in both sets.)
- |
- | isdisjoint(...)
- | Return True if two sets have a null intersection.
- |
- | issubset(...)
- | Report whether another set contains this set.
- |
- | issuperset(...)
- | Report whether this set contains another set.
- |
- | symmetric_difference(...)
- | Return the symmetric difference of two sets as a new set.
- |
- | (i.e. all elements that are in exactly one of the sets.)
- |
- | union(...)
- | Return the union of sets as a new set.
- |
- | (i.e. all elements that are in either set.)
python __builtins__ frozenset类 (27)的更多相关文章
- python __builtins__ staticmethod类 (64)
64.'staticmethod', 返回静态方法 class staticmethod(object) | staticmethod(function) -> method | | Conve ...
- python __builtins__ memoryview类 (46)
46.'memoryview', 返回给定参数的内存查看对象(Momory view).所谓内存查看对象,是指对支持缓冲区协议的数据进行包装,在不需要复制对象基础上允许Python代码访问. cla ...
- python __builtins__ help类 (32)
32.'help', 接收对象作为参数,更详细地返回该对象的所有属性和方法 class _Helper(builtins.object) | Define the builtin 'help'. | ...
- python __builtins__ float类 (25)
25.'float', 用于将整数和字符串转换成浮点数. class float(object) | float(x) -> floating point number | | Convert ...
- python __builtins__ classmethod类 (11)
11.'classmethod', 修饰符对应的函数不需要实例化,不需要 self 参数,但第一个参数需要是表示自身类的 cls 参数,可以来调用类的属性,类的方法,实例化对象等. class cla ...
- python __builtins__ bool类 (6)
6.'bool', 函数用于将给定参数转换为布尔类型,如果没有参数,返回 False. class bool(int) # 继承于int类型 | bool(x) -> bool # 创建boo ...
- python __builtins__ zip类 (71)
71.'zip' , 函数用于将可迭代的对象作为参数,将对象中对应的元素打包成一个个元组,然后返回由这些元组组成的列表.如果各个迭代器的元素个数不一致,则返回列表长度与最短的对象相同,利用 * 号操作 ...
- python __builtins__ type类 (69)
69.'type', 返回对象类型 class type(object) | type(object_or_name, bases, dict) | type(object) -> the ob ...
- python __builtins__ tuple类 (68)
68.'tuple', 转换为元组类型 class tuple(object) | tuple() -> empty tuple | tuple(iterable) -> tuple in ...
随机推荐
- Solidworks如何绘制标准螺纹线
1 绘制螺旋线,螺距为0.5mm,圈数为15,起始角度为0°. 2
- SpringBoot学习之启动报错【This application has no explicit mapping for /error.....】
今天做SpringBoot小例子,在请求controller层的时候出现如下问题. Whitelabel Error Page This application has no explicit map ...
- Codeforces Round #148 (Div. 1)
A wool sequence 表示一个序列中能够找到一个连续的子区间使得区间异或值为0 那么求的是不含这样的情况的序列个数 题目中数据范围是.在0~2^m - 1中选n个数作为一个序列 n和m都是1 ...
- mt7620 wifi driver
<*> Ralink RT2860 802.11n AP support [*] LED Support [*] WSC (WiFi Simple Config) [*] WSC 2.0( ...
- Ajax的简单实现(JQuary)
还是之前的例子,相对来说,用JQ就简单了很多,真的多,因为JQ直接把方法都写好了,直接调用就行了,,ԾㅂԾ,, php文件就不需要多做修改了,如下: <?php //改变Content-Type ...
- POJ 1183 反正切函数的应用(数学代换,基本不等式)
题目链接:http://poj.org/problem?id=1183 这道题关键在于数学式子的推导,由题目有1/a=(1/b+1/c)/(1-1/(b*c))---------->a=(b*c ...
- Kubernetes实战阅读笔记--1、介绍
1.业界根据云计算提供服务资源的类型将其划分为三大类: 基础设施即服务(Infrastructure-as-a-Service,IaaS).平台即服务(Platform-as-a-Service,Pa ...
- python dictionary的遍历
d = {'x':1, 'y':3, 'z':2} for k in d: print d[k] 直接遍历k in d的话,遍历的是dictionary的keys. 2 字典的键可以是任何不可变 ...
- passive aggressive(pa)和average perceptron(ap)
passive aggressive(pa)和average perceptron(ap)
- vue、react、angular三大框架对比
前端的三大框架当属vue.react以及angular了,个人比较偏向react,它的社区比较繁荣,有很多丰富的组件 .angular的话感觉编译时间有点长,等待很恼火. vue与react vue和 ...