diff options
Diffstat (limited to 'lisp/progmodes/python.el')
| -rw-r--r-- | lisp/progmodes/python.el | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index eb84b494e35..a1793185899 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el | |||
| @@ -662,14 +662,11 @@ builtins.") | |||
| 662 | ;; assignments | 662 | ;; assignments |
| 663 | ;; support for a = b = c = 5 | 663 | ;; support for a = b = c = 5 |
| 664 | (,(lambda (limit) | 664 | (,(lambda (limit) |
| 665 | (let ((re (python-rx (group (+ symbol-name)) | 665 | (let ((re (python-rx (group symbol-name) |
| 666 | (? ?\[ (+ (not ?\])) ?\]) | 666 | ;; subscript, like "[5]" |
| 667 | (* space) | 667 | (? ?\[ (+ (not ?\])) ?\]) (* space) |
| 668 | ;; A type, like " : int ". | 668 | ;; type hint, like ": int" or ": Mapping[int, str]" |
| 669 | (? ?: | 669 | (? ?: (* space) (+ not-simple-operator) (* space)) |
| 670 | (* space) | ||
| 671 | (+ not-simple-operator) | ||
| 672 | (* space)) | ||
| 673 | assignment-operator)) | 670 | assignment-operator)) |
| 674 | (res nil)) | 671 | (res nil)) |
| 675 | (while (and (setq res (re-search-forward re limit t)) | 672 | (while (and (setq res (re-search-forward re limit t)) |
| @@ -679,9 +676,9 @@ builtins.") | |||
| 679 | (1 font-lock-variable-name-face nil nil)) | 676 | (1 font-lock-variable-name-face nil nil)) |
| 680 | ;; support for a, b, c = (1, 2, 3) | 677 | ;; support for a, b, c = (1, 2, 3) |
| 681 | (,(lambda (limit) | 678 | (,(lambda (limit) |
| 682 | (let ((re (python-rx (group (+ symbol-name)) (* space) | 679 | (let ((re (python-rx (group symbol-name) (* space) |
| 683 | (* ?, (* space) (+ symbol-name) (* space)) | 680 | (* ?, (* space) symbol-name (* space)) |
| 684 | ?, (* space) (+ symbol-name) (* space) | 681 | ?, (* space) symbol-name (* space) |
| 685 | assignment-operator)) | 682 | assignment-operator)) |
| 686 | (res nil)) | 683 | (res nil)) |
| 687 | (while (and (setq res (re-search-forward re limit t)) | 684 | (while (and (setq res (re-search-forward re limit t)) |