Title: _wave_parameters in wave.py should be public · Issue #94991 · python/cpython · GitHub
Open Graph Title: _wave_parameters in wave.py should be public · Issue #94991 · python/cpython
X Title: _wave_parameters in wave.py should be public · Issue #94991 · python/cpython
Description: Feature or enhancement Make the named tuple _wave_parameters public. This nameed tuple defines the inputs to Wave_write.setparams which is a public method that users would want to call. To best create an input to setparams one would idea...
Open Graph Description: Feature or enhancement Make the named tuple _wave_parameters public. This nameed tuple defines the inputs to Wave_write.setparams which is a public method that users would want to call. To best cre...
X Description: Feature or enhancement Make the named tuple _wave_parameters public. This nameed tuple defines the inputs to Wave_write.setparams which is a public method that users would want to call. To best cre...
Opengraph URL: https://github.com/python/cpython/issues/94991
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"_wave_parameters in wave.py should be public","articleBody":"**Feature or enhancement**\r\n\r\nMake the named tuple [_wave_parameters](https://github.com/python/cpython/blob/main/Lib/wave.py#L89) public. This nameed tuple defines the inputs to `Wave_write.setparams` which is a public method that users would want to call. To best create an input to setparams one would ideally first make a _wave_parameters named tuple. \r\n\r\nThis is especially true in a typed environment (see https://github.com/python/typeshed/issues/8322) but I feel it would be useful for all users of the wave module.\r\n\r\n**Pitch**\r\n\r\nCurrently if one wants to call setparams in a typed setting, the only option is to use the private type:\r\n```python\r\nimport wave\r\nwith wave.open(\"test.wav\", \"wb\") as wav_file:\r\n params = wave._wave_params(\r\n nchannels=1, sampwidth=2, framerate=16_000, nframes=0, comptype=\"NONE\", compname=\"NONE\",\r\n )\r\n wav_file.setparams(params)\r\n```\r\nThere is no way to call setparams in a typed environment without using the `wave._wave_params`. If instead it was made public, all users could use the readable version of the parameters above, rather than pass in a tuple without kowing which numbers meant waht.\r\n\r\n**Previous discussion**\r\n\r\nsee https://github.com/python/typeshed/issues/8322\r\n\r\n","author":{"url":"https://github.com/f4hy","@type":"Person","name":"f4hy"},"datePublished":"2022-07-19T02:01:33Z","url":"https://github.com/python/cpython/issues/94991"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| 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:5006ba14-f701-d17e-361c-9baa2115149e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9D90:22D2A9:392049:4E88D5:6AECCA0E |
| html-safe-nonce | 80704aed0220ecdec7d16753a42a75a89de8b06acd0d12e625fdb4ebd6cb7bb3 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RDkwOjIyRDJBOTozOTIwNDk6NEU4OEQ1OjZBRUNDQTBFIiwidmlzaXRvcl9pZCI6IjY4MDgzMTg0MDQ5MTg1NjEyOTQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 781e035e99e3f17dbe2ed0751744c7a2a38969b9f373d3bf511cf90db55e241d |
| hovercard-subject-tag | issue:1308879118 |
| 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/94991/issue_layout |
| twitter:image | https://opengraph.githubassets.com/929520500be4fc88773b1190b4149272fa2b2ea90c1560a28885e2d05806d4f1/python/cpython/issues/94991 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/929520500be4fc88773b1190b4149272fa2b2ea90c1560a28885e2d05806d4f1/python/cpython/issues/94991 |
| og:image:alt | Feature or enhancement Make the named tuple _wave_parameters public. This nameed tuple defines the inputs to Wave_write.setparams which is a public method that users would want to call. To best cre... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | f4hy |
| hostname | github.com |
| expected-hostname | github.com |
| None | dc0b519c5798dc1150b88dc4c06a8b9634d0069218dc04e469970e76aad74016 |
| 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 | db139f0bf57b59bf9a8c4abb0849924d6c6ca559 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width