What is python .. (“dot dot”) notation syntax?
2024-10-08 00:31:06
What you have is a float
literal without the trailing zero, which you then access the __truediv__
method of. It's not an operator in itself; the first dot is part of the float value, and the second is the dot operator to access the objects properties and methods.
You can reach the same point by doing the following.
>>> f = 1.
>>> f
1.0
>>> f.__floordiv__
<method-wrapper '__floordiv__' of float object at 0x7f9fb4dc1a20>
Another example
>>> 1..__add__(2.)
3.0
Here we add 1.0 to 2.0, which obviously yields 3.0.
最新文章
- BroadcastReceiver注册、使用及其权限
- hibernate中数据库方言
- sql2012还原sql2008备份文件语句
- Http概述(一)
- ARM2440 LCD实验
- Qt之窗体透明 (三种不同的方法和效果)
- OTG_FS_ID功能及引申
- TCSRM 593 div2(1000)(dp)
- 如何让Activiti-Explorer使用sql server数据库
- DEDECMS栏目自定义字段添加
- bzoj3721
- localStorage存储JSON对象的小方法
- appium自动化测试
- 使用Boost.PropertyTree处理XML、JSON和INI数据
- ES6就是ES2015 的主要内容
- vbs 解析html文档的方法
- js 防止重复点击
- 【BZOJ4034】【HAOI2015】树上操作
- JSON 序列化与反序列化, 与XML相互转换.
- Activiti的25张表