commit 4b3baeb15a8015e8ed9075e465cf97800189eef2
Author: Rodolfo Alonso Hernandez <email address hidden>
Date: Fri Oct 25 17:00:43 2019 +0000
Do not inherit from built-in "dict"
This is not recommended because some type methods are implemented not
in Python but in C [1][2] and should not be overridden. Subclassing
the built-in types directly, will yield non-obvious errors that are
hard to debug, and identify at first glance [3].
Reviewed: https:/ /review. opendev. org/691874 /git.openstack. org/cgit/ openstack/ neutron/ commit/ ?id=4b3baeb15a8 015e8ed9075e465 cf97800189eef2
Committed: https:/
Submitter: Zuul
Branch: master
commit 4b3baeb15a8015e 8ed9075e465cf97 800189eef2
Author: Rodolfo Alonso Hernandez <email address hidden>
Date: Fri Oct 25 17:00:43 2019 +0000
Do not inherit from built-in "dict"
This is not recommended because some type methods are implemented not
in Python but in C [1][2] and should not be overridden. Subclassing
the built-in types directly, will yield non-obvious errors that are
hard to debug, and identify at first glance [3].
[1] http:// www.kr41. net/2016/ 03-23-dont_ inherit_ python_ builtin_ dict_type. html /treyhunner. com/2019/ 04/why- you-shouldnt- inherit- from-list- and-dict- in-python/ /medium. com/bynder- tech/using- collections- in-python- 36129737b5a1
[2] https:/
[3] https:/
Closes-Bug: #1849980
Change-Id: I08c712ff1b0933 70cda2ce66b93e2 a0709094fe1