Title: Annotation-based syntax for ctypes functions · Issue #104532 · python/cpython · GitHub
Open Graph Title: Annotation-based syntax for ctypes functions · Issue #104532 · python/cpython
X Title: Annotation-based syntax for ctypes functions · Issue #104532 · python/cpython
Description: Turn this: libm = ctypes.CDLL('libm.so') pow = libm.pow pow.restype = ctypes.c_double pow.argtypes = (ctypes.c_double, ctypes, c_double) into this: libm = ctypes.CDLL('libm.so') @libm def pow(x : ctypes.c_double, y : ctypes.c_double) -> ...
Open Graph Description: Turn this: libm = ctypes.CDLL('libm.so') pow = libm.pow pow.restype = ctypes.c_double pow.argtypes = (ctypes.c_double, ctypes, c_double) into this: libm = ctypes.CDLL('libm.so') @libm def pow(x : c...
X Description: Turn this: libm = ctypes.CDLL('libm.so') pow = libm.pow pow.restype = ctypes.c_double pow.argtypes = (ctypes.c_double, ctypes, c_double) into this: libm = ctypes.CDLL('libm.so') @li...
Opengraph URL: https://github.com/python/cpython/issues/104532
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Annotation-based syntax for ctypes functions","articleBody":"Turn this:\r\n```python\r\nlibm = ctypes.CDLL('libm.so')\r\npow = libm.pow\r\npow.restype = ctypes.c_double\r\npow.argtypes = (ctypes.c_double, ctypes, c_double)\r\n```\r\n\r\ninto this:\r\n```python\r\nlibm = ctypes.CDLL('libm.so')\r\n\r\n@libm\r\ndef pow(x : ctypes.c_double, y : ctypes.c_double) -> c_double:\r\n pass\r\n```\r\n\r\nReceived some good feedback on https://discuss.python.org/t/annotation-based-sugar-for-ctypes/26579\r\nWorking on implementation.","author":{"url":"https://github.com/orent","@type":"Person","name":"orent"},"datePublished":"2023-05-16T06:08:05Z","url":"https://github.com/python/cpython/issues/104532"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| 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:9a6eecc2-7f9f-da40-975f-a1b84a010145 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E5F8:3F7946:28FB561:3801710:6B004F06 |
| html-safe-nonce | a20db9718990933f41495951b62fac7fa76e71326d195f2dd11014af964cacbc |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNUY4OjNGNzk0NjoyOEZCNTYxOjM4MDE3MTA6NkIwMDRGMDYiLCJ2aXNpdG9yX2lkIjoiNzY0NjgyMDA1OTc1NDU0ODk5OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | d13dbf7bdbe7d02f3090457534bd7771b8ab03a9319400223760cffc30e80837 |
| hovercard-subject-tag | issue:1711304258 |
| 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/python/cpython/104532/issue_layout |
| twitter:image | https://opengraph.githubassets.com/82dfd9c182232cc559ae5179a860ccb23f216780d5013333766af8faae92c329/python/cpython/issues/104532 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/82dfd9c182232cc559ae5179a860ccb23f216780d5013333766af8faae92c329/python/cpython/issues/104532 |
| og:image:alt | Turn this: libm = ctypes.CDLL('libm.so') pow = libm.pow pow.restype = ctypes.c_double pow.argtypes = (ctypes.c_double, ctypes, c_double) into this: libm = ctypes.CDLL('libm.so') @libm def pow(x : c... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | orent |
| hostname | github.com |
| expected-hostname | github.com |
| None | f9517bf360d46638a1e5e7daee7158842fe5ef43c9000afa0e127564a7c2f39b |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| 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 | b27c5dde30676028abd5c5fc53ce5c9b625f8281 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width