Title: RcParams is fundamentally broken · Issue #12576 · matplotlib/matplotlib · GitHub
Open Graph Title: RcParams is fundamentally broken · Issue #12576 · matplotlib/matplotlib
X Title: RcParams is fundamentally broken · Issue #12576 · matplotlib/matplotlib
Description: Bug report Anyone tried: >>> import matplotlib >>> len(matplotlib.rcParams) 0 A great example of shooting yourself in the foot with multiple inheritance. Essentially, we do class RcParams(MutableMapping, dict): def __getitem__(self, key)...
Open Graph Description: Bug report Anyone tried: >>> import matplotlib >>> len(matplotlib.rcParams) 0 A great example of shooting yourself in the foot with multiple inheritance. Essentially, we do class RcParams(MutableMa...
X Description: Bug report Anyone tried: >>> import matplotlib >>> len(matplotlib.rcParams) 0 A great example of shooting yourself in the foot with multiple inheritance. Essentially, we do class ...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/12576
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"RcParams is fundamentally broken","articleBody":"\u003c!--To help us understand and resolve your issue, please fill out the form to the best of your ability.--\u003e\r\n\u003c!--You can feel free to delete the sections that do not apply.--\u003e\r\n\r\n### Bug report\r\n\r\nAnyone tried:\r\n\r\n~~~\r\n\u003e\u003e\u003e import matplotlib\r\n\u003e\u003e\u003e len(matplotlib.rcParams)\r\n0\r\n~~~\r\n\r\nA great example of shooting yourself in the foot with multiple inheritance. Essentially, we do\r\n\r\n~~~\r\nclass RcParams(MutableMapping, dict):\r\n def __getitem__(self, key):\r\n return dict.__getitem__(self, key)\r\n\r\n def __setitem__(self, key, val):\r\n return dict.__setitem__(self, key, val)\r\n~~~\r\n\r\nbut do not reimplement `__len__`. You can work out the consequences yourself.\r\n\r\n### Proposed solution\r\n\r\nDo not inherit `RcParams` from dict, and use a private data dict instead.","author":{"url":"https://github.com/timhoffm","@type":"Person","name":"timhoffm"},"datePublished":"2018-10-20T21:37:20.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":7},"url":"https://github.com/12576/matplotlib/issues/12576"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:bc025321-31c9-8675-2e10-edf0e7afa42a |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A4E8:28D644:1E31698:280C103:6A52D88D |
| html-safe-nonce | 027d05f455c249dc00f08a1a6939ee6d69e924b6ddce39bc97fccb701211582e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNEU4OjI4RDY0NDoxRTMxNjk4OjI4MEMxMDM6NkE1MkQ4OEQiLCJ2aXNpdG9yX2lkIjoiMjM0MzUwNjI5NjQ3NTY3MDY2OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | d252dd37346fbb54db821a646b5c19a9ce6d710d944ecb49f9dd732790d368fc |
| hovercard-subject-tag | issue:372255217 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/matplotlib/matplotlib/12576/issue_layout |
| twitter:image | https://opengraph.githubassets.com/7de5fed1871786808b44466806936f6b8d52b346165ce840dafec9fb809838c6/matplotlib/matplotlib/issues/12576 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/7de5fed1871786808b44466806936f6b8d52b346165ce840dafec9fb809838c6/matplotlib/matplotlib/issues/12576 |
| og:image:alt | Bug report Anyone tried: >>> import matplotlib >>> len(matplotlib.rcParams) 0 A great example of shooting yourself in the foot with multiple inheritance. Essentially, we do class RcParams(MutableMa... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | timhoffm |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| go-import | github.com/matplotlib/matplotlib git https://github.com/matplotlib/matplotlib.git |
| octolytics-dimension-user_id | 215947 |
| octolytics-dimension-user_login | matplotlib |
| octolytics-dimension-repository_id | 1385122 |
| octolytics-dimension-repository_nwo | matplotlib/matplotlib |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1385122 |
| octolytics-dimension-repository_network_root_nwo | matplotlib/matplotlib |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 07a982c1d40157c619b364352b704c3ce66bb332 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width