From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Wed, 13 Sep 2017 04:55:23 +0000 (-0700) Subject: [3.6] Mention enum as a potential use for metaclasses (GH-2982) (GH-3527) X-Git-Tag: v3.6.3rc1~31 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=547f2a97ea77ee6b3fe2f5b80c2c1fa20956b5a1;p=python [3.6] Mention enum as a potential use for metaclasses (GH-2982) (GH-3527) (cherry picked from commit b8d1b9d7c697dd0401491b6d43047acbaf425f02) --- diff --git a/Doc/reference/datamodel.rst b/Doc/reference/datamodel.rst index 7c140a3bc8..230caf843a 100644 --- a/Doc/reference/datamodel.rst +++ b/Doc/reference/datamodel.rst @@ -1875,8 +1875,8 @@ Metaclass example ^^^^^^^^^^^^^^^^^ The potential uses for metaclasses are boundless. Some ideas that have been -explored include logging, interface checking, automatic delegation, automatic -property creation, proxies, frameworks, and automatic resource +explored include enum, logging, interface checking, automatic delegation, +automatic property creation, proxies, frameworks, and automatic resource locking/synchronization. Here is an example of a metaclass that uses an :class:`collections.OrderedDict`