17xie > Python 语言参考手册 > 2.5 运算符 Operators
背景:                 
[本书目录] [图书首页] [本书讨论区]  
链接地址:http://www.17xie.com/read-37418.html    注册17xie 一起来写书 实现您的出书梦想!


2.5 运算符 Operators

The following tokens are operators:

以下符号是运算符:

+       -       *       **      /       //      %
<<      >>      &       |       ^       ~
<       >       <=      >=      ==      !=      <>

The comparison operators <> and != are alternate spellings of the same operator. != is the preferred spelling; <> is obsolescent.

比较运算符<>和!=是可选的两个具有相同含义的符号. 但推荐使用!=, <>是过时的写法.



2.6 分隔符 Delimiters

The following tokens serve as delimiters in the grammar:

以下符号用作语法上的分隔符:

(       )       [       ]       {       }
,       :       .       `       =       ;
+=      -=      *=      /=      //=     %=
&=      |=      ^=      >>=     <<=     **=

The period can also occur in floating-point and imaginary literals. A sequence of three periods has a special meaning as an ellipsis in slices. The second half of the list, the augmented assignment operators, serve lexically as delimiters, but also perform an operation.

句号可以在浮点数和虚数字面值中出现, 一个连续的三个句号的序列具有特殊的含义, 它指出这是一个片断中的省略写法.在这个表格的后半部分, 即参数化赋值运算符, 在词法上是作为分隔符处理, 但也执行运算.

The following printing ASCII characters have special meaning as part of other tokens or are otherwise significant to the lexical analyzer:

以下可显示ASCII字符具有作为其它符号的一部分有着特殊的含义, 或者对于词法分析器具有重要意义:

'       "       #       \

The following printing ASCII characters are not used in Python. Their occurrence outside string literals and comments is an unconditional error:

以下可显示ASCII字符不在Python中使用, 当它们出现在注释和字面值之外时就是非法的:

@       $       ?

字数:1539    最后更新:8个月以前 [03-15 20:29]月落晨星 修改
本页编辑者:月落晨星  
[前一页]:2.4.4 整数和长整数型…  [后一页]:3. !!数据模型 Data m…
[在本页中加入书签] [收藏本书] [推荐本书]
  17xie论坛 > 本书讨论区 > 本页评论   (共0条)
发表评论

用户名称 匿名发表
评论内容
验证码

关于我们 | 版权声明 | 免责声明 | 诚聘英才 | 联系我们 | 合作伙伴 | 友情链接 | 广告合作 | 提交意见
Copyright © 2007 17xie.com 互联网协同写书平台 京ICP备08002671号