Title: Use (float, float) as parameter type for 2D positions by timhoffm · Pull Request #12227 · matplotlib/matplotlib · GitHub
Open Graph Title: Use (float, float) as parameter type for 2D positions by timhoffm · Pull Request #12227 · matplotlib/matplotlib
X Title: Use (float, float) as parameter type for 2D positions by timhoffm · Pull Request #12227 · matplotlib/matplotlib
Description: PR Summary As noted in #12214, we currently do not have a consistent way of defining the parameter type of 2D positions. Used formats include tuple iterable tuple of 2 floats (float, float) tuple of (float, float) While all are sort of correct, I think it's important to define the length and the element type. A fully precise definition is iterable of float of length 2 or length-2 iterable of float, which is IMO is not quite readable and scary to less experienced programmers. Therefore, I propose to use (float, float), e.g. xy : (float, float) The point *(x,y)* to annotate. This seems simple and clear enough. It concisely defines contained type and size, and does not put emphasis on tuple, which is technically too restrictive as other iterables work as well.
Open Graph Description: PR Summary As noted in #12214, we currently do not have a consistent way of defining the parameter type of 2D positions. Used formats include tuple iterable tuple of 2 floats (float, float) tuple ...
X Description: PR Summary As noted in #12214, we currently do not have a consistent way of defining the parameter type of 2D positions. Used formats include tuple iterable tuple of 2 floats (float, float) tuple ...
Opengraph URL: https://github.com/matplotlib/matplotlib/pull/12227
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:04344f58-4abb-d938-d810-93ba3578ded2 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | E708:1F08C5:38D7C3D:4E7C199:6A54BAFB |
| html-safe-nonce | ec0e4a642a5c7d1e1c6ee8e2104f113e64c7974f4adeed9b90bf150fc7854bbe |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNzA4OjFGMDhDNTozOEQ3QzNEOjRFN0MxOTk6NkE1NEJBRkIiLCJ2aXNpdG9yX2lkIjoiODcyNDc0NDYxOTI0ODg5MjY2NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | b0137912bd03d75d408e32ce1294babf76be2f97ff5ba343fb7d5865b8654711 |
| hovercard-subject-tag | pull_request:217501193 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,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/matplotlib/matplotlib/pull/12227/files |
| twitter:image | https://avatars.githubusercontent.com/u/2836374?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/2836374?s=400&v=4 |
| og:image:alt | PR Summary As noted in #12214, we currently do not have a consistent way of defining the parameter type of 2D positions. Used formats include tuple iterable tuple of 2 floats (float, float) tuple ... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| diff-view | unified |
| 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 | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 69f9664dd5e7a82ba8ab1b4cb7f5a2f09333ab38 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width