2016-11-30 8:11 GMT-08:00 Guido van Rossum :
> On Wed, Nov 30, 2016 at 7:09 AM, Ethan Furman wrote:
>
>> On 11/30/2016 02:32 AM, Jelte Fennema wrote:
>>
>> It would be nice to have a supported way to add defaults to namedtuple,
>>> so the slightly hacky
On 30 November 2016 at 13:09, Ethan Furman wrote:
> But even more readable than that is using the NamedTuple class from my aenum
> [3] library (and on SO as [3]):
>
> --> from aenum import NamedTuple
> --> class Node(NamedTuple):
> --> val = 0
> --> left = 1, 'previous
On Wed, Nov 30, 2016 at 7:09 AM, Ethan Furman wrote:
> On 11/30/2016 02:32 AM, Jelte Fennema wrote:
>
> It would be nice to have a supported way to add defaults to namedtuple,
>> so the slightly hacky solution here does not have to be used:
>>
On 11/30/2016 02:32 AM, Jelte Fennema wrote:
It would be nice to have a supported way to add defaults to namedtuple,
so the slightly hacky solution here does not have to be used:
http://stackoverflow.com/a/18348004/2570866
Actually, the solution right below it is better [1]:
--> from
It would be nice to have a supported way to add defaults to namedtuple, so
the slightly hacky solution here does not have to be
used: http://stackoverflow.com/a/18348004/2570866
Jelte
___
Python-ideas mailing list
Python-ideas@python.org