[issue18615] sndhdr.whathdr could return a namedtuple

Serhiy Storchaka report at bugs.python.org
Tue Jul 15 13:24:01 CEST 2014


Serhiy Storchaka added the comment:

If Raymond found this feature helpful, I have no strong objection.

Only several comments:

* A named tuple is documented as having fields: type, sampling_rate, channels, frames, bits_per_sample.

* User tests in existing code return tuples. what() and whathdr() should convert result to named tuple. Changing standard tests after this is redundant.

* If we guarantee pickleability, we will stick with nametuple's name. It is not more implementation detail which we can change in any moment, all future versions of Python should have sndhdr._SndHeaders. Is it good to use underscored name?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue18615>
_______________________________________


More information about the Python-bugs-list mailing list