parameters: (src)
docstring: Return the remainder of a list in SRC, starting before an element or ).
  
      >>> read_tail(Buffer(tokenize_lines([")"])))
      nil
      >>> read_tail(Buffer(tokenize_lines(["2 3)"])))
      Pair(2, Pair(3, nil))
      >>> read_tail(Buffer(tokenize_lines(["2 (3 4))"])))
      Pair(2, Pair(Pair(3, Pair(4, nil)), nil))
      >>> read_line("(1 . 2)")
      Pair(1, 2)
      >>> read_line("(1 2 . 3)")
      Pair(1, Pair(2, 3))
      >>> read_line("(1 . 2 3)")
      Traceback (most recent call last):
        ...
      SyntaxError: expected one element after .
      >>> scheme_read(Buffer(tokenize_lines(["(1", "2 .", "'(3 4))", "4"])))
      Pair(1, Pair(2, Pair('quote', Pair(Pair(3, Pair(4, nil)), nil))))
docstring_summary: Return the remainder of a list in SRC, starting before an element or ).
docstring_tokens: Return the remainder of a list in SRC starting before an element or ) .
function: def read_tail(src):
      """Return the remainder of a list in SRC, starting before an element or ).
  
      >>> read_tail(Buffer(tokenize_lines([")"])))
      nil
      >>> read_tail(Buffer(tokenize_lines(["2 3)"])))
      Pair(2, Pair(3, nil))
      >>> read_tail(Buffer(tokenize_lines(["2 (3 4))"])))
      Pair(2, Pair(Pair(3, Pair(4, nil)), nil))
      >>> read_line("(1 . 2)")
      Pair(1, 2)
      >>> read_line("(1 2 . 3)")
      Pair(1, Pair(2, 3))
      >>> read_line("(1 . 2 3)")
      Traceback (most recent call last):
        ...
      SyntaxError: expected one element after .
      >>> scheme_read(Buffer(tokenize_lines(["(1", "2 .", "'(3 4))", "4"])))
      Pair(1, Pair(2, Pair('quote', Pair(Pair(3, Pair(4, nil)), nil))))
      """
      try:
          if src.current() is None:
              raise SyntaxError("unexpected end of file")
          elif src.current() == ")":
              src.pop()
              return nil
          elif src.current() == ".":
              # BEGIN Question 2
              "*** REPLACE THIS LINE ***"
              src.pop()
              result = scheme_read(src)
              if src.pop() != ')':
                  raise SyntaxError("Expected one element after.")
              return result
              # END Question 2
          else:
              first = scheme_read(src)
              rest = read_tail(src)
              return Pair(first, rest)
      except EOFError:
          raise SyntaxError("unexpected end of file")
function_tokens: def read_tail ( src ) : try : if src . current ( ) is None : raise SyntaxError ( "unexpected end of file" ) elif src . current ( ) == ")" : src . pop ( ) return nil elif src . current ( ) == "." : # BEGIN Question 2 "*** REPLACE THIS LINE ***" src . pop ( ) result = scheme_read ( src ) if src . pop ( ) != ')' : raise SyntaxError ( "Expected one element after." ) return result # END Question 2 else : first = scheme_read ( src ) rest = read_tail ( src ) return Pair ( first , rest ) except EOFError : raise SyntaxError ( "unexpected end of file" )