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.

  1. >>> f = 1.
  2. >>> f
  3. 1.0
  4. >>> f.__floordiv__
  5. <method-wrapper '__floordiv__' of float object at 0x7f9fb4dc1a20>

Another example

  1. >>> 1..__add__(2.)
  2. 3.0

Here we add 1.0 to 2.0, which obviously yields 3.0.

What is python .. (“dot dot”) notation syntax?的更多相关文章

  1. Python 3.5.1 Syntax & APIs(Continue Updating..

    print(x, end=' ') instead of print(x) to escape the default line-changing-output. print(str.ljust(si ...

  2. python异常和错误(syntax errors 和 exceptions)

    语法错误 语法错误又被称解析错误 >>> for i in range(1..10):print(i) File "<stdin>", line 1 ...

  3. python中提示invalid syntax 总结

    记录语法错误的坑 1.陷进1,使用notepad++,格式显示与实际不相匹配,报invalid syntax 错误 使用文本格式执行一个文件,一直提示 找原因,因为写文件时一直是用的文本文件写的代码, ...

  4. python——SyntaxError:invalid syntax

    格式不对,tab 或空格的格式不统一导致

  5. Drawing Graphs using Dot and Graphviz

    Drawing Graphs using Dot and Graphviz Table of Contents 1. License 2. Introduction 2.1. What is DOT? ...

  6. 使用DOT语言和Graphviz绘图(翻译)

    Casa Taloyum About Me Blog Archives 使用DOT语言和Graphviz绘图(翻译) Date Wed 26 November 2014 Tags graphviz / ...

  7. DOT + graphviz 轻松画图

    一.简介DOT & graphviz1. DOT    DOT是一种文本图形描述语言.DOT语言文件通常具有.gv或是.dot的文件扩展名.当然,在编写好.dot或者.gv的文件之后,需要有专 ...

  8. dot.js使用心得

    一.dot.js介绍 最近用到的数据模板引擎有很多,今天讲的doT.js也是其中一种. doT.js的特点是体积小,速度快,并且不依赖其他插件. 官网下载:http://olado.github.io ...

  9. [Python] Python list slice syntax fun

    # Python's list slice syntax can be used without indices # for a few fun and useful things: # You ca ...

随机推荐

  1. memset 初始化 不同数值 打表

    #include <cstdio> #include <cstdlib> #include <cmath> #include <cstring> #in ...

  2. PHP curl采集

    if (function_exists('curl_init')) { //检查函数是否存在 $url = "http://***.com/"; $ch = curl_init() ...

  3. 长链接生成短链接Java源码(调用百度接口)

    public static DefaultHttpClient httpclient; static { httpclient = new DefaultHttpClient(); //httpcli ...

  4. 用VC++MFC做文本编辑器(单文档模式)

    用VC++MFC做文本编辑器(单文档模式) 原来做过一个用对话框实现的文本编辑器,其实用MFC模板里面的单文档模板也可以做,甚至更加方便,适合入门级的爱好者试试,现介绍方法如下: < xmlna ...

  5. (转)I帧,P帧,B帧 .

    转:http://blog.csdn.net/abcjennifer/article/details/6577934 视频压缩中,每帧代表一幅静止的图像.而在实际压缩时,会采取各种算法减少数据的容量, ...

  6. import、export 和 export default

    ES6中 在JavaScript ES6中,export与export default均可用于导出常量.函数.文件.模块等. 你可以在其它文件或模块中通过import+(常量 | 函数 | 文件 | ...

  7. 框架前期准备篇之AutoFac常见用法总结 转载

    框架前期准备篇之AutoFac常见用法总结 一. 说在前面的话 凡是大约工作在两年以上的朋友们,或多或少都会接触到一些框架搭建方面的知识,只要一谈到框架搭建这个问题或者最佳用法这个问题,势必会引起一点 ...

  8. day 61 Django基础之django分页

      Django基础之django分页 一.Django的内置分页器(paginator) view   from django.shortcuts import render,HttpRespons ...

  9. Python3简介

    Python3简介 Python 是一个高层次的结合了解释性.编译性.互动性和面向对象的脚本语言. Python 的设计具有很强的可读性,相比其他语言经常使用英文关键字,其他语言的一些标点符号,它具有 ...

  10. Spring 泛型依赖注入(3)

    BaseService<T>:有RoleService和UserService两的子类 BaseRepepositry<T>:有UserRepository和RoleRepos ...