Package babel :: Package messages :: Module jslexer :: Class Token

# Class Token

    object --+
             |
         tuple --+
                 |
                Token

Represents a token as returned by tokenize.

Instance Methods
Inherited from `tuple`: `__add__`, `__contains__`, `__eq__`, `__ge__`, `__getattribute__`, `__getitem__`, `__getnewargs__`, `__getslice__`, `__gt__`, `__hash__`, `__iter__`, `__le__`, `__len__`, `__lt__`, `__mul__`, `__ne__`, `__repr__`, `__rmul__` Inherited from `object`: `__delattr__`, `__init__`, `__reduce__`, `__reduce_ex__`, `__setattr__`, `__str__`

Static Methods

a new object with type S, a subtype of T

__new__(cls, type, value, lineno) |

Properties
| type itemgetter(item, ...) --> itemgetter object
| value itemgetter(item, ...) --> itemgetter object
| lineno itemgetter(item, ...) --> itemgetter object
Inherited from `object`: `__class__`

Method Details

### __new__(cls, type, value, lineno)
Static Method

Returns: a new object with type S, a subtype of T
Overrides: object.__new__
  (inherited documentation)

Property Details

### type

itemgetter(item, ...) --> itemgetter object

Return a callable object that fetches the given item(s) from its operand. After, f=itemgetter(2), the call f(r) returns r[2]. After, g=itemgetter(2,5,3), the call g(r) returns (r[2], r[5], r[3])

Get Method:

      <operator.itemgetter object at 0x1798d30>

### value

itemgetter(item, ...) --> itemgetter object

Return a callable object that fetches the given item(s) from its operand. After, f=itemgetter(2), the call f(r) returns r[2]. After, g=itemgetter(2,5,3), the call g(r) returns (r[2], r[5], r[3])

Get Method:

      <operator.itemgetter object at 0x1798d70>

### lineno

itemgetter(item, ...) --> itemgetter object

Return a callable object that fetches the given item(s) from its operand. After, f=itemgetter(2), the call f(r) returns r[2]. After, g=itemgetter(2,5,3), the call g(r) returns (r[2], r[5], r[3])

Get Method:

      <operator.itemgetter object at 0x1798cf0>