 		      (current-indentation)
 		    ;; else they're about to enter the first item
 		    (goto-char open-bracket-pos)
+		    (setq placeholder (point))
+		    (py-goto-initial-line)
+		    (py-goto-beginning-of-tqs
+		     (save-excursion (nth 3 (parse-partial-sexp
+					     placeholder (point)))))
 		    (+ (current-indentation) py-indent-offset))))
 
 	    ;; else on backslash continuation line

	;; if we landed inside a string, go to the beginning of that
	;; string. this handles triple quoted, multi-line spanning
	;; strings.
	(let* ((delim (nth 3 (parse-partial-sexp bod (point))))
	       (skip (and delim (make-string 1 delim))))
	  (when skip
	    (save-excursion
	      (py-safe (search-backward skip))
	      (if (and (eq (char-before) delim)
		       (eq (char-before (1- (point))) delim))
		  (setq skip (make-string 3 delim))))
	    ;; we're looking at a triple-quoted string
	    (py-safe (search-backward skip))))
	;; now skip backward over continued lines
	(py-goto-initial-line)
	(+ (current-indentation)
	   (if (py-statement-opens-block-p)
	       py-indent-offset

    (or (py-backslash-continuation-line-p)
	(py-nesting-level))))

(defun py-goto-beginning-of-tqs (delim)
  "Go to the beginning of the triple quoted string we find ourselves in.
DELIM is the TQS string delimiter character we're searching backwards
for."
  (let ((skip (and delim (make-string 1 delim))))
    (when skip
      (save-excursion
	(py-safe (search-backward skip))
	(if (and (eq (char-before) delim)
		 (eq (char-before (1- (point))) delim))
	    (setq skip (make-string 3 delim))))
      ;; we're looking at a triple-quoted string
      (py-safe (search-backward skip)))))

(defun py-goto-initial-line ()
  "Go to the initial line of the current statement.
Usually this is the line we're on, but if we're on the 2nd or
