   (mapcar (function
 	   (lambda (x)
 	     (define-key py-mode-map (car x) (cdr x))))
-	  '(("\C-c\C-c"  . py-execute-buffer)
+	  '((":"         . py-electric-colon)
+	    ("\C-c\C-c"  . py-execute-buffer)
 	    ("\C-c|"	 . py-execute-region)
 	    ("\C-c!"	 . py-shell)
 	    ("\177"	 . py-delete-char)

;; LCD Archive Entry:
;; python-mode|Barry A. Warsaw|bwarsaw@cnri.reston.va.us
;; |Major mode for editing Python programs
;; |1995/03/10 15:58:16|2.7|

;;; Code:


(defconst py-blank-or-comment-re "[ \t]*\\($\\|#\\)"
  "Regexp matching blank or comment lines.")

(defconst py-outdent-re
  (concat "\\(" (mapconcat 'identity
			   '("else:"
			     "except\\s +.*:"
			     "finally:"
			     "elif\\s +.*:")
			   "\\|")
	  "\\)")
  "Regexp matching clauses to be outdented one level.")


