[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#38318: [PATCH] Highlight Python special attributes.
From: |
Lars Ingebrigtsen |
Subject: |
bug#38318: [PATCH] Highlight Python special attributes. |
Date: |
Fri, 22 Nov 2019 14:35:47 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
Hong Xu <hong@topbug.net> writes:
> * lisp/progmodes/python.el (python-font-lock-keywords-level-2): Add
> special attributes
[...]
> - ;; Extra:
> - "__all__" "__doc__" "__name__" "__package__")
> + ;; Special attributes:
> + ;; https://docs.python.org/3/reference/datamodel.html
> + "__annotations__" "__closure__" "__code__"
> + "__defaults__" "__dict__" "__doc__" "__globals__"
> + "__kwdefaults__" "__name__" "__module__" "__package__"
> + "__qualname__"
> + ;; Extras:
> + "__all__")
I'm no (ahem) Python expert, but this makes sense to me, so I've applied
the patch to Emacs 27.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no