On 11 August 2018 at 01:29, Eric V. Smith wrote:
> On 8/10/2018 7:01 PM, Neil Girdhar wrote:
>
>> [...]
>
> [...]
>
>> sequence would simply inherit from collections.abc.Sequence and implement
>> the two methods __len__ and __getitme__.
>>
>
> Unless I'm misunderstanding you, this falls in to the
My only motivation for this idea is so that I can forget about namedtuple.
Thinking about it again today, I withdraw my suggestion until I one day see
a need for it.
On Fri, Aug 10, 2018 at 10:14 PM Eric V. Smith wrote:
> On 8/10/2018 7:01 PM, Neil Girdhar wrote:
> > It would be nice if dataclas
On 8/10/2018 7:01 PM, Neil Girdhar wrote:
It would be nice if dataclasses
(https://docs.python.org/3/library/dataclasses.html#dataclasses.dataclass)
had an option to make them a sequence. This would make
dataclass(frozen=True, order=True, sequence=True)
an optionally-typed version of namedtu
On Fri, Aug 10, 2018 at 04:01:59PM -0700, Neil Girdhar wrote:
> It would be nice if dataclasses
> (https://docs.python.org/3/library/dataclasses.html#dataclasses.dataclass)
> had an option to make them a sequence.
Do you have a use-case or reason for this other than "it would be nice"?
Nice in