Ignore:
Timestamp:
Mar 19, 2014, 11:31:01 PM (11 years ago)
Author:
dmik
Message:

python: Merge vendor 2.7.6 to trunk.

Location:
python/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • python/trunk

  • python/trunk/Doc/library/tokenize.rst

    r2 r391  
    1 
    21:mod:`tokenize` --- Tokenizer for Python source
    32===============================================
     
    87.. sectionauthor:: Fred L. Drake, Jr. <fdrake@acm.org>
    98
     9**Source code:** :source:`Lib/tokenize.py`
     10
     11--------------
    1012
    1113The :mod:`tokenize` module provides a lexical scanner for Python source code,
     
    1315well, making it useful for implementing "pretty-printers," including colorizers
    1416for on-screen displays.
     17
     18To simplify token stream handling, all :ref:`operators` and :ref:`delimiters`
     19tokens are returned using the generic :data:`token.OP` token type.  The exact
     20type can be determined by checking the token ``string`` field on the
     21:term:`named tuple` returned from :func:`tokenize.tokenize` for the character
     22sequence that identifies a specific operator token.
    1523
    1624The primary entry point is a :term:`generator`:
     
    2230   :meth:`readline` method of built-in file objects (see section
    2331   :ref:`bltin-file-objects`).  Each call to the function should return one line
    24    of input as a string.
     32   of input as a string. Alternately, *readline* may be a callable object that
     33   signals completion by raising :exc:`StopIteration`.
    2534
    2635   The generator produces 5-tuples with these members: the token type; the token
Note: See TracChangeset for help on using the changeset viewer.