Subject: bug#38318: [PATCH] Highlight Python special attributes.

From: Lars Ingebrigtsen <[email-masked]>
Date: Fri, 22 Nov 2019 14:35:47 +0100

Hong Xu <[email-masked]> 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