def read_number(s, start_position):
 m = _READ_NUMBER_VALUE.match(s, start_position)
 if ((not m) or (not (m.group(1) or m.group(2)))):
  raise ReadError('number', start_position)
 if m.group(2):
  return (float(m.group()), m.end())
 else:
  return (int(m.group()), m.end())

def read_number ( s , start_position ) : m = _READ_NUMBER_VALUE . match ( s , start_position ) if ( ( not m ) or ( not ( m . group ( 1 ) or m . group ( 2 ) ) ) ) : raise ReadError ( 'number' , start_position ) if m . group ( 2 ) : return ( float ( m . group ( ) ) , m . end ( ) ) else : return ( int ( m . group ( ) ) , m . end ( ) )
if an integer or float begins at the specified position in the given string .