I feel like this proposal is not quite right, but maybe the idea will provoke
some thoughts about something similar that -would- be right.
The idea first came to me upon realizing that since `namedtuple` classes have
no special base class beyond `tuple`, there should be some way of identifying
This is the kernel of a really useful idea, IMO. In fact, I already
proposed something related to this-- unification of dict-making APIs-- back
in May:
https://mail.python.org/pipermail/python-ideas/2019-May/056491.html
But I like the Struct ABC approach you've suggested, too.
---
Ricky.
"I've
On Wed, Oct 16, 2019 at 05:27:31PM -, Steve Jorgensen wrote:
> I feel like this proposal is not quite right, but maybe the idea will provoke
> some thoughts about something similar that -would- be right.
>
> The idea first came to me upon realizing that since `namedtuple`
> classes have no
On 2019-10-16 21:48, Steven D'Aprano wrote:
On Wed, Oct 16, 2019 at 05:27:31PM -, Steve Jorgensen wrote:
I feel like this proposal is not quite right, but maybe the idea will provoke
some thoughts about something similar that -would- be right.
The idea first came to me upon realizing th
On Oct 16, 2019, at 13:48, Steven D'Aprano wrote:
>
> I don't think that "structural" is the word you are looking for. Lists
> and tuples and sets are all structural. That's why they're called "data
> structures".
I think what he’s looking for is the adjective that goes with the quasi-word
“s
> Maybe borrowing a word from a different language—record or datatype or
something—would avoid that problem?
Hmm, I don't think "record" would work. The terms "record", "struct", and
"tuple" are far too synonymous with one another (
https://en.wikipedia.org/wiki/Record_(computer_science)). This te
Andrew Barnert via Python-ideas wrote:
I think what he’s looking for is the adjective that goes with the quasi-word
“struct” as used in C, and in Python’s ctypes and C API. The type name
“Struct” isn’t bad here, but the adjective “structural” has to many other
connotations.
Structy type? Struct
At long last, Steven D'Aprano and I have pushed a second draft of PEP 584
(dictionary addition):
https://www.python.org/dev/peps/pep-0584/
The accompanying reference implementation is on GitHub:
https://github.com/brandtbucher/cpython/tree/addiction
This new draft incorporates much of the feed
On Oct 16, 2019, at 22:13, Kyle Stanley wrote:
>
> > Maybe borrowing a word from a different language—record or datatype or
> > something—would avoid that problem?
>
> Hmm, I don't think "record" would work. The terms "record", "struct", and
> "tuple" are far too synonymous with one another
>