GNU Info

Info Node: (python2.1-ref.info)Delimiters

(python2.1-ref.info)Delimiters


Prev: Operators Up: Lexical analysis
Enter node , (file) or (file)node

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:

     '       "       #       \

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

     @       $       ?


automatically generated by info2www version 1.2.2.9