Function: python-indent--calculate-levels

python-indent--calculate-levels is a byte-compiled function defined in python.el.gz.

Signature

(python-indent--calculate-levels INDENTATION)

Documentation

Calculate levels list given INDENTATION.

Argument INDENTATION can either be an integer or a list of integers. Levels are returned in ascending order, and in the case INDENTATION is a list, this order is enforced.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/python.el.gz
(defun python-indent--calculate-levels (indentation)
  "Calculate levels list given INDENTATION.
Argument INDENTATION can either be an integer or a list of
integers.  Levels are returned in ascending order, and in the
case INDENTATION is a list, this order is enforced."
  (if (listp indentation)
      (sort (copy-sequence indentation) #'<)
    (nconc (number-sequence (prog-first-column) (1- indentation)
                            python-indent-offset)
           (list indentation))))