[Python-ideas] socket module: plain stuples vs named tuples
Chris Barker
chris.barker at noaa.gov
Wed Jul 5 14:55:20 EDT 2017
On Mon, Jun 19, 2017 at 8:04 PM, Nick Coghlan <ncoghlan at gmail.com> wrote:
> As context for anyone not familiar with the time module precedent that
> Guido mentioned, we have a C level `PyStructSequence` that provides
> some of the most essential namedtuple features, but not all of them:
> https://github.com/python/cpython/blob/master/Objects/structseq.c
>
> So there's potentially a case to be made for:
>
> 1. Including the struct sequence header from "Python.h" and making it
> part of the stable ABI
> 2. Documenting it in the C API reference
>
+1 -- I was just thinking this morning that a C-level named tuple would be
nice.
And certainly better than re-implementing it in various places it is needed.
Would there be any benefit in making a C implementation available from
Python?
-CHB
--
Christopher Barker, Ph.D.
Oceanographer
Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chris.Barker at noaa.gov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20170705/a5c03d89/attachment.html>
More information about the Python-ideas
mailing list