(self, token)
Convert number token to new Number temporary
Convert number token to new Number temporary
Convert number token to new Number temporary
def from_token(self, token):
        """Convert number token to new Number temporary"""
        if not token:
            raise ValueError('Token must not be empty')
        lead = bytes(token)[0:1]
        if lead == tk.T_SINGLE:
            return numbers.Single(None, self).from_token(token)
        elif lead == tk.T_DOUBLE:
            return numbers.Double(None, self).from_token(token)
        elif lead in tk.NUMBER:
            return numbers.Integer(None, self).from_token(token)
        raise ValueError('%s is not a number token' % repr(token))
def from_token ( self , token ) : if not token : raise ValueError ( 'Token must not be empty' ) lead = bytes ( token ) [ 0 : 1 ] if lead == tk . T_SINGLE : return numbers . Single ( None , self ) . from_token ( token ) elif lead == tk . T_DOUBLE : return numbers . Double ( None , self ) . from_token ( token ) elif lead in tk . NUMBER : return numbers . Integer ( None , self ) . from_token ( token ) raise ValueError ( '%s is not a number token' % repr ( token ) )