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.

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. day31 类的组合及继承,文件目录规范

    Python之路,Day18 = Python基础18-面向对象继承与组合 类的继承 def talk(): print("I am come from talk..a") cla ...

  2. css3技巧——产品列表之鼠标滑过效果translateY(三)

    <div class="main"> <div class="view view-tenth"> <figure> < ...

  3. platform模块和ctypes模块

    一.ctypes模块 Python 的 ctypes 要使用 C 函数,需要先将 C 编译成动态链接库的形式,即 Windows 下的 .dll 文件,或者 Linux 下的 .so 文件.先来看一下 ...

  4. skyline中大数据量的三维场景刷新速度问题

    我们做了一个的类似于TE Pro的桌面系统来代替TE Pro演示我们的大三维场景.我们的三维场景包括100平方公里的全要素场景,有建筑物,地面.小品.部件.植被等.在系统运行后,三维场景刷不起来,速 ...

  5. Mybatis笔记 – 入门程序开发

    一.Mybatis开发环境 JDK:jdk_1.7 Eclipse:Oxygen.1 Release (4.7.1) MySQL:MySQL Servr 5.7 1.添加相关ja r包 mybatis ...

  6. PHP面向对象魔术方法之__toString函数

    l 基本介绍: 当我们希望将一个对象当做字符串来输出时,就会触发__toString魔术方法. <?php header('content-type:text/html;charset=utf- ...

  7. springboot-配置多数据源之番外篇(分包实现)

    场景: 随着业务发展,系统连接多数据库成为常态,继前面AOP的实现方式之后,这里记录一下分包实现的方式. 实现:  1.pom.xml <?xml version="1.0" ...

  8. 关于vlfeat做vlad编码问题

    这里是官方文档,可以自己查看 在这里,只是想记录一下,我这几天学习vlfeat 做vlad编码的过程,便于以后整理 网上涉及到vlfeat做vlad编码资料较少,而官网上例子又相对简单,主要是那几个参 ...

  9. 总结windows cmd 查看进程,端口,硬盘信息

    1.查看window所有进程 tasklist 2.查看windows所占用的进程号 tasklist|findstr 1916 3.杀死进程,进程pid taskkill /f /pid 10156 ...

  10. 笔记:Python异常处理与程序调试

    Python异常处理与程序调试 Python提供了强大的异常处理机制,通过捕获异常可以提高程序的健壮性.异常处理还具有释放对象,中止循环的运行等作用.在程序运行的过程中,如果发生了错误,可以返回事先约 ...