| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
This namedtuple is the public interface for Wave_write.setparams, making this private does not allow users to create an input that is typechecked to Wave_write.setparams. Is there a reason to want to hide this from users to make it less readable for how to call Wave_write.setparams ?
Sorry, something went wrong.
|
Most changes to Python require a NEWS entry. Please add it using the blurb_it web app or the blurb command-line tool. |
Sorry, something went wrong.
|
Hi, this seams very reasonable and I think it should be merged in python! I created a small drop-in replacement for stdlib wave: newwave, available on pypi. I added this PR to that package, thanks!! But I also added wave.write() as 'syntactic sugar' on top of `wave.open(..., 'wb'): # Using the convenience function
with newwave.write('output.wav', channels=2, sampwidth=2, framerate=44100) as w:
w.writeframes(audio_data)
That is even easier!! What do you think? |
Sorry, something went wrong.
|
This could go together with adding a non-positional format attribute, as needed by #60729.
I wouldn't mind this in wave.Wave_write.__init__ itself. |
Sorry, something went wrong.
|
This PR is stale because it has been open for 30 days with no activity. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
This namedtuple is the public interface for Wave_write.setparams, making this private does not allow users to create an input that is typechecked to Wave_write.setparams.
If this were public users could call with more readable code such as:
rather than the less readable
This is even worse in a typed environment where the private type of wave._wave_params is the only way to call setparams which use of private values from the stdlib should be avoided.