类名 :bool
注意:bool类型只有真和假两个值,分别用True和Fasle表示,如果是数字的话,除了0以外的任何数字的布尔值都是True,0的布尔值是False
1 def __and__(self, *args, **kwargs): # real signature unknown 2 """ 按位与运算 """ 3 """ Return self&value. """ 4 pass 5 6 def __init__(self, x): # real signature unknown; restored from __doc__ 7 """ 构造方法,创建bool对象时自动调用 """ 8 pass 9 10 @staticmethod # known case of __new__ 11 def __new__(*args, **kwargs): # real signature unknown 12 """ Create and return a new object. See help(type) for accurate signature. """ 13 pass 14 15 def __or__(self, *args, **kwargs): # real signature unknown 16 """ 按位或运算 """ 17 """ Return self|value. """ 18 pass 19 20 def __rand__(self, *args, **kwargs): # real signature unknown 21 """ 后面的参数对前面的参数进行安危与运算 """ 22 """ Return value&self. """ 23 pass 24 25 def __repr__(self, *args, **kwargs): # real signature unknown 26 """ 转换成解释器可读取的形式 """ 27 """ Return repr(self). """ 28 pass 29 30 def __ror__(self, *args, **kwargs): # real signature unknown 31 """ 后面的参数对前面的参数进行按位或运算 """ 32 """ Return value|self. """ 33 pass 34 35 def __rxor__(self, *args, **kwargs): # real signature unknown 36 """ 后面的参数对前面的参数进行按位异或运算 """ 37 """ Return value^self. """ 38 pass 39 40 def __str__(self, *args, **kwargs): # real signature unknown 41 """ 转换成可读取的形式 """ 42 """ Return str(self). """ 43 pass 44 45 def __xor__(self, *args, **kwargs): # real signature unknown 46 """ 按位异或运算 """ 47 """ Return self^value. """ 48 pass
原文地址:https://www.cnblogs.com/rodger/p/10657922.html
时间: 2024-11-08 00:25:08