[Python-ideas] Add recordlcass to collections module
Steven D'Aprano
steve at pearwood.info
Sat Sep 1 20:18:30 EDT 2018
On Sat, Sep 01, 2018 at 05:10:49PM +0100, Jonathan Fine wrote:
> Hi Martin
>
> Summary: Thank you. Your suggestion has good points. I suggest to
> advance it (i) provide a pure Python implementation of namedlist, and
> (ii) ask that the Python docs for namedtuple provide a link to
> namedlist.
Before Martin (and you) get carried away doing these things, there's a
lot more to do first.
For starters, how about answering the questions I asked? Recapping:
- The package author describes this as a record class, not a list,
and it doesn't seem to support any list operations, so why do you
and Martin want to change the name to namedlist?
- What would it mean to insert, sort, append etc named items in a
list? When would you want to do it?
- Have you asked the author what he thinks about putting it in the
standard library?
(The author calls it a "proof of concept", and it is version 0.5.
That doesn't sound like the author considers this a mature product.)
- How is this different from data classes?
If the answer is that this supports iteration, why not add iteration to
data classes? See this thread:
https://mail.python.org/pipermail/python-ideas/2018-August/052683.html
[...]
> 1. Focus on getting and meeting the expressed needs of users. A link
> from the Python docs will help here.
It's not the job of the Python docs to link to every and any third-party
package that somebody might find useful.
It might -- perhaps -- make sense for the docs to mention or link to
third-party libraries such as numpy which are widely recognised as "best
of breed". (Not that numpy needs a link from the std lib.) But in
general it is hardly fair for us to single out some arbitrary third-
party libraries for official recognition while other libraries, perhaps
better or more worthy, are ignored.
Put yourself in the shoes of somebody who has worked hard to get a
package into a mature state, and then the Python docs start linking to a
competing alpha-quality package just because by pure chance, that was
the package that got mentioned on Python-Ideas first.
--
Steve
More information about the Python-ideas
mailing list