 	      (push (cons prev-name
 			  (cons save-elmt sub-method-alist))
 		    index-alist))))
-
        ;; found less indented expression, we're done.
        (t 
 	(setq looking-p nil)
-	(re-search-backward imenu-example--python-generic-regexp 
-			    (point-min) t)))
+	(re-search-backward py-imenu-generic-regexp (point-min) t)))
+      ;; end-cond
       (setq prev-name def-name)
       (and looking-p
 	   (setq looking-p
-		 (re-search-forward imenu-example--python-generic-regexp
+		 (re-search-forward py-imenu-generic-regexp
 				    (point-max) 'move))))
     (nreverse index-alist)))
 

  "*Function called by `py-electric-delete' when deleting forwards."
  :type 'function
  :group 'python)

;; Not customizable
(defvar py-master-file nil

   "[ \t]*:"				; and the final :
   "\\)"				; >>classes<<
   )
  "Regexp for Python classes for use with the Imenu package."
  )

(defvar py-imenu-method-regexp
  (concat                               ; <<methods and functions>>
   "\\("                                ; 
   "^[ \t]*"                            ; new line and maybe whitespace
