Function: python-info-assignment-statement-p
python-info-assignment-statement-p is a byte-compiled function defined
in python.el.gz.
Signature
(python-info-assignment-statement-p &optional CURRENT-LINE-ONLY)
Documentation
Check if current line is an assignment.
With argument CURRENT-LINE-ONLY is non-nil, don't follow any continuations, just check the if current line is an assignment.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/python.el.gz
(defun python-info-assignment-statement-p (&optional current-line-only)
"Check if current line is an assignment.
With argument CURRENT-LINE-ONLY is non-nil, don't follow any
continuations, just check the if current line is an assignment."
(save-excursion
(let ((found nil))
(if current-line-only
(back-to-indentation)
(python-nav-beginning-of-statement))
(while (and
(re-search-forward (python-rx not-simple-operator
assignment-operator
(group not-simple-operator))
(line-end-position) t)
(not found))
(save-excursion
;; The assignment operator should not be inside a string.
(backward-char (length (match-string-no-properties 1)))
(setq found (not (python-syntax-context-type)))))
(when found
(skip-syntax-forward " ")
(point-marker)))))