[New-bugs-announce] [issue33816] New metaclass example for Data Model topic

Andrés Delfino report at bugs.python.org
Sat Jun 9 13:59:20 EDT 2018


New submission from Andrés Delfino <adelfino at gmail.com>:

Since Python 3.6, when PEP 520 was accepted, class attribute definition order is preserved. That alone is sufficient to replace the example, but then 3.7 came with guaranteed dictionary insertion order. The metaclass example uses OrderedDict, what may cause confusing to new programmers, since it is not needed.

I'm creating this issue in case someone who actually has used metaclasses can come up with an example, but I'll try to find/think of an example myself.

----------
assignee: docs at python
components: Documentation
messages: 319166
nosy: adelfino, docs at python
priority: normal
severity: normal
status: open
title: New metaclass example for Data Model topic
type: enhancement
versions: Python 3.6, Python 3.7, Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33816>
_______________________________________


More information about the New-bugs-announce mailing list