[issue18615] sndhdr.whathdr could return a namedtuple

2014-10-09 Thread Claudiu Popa
Changes by Claudiu Popa pcmantic...@gmail.com: -- stage: patch review - commit review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18615 ___ ___

[issue18615] sndhdr.whathdr could return a namedtuple

2014-10-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset ef72142eb8a2 by R David Murray in branch 'default': #18615: Make sndhdr return namedtuples. https://hg.python.org/cpython/rev/ef72142eb8a2 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org

[issue18615] sndhdr.whathdr could return a namedtuple

2014-10-09 Thread R. David Murray
R. David Murray added the comment: Committed. Thanks, Claudiu. -- resolution: - fixed stage: commit review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18615

[issue18615] sndhdr.whathdr could return a namedtuple

2014-09-01 Thread Claudiu Popa
Claudiu Popa added the comment: Serhiy, is there anything left to do for this patch? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18615 ___

[issue18615] sndhdr.whathdr could return a namedtuple

2014-09-01 Thread Raymond Hettinger
Raymond Hettinger added the comment: The patch looks good. I'll apply it shortly. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18615 ___ ___

[issue18615] sndhdr.whathdr could return a namedtuple

2014-08-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The documentation says: When these functions are able to determine what type of sound data is stored in a file, they return a :func:`~collections.namedtuple`, containing five attributes: (``type``, ``sampling_rate``, ``channels``, ``frames``,

[issue18615] sndhdr.whathdr could return a namedtuple

2014-08-06 Thread Claudiu Popa
Claudiu Popa added the comment: Thanks. -- Added file: http://bugs.python.org/file36290/issue18615_2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18615 ___

[issue18615] sndhdr.whathdr could return a namedtuple

2014-07-15 Thread Claudiu Popa
Claudiu Popa added the comment: Serhiy, if there's no actual gain in changing this, should we close the issue? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18615 ___

[issue18615] sndhdr.whathdr could return a namedtuple

2014-07-15 Thread Raymond Hettinger
Raymond Hettinger added the comment: This is a reasonable improvement. It was what named tuples were intended to be used for. -- assignee: - rhettinger nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18615

[issue18615] sndhdr.whathdr could return a namedtuple

2014-07-15 Thread Serhiy Storchaka
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

[issue18615] sndhdr.whathdr could return a namedtuple

2014-07-15 Thread Claudiu Popa
Claudiu Popa added the comment: Thanks, Serhiy, for the review. Here's the updated version. -- Added file: http://bugs.python.org/file35956/issue18615.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18615

[issue18615] sndhdr.whathdr could return a namedtuple

2014-07-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: A namedtuple is still wrongly documented. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18615 ___ ___

[issue18615] sndhdr.whathdr could return a namedtuple

2014-07-15 Thread Claudiu Popa
Claudiu Popa added the comment: Here's a new version. It adds versionchanged directive for 'whathdr' and 'what'. Serhiy, I hope that now I got right the documentation of the return type. I didn't understand at first what was wrong. -- Added file:

[issue18615] sndhdr.whathdr could return a namedtuple

2014-05-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Personally I doubt it is a good idea to convert any tuple to named tuple. There are downsides: this increases memory usage and decreases performance; this changes pickled data and makes it backward incompatible (and even worse with other serialization

[issue18615] sndhdr.whathdr could return a namedtuple

2014-05-13 Thread Claudiu.Popa
Claudiu.Popa added the comment: But it improves the API. It's much nicer to actually access the values returned by sndhdr as f.type, f.sampling_rate, f.channels than f[0], f[1], f[2]. You do have a point though. Would it be more acceptable if we'll provide a new function which returns a

[issue18615] sndhdr.whathdr could return a namedtuple

2014-04-27 Thread Claudiu.Popa
Claudiu.Popa added the comment: Ping. :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18615 ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue18615] sndhdr.whathdr could return a namedtuple

2014-03-17 Thread Claudiu.Popa
Changes by Claudiu.Popa pcmantic...@gmail.com: -- versions: +Python 3.5 -Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18615 ___ ___

[issue18615] sndhdr.whathdr could return a namedtuple

2013-11-19 Thread Claudiu.Popa
Claudiu.Popa added the comment: Ping, please review. I guess it is minimal enough to get into 3.4. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18615 ___

[issue18615] sndhdr.whathdr could return a namedtuple

2013-09-04 Thread Claudiu.Popa
Changes by Claudiu.Popa pcmantic...@gmail.com: -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18615 ___ ___

[issue18615] sndhdr.whathdr could return a namedtuple

2013-09-04 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +r.david.murray stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18615 ___

[issue18615] sndhdr.whathdr could return a namedtuple

2013-08-01 Thread Claudiu.Popa
New submission from Claudiu.Popa: Both sndhdr.whathdr an sndhdr.what returns a tuple with various information, while it could return a namedtuple. I attached a patched for this, with tests as well. -- components: Library (Lib) files: sndhdr.patch keywords: patch messages: 194080 nosy: