13、'complex', 函数用于创建一个值为 real + imag * j 的复数或者转化一个字符串或数为复数。如果第一个参数为字符串,则不需要指定第二个参数。

class complex(object)|  complex(real[, imag]) -> complex number|  |  Create a complex number from a real part and an optional imaginary part.|  This is equivalent to (real + imag*1j) where imag defaults to 0.    # 创建一个复数,实数部分是第一个参数,虚部是第二个参数,虚部默认为0.|  |  Methods defined here:|  |  __abs__(self, /)|      abs(self)|  |  __add__(self, value, /)|      Return self+value.|  |  __bool__(self, /)|      self != 0|  |  __divmod__(self, value, /)|      Return divmod(self, value).|  |  __eq__(self, value, /)|      Return self==value.|  |  __float__(self, /)|      float(self)|  |  __floordiv__(self, value, /)|      Return self//value.|  |  __format__(...)|      complex.__format__() -> str|      |      Convert to a string according to format_spec.|  |  __ge__(self, value, /)|      Return self>=value.|  |  __getattribute__(self, name, /)|      Return getattr(self, name).|  |  __getnewargs__(...)|  |  __gt__(self, value, /)|      Return self>value.|  |  __hash__(self, /)|      Return hash(self).|  |  __int__(self, /)|      int(self)|  |  __le__(self, value, /)|      Return self<=value.|  |  __lt__(self, value, /)|      Return self<value.|  |  __mod__(self, value, /)|      Return self%value.|  |  __mul__(self, value, /)|      Return self*value.|  |  __ne__(self, value, /)|      Return self!=value.|  |  __neg__(self, /)|      -self|  |  __new__(*args, **kwargs) from builtins.type|      Create and return a new object.  See help(type) for accurate signature.|  |  __pos__(self, /)|      +self|  |  __pow__(self, value, mod=None, /)|      Return pow(self, value, mod).|  |  __radd__(self, value, /)|      Return value+self.|  |  __rdivmod__(self, value, /)|      Return divmod(value, self).|  |  __repr__(self, /)|      Return repr(self).|  |  __rfloordiv__(self, value, /)|      Return value//self.|  |  __rmod__(self, value, /)|      Return value%self.|  |  __rmul__(self, value, /)|      Return value*self.|  |  __rpow__(self, value, mod=None, /)|      Return pow(value, self, mod).|  |  __rsub__(self, value, /)|      Return value-self.|  |  __rtruediv__(self, value, /)|      Return value/self.|  |  __str__(self, /)|      Return str(self).|  |  __sub__(self, value, /)|      Return self-value.|  |  __truediv__(self, value, /)|      Return self/value.|  |  conjugate(...)|      complex.conjugate() -> complex|      |      Return the complex conjugate of its argument. (3-4j).conjugate() == 3+4j.|  |  ----------------------------------------------------------------------|  Data descriptors defined here:|  |  imag|      the imaginary part of a complex number|  |  real|      the real part of a complex number

  

转载于:https://www.cnblogs.com/gundan/p/8243950.html

python __builtins__ complex类 (13)相关推荐

  1. python __builtins__ float类 (25)

    25.'float', 用于将整数和字符串转换成浮点数. class float(object)| float(x) -> floating point number| | Convert a ...

  2. python __builtins__ set类 (60)

    60.'set',  转换为集合类型 class set(object)| set() -> new empty set object| set(iterable) -> new set ...

  3. python __builtins__ credits类 (15)

    15.'credits', 信用 class _Printer(builtins.object)| interactive prompt objects for printing the licens ...

  4. python __builtins__ frozenset类 (27)

    27.'frozenset', 返回一个冻结的集合,冻结后集合不能再添加或删除任何元素. class frozenset(object)| frozenset() -> empty frozen ...

  5. python __builtins__ copyright类 (14)

    14.'copyright', 版权 class _Printer(builtins.object)| interactive prompt objects for printing the lice ...

  6. python __builtins__ str类 (65)

    65.'str', 字节转换成字符串.第一个传入参数是要转换的字节,第二个参数是按什么编码转换成字符串 class str(object)| str(object='') -> str| str ...

  7. python __builtins__ bytes类 (8)

    8.'bytes', 字符串转换成字节流.第一个传入参数是要转换的字符串,第二个参数按什么编码转换为字节. class bytes(object)| bytes(iterable_of_ints) - ...

  8. Python基础之:Python中的类

    文章目录 简介 作用域和命名空间 class 类对象 类的实例 实例对象的属性 方法对象 类变量和实例变量 继承 私有变量 迭代器 生成器 简介 class是面向对象编程的一个非常重要的概念,pyth ...

  9. Python模块与类

    2019独角兽企业重金招聘Python工程师标准>>> 类 类的定义,继承 类中的属性,类属性和实例属性的区别及访问方式 变量名以"_"或"__&quo ...

最新文章

  1. boost::fusion::fused用法的测试程序
  2. 牛客 - lglg说要有题,于是便有了题。(欧拉线性筛+打表+思维)
  3. ajax的data传参的两种方式
  4. 传入一个MapString,Long 返回它按value排序后的结果
  5. Linux查询pg数据库账号密码,PostgreSQL登录数据库
  6. ckeditor编辑的使用方法
  7. Redis基础(七)——事件、服务器、客户端、多线程
  8. 【工程项目经验】mac电脑lldb调试工具
  9. 那年学过的Java笔记三核心类库二
  10. SpringBoot中关于Mybatis使用的三个问题
  11. 小型制造类企业IT云平台
  12. 双线性映射(Bilinear Maps)实现(有限域、循环群)
  13. coreos 安装 mysql_在 UOS 上体验 CoreOS
  14. Docker Wnmp 搭建
  15. 包政讲营销录音(3)
  16. AUTOCAD——调整十字光标、CAD表格文字对齐方式
  17. 什么是机器人的外部轴?
  18. 摘:一张废手机卡的作用
  19. 【每日一读】Sampling Multiple Nodes in Large Networks: Beyond Random Walks
  20. with open相关用法

热门文章

  1. mysql中设置字符集语句_mysql设置字符集
  2. mysql数据库批量编码_MySQL批量修改数据库的编码类型
  3. 用户计算机通过连入局域网上网时,重庆市职称计算机考试理论题库05
  4. 网络广告推广浅析网站中的关键词密度要如何控制呢?
  5. 互联网电商老三巨头在网站推广下逐步退居幕后新三巨头蓄势待发
  6. 网络营销外包专员浅析网站网络营销外包如何快速获取关键词排名
  7. 网络营销外包对于搜索引擎策略性调整网络营销外包专员如何解析
  8. 网络推广——网络推广专员从多角度分析网站关键词排名受影响因素
  9. 浅析网站与网址二者之间的差别
  10. Auto Encoder用于异常检测