Title: [ENH]: allow passing a function to `CallbackRegistry.disconnect` · Issue #23306 · matplotlib/matplotlib · GitHub
Open Graph Title: [ENH]: allow passing a function to `CallbackRegistry.disconnect` · Issue #23306 · matplotlib/matplotlib
X Title: [ENH]: allow passing a function to `CallbackRegistry.disconnect` · Issue #23306 · matplotlib/matplotlib
Description: Problem Currently to disconnect a callback in a callback registry you need to keep track of the connection id. It'd be easier to use if you could instead just pass the function to disconnect. Proposed solution Allow for the following: re...
Open Graph Description: Problem Currently to disconnect a callback in a callback registry you need to keep track of the connection id. It'd be easier to use if you could instead just pass the function to disconnect. Propo...
X Description: Problem Currently to disconnect a callback in a callback registry you need to keep track of the connection id. It'd be easier to use if you could instead just pass the function to disconnect. P...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/23306
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[ENH]: allow passing a function to `CallbackRegistry.disconnect`","articleBody":"### Problem\n\nCurrently to disconnect a callback in a callback registry you need to keep track of the connection id. It'd be easier to use if you could instead just pass the function to disconnect.\n\n### Proposed solution\n\nAllow for the following:\r\n\r\n```python\r\nreg = CallbackRegistry()\r\n\r\ndef f1():\r\n pass\r\n\r\ncid = reg.connect(\"something\", f1)\r\n\r\nreg.disconnect_func(\"something\", f1) \r\n# above is equivalent to reg.disconnect(cid)","author":{"url":"https://github.com/ianhi","@type":"Person","name":"ianhi"},"datePublished":"2022-06-20T11:47:37.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/23306/matplotlib/issues/23306"}
| 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:778392e6-a01b-5d73-25cb-f5ac0665f8bd |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9D10:4342D:131A191:1962720:6A52A35C |
| html-safe-nonce | 8c34da2f987d9bab66f894d012dd05657c4333ff2b9fd6173466aaa7beca3e60 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RDEwOjQzNDJEOjEzMUExOTE6MTk2MjcyMDo2QTUyQTM1QyIsInZpc2l0b3JfaWQiOiIzNDkxNjg2OTY4OTM2NTM4OTcyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | fb5bab068c78e40444c75026edf707eee9f32fff6bcd8acdeaf825fafaaec5d4 |
| hovercard-subject-tag | issue:1276804868 |
| 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/23306/issue_layout |
| twitter:image | https://opengraph.githubassets.com/2f21df74673ee29dc4a6ffdb24776a61e6a70c2b9dcc76528009d20977026d07/matplotlib/matplotlib/issues/23306 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/2f21df74673ee29dc4a6ffdb24776a61e6a70c2b9dcc76528009d20977026d07/matplotlib/matplotlib/issues/23306 |
| og:image:alt | Problem Currently to disconnect a callback in a callback registry you need to keep track of the connection id. It'd be easier to use if you could instead just pass the function to disconnect. Propo... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | ianhi |
| 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